Posted on

Magento and Google Checkout: Tax on Shipping incorrect in Merchant Calculated callback

I’ve had a love/hate/hate/hate relationship with Google Checkout and Magento for a long long time. Today marks a new low in our relationship. I’ve wasted so much time on this bug that I have made up a pie graph that illustrates the situation using Google’s charting API:

too much time with fucking Magento bugs

I’ve been on a journey to the bowels of the Magento Tax system and having spent the better part of 6 hours debugging through my issue I can safely say I will not do that again. The issue is that the totals are only collected once per address so depending on how many addresses you have and whether they are shippable or not, you get all sorts of weird results out of the shipping tax calculation. My issue was the calculated VAT amount on merchant calculated shipping in Google Checkout was wrong by a factor of tax % on shipping. So for £10 shipping in the UK, £1.75. Annoyingly it meant that Google would charge less than Magento recorded the order as being worth so now I have all sorts of mismatched order totals to deal with too. The issue could manifest itself as shipping tax being charged in Magento but not in Google Checkout too, if the tax was calculated on paid method, but the customer chooses a free method, for example.

I’ve reported the bug, so I really really hope it gets fixed soon – if someone else goes through what I just did, it would be a travesty.
Continue reading Magento and Google Checkout: Tax on Shipping incorrect in Merchant Calculated callback

Posted on

Magento 1.4.0.1 Tax Calculation error – Out by a factor of 100

I was just setting up a store with GST tax on Magento 1.4.0.1 and got caught up on a bug where the tax on a product would be calculated correctly, but the total on the cart page would show it 100x (yes 100 times!) lower than it actually was, leading to an incorrect total being calculated for when tax is included.

With a bit of Google’ing and I found this forum post which had the answer. A clean way of making this little patch while we await a core fix is:
Continue reading Magento 1.4.0.1 Tax Calculation error – Out by a factor of 100