1

We are having a problem in our Magento 2 shop. All tax settings are set and everywhere he is showing the tax good, so also in the checkout and on orders, the only place were he is not showing the price including tax is in the shopping cart.

We have set the tax settings as shown below and should be good. We also tried to set the "include tax in order total" to no, but this is also not working.

Does anyone know how we can fix this?

enter image description here

  • Have you tried reverting back to Magento's default theme and testing the cart page? – Jake from TaxJar Feb 22 '17 at 21:33
2

I had the similar issue. This worked for me:

Change grand-total component in checkout_cart_index.xml in Magento_Checkout module(under Magento_Checkout/layout in your theme Directory) to Magento_Tax/js/view/checkout/cart/totals/grand-total

<item name="grand-total" xsi:type="array">
      <item name="component"  xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/grand-total</item>
      <item name="config" xsi:type="array">
            <item name="title" xsi:type="string" translate="true">Grand Total</item>
            <item name="template" xsi:type="string">Magento_Checkout/cart/totals/grand-total</item>
      </item>
</item>
  • Any idea what the fix would be if it shows the tax in the cart, but doesn't add it to the grand total? Shows subtotal, shipping, tax, and then order total. Order total includes the subtotal and shipping but totally skips tax. Can't seem to get it to actually charge the tax. – Octoxan Jul 12 at 13:24
1

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

in grand-total.js,

change:

getPureValue: function() {
    var totals = quote.getTotals()();
    if (totals) {
        return totals.grand_total;
    }
    return quote.grand_total;
},

to:

getPureValue: function() {
    var totals = quote.getTotals()();
    if (totals) {
        return totals.base_grand_total;
    }
    return quote.base_grand_total;
},
0

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

0

I had the same issue but it ended up being that a conflict with a third party extension. I used Chrome inspect element network tab to see if grand-total.js was loading. Turns out there were three separate files for this with the third party extension loading last.

Once I corrected this error everything functioned as intended.

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.