2

I am using Tax rule for some Countries, Tax rate is displaying fine in Checkout page but in Cart page, it is not displaying. I am using Custom Theme.

8

Finally Got it, we need to add below line in checkout_cart_index.xml file under Magento_Checkout/Layout in your theme Directory.

Find around line number 166

<item name="shipping" xsi:type="array">
<item name="component"  xsi:type="string">Magento_Checkout/js/view/cart/totals/shipping</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Shipping</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/shipping</item>
</item>
</item>

<item name="grand-total" xsi:type="array">
<item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/grand-total</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Order Total</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/grand-total</item>
</item>
</item>

Replace with

<item name="shipping" xsi:type="array">
<item name="component"  xsi:type="string">Magento_Checkout/js/view/cart/totals/shipping</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Shipping</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/shipping</item>
</item>
</item>

<item name="tax" xsi:type="array">
<item name="component"  xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/tax</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Tax/checkout/cart/totals/tax</item>
<item name="title" xsi:type="string" translate="true">Tax</item>
</item>
</item>

<item name="grand-total" xsi:type="array">
<item name="component"  xsi:type="string">Magento_Checkout/js/view/summary/grand-total</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Order Total</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/grand-total</item>
</item>
</item>
  • This doesnt worked. – Kumar A. Dec 12 '16 at 12:23
2

To add the tax value in the grand total of the cart page you must edit the grand-total.js file from:

/vendor/magento/module-checkout/view/frontend/web/js/view/summary/

But you cannot edit this core file so you must copy it to:

/app/design/frontend/[vendor]/[theme]/Magento_Checkout/web/js/view/summary/

and replace everything in grand-total.js with:

define(
    [
        'Magento_Tax/js/view/checkout/summary/grand-total'
    ],
    function (Component) {
        'use strict';

        return Component.extend({

            /**
             * @override
             */
            isDisplayed: function () {
                return true;
            }
        });
    }
);

After that run:

php bin/magento setup:upgrade

1

You are right now we can see tax value in total area but that tax is not added in total.

Subtotal €13.63 Tax €1.36 Order Total €13.63

there Should be

Subtotal €13.63 Tax €1.36 Order Total €14.99

0

This worked for me: Change grand-total component in checkout_cart_index to Magento_Tax/js/view/checkout/summary/grand-total

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy