Google Product Integration
FoxyShop will integrate directly with your Google Product Feed from the Google Merchant Center. Previously, you had to export a TXT file and upload it once a month. Now you can see your Google Products and update/renew them from directly within FoxyShop. The Google Products are synced with your existing store contents.
To get started, check the “Enable Google Product Feed Connection” box on the Settings page. You’ll also need to load your Google Merchant ID number in. You can find this number in your Google Merchant Control Panel. After saving your settings, you’ll now see a “Google Products” option in your Products menu.
Note: Google have deprecated the approach that FoxyShop was taking for authenticating your Google account. This means that for the interim, you will need to manually export the product feed from within FoxyShop’s “Google Product” section using the “Create Google Product Feed” button. This will generate a text file that you can then manually upload into Google Merchant Center.
Once you have authenticated your account you will see the list of products currently in your Google store. You’ll also see products in your local FoxyShop store which are available to be uploaded to Google. The field that determines a product’s eligibility is the “Google Product Category” field. You will see a bunch of Google Product Category fields in a meta box on the product management page as well as a link to Google’s master document of product categories. You can use the Custom Field Bulk Editor to add this field to a bunch of products at once.
This solution should save a lot of time for basic stores. It’s not a perfect solution for everyone, though. Here are some things to keep in mind:
- Products uploaded to Google expire after 30 days so you’ll have to make a reminder to yourself to update your store every 3-4 weeks.
- The XML feed is setup for US only at this point. If you need to use this in the UK, review the code below for how to achieve that.
- The feed will only show 250 products at once. If you have more than 250, there will be a “Next” button appearing at the bottom of the list. Products not shown on that feed view, however, will show up as addable at the bottom of the screen. It doesn’t hurt to add them twice, duplicates won’t be made.
- Google only lets you upload or add 1MB worth of data at once. So if you have a lot of products, you may have to add or update them in groups.
- If you have trouble, there’s a debug mode you can turn on by putting “&debug=1” at the end of the url. After making a change it will display the data sent and the data received back before letting you continue.
- Google wants you to send them the product code (ISBN, UPC, etc) in the GTIN field. If you don’t enter this, FoxyShop will put the product code in the GTIN field for you automatically.
- Previously the product code was used as the ID. This is now the the WordPress Product ID to allow for better matching with existing products.
- The old export method is still available.
- The submitted feed has not been customized with WP filters yet. If you need some customization, let me know.
If you need to change the target country or currency from US and usd, you can do so by putting this in your functions.php file:
//Sets Custom Target Country and Currency for Google Product Feed add_filter("foxyshop_google_product_target_country", "do_foxyshop_google_product_target_country"); function do_foxyshop_google_product_target_country($str) { return "UK"; } add_filter("foxyshop_google_product_currency", "do_foxyshop_google_product_currency"); function do_foxyshop_google_product_currency($str) { return "gbp"; }