We want to load the product price excluding tax inside the invoice email. Therefore we copied the default file to: /app/design/frontend/theme/theme/Magento_Sales/templates/email/items/invoice/default.phtml

Our tax setting for "Catalog Prices" is set to "Including Tax".

And we tried a lot, but at the moment the price is display including tax with:

<?php echo $this->helper('Magento\Framework\Pricing\Helper\Data')->currency($_item->getPrice(), true, false);?>

How can we get the price excluding tax?


In \Magento\Sales\Api\Data\OrderItemInterface

You have getTaxAmount()

What if you instead try:

<?php echo $this->helper('Magento\Framework\Pricing\Helper\Data')->currency($_item->getPrice()-$_item->getTaxAmount(), true, false);?>
  • Thanks Kristoffer, but that does not work. We get a total wrong value in that case.
    – JGeer
    Oct 21 '20 at 9:49
  • If you use only getTaxAmount, do u get the correct tax amount?
    – Kristoffer
    Oct 21 '20 at 9:57
  • It can be that you have to divide getTaxAmount with the quantity in cart before you substract
    – Kristoffer
    Oct 21 '20 at 10:23
  • Thanks! Will try that.
    – JGeer
    Oct 21 '20 at 10:53

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.