Jump to content
hari44

Update price on quantity change in PrestaShop 1.7

Recommended Posts

Hello,

Same request here on 1.7.5.1.

On cart details we have that working, changing quantity updates price, but on product page that doesn't work the same way...

Any help appreciated.

 

Best regards

Share this post


Link to post
Share on other sites

Hello, in this case, we wanted to recalculate a price field everytime the quantity varies, we included the following JavaScript code within the custom.js file in the theme designed fot the online shop in PrestaShop. If you have any questions you can contact us https://www.digitaldot.es/soporte-prestashop

 

prestashop.on('updatedProduct', calculate);
 
 function calculate (){
//operation
}
 
Regards
 
 
  • Thanks 1

Share this post


Link to post
Share on other sites
On 4/16/2019 at 7:41 PM, digitalDot said:

Hello, i added this code at the bottom of custom.js file but nothing happens.

prestashop.on('updatedProduct', calculate);

 

 function calculate (){
//operation
}
 
Do i have to do anything else?
 
Thank you

 

On 4/16/2019 at 7:41 PM, digitalDot said:
 
On 4/16/2019 at 7:41 PM, digitalDot said:

Hello, in this case, we wanted to recalculate a price field everytime the quantity varies, we included the following JavaScript code within the custom.js file in the theme designed fot the online shop in PrestaShop. If you have any questions you can contact us https://www.digitaldot.es/soporte-prestashop

 

prestashop.on('updatedProduct', calculate);
 
 function calculate (){
//operation
}
 
Regards
 
 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More