After upgrading from 1.9.3.7 to 1.9.3.9 we encountered an issue regarding shipping collectrates request. The
$request->_data['package_value']
which was working correctly on 1.9.3.7 (as in giving us a subtotal EXCLUDING TAX) is now wrongly including tax in 1.9.3.9 and 1.9.3.10. The request appears to be problematic in two places : the checkout-cart page and the one page review step. Is it strangely correct in the one page shipping method step as in the subtotal is not tax included. Also, when we use the code below, the calculation is correct.
$shippingAddress = $quote->getShippingAddress(); $shippingAddress->setCollectShippingRates(true)->collectShippingRates();
Do you guys think any kind of patch could be the issue between '3.7 and '3.9 ? If anyone could shed any light on this we would be truly grateful !
Solved! Go to Solution.
Hi again,
We found what we think is the problem.
In Magento 1.9.3.10 in Code/Mage/tax/etc/config.xml, you'll find the following:
<sales> <quote> <totals> <tax_subtotal> <class>tax/sales_total_quote_subtotal</class> <after>subtotal,nominal,shipping,freeshipping</after> <before>tax,discount</before> </tax_subtotal> …
This piece of code seems to be the problem. Because of it the subtotal ($request->_data['package_value']) becomes TAX included in the Checkout Cart and in the Onepage Review step. Which makes any shipping methods calculation (like with Owebia Shipping for example) based on this subtotal wrong.
By overriding config.xml with the one from Magento 1.9.3.7, the problem disappears.
Here is the working code for us.
<sales> <quote> <totals> <tax_subtotal> <class>tax/sales_total_quote_subtotal</class> <after>subtotal</after> <before>tax,discount,msrp</before> </tax_subtotal> …
Any idea why this was changed in 1.9.3.10 ? Was it causing issues somewhere else ?
Hello @booby69
can you please check below setting
sales >> tax >> shopping cart display setting
Display Subtotal setting
Hope it will help you
If works then mark as solution
Hi again,
We found what we think is the problem.
In Magento 1.9.3.10 in Code/Mage/tax/etc/config.xml, you'll find the following:
<sales> <quote> <totals> <tax_subtotal> <class>tax/sales_total_quote_subtotal</class> <after>subtotal,nominal,shipping,freeshipping</after> <before>tax,discount</before> </tax_subtotal> …
This piece of code seems to be the problem. Because of it the subtotal ($request->_data['package_value']) becomes TAX included in the Checkout Cart and in the Onepage Review step. Which makes any shipping methods calculation (like with Owebia Shipping for example) based on this subtotal wrong.
By overriding config.xml with the one from Magento 1.9.3.7, the problem disappears.
Here is the working code for us.
<sales> <quote> <totals> <tax_subtotal> <class>tax/sales_total_quote_subtotal</class> <after>subtotal</after> <before>tax,discount,msrp</before> </tax_subtotal> …
Any idea why this was changed in 1.9.3.10 ? Was it causing issues somewhere else ?