Originally Posted by
mc12345678
How does 9.09 come into play? There seems to be a lot missing from the description of the setup including an example of this issue. What other plugin(s) are installed?
Does the same issue appear when temporarily switching to the default template?
Apologies for not being entirely clear.
$9.09 is $10 missing the 10% tax component (sorry, I forgot to mention the tax amount). So the product price is $50 with a $10 reduction, making it $40. The 'Save $x.xx' part should show 'Save $10', but it instead shows 'Save $9.09'. I've attached an image as an example. $11.82 should be $13 (11.82 + 10% = 13).
After looking into the problem more since posting this thread, I've discovered that the issue stems from the custom template I have installed, which has altered the framework of pricing functions. I can't remove the pricing alterations the template has made, as the template is based on the alterations. Following is the functions snippet:
PHP Code:
// Price Functions Improvement
function pt_get_discount_amount($products_id) {
global $db, $currencies;
$show_sale_discount = '';
$display_normal_price = zen_get_products_base_price($products_id);
$display_special_price = zen_get_products_special_price($products_id, true);
$display_sale_price = zen_get_products_special_price($products_id, false);
if (SHOW_SALE_DISCOUNT_STATUS == '1' and ($display_special_price != 0 or $display_sale_price != 0)) {
if ($display_sale_price) {
if (SHOW_SALE_DISCOUNT == 1) {
if ($display_normal_price != 0) {
$show_discount_amount = number_format(100 - (($display_sale_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);
} else {
$show_discount_amount = '';
}
$show_sale_discount = $show_discount_amount . PRODUCT_PRICE_DISCOUNT_PERCENTAGE;
} else {
$show_sale_discount = $currencies->display_price(($display_normal_price - $display_sale_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT;
}
} else {
if (SHOW_SALE_DISCOUNT == 1) {
$show_sale_discount = number_format(100 - (($display_special_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS) . PRODUCT_PRICE_DISCOUNT_PERCENTAGE;
} else {
$show_sale_discount = $currencies->display_price(($display_normal_price - $display_special_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT;
}
}
}
return $show_sale_discount;
}
I've compared the above coding to what's in functions_prices.php, but I can't work out what needs to be altered/added/removed. Normally I would be bringing this up with the template author, and have sent an email for his help, but due to personal problems, he is unavailable for the time.
Bookmarks