0

We added 1 product to cart with the price of 10.99 Tax applied is 5.99 when applied a discount code of 50 euro the grand total incl tax = € NaN,N

Can anyone suggest what could be the issue?

1

I've fixed this issue by overriding below js file in theme and updated getValue() function in it: Magento_Tax/web/js/view/checkout/summary/grand-total.js

Before:

getValue: function() {
                var price = 0;
                if (this.totals()) {
                    price = totals.getSegment('grand_total').value;
                }
                return this.getFormattedPrice(price);
            },

After:

getValue: function() {
                var price = 0;
                if (this.totals()) {
                    price = parseFloat(totals.getSegment('grand_total').value).toFixed(2);
                }
                return this.getFormattedPrice(price);
            },

parseFloat just added to make sure it should return float value. Hope this helps someone. Thanks!

0

This issue is already reported in GitHub https://github.com/magento/magento2/issues/18027

The issue got fixed in version 2.2.8

  • Not quite the same issue - the described issue is still present in 2.3.1 which includes the fix for issue 18027 – johnorourke Aug 7 at 10:56

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.