4

I know that it can be set easily under System->Configuration->Sales->Tax to change how tax is displayed for 'Price Display Setting' and 'Display Product Prices In Catalog'.

The problem being that this changes the display for both Category view and Product view.

How can I get the price to display as just the Excluding Tax on the category view and show both Including and Excluding tax for Product view page?

2

Set the config value to Both including and excluding tax and then ...

You can try to manipulate the config for the category page.
Use the event controller_action_predispatch_catalog_category_view - the event dispatched before the executing of the catalog category view page. and add this in the observer.

$config = Mage::getConfig();
$code = Mage::app()->getStore()->getCode();
$config->setNode("stores/$code/tax/display/type", 1);
  • Unfortunately this shows the price both Including and Excluding tax everywhere (featured item blocks etc) unless I was to input this everywhere. – performadigital Jun 23 '14 at 11:55
  • Could it be used to the opposite effect? To only be used on the product view page instead and display Ex VAT only? – performadigital Jun 23 '14 at 11:55
1

Managed to do this in a very simple way.

Set the configuration to show prices 'Excluding Tax' only.

Then edited my addtocart.html to add this to pull in and show the products price including tax:

<?php
$_coreHelper = $this->helper('core');
$_taxHelper  = $this->helper('tax');
$priceIncTax = $_taxHelper->getPrice($_product, $_product->getPrice(), true);
$priceIncTax = Mage::helper('core')->currency(number_format($priceIncTax ,2)); ?>
<?php echo $priceIncTax; ?> inc. VAT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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