From 2117c8935295d54c83b1efbc1c97150c4f1e6d32 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 13 Nov 2013 11:04:13 +0100 Subject: [PATCH] [-] FO : FixBug #PSCFV-9291 - Ecotax increment display price in product combination --- themes/default/js/product.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/themes/default/js/product.js b/themes/default/js/product.js index b38b63e38..0d93b0ff0 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -375,8 +375,16 @@ function updateDisplay() productPriceDisplay = ps_round(productPriceDisplay * group_reduction, 2); var ecotaxAmount = !displayPrice ? ps_round(selectedCombination['ecotax'] * (1 + ecotaxTax_rate / 100), 2) : selectedCombination['ecotax']; - productPriceDisplay += ecotaxAmount; - productPriceWithoutReductionDisplay += ecotaxAmount; + + if (ecotaxAmount != default_eco_tax) + productPriceDisplay += ecotaxAmount - default_eco_tax; + else + productPriceDisplay += ecotaxAmount; + + if (ecotaxAmount != default_eco_tax) + productPriceWithoutReductionDisplay += ecotaxAmount - default_eco_tax; + else + productPriceWithoutReductionDisplay += ecotaxAmount; var our_price = ''; if (productPriceDisplay > 0) {