// Fix price displaying on product page when using an amount reduction
This commit is contained in:
@@ -340,8 +340,8 @@ function updateDisplay()
|
|||||||
$('#not_impacted_by_discount').show();
|
$('#not_impacted_by_discount').show();
|
||||||
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;
|
||||||
@@ -716,4 +715,4 @@ function checkUrl()
|
|||||||
window.location = url.substring(0, url.indexOf('#'));
|
window.location = url.substring(0, url.indexOf('#'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user