News:

Support the VirtueMart project and become a member

Main Menu

Show (Ex VAT) for products that use rule

Started by camble, December 16, 2014, 18:22:19 PM

Previous topic - Next topic

camble

Hi guys,
I was wondering whether it was possible to add something to the template file or system that adds (Ex VAT) after the price on the product details page for products that use the standard tax rule of 20%?

There are some products however that are not liable for VAT, so for those products that do not use the rule I do not want the (Ex VAT) to appear.


Is this at all possible? I'm using Joomla 2.5.24 and VM 2.6.6.


Kind regards
Liam

camble

Hi guys,
I'm still looking for a bit of help with this please.


I thought that by adding something like below to the template override default_showprices.php within productdetails it can be achieved, I just need a little help to get it working...


echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
if ($this->product->prices['taxAmount']=0) {
echo '<span class="vat">No VAT</span>';
} else {
echo '<span class="vat">Ex VAT</span>';
}
}



I'm essentially trying to achieve a result whereby if the tax is 0, it shows "No VAT" to the user however if the tax is anything higher than 0 it shows "Ex VAT".

At the moment it shows "Ex VAT" for all products, so I assume it's a small tweak I need to pull in either the amount (greater than 0) or the id of the product_tax_id field within the database.


Kind regards
Liam