Jump to content

Prestashop 1.5.3.1 Quantity Discount Show/hide Problem


Recommended Posts

The current quantity discount displayed on the product page is limited to one row only where there should actually be more when you have multiple quantity discount. The jQuery code is using

ID for show hide. So it affect only 1 ID when the show function is executed.

Change it to use class instead for show/hide.

 

Here's the fix.

 

Open product.js in js folder of your theme directory

 

Edit

 

 

 

if ($('#quantityDiscount_'+combination).length != 0) {

$('#quantityDiscount_'+combination).show();

$('#noQuantityDiscount').hide();

} else

$('#noQuantityDiscount').show();

 

Change it to

 

 

if ($('.quantityDiscount_'+combination).length != 0) {

$('.quantityDiscount_'+combination).show();

$('.noQuantityDiscount').hide();

} else

$('#noQuantityDiscount').show();

 

 

Open product.tpl in your theme folder

Edit

 

<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}">

 

Change it to

 

<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">

Link to comment
Share on other sites

×
×
  • Create New...