TransWikia.com

Magento 2.3.5 Estimate Shipping should be apply on Subtotal (Incl.tax)

Magento Asked by Suresh Prajapati on October 2, 2021

We’re in trouble for a few days.

After upgrade to the latest Magento 2.3.5, we got an issue in estimate shipping calculation on the cart page.
Actually shipping takes value Subtotal (Excl. Tax) for calculation but we need to apply on Subtotal (Incl. Tax).

Table Rate Import file setting: Shipping should be 0 (zero) when price greater 40

From below image shipping should be 0 (zero)

enter image description here

Please check the admin store configuration changes.

Shipping Display Setting
enter image description here

Tax Calculation Setting
enter image description here

Table-rate Setting
enter image description here

Table-rate import file price Setting
enter image description here

2 Answers

When table-rates looks at the price it always looks at the tax-exclusive price and ignores promotional discounts as well.

Even though if the client wants to calculate based on subtotal with inclusive tax,

create plugin here, Class MagentoQuoteModelQuoteAddress method: requestShippingRates

Manipulate the value of $request->setPackageValue($item ? $item->getBaseRowTotal() : $this->getBaseSubtotal());

Thanks

Answered by Kaushik Chavda on October 2, 2021

found this:

vendormagentomodule-taxModelSalesTotalQuoteCommonTaxCollector.php Line 596FF

$address = $shippingAssignment->getShipping()->getAddress();

$address->setBaseSubtotalTotalInclTax($baseSubtotalInclTax);

$address->setSubtotal($total->getSubtotal());

$address->setBaseSubtotal($total->getBaseSubtotal());

removed

$address->setSubtotal($total->getSubtotal());

$address->setBaseSubtotal($total->getBaseSubtotal());

Hope it will work for you.

Answered by KHIMAJI VALUKIYA on October 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP