Hello, I am using prestashop 1.6.1.5 and I have troubles when using promotion on the products. The product page shows prices with and without VAT for all products with attributes as well. I had to chance some codes in product.tpl as well as in product.js. Everything works fine but when I add promotion to a product, the price without VAT is showing the correct amount. I know that I need to change or add something in product.js. Please enclosed what I have now
if (priceWithDiscountsDisplay > 0) { if(findSpecificPrice()){ $('#our_price_display').text(findSpecificPrice()).trigger('change'); } else{ $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay, currencyFormat, currencySign, currencyBlank)).trigger('change'); $('#our_price_displaybezdane').text(formatCurrency(basePriceWithoutTax * currencyRate, currencyFormat, currencySign, currencyBlank)); } } else { $('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank)).trigger('change'); } // If the calculated price (after all discounts) is different than the base price // we show the old price striked through if (priceWithDiscountsDisplay.toFixed(2) != basePriceDisplay.toFixed(2)) { $('#old_price_display span.price').text(formatCurrency(basePriceDisplay, currencyFormat, currencySign, currencyBlank)); $('#old_price, #old_price_display, #old_price_display_taxes').removeClass('hidden').show(); // Then if it's not only a group reduction we display the discount in red box if (priceWithDiscountsWithoutTax != priceWithGroupReductionWithoutTax) { if (combination.specific_price.reduction_type == 'amount') { $('#reduction_amount_display').html('-' + formatCurrency(discountValue, currencyFormat, currencySign, currencyBlank)); $('#reduction_amount').show(); } else { var toFix = 2; if ((parseFloat(discountPercentage).toFixed(2) - parseFloat(discountPercentage).toFixed(0)) == 0) toFix = 0; $('#reduction_percent_display').html('-' + parseFloat(discountPercentage).toFixed(toFix) + '%'); $('#reduction_percent').show(); } }