// Fix price displaying on product page when using an amount reduction

This commit is contained in:
rGaillard
2012-05-21 15:52:58 +00:00
parent d29ad8a556
commit f3660840d5
+1 -2
View File
@@ -341,7 +341,7 @@ function updateDisplay()
else else
$('#not_impacted_by_discount').hide(); $('#not_impacted_by_discount').hide();
var taxExclPrice = (display_specific_price ? (specific_currency ? display_specific_price : display_specific_price * currencyRate) : priceTaxExclWithoutGroupReduction) + selectedCombination['price'] * currencyRate; var taxExclPrice = (display_specific_price && display_specific_price >= 0 ? (specific_currency ? display_specific_price : display_specific_price * currencyRate) : priceTaxExclWithoutGroupReduction) + selectedCombination['price'] * currencyRate;
if (display_specific_price) if (display_specific_price)
productPriceWithoutReduction = priceTaxExclWithoutGroupReduction + selectedCombination['price'] * currencyRate; // Need to be global => no var productPriceWithoutReduction = priceTaxExclWithoutGroupReduction + selectedCombination['price'] * currencyRate; // Need to be global => no var
@@ -374,7 +374,6 @@ function updateDisplay()
if (product_specific_price.reduction_price && (displayPrice || noTaxForThisProduct)) if (product_specific_price.reduction_price && (displayPrice || noTaxForThisProduct))
reduction = ps_round(reduction / tax, 6); reduction = ps_round(reduction / tax, 6);
} }
productPriceWithoutReduction = productPrice * group_reduction; productPriceWithoutReduction = productPrice * group_reduction;
productPrice -= reduction; productPrice -= reduction;