I’ve had one of my worst days programming ever – which is a big call I know – but seriously after today I think no Magento bug will ever faze me again.
So for anyone Googling about Magento 1.4.2 and Google Checkout, here’s a couple of tips based on this bug report.
Flat Rate Google Checkout shipping
There’s a warning generated by Magento if you do not have all 3 flat rate options filled in:
Warning: number_format() expects parameter 1 to be double, string given
The solution is to check if they are populated in the
app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php before sending them.
Continue reading Magento 1.4.2 and Google Checkout – Debugging weight-based table rate issues
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:
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