Originally Posted by
sn0ut
thanks for the reply mate... added that code and tested.
It seems to ignore the if statement and just does the first oart for every product, so it shows every product as being tax free!
Is $products_tax defined somewhere or should I redeclare it again in that page?
Sorry I should have tested the code before posting
Try this
PHP Code:
function display_price($products_price, $products_tax, $quantity = 1) {
if ($products_tax ='0'){
return $this->format ($products_price * $quantity) . ' No Tax';
}else{
return $this->format ($products_price * $quantity) . ' ex. <img border="0" src="images/pixel_trans.gif" width="2%" height="1"><span class="incvat">' . $this->format (zen_add_tax($products_price, $products_tax)* 1.175* $quantity) . ' inc.' . '</span>';
return $return_this;
}
}
}
So if the products tax rate is '0' it will show price no tax
Dave
Bookmarks