Using Google Checkout Shipping Settings in Magento
I was integrating this feature for a customer and was stomped as to why the Google Checkout Shipping Settings (not Magento’s) weren’t populating in Google Checkout. After, posting a question in the Google Checkout Help Forum, I was informed that Google Checkout settings were being overidden if Magneto sends this shipping information everytime a customer checks out. Even if you disable all Google API shipping methods from the Magento Admin, Magento will still send an empty shipping method via xml tag. Thus you have to comment out the shipping method tag from the A.K.A xml generator in magento /app /code /core /Mage /GoogleCheckout /Model /Api /Xml /Checkout.php
Using Google’s Checkout Shipping Settings instead of Magento’s, is the best way. Here is why. You don’t use your server resources to populate shipping price and methods. Google will less likely time out if it depends on UPS, USPS, or UPS carrier’s servers; where they have many backups in place. Google will also less likely time out because there is not another layer of code it needs to process. And there are many more pros.
The only con I see by using Google’s Checkout Shipping Settings, is that if you have advanced shipping settings, Magento extensions, or plugins for your shipping needs in Magento, it won’t carry over to google using the following method in this tutorial. But, the good news is Google’s Checkout Shipping Settings are very flexible to most shipping needs.
The Settings
The following Google Checkout Shipping tutorial is based on the following:
- Use Google’s Checkout Shipping Settings instead of Magento’s
- Google Integration Settings are set to the following:
-My company will only post digitally signed carts.
-API callback URL (Level 2 integrations only) using HTTPS
-API callback URL:
-Callback contents: Notification as XMLhttps://yourmagentostore.com/index.php/googlecheckout/api
-Advanced settings:-
~Provide the first name, last name and full name of the buyer and order recipient in separate fields in the new order notification.
~Return the buyer’s ship-to phone number in the new order notification.
~Return the buyer’s billing phone number in the new order notification.
-
~Provide the first name, last name and full name of the buyer and order recipient in separate fields in the new order notification.
- Magento’s Google API Google Checkout Settings are as follows:
Located here, Magento Admin > Sysytem > Google API > Google Checkout
-Enabled - Yes
-Sandbox - No
-Secure Callback URL - Yes
-Debug - No
-Existing Merchant ID
-Existing Merchant Key
-Checkout Image Style - Small 160×43 Transaparent
-Location - United States
-New Order Status - Pending
-Continue Shopping URL - Blank
-Hide Cart Contents During Checkout - Yes
-Disable Default Tax Tables - No - Magento’s Google API Merchant Calculated Settings are as follows:
Located here, Magento Admin > Sysytem > Google API > Google Checkout Shipping - Merchant Calculated
-Enable Merchant Calculated - No - Magento’s Google API Carrier Calculated Settings are as follows:
Located here, Magento Admin > Sysytem > Google API > Google Checkout Shipping - Carrier Calculated
-Enable Carrier Calculated - No - Magento’s Google API Flat Rate Settings are as follows:
Located here, Magento Admin > Sysytem > Google API > Google Checkout Shipping - Flat Rate
-Enable Flat Rate - No
The Magento Core Edit Solution
Make a back up copy of the Magento Core file and make a note of the edit for future Magento upgrades.
prompt>cd /var/www/yourmagentostore/app/code/core/Mage/GoogleCheckout/Model/Api/Xml
prompt>cp Checkout.php Checkout.php.bak
Edit Checkout.php
prompt>nano Checkout.php
At around line 232 replace:
<shipping-methods>
With:
<!--shipping-methods>
At around line 237 replace:
<shipping-methods>
With:
</shipping-methods -->
Troubleshooting
- Enable Debug in Magento:
1. Go to Magento Admin > Google API > Google Checkout Tab > Select Debug
2. Do a checkout test run
3. Go to PHPMyAdmin > Select appropriate Magento DB > Select googlecheckout_api_debug > Click Browse tab
Here you can view the XML sent to Google in request_body and the Google Response in response_body. Viewing this debug table will help you better understand how Google Checkout and Magento work together.
- View Google Checkout’s API Integration console
GC Admin>Tools>Integration consoleHere you will see a log of most errors. This will give you a better understanding on API errors.
Please note that some errors won’t be logged in Google Checkout’s API Integration console.
Let me know if you run into any snags. Thanks for reading.


















" Google Checkout Shipping and Magento "
I get the following messing using your procedure on the commenting out the code:
Google Checkout: Error parsing XML; message from parser is: The string “–” is not permitted within comments.
any ideas?
" Google Checkout Shipping and Magento "
that was on line 232 using your procedure.
" Google Checkout Shipping and Magento "
ok, i resolved the above error, it was due to the not commenting out line 237 correctly.
but I still don’t see Magento passing the tax and shipping info.