From 5a82de41e54c76a9db16ecd1040473e2b9940f46 Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 22 Nov 2011 13:24:19 +0000 Subject: [PATCH] // Apply fix on reduction price from 1.4 to new system on 1.5 --- themes/prestashop/js/product.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/prestashop/js/product.js b/themes/prestashop/js/product.js index 9fde23617..19d67ceae 100644 --- a/themes/prestashop/js/product.js +++ b/themes/prestashop/js/product.js @@ -347,13 +347,14 @@ function updateDisplay() var reduction = 0; if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent) { - reduction_price = (specific_currency ? reduction_price : reduction_price * currencyRate); - reduction = productPrice * (parseFloat(reduction_percent) / 100) + reduction_price; - if (reduction_price && (displayPrice || noTaxForThisProduct)) + selectedCombination['specific_price'].reduction_price = (specific_currency ? selectedCombination['specific_price'].reduction_price : selectedCombination['specific_price'].reduction_price * currencyRate); + reduction = productPrice * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + selectedCombination['specific_price'].reduction_price; + if (selectedCombination['specific_price'].reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6); } else if (product_specific_price.reduction_price || product_specific_price.reduction_percent) { + product_specific_price.reduction_price = (specific_currency ? product_specific_price.reduction_price : product_specific_price.reduction_price * currencyRate); reduction = productPrice * (parseFloat(product_specific_price.reduction_percent) / 100) + product_specific_price.reduction_price; if (product_specific_price.reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6);