1

I'd like to remove tax from cart and checkout.
Now it shows 0 or "Not yet calculated" text.

I've already remove estimated shipping and tax by comment out code from vendor/magento/module-checkout/view/frontend/templates/cart/shipping.phtml but i just cant find this section.

In my admin panel all options under Tax is set to "No" or "Excluding Tax"

11

If you want to leave taxes enabled and with a value but just remove them from display remove the item with the name tax at the appropriate place.

For example to remove tax from the checkout cart sidebar add this to your themes (or module) app/design/frontend/<vendor>/<theme>/Magento_Checkout/layout/checkout_cart_index.xml:

<referenceBlock name="checkout.cart.totals">
    <arguments>
        <argument name="jsLayout" xsi:type="array">
            <item name="components" xsi:type="array">
                <item name="block-totals" xsi:type="array">
                    <item name="children" xsi:type="array">
                        <item name="tax" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="componentDisabled" xsi:type="boolean">true</item>
                            </item>
                        </item>
                    </item>
                </item>
            </item>
        </argument>
    </arguments>
</referenceBlock>

To remove from cart you would add this to app/design/frontend/<vendor>/<theme>/Magento_Checkout/layout/checkout_index_index.xml:

<referenceBlock name="checkout.root">
    <arguments>
        <argument name="jsLayout" xsi:type="array">
            <item name="components" xsi:type="array">
                <item name="checkout" xsi:type="array">
                    <item name="children" xsi:type="array">
                        <item name="sidebar" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="summary" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="totals" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="tax" xsi:type="array">
                                                    <item name="config" xsi:type="array">
                                                        <item name="componentDisabled" xsi:type="boolean">true</item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </item>
        </argument>
    </arguments>
</referenceBlock>
  • Excellent! just I think you could label these clearer, the second block is for the checkout page sidebar first for the basket page cart – Joel Davey Mar 28 at 15:32
0

Login to your magento admin panel. Go, Stores > (under Taxes) > Tax zones and rates > click your tax options > then put the Rate percentage to 0.

Also don't forget to Clear your cache, Remove the products form card, go back to homepage, add product again, go to checkout and see.

This should remove the tax completely from the checkout. I've check it, it works for me.

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.