Jump to content

upgrade price when you change the amount


Recommended Posts

hello, please I need to change the product page this function. Basically I would like that when the customer is on the product page and increase the amount of products (via the + and - buttons placed next to the quantity) the price will update automatically.
 
Before posting I followed this guide http://www.prestashop.com/forums/topic/239317-change-quantity-with-buttons/ and everything works, but putting this 
 
$(document).ready(function(){
$("#quantity_wanted").change(function(){
    $("#our_price_display").html(currencySign+" "+(productPrice*$("#quantity_wanted").val()));
});
});
 
the price does not change, remains the same as I do?
 
 
thanks

 

Link to comment
Share on other sites

  • 1 month later...

Hi Lui, Jan,

can you:

1)  add a link to your sites, to check if maybe default field names are renamed in the theme used and therefore the javascript isn't working

2) and mention which versions you use

 

3) Also check: if you add a different amount by just adding a new number in the amount/quantity input field and then click add to cart, does it work? (If not, then the method above will not work anyway)

 

pascal

Link to comment
Share on other sites

Hi Pascal,

 

Thank you for your input!

 

The provided code by lonlywolf got the job done for 50%, the other code was incomplete.

 

50% because everything works besides that most important thing!: the product price discounts are not calculated in the final price. And the product discounts were the only reason that I wanted this feature.

 

Thanks again, if you have a solution please post it in the following topic: http://www.prestashop.com/forums/topic/239317-change-quantity-with-buttons/

Link to comment
Share on other sites

Bedankt voor je interesse Pascal, Ik ben ook Nederlands :) Leuk land btw; Thailand. We zitten op het Engelstalige forumgedeelte, dus even verder in 't Engels:

 

We (me and my companions) like to keep the shop private until our launch. The code of the product page is almost stock-code (product.tpl / product.js), so if you could provide us the (javascript?) code for the right pricing display calculation with the discounts caclulated, then that would be great ! Oftewel, we zouden dat zéér op prijsstellen !!

Link to comment
Share on other sites

×
×
  • Create New...