0

I want to display product price including tax on invoice totals. Every product has name, quantity, price and row total. I got all except the price.

Right now I have

<td align="center" valign="top" style="font-size:11px; padding:3px 9px; line-height: 20px;"><?php echo $_item->getPrice()*1 . ' €'?></td>

But this does'nt include tax..

Also my settings on admin panel: enter image description here

3 Answers 3

0

It was really easy... But in fact I have lost almost one week searching the issue of this problem.

It seems that even if you will precise the tax %, in the tax rules, and you will chose tax class "Normal", the same for the product, it will not add tax to your product. It will without tax.

You have to choose tax class Shipping, for tax rule and product. And after that all works like a charm.

0

Try to replace

$price = $order->formatPriceTxt($_item->getPrice());

With

$price = $order->formatPriceTxt($_item->getPriceInclTax());
3
  • I dont have that line of code in that file (template/email/order/items/invoice/default.phtml)
    – raouaoul
    Commented Nov 29, 2016 at 12:36
  • Ok I found the file, but there is currently this code: if ($this->canShowPriceInfo($_item)) { if ($taxHelper->displaySalesPriceInclTax()) { $price = $order->formatPriceTxt($_item->getPriceInclTax()); } else { $price = $order->formatPriceTxt($_item->getPrice()); } So I guess I have some settings on wrong options somewhere... But I cant figure out where
    – raouaoul
    Commented Nov 29, 2016 at 12:48
  • it was really easy... But in fact I have lost almost one week searching the issue of this problem. It seems that even if you will precise the tax %, in the tax rules, and you will chose tax class "Normal", the same for the product, it will not add tax to your product. It will without tax. You have to choose tax class Shipping, for tax rule and product. And after that all works like a charm. Commented Nov 29, 2016 at 13:02
0

Alright I figured it out now by myself.. I just added TaxAmount to getPrice, like so:

<?php echo $_item->getTaxAmount() + $_item->getPrice() ?>

And this to get the currency symbol after price:

<?php echo $_item->getTaxAmount() + $_item->getPrice() . ' €' ?>

EDIT: ACTUALLY NOT WORKING The tax is added for every product... For example when I add 2 products that are the same, then it gets their both tax and adds it together..

So it is still broken :/

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.