I would like to have in my pages prices shown with and without vat. I set up that it shows both prices, but no matter what I do prices are always same. Check:


  • with vat: 915€
  • without vat: 915€

915€ is price including vat. When I go to manage products-prices I have there a window where I put price inside it says: Price * 915 [EUR] [Inc. Tax]

What can I do to have different prices, so price with or without vat?

  • can you please tell us which magento? Jul 14, 2017 at 12:38
  • Magento ver.
    – klemen
    Jul 19, 2017 at 10:29

1 Answer 1


$taxClassId = $_product->getData("tax_class_id");
$taxClasses = Mage::helper("core")->jsonDecode(Mage::helper("tax")->getAllRatesByProductClass());
$taxRate = $taxClasses["value_".$taxClassId];
$price_with_tax = $_product->getPrice();

$divided_value = 1+($taxRate/100);
$price_without_tax = $price_with_tax/$divided_value;
$price_without_tax_formatted = Mage::helper('core')->currency($price_without_tax, true, false);
echo $price_without_tax_formatted." exc GST";

  • this code will get you price without TAX
    – Raghu
    Jul 15, 2017 at 12:46
  • I need on my page price with and without vat. Because of law in Slovenia, I need to have both of them shown. I copy this to main folder?
    – klemen
    Jul 19, 2017 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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