NemoPS Posted December 7, 2016 Share Posted December 7, 2016 Hey everyone!If you want the price on the product page to update when changing quantity, here is a quick tut about it!http://nemops.com/update-price-on-quantity-change-in-prestashop-1-6/#.WEf5A_nx6UkFabio Link to comment Share on other sites More sharing options...
mnsh Posted April 11, 2017 Share Posted April 11, 2017 Hi Fabio, I can't make it work, unfortunately... here is a code if (priceWithDiscountsDisplay > 0) { if(findSpecificPrice()){ $('#our_price_display, #our_price_display2').text(findSpecificPrice()).trigger('change'); } else{ $('#our_price_display, #our_price_display2').text(formatCurrency(priceWithDiscountsDisplay, currencyFormat, currencySign, currencyBlank)).trigger('change'); $('#our_price_display, #our_price_display2').text(formatCurrency(priceWithDiscountsDisplay * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)).trigger('change'); } } else { $('#our_price_display, #our_price_display2').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank)).trigger('change'); } Please advise Link to comment Share on other sites More sharing options...
NemoPS Posted April 12, 2017 Author Share Posted April 12, 2017 Are you using a custom template? Link to comment Share on other sites More sharing options...
mnsh Posted April 12, 2017 Share Posted April 12, 2017 A bit modified - a price located in two places for customer's convenience Link to comment Share on other sites More sharing options...
NemoPS Posted April 13, 2017 Author Share Posted April 13, 2017 Any javascript error? DId you clear cache? Link to comment Share on other sites More sharing options...
mnsh Posted April 13, 2017 Share Posted April 13, 2017 cash cleared, no js errors Link to comment Share on other sites More sharing options...
sooroos Posted July 6, 2017 Share Posted July 6, 2017 P.S. 1.6.1.14 like mnsh said there is no effect after changing the product.js, Cache cleared, no js error Link to comment Share on other sites More sharing options...
rahulteja Posted September 21, 2017 Share Posted September 21, 2017 Could you please help to clear this issue ? unable to update price after increasing quantity. Link to comment Share on other sites More sharing options...
Angrywolfstudio Posted February 6, 2018 Share Posted February 6, 2018 Hey. I will dig out the topic. Helps solve the same effect in PS.1.7? Sorry for my English Link to comment Share on other sites More sharing options...
lucascatani Posted August 9, 2018 Share Posted August 9, 2018 (edited) Hi @NemoPS This part dont works for me. I use prestashop 1.6.1.20 and default template. Can you help me? $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)).trigger('change'); product.js Edited August 9, 2018 by lucascatani Add product.js to the post (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted August 11, 2018 Author Share Posted August 11, 2018 DO you get any js error on the page? Link to comment Share on other sites More sharing options...
lucascatani Posted August 16, 2018 Share Posted August 16, 2018 On 8/11/2018 at 9:42 AM, NemoPS said: DO you get any js error on the page? No errors.... Link to comment Share on other sites More sharing options...
NemoPS Posted August 23, 2018 Author Share Posted August 23, 2018 It's hard to tell what's going on without seeing the actual template. I would suggest going through it line by line and printing out the value, so see where it runs and where it doesn't Link to comment Share on other sites More sharing options...
William K. Posted October 5, 2018 Share Posted October 5, 2018 Hello Nemo, Thank you for this. Unfortunatly, your changes don't work for a product with a simple product with no combination. How are we supposed to do this with the base product price ? Link to comment Share on other sites More sharing options...
NemoPS Posted October 8, 2018 Author Share Posted October 8, 2018 William, that should actually be easier, you can simply add a script tag in the template that reads the onchange event of the quantity box, and multiplies the price by the value it contains Link to comment Share on other sites More sharing options...
William K. Posted October 10, 2018 Share Posted October 10, 2018 Hey thanks for the feedback. The real issue was for products with no combination AND a quantity discount (but no discount for the product when the quantity wanted is 1). I made the changes for this case. I also show the reduction percent or amount when the quantity triggers it, and the crossed old price. I someone needs it, I can explain what I did, I don't think my code is optimised and it require the option "Display discounted price" for the discount board to be toggle but still if it can help, feel free to ask. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now