1

My 1.9.4 site is predominantly Food so does not incur VAT. I have my Site set to show Prices without VAT. I do not want to show prices with and without VAT. I'd like to add a label to the end of the Price reading "+VAT" but only if that product is taxable.

Any suggestions will be gratefully received. Kevin

0

You can check check in your templates in which your product object is available for the taxClassId attribute.

The taxClassId stores the information about the tax class assigned to a product for example in admin panel. taxClassId = 0 means the product has no tax class, taxClassId > 0 means the product has a specific tax class.

For example you can use the following code in catalog/product/price.phtml template:

$_vatSuffix = '';
if ($_product->getTaxClassId()){
  $_vatSuffix = ' +VAT';
}
[...]
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) . $_vatSuffix ?>

This is only an example to show, how you can identify the products with VAT and based on that information add a price suffix. You will have to change some other templates depending on your theme and customization.

I hope that helps.

  • Altering this file doesn't seem to change the ./public_html/app/design/frontend/base/default/template/bundle/catalog/product/price.phtml Is this possibly down to Caching? – Kevin Russell Feb 12 at 15:32
  • you have to make the changes in the template your theme is using, the default Magento file I referred to is app/design/frontend/base/default/template/catalog/product/price.html without bundle :-) – HelgeB Feb 12 at 15:35
  • That did the trick - thanks HelgeB – Kevin Russell Feb 12 at 15:37
  • @Russell you're welcome. Please let me know if you need further help on this issue – HelgeB Feb 12 at 17:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.