Grandtotal Calculated Incorrectly Deducting Tax/VAT in Magento
We’ve come across this a few times, and usually we manage to rectify the issue relatively quickly but this time, we spent the last two days debugging this issue. Even reverting/switching themes and rebuilding the site in a dev environment, literally pulling it apart piece by piece to identify the cause of the issue. What happens is when you have set up your Magento store to show prices inclusive of tax/VAT, at cart/checkout your subtotal shows as correct but then the grandtotal shows less the tax/VAT. So for example, if you’re subtotal value shows as £110, the grandtotal was showing as £91.67 – clearly not correct, at the least it should show the same as the subtotal or more depending on whether there is a cost for shipping or you’ve set your subtotal to display excluding tax/VAT. This issue was happening whether in the cart or checkout pages. We have tracked the issue down to being caused by a file in Magestore’s OneStepCheckout extension (even when the extension is disabled, the issue is still apparent). The problem is caused in the file
/app/code/local/Magestore/Onestepcheckout/Model/Sales/Quote/Address/Total/Giftwrap.php
and I’m not exactly sure what code in this file is causing the problem as of yet but I think it has something to do with it’s extending of the class Mage_Sales_Model_Quote_Address_Total_Abstract
. If you don’t actually use the giftwrap feature of this extension, then the quickest solution for now is to just comment out the following in /app/code/local/Magestore/Onestepcheckout/etc/config.xml
:-
<giftwrap> <class>onestepcheckout/sales_quote_address_total_giftwrap</class> <after>wee,discount,tax,tax_subtotal,grand_total</after> </giftwrap>
Like so:-
<!--<giftwrap> <class>onestepcheckout/sales_quote_address_total_giftwrap</class> <after>wee,discount,tax,tax_subtotal,grand_total</after> </giftwrap>-->
The culprit line being <class>onestepcheckout/sales_quote_address_total_giftwrap</class>
of course. More information on this to come as I discover it…
I had exactly the same problem with another magestore extension (storepickup) which caused the same problem. So thanks for posting this. I just commented out from
/app/code/local/Magestore/Onestepcheckout/etc/config.xml
and the problem is now fixed. I also informed magestore.
Thanks for stopping by and leaving a comment of your experience too Marshall.
This isn’t the first time we’ve encountered issues with Magestore’s extensions to be honest and as you’ve discovered, it looks like this could well be apparent in numerous extensions of theirs.
I believe I informed them of this when we discovered it but no-one replied.
Just found the same issue in their Customer Credit extension
Thanks for stopping by and the heads up John.
Is that one too, an extension by Magestore?