HomeDecorative ElementBlogDecorative ElementE-Commerce
Generating Product Variants for Google Shopping Feeds - E-Commerce
Having issues with product variants in your Google Shopping feed? The Magento pros at Fruition developed a custom extension to feed product variants.

Generating Product Variants for Google Shopping Feeds

Google shopping bag Google Shopping is an insanely helpful tool for bringing new customers to your store. However, merchants who sell apparel online may have recently run into an issue with the 2014 Google Shopping update. During this update Google seems to have taken a slightly harder stance on acceptable product feeds for apparel and is now enforcing the rule that requires merchants to provide variants for these products. We recently encountered this issue with an existing Magento client who generates a large number of sales through Google Shopping. Prior to the update, their feed would only send a single entry to Google Shopping for a product that had multiple size and color options. This had worked without any issues for over a year, but after the new Google Shopping update took place, their feed was soon suspended because it didn't provide the now required product variants.

How Google Shopping Product Variants Work

To start, Google only requires product variants be submitted for products that fall into the “Apparel & Accessories” Google Shopping category. This applies to shirts, shoes and other clothing items that may be available in different colors, materials, patterns or sizes. If your store sales these types of items and you want to push product to Google Shopping, you’ll need to come up with a feed that accounts for all of your product’s available variants. On the surface, understanding how this works is pretty simple. Google provides a straight forward solution for how these variants should be accounted for in your feed. A quick example would be a product called ‘Mens V-Neck’ with an id of ‘m-vneck’ that is available in ‘Medium’ and ‘Large’, and comes in colors ‘Red’ and ‘Green’. Google requires you provide a unique entry with a unique ‘id’ for each of these variants, but also provide an ‘item group id’ that ties all of these products together. Here is an example:

id item group id title size color
m-vneck-m-r m-vneck Mens V-Neck Medium Red
m-vneck-m-g m-vneck Mens V-Neck Medium Green
m-vneck-l-r m-vneck Mens V-Neck Large Red
m-vneck-l-g m-vneck Mens V-Neck Large Green
(You can see the full specs for product variants on Google Shopping here.)

This example is still missing a lot of required attributes, but shows how ‘id’ and ‘item group id’ should be used. The attribute ‘id’ still needs to be unique for all of your individual entries, and for products that belong to one group, the ‘item group id’ should remain the same.

Automating the Google Shopping Feed on Magento

After defining what we needed to supply in the feed to make Google Shopping happy, our next task was automating this process so the daily generated feed included the new ‘item group id’ tag. This is where things started to get a little hairy. Our client manages around 1900 SKUs with an average of roughly 5 color options and 10 size options for each product. Instead of managing 65k individual SKUs and using Magento Configurable Products, we opted to use an extension called Advanced Product Options by MageWorx in order to manage a single product for each product group. This extension also allows us to manage price, SKU and q at the Custom Option level using a Parent > Child relationship between a color and a unique run of sizes. Our custom options area for each product is pretty robust, but our client is able to save a lot of time in overall product management. For the existing feed, we were using Wyomind’s Data Feed Manager extension to automate the daily generation of the XML. Wyomind offers a lot of configuration for managing which products are added to a feed based on category, product type, price, availability, cost, color and almost every other attribute assigned to your products. It also takes care of assigning Google Product Categories at the Magento category level which is very helpful. We did have a problem though, Wyomind wouldn’t handle the Parent > Child relationship that APO provided for its custom options and it was impossible to have the two extensions work together to generate a feed without any customization. Luckily we had a great naming pattern in place for our APO options, and Wyomind offered a way to at least run through every custom option that was assigned to a product. Because each product always started with the color options “Color”, and because every assigned run of sizes was named “Color in Size XX’, we were able to update the output of the Wyomind export and generate an XML feed that we could post-process in order to generate a feed that Google would happily approve. We ran into some other minor challenges related to Google needing a unique image for each color option, and having to adjust the feed generation code to load the final Color > Size QTY vs. the Simple Product QTY. These were all fairly easy to adjust once we had the heavy lifting out of the way and our client is once again an approved Google Merchant with over 16,000 individual product ids being fed in their Google Shopping feed instead of their original 1,200. If product variants have you stumped and you’re unable to properly push your Apparel catalog onto Google Shopping, you’re missing out on a huge marketing opportunity. Reach out and see if our team can fix your product feed and help your store gain more visibility. Post by Chance Carlin

Table of Contents
    Table of Contents+