Client wants prices shown with both VAT and ex-VAT on product info page. I can do that with a simple calculation at the time of display, but when a Specials price is in force, the calculation returns 0.
So where does the display of the special price come from..or even better, how do I overcome this problem?
This is my section of code from tpl_product_info_display.php which displays the base price with and without tax:
Code:
<?php
//tax inclusive price
$withtax=zen_get_products_display_price((int)$_GET['products_id']);
$withtax = substr($withtax, 7); //removes £ symbol
$withtax=ereg_replace(',','',$withtax);//removes commas from thousands
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']).' (£';
printf ("%01.2f", round($withtax/1.175,2));
echo ' exc VAT)';
?>
Bookmarks