How to display shipping charge inc and ex tax on the checkout.

For example

3.25 [ex. VAT] 3.99 [inc. VAT]

on panel where you choose shipping method.

Cant see obvious configuration so assume template override?


In Store/Configuration/Sales/Tax/Tax Classes, you may set the valid tax class for the setting Tax Class for Shipping

Once this is set, you can troubleshoot the issue with the function \Magento\Tax\Helper\Data::getShippingPrice and even better at \Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector::processShippingTaxInfo

If your system has no customisation and if the above configuration area is setup like the screenshot below, the rendering should display

enter image description here

enter image description here

Note: this is tested with Magento ver. 2.3.3 and luma theme + sample data.

  • Completely makes sense. With all that in place I still get method.price_excl_tax and method.price_incl_tax as same value in KO. Yet calculations are correct as correct elsewhere in quote totals. Something somewhere must be overriding but I'm yet to pinpoint it. – Dominic Xigen Jul 1 '20 at 10:38
  • now, when ko is in the game, it is possibly either a listener not being connected or the customer data not being updated. Have you been able to track the shipping data in the locaStorage for instance? – Herve Tribouilloy Jul 1 '20 at 10:41
  • I suspect you are right with customer-data. 'selectedShippingAddress' was null - now it isn't but still same. But other irregularities exist. I've run out of time to debug this unfortunately. – Dominic Xigen Jul 1 '20 at 11:10

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.