2

In Store > Configuration > Shopping Cart Display Settings I set next configuration: enter image description here

But in checkout and cart, order total incl. and excl. tax both are displayed.

enter image description here

How I can remove total exclude tax from checkout page and order invoice emails?

1
  • Have you found a solution to this yet? Commented Oct 28, 2017 at 22:16

2 Answers 2

2

Changing the below store configuration will solve this.

enter image description here

Which renders the totals as below

enter image description here

./vendor/magento/module-tax/view/frontend/templates/checkout/grandtotal.phtml In this file, the totals INCL and EXCL both loaded only when this condition is satisfied.

<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0):?>

And the includeTax() method check the above-described store configuration value. Switch this "Include Tax in Order Total" to NO in both

Store > Configuration > Tax > Shopping Cart Display Settings = NO

Store > Configuration > Tax > Orders, Invoices, Credit Memos Display Settings = NO

0

in the checkout cart tax total template, both are included if you choose to display incl. tax (had the same problem).

You have to override the html template file for the grand total in:

your-theme/Magento_Tax/web/template/checkout/cart/totals/grand-total.html

inside the original file https://github.com/magento/magento2/blob/develop/app/code/Magento/Tax/view/frontend/web/template/checkout/cart/totals/grand-total.html#L16, there is a knockout js if condition isTaxDisplayedInGrandTotal

just remove the second tr output (class="grand totals excl")

2

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.