Hi, I had a very easy solution for showing prices with and without tax in my 1.5.5 shop.
I changed the function display_price in currencies.php from:
return $this->format(zen_add_tax($product_price, $product_tax) * $quantity);
to
return $this->format(zen_add_tax($product_price, $product_tax) *$quantity).'<br><font size=1> (€ '. number_format(round(($product_price * $quantity),4),4,',','.').' ex BTW )</font>'
This shows the price everywhere with and without tax, like this:
€ 0,73
(€ 0,6061 ex BTW)
Now I'm installing a new shop version 1.5.7 and included the same code.
This works everywhere, except in tpl_product_info_display. There the price including tax is shown, but the value for $product_tax is '0'. Prices are shown like this:
€ 27,25000
(€ 27,2500 EX BTW)
and when I add . 'BTW = '.$product_tax; to the function:
return $this->format(zen_add_tax($product_price, $product_tax) *$quantity).'<br><font size=1> (€ '. number_format(round(($product_price * $quantity),4),4,',','.').' ex BTW)</font>' . 'BTW = '.$product_tax;
it says:
€ 0,73338
(€ 0,7334 EX BTW)BTW = 0
here it should be 21.
On the same page, below the product, the other products in the 'family' are shown and those produts are shown with the correct tax.
Does anyone know how to get the variable $product_tax filled with the right value on the product_info_display page?
Example on: https://www.frankfokke.nl/shopnw/ind...roducts_id=339
Thanks, Frank.
Bookmarks