Logo Wyomind Magento workshop

Add-ons for Magento®

Export quickly and safely a valid and well-structured data feed of your complete catalog of products from your Magento website to your Google Merchant Account thanks to Simple Google Shopping, an extension built by a Google partner.

426 Reviews

This extension is built by a

Google Shopping specialized partner


What are Google Merchant and Google Shopping?

What is Google Shopping and Google Merchant?

Google Shopping is a free Google service allowing customers to find and compare products they want to buy online. If you are an online merchant, you can submit all your products to Google Shopping and attract potential customers by allowing them to view your products more easily.

Google Merchant Center is a tool that helps you upload your store and product data to Google and make it available for Shopping ads and other Google services. Learn more about getting starting with Merchant Center

How to create my Google Merchant Account?

In order to submit your products to Google Shopping, you need to create a Google Merchant Account. Click on the following link for further information on creating an account: https://www.google.com/support/merchants/bin/answer.py?hl=en&answer=188924

This account gives access to the Google Merchant interface. There you can manage all your product data feeds and plan any daily, weekly or monthly updating tasks.

What is a products data feed?

A data feed is a file made up of a unique group of attributes that define each one of your products. This allows customers to search and find your items more easily. This file is similar to an RSS data feed but includes some specific XML tags used by Google Merchant Center or any other shopping engine.

To know more about the product data feeds, have a look to the Google Merchant Center support site: https://support.google.com/merchants/answer/188478?hl=en

How to create a products data feed?

Simple Google Shopping and Data Feed Manager are two Magento extensions that allow you to quickly configure, generate and automate several product data feeds.

How to use Simple Google Shopping?

STEP 1: Configure Simple Google Shopping in a general way

Before being able to configure your data feeds, you should configure the extension in a general way. To do so, go to

System Configuration Wyomind  Simple Google Shopping

Cron job reporting

In the Cron job reporting tab, you can activate the cron job reporting and fill in an email address to receive the reports. You can also rename the reports as you want. Finally, you have the possibility to enable the debug mode.  

Core Settings

In the Core Settings tab, you'll need to configure a certain number of fields.

  • Items in preview
    By default there are 10 items in preview, if you want you can reduce or increase that number. 
  • Items in buffer
    By default, products are inserted into the file on the server every 10 items but you can reduce or increase that number.
  • Items in SQL request
    By default, there are 1500 items in each MySql query.
  • Number of advanced filters
    By default, you have 10 advanced filters. If you need more, you can at any time increase that value.
  • Use of OR/AND statements in advanced filters
    And/or statements can be used in the advanced filters simply by enabling that option.  
  • Include not in menu categories
    You can also include the categories of products that are not in the menu.  
  • Memory limit size (M)
    The default memory limit is 1024.
  • Use canonical urls

    You'll be able to choose which type of URL to use in your data feed. You can choose between 3 options:
    Product url, Shortest category url or Longest category url.

      For example, if you have a "T-shirt" in 2 categories: "New arrivals" and "Shirts", the urls may be
      Product Url = http://mywebsite.com/t-shirt.html
      Shortest category url = http://www.mywebsite.com/men/shirts/t-shirt.html
      Longest category url = http://mywebsite.com/men/new-arrivals/t-shirt.html

    STEP 2: Configure your data feeds with Simple Google Shopping

    To create/configure your own data feed, you need to go to

    Catalog  Simple Google Shopping.

    There, click on Create a new data feed 

    You now have to configure your data feed as you want.

    The Tool Box or so-called "Black Box"

    When creating a data feed, you should see a blackbox on the right of your screen. The Simple Google Shopping extension includes that tool to help you create your feed and see what is wrong.

    The blackbox is inevitably a very useful tool. This will help you to configure your data feed more quickly.

    Here are the different options of the blackbox:

    Syntax validation

    This button allows you to check if your syntax is correct. It helps you to see if you have forgotten a bracket or a comma by underlining in yellow the part of text that contains a mistake.

    Attributes library 

    If you click on that button, a library of your store attributes will be displayed. This makes it easier to find very quickly which attribute you need to add into your template.

    Data preview 

    When clicking on Data preview, you'll see a preview of your data feed. It's very useful to see if the values of your attributes are correctly retrieved or if your filters are working. 

    Error report 

    When clicking on that button, it will display a report on the errors and warnings of your data feed. 


    In that first tab is the main configuration of the data feed. You'll find several fields to fill in that will allow you to customize your feed.

    • File name
      Enter a name for the file.
    • Path
      Define the path where you want the data feed to be generated. For example /feeds/. 
    • Store View
      Define which store view must be used.
    • Website url
      Add your website url.
    • Title
      Add a title to your feed.
    • Description
      Add a description to your data feed.
    • XML template
      This is probably the most important field as this is where you will configure your template
      For a good understanding check how to manage your data feed templates 

    Categories filters 

    In the Categories tab, you will find 2 sections that will allow you to manage your categories. The first section allows filtering products by categories.

    You can filter products depending on the categories according to two different ways:

    • Exclude all products from the selected categories.
    • Include all products from the selected categories.

    If you don't select any category, all products will be exported.

    For example, if you wish to include only products of the Apparel category, you can configure your filter in two different ways.

    First of all by ticking the Include option that will allow you to include all categories that you have selected.

    Or via the Exclude option that will exclude all categories you have selected.

    You'll be able to include or exclude your categories depending on:

    • Product categories only
    • Product and parent categories
    • Parent categories only

    Imagine you have a configurable product with simple variants associated. The configurable has a category assigned but not the variants. In that case, you'll need to select Parent categories only.

    On the contrary, if you have categories assigned to simple variants but not to the configurable product, you'll need to select Product categories only.

    In the case where you have both situations, you can select Product and parent categories.

    Category  mapping

    In that section, you can map your categories to Google ones. This step is very important so that Google can make a link between their product categories and yours.

    What is a category mapping?

    Categories names you are using in your Magento aren't always the same than the ones used by Google Merchant to reference your products.

    This means you have to find out which Google Merchant categories have the best matching with yours, according to the Google product taxonomy.

    For example, if you're selling furnitures like coffee tables, you'll have a Coffee table category in your Magento admin. But Google Merchant doesn't handle this kind of category. The closest Google product category could be Kitchen & Dining Room Table.

    How to map your categories with Simple Google Shopping?

    Simple Google Shopping  provides you an easy way to input Google product categories matching yours. 

    In your data feed configuration, go in the Categories tab. Then, in Category selection and mapping section, you'll find a treeview of all your categories.

    First select the Google Taxonomy source on which the category mapping is based.

    Taxonomy files for the main countries are directly included to allow you to map your categories more easily. You can also have a look to our faq to know how to add a new taxonomy file.

    For each category, you have a little arrow followed by mapped as . There, you'll be able to start typing a keyword in order to display a list of all categories including that keyword. You simply need to select the one you need.

    If your press the End key of your keyboard after typing a category mapping, the value will apply to all sub-categories.

    Once all your categories are mapped, you can click on Save .

    Here are a few guide lines for choosing the most appropriate category:

    • Use the category that best describes your item. To do this, first determine the primary function of the products you are submitting. For specific items like MP3 Players, select the MP3 Players category. While some MP3 players can also serve different functions, like those that contain a clock, they are primarily MP3 Players.
    • Use only one category. For some products, more than one category might be relevant. For example, an adapter to allow an MP3 player to be used in a car could be in both categories Motor Vehicles > Audio & Video and Electronics > Audio > Audio Accessories > MP3 Player Accessories. In such cases, choose the category that seems the most appropriate to you, but don't include more than one.
    • Use the most specific category possible. Being specific will help to improve your data quality and so ensure that offers are presented in the right category. When viewing the taxonomy, try to navigate to the most specific category that still covers all the products that are being submitted. For instance, if you are submitting MP3 player chargers use the MP3 Player Chargers category. Conversely, if you are submitting multiple types of chargers use the Chargers category.

    How to include the Google category to the XML template?

    Finally, so that the Google category is retrieved in your data feed, you must add the following attribute to the XML template:




    Please note that this attribute is different from Product Type

    <g:product_type> is for the categories that you have defined independently in your Magento back-office.You can easily fill this XML section using {G:PRODUCT_TYPE}. This will then retrieve for each one of your products, the category you have assigned to it.

    Read also: https://support.google.com/merchants/answer/6324406?hl=en

    How to add a new taxonomy file?

    The Google product taxonomy is a tree of categories that will help you generate values for the 'Google product category' attribute. It lists all possible values for the 'Google product category' attribute.

    In that page, choose the language you want to use for your taxonomy at the bottom right. Then, in the Downloadable taxonomy, open the Plain Text link that contains full category names.

    Save that file and paste it in Magento Root Directory  Lib  Wyomind google

    Don't forget to apply the permissions 755 to the file.

    You'll then be able to choose that specific taxonomy from your data feed configuration.


    Simple Google Shopping
    also allows you to filter your products on several levels according to their attribute sets or their visibility for example.

    Product Type

    First of all, you can choose to include products to your feed according to their type. For example, only include simple, virtual and downloadable products.

    Attribute Set

    You have the choice to include several attribute sets. In our case, we've decided to include only attribute sets that are linked to the Apparel category.

    Product Visibility

    Then, choose the products that will be included to the feed between the products that are not visible individually, products from the Catalog, the Search results, or both.

    Advanced Filters

    In the Advanced filters, you can go further by setting more personalized filters.
    For example, we wanted to include only products which price is higher than 0, and which SKU and name are not null.

    Here again, you have the possibility to configure your advanced filters according to several options.


      name like %shirt: will include all products which name ends with 'shirt
      name like Apple%: will include all products which name starts with 'Apple'
      name like %women%: will include all products which name contains the 'women' character string
      name not like %shirt: won't include any product which name ends with 'shirt'
      name not like Apple%: won't include any product which name starts with 'Apple'
      name not like %women%: won't include any product which name contains the 'women' character string.


      Special price is null: will include all products that don't have special prices
      SKU is not null: will include all products which SKU is not null

    • IN / NOT IN

      Brand in Acer, Apple, Sony: will include only products from these 3 brands
      Brand not in Dell, Toshiba: will include all products which brand is not Dell or Toshiba.


      Brand is equal to Acer: will include only products which brand is Acer
      SKU is not ABC123: will include all products which sku is not equal to ABC123
      Price is higher than or equal to 1.00: will include all products which price is higher than or equal to 1.00

    Advanced filters can be grouped into sub-division by using AND/OR clauses.

    (SKU LIKE ABC% AND Brand = Acer) OR  (Brand IN Dell, Toshiba AND Price >= 99.99)

    The option must be enabled in 
    System ConfigURATION Wyomind Simple Google Shopping

    Scheduled tasks

    Simple Google Shopping
    provides you a fully configurable schedule in the Scheduled task tab of your template configuration for each data feed. You just have to tick the days and hours when you want your feed to be generated.

    See also Generate the data feeds automatically through the cron tasks

    STEP 3: Generate/Download the data feeds

    Generate the data feeds manually

    There are two different ways you can use to generate your data feeds: 

    • You can generate your data feeds manually in the grid from the action dropdown.

    • Or you can do it from the configuration panel by clicking on "generate"

    Generate the data feeds automatically through the cron tasks

    You can generate your data feeds automatically using the cron tasks. 

    First, check that the main cron task is enabled on your server.
    If it is disabled, a warning message will appear in Simple Google Shopping

    You have to select the days and timeframes for the data feeds you want to update, in the Scheduled Tasks tab.

    Check our Faq about cron taks for more information about how to configure the cron tasks from your server CPanel.

    Simple Google Shopping also provides you a cron job reporting, so you can get email reports on each data feed you will generate.

    Generate the data feeds from the command lines

    Simple Google Shopping
    allows generating data feed via the command lines

     php -f shell/wyomind_simplegoogleshopping.php -- [options]

    The following options are available:

    • --generate
      Generate all data feeds
    • --generate id1,id2,...,idN
      Generate data feeds from the given list
    • --list
      List all data feeds

    Download the generated data feed

    When a data feed is ready to be downloaded, the link is displayed in both, the data feed grid and the data feed page at the top of the page. You can download the data feed directly by right-clicking + save as or from your ftp client if the directory where the data feed is stored is not publicly accessible.

    Note that the random parameter at the end of the url avoids caching issue when you download the data feed from your Magento admin.

    Step 4: Check the data feed status and report

    Data feed status

    Go to Catalog  Simple Google Shopping.

    Your data feed will be listed according to IDs.You will find the name of the file, its path as well as the link to the data feed file. You should also get a message that sums up the number of products exported, the time it took and the number of errors and warnings in your data feed.

    The status of your data feed will vary according to the situation:

    • Pending
      The data feed has never been generated or the scheduled hour is passed (waiting for the execution of the cron task)
    • Success
      Successful generation of the data feed, manually or automatically (the generation corresponds with a schedule)
    • Processing
      The data feed is processing
    • Error
      The generation is stopped

    You should find the date and the hour of the last generation of the data feed as well as the Store view taken into account for the data feed.

    Errors and warnings reports

    Those reports do not replace the error reports from Google and are by no means a guarantee that your data feed will be approved by the Google team. This will help you to save time by quickly identifying the main problems of your data feed and by making the necessary changes.

    The reports are available:

    • from the action dropdown in Catalog  Simple Google Shopping

    • from the blackbox when editing a data feed

    • In orange will be displayed the warnings
    • In red will be displayed the error that you must correct to be able to submit your data feed 

    Next to these errors or warnings, you should see the number of items that are concerned.

    By default, the reports will give the 10 first examples ( sku ) that are concerned with each error and warning. You can change that by editing the Items in preview in System  ConfigURATION  Wyomind  Simple Google Shopping Core Settings.

    Manage your data feed templates 

    10 Things to know when creating an XML data feed 

    1.  An XML data feed is made of XML tags using an opening and closing tag that includes a value.
      <price>45.99 USD</price>​
    2. A data feed template is made of several tags including a dynamic or a fixed values
      <g:brand>Fixed Brand</g:brand>

    3. Dynamic values are called variables and use the attribute codes of your Magento website. Attribute codes must be surrounded by brackets

    4. Between every opening and closing tags, you can also include some fixed values. Fixed values are simply text.
      <g:brand>YOUR BRAND</g:brand>

    5. You have also the possibility to add several variables and fixed values in a same tag.
      <title>{name},available in {color}-{size} for only ${price}</title>

    6. You're allowed to use PHP code if you want to customize the pattern. You just have to write your PHP code in one single line, and it will work perfectly (check how to add PHP scripts into your templates).
      <g:gender><? if (stristr($product->getName(),"dress")) return "Female"; else "Male"; ?></g:gender>

    7. The syntactic coloration in Simple Google Shopping will help you to avoid any error in your template. First, the errors will be underlined in yellow. You need to correct each error before checking syntax once again. Finally, you'll be able to check data.

    8. Some Magic variables will act as shortcuts to create complete portions of XML in your data feed including the appropriate variables.

    9. You can use one or more fallback variables in case of the previous is empty or null.
      {color | colour | custom_color}

      If attributeA exists then the value will be attributeA, otherwise, the value will be attributeB, etc...

    10. CDATA are recommended. CDATA stands for Character Data. It means that the data in between these tags include data that could be interpreted as XML markup, but should not be. (Wikipedia article)
      <description><![CDATA[<p>Fantastic <b>Watch</b>, that not only tells you what time it is,
      but also gives the weather trends</p>]]></description>​

    Attribute specifications


    Most of the time simple products are related to parent products like configurable, grouped and bundle products. That is why you might need to retrieve Parent attribute values instead of simple product attribute values such as url, image, description...

    {attribute_code parent}

    Retrieves the first parent attribute value.

    The parent value is retrieved only if the simple (item) product is associated with a parent product, if not, its own attribute value is retrieved.

    The parent product may be a configurable, a grouped or a bundle product. The first parent product that matches the simple product is used to get the attribute value.


    {G:PRODUCT_TYPE parent}
    <g:product_type>{categories parent,[last]}</g:product_type>

    {attribute_code configurable}

    Retrieves the first configurable parent attribute value.

    The configurable product value is retrieved only if the simple product is associated to a configurable product, if not, its own attribute value is retrieved.


    {G:IMAGE_LINK configurable}
    <g:image_link>{image configurable}</g:image_link>

    {attribute_code grouped}

    Retrieves the first grouped parent attribute value.

    The grouped product value is retrieved only if the simple product is associated to a grouped product, if not, its own attribute value is retrieved.

    Eg :

    <link>{url grouped}</link>

    {attribute_code bundle}

    Retrieves the first bundle parent attribute value.

    The bundle product value is retrieved only if the simple product is associated to a bundle product, if not, its own attribute value is retrieved.


    {G:SALE_PRICE bundle}
    <g:price>{price bundle}</g:price>



    Retrieves the product id.

    For example:



    Is the shortcut for:


    You can retrieve the id instead of the sku by adding an option:



    Is the shortcut for:

    <g:item_group_id>{sku configurable}</g:item_group_id>


    Retrieves the product SKU

    For example:



    Retrieves the brand of the product.

    For example:



    Retrieves the brand of the product.

    For example:




    Retrieve the product name

    For example:



    Is the shortcut for:



    Retrieves the description of the product.

    For example:



    Is the shortcut for:


    You can retrieve the short description instead by adding a parameter:



    Retrieves the short description of the product.

    For example:



    Retrieves the condition of the product.

    For example:



    Retrieves the weight of the product.

    For example:




    Retrieves the normal price or the special price if it exists.

    For example:


    You also have the possibility to use 2 parameters with this attribute:

    • currency must be an ISO3 code. This option automatically converts the original product price to a specified currency.By default, your local currency is used.
    • vat_rate can be a float number that represents the VAT percentage or a ISO2 country code, then the VAT rate will be automatically applied depending on the country and the tax class. VAT can also be substracted by using the minus (-) prefix.

    Here are a few examples:

    To convert the prices to EUR and apply a 20% VAT rate:


    To convert the prices to EUR excluding tax:


    To convert the prices to EUR and apply the VAT rate that applies for France:


    To convert the prices to USD and apply the VAT rate that applies in United States / New York:


    To convert the prices to USD and remove the VAT that applies in United States / New York::


    If your prices are including VAT, then var_rate parameter must be ommited.


    Here are some examples:

    To convert the prices to EUR


    To convert the prices to USD



    Is the shortcut for:


    The same parameters as {price} may apply.


    Retrieves the price and ignores any existing special price value.

    For example:

    The same parameters as {price} may apply.


    Retrieves the promotional price (special price) if exists.

    If this price doesn't exist the value is null.

    For example:

    The same parameters as {price} may apply.


    Retrieves either the price or the special price or the price including the catalog price rules if indicated.

    For example:


    You also have the possibility to use some parameters with this attribute:

    • currency is for currency conversion. This option automatically converts the original product price to a specified currency. It uses an exchange rate already stored by you in your admin panel. By default, your local currency is used.
    • vat_rate is a floating value between 0.00 and 100.00 that represents an arbitrary VAT rate to apply. This option rewrites the VAT rule for the product except if the product doesn't have any tax class.
    • customer_group_id allows you to determine which price rules must apply for a given custom group id (by default the "NOT LOGGED IN" customer group applies)


    Is the shortcut for:
    Must be used in combination with {normal_price}:

    The same parameters as {price} may apply.


    Retrieves either 1 if a special price exists or 0 if it doesn't.

    • value_if_yes value to retrieve if a special price exists. By default 1.
    • value_if_no value to retrieve if no special price exists. By default 0.

    For example:



    Retrieves the minimum price.

    For example:
    {min_price} must be used for Bundle and Grouped products.
    The same parameters as {price} may apply.


    Retrieves the maximum price.

    For example:
    {max_price} must be used for Bundle and Grouped products.
    The same parameters as {price} may apply.


    Retrieves the product promotion id if exists.

    To know more about the use of this attribute, check out our doc on Google Merchant Promotions extension.



    Retrieves the product's absolute url.

    For example:

    url attribute can receive the currency code as an url parameter to display the landing page with a specific currency, for example:


    With children of configurable products {url} can be used with 2 additional parameters as follows:


    • variant (optional) generates the url of the configurable product including  additional parameters that may help to display the price of the variant and to pre-select the configurable attribute
    • force (optional when using variant) forces to reload the product model (useful if the configurable attributes are not included in the template)
    // return for example: https://www.website.com/product-page.html?c=583&391=768#391=768


    Is the shortcut for:



    Retrieves the product's main image.

    • index is the index of any additional images to retrieve. By default 0 (the main image).

    For example:



    Is the shortcut for:


    Retrieves the host url, for example https://www.website.com.

    An example with attribute {small_image}:



    Retrieves the product canonical relative url.
    For example:



    Retrieves a list of category paths separated by "," in which the product may be found


    • number_of _category_path, by default infinity
    • from_category_level, by default 1 (root catalog)
    • number_of_categories_in_each_path, by default infinity



    2 arguments can be used to specify the path separator and the category separator:


    • path_separator, by default "comma" (,).
    • category_separator, by default "higher than" (>)



    Only one argument can be used to get the first or the last (deepest) category path:



    A complete list of all categories per product can be retrieved with the following method:

    <? $product->getCategoriesArray(); ?>


    Has no equivalent, this attribute creates a list of all the categories where the product may be found:
    <g:product_type>category A > sub-category B </g:product_type>
    <g:product_type>category A > sub-category B > sub-category C</g:product_type>
    This attribute generates a tag for each category in which the product is classified.

    Options: see {categories}


    Retrieves any new category that you have assigned (in the Categories filter) to the item's own product category. If no mapping is assigned to the first category found, the second category will be used etc.


    • index: index of the category mapping

    For example:


    Will retrieve a maximum of 5 category mappings in 5 separate tags.


    Is the shortcut for:


    This magic attribute retrieves the Google category that you assigned (in filter section/category filter) of the first category found to which the product is linked. If no Google category is assigned to the first category found, the second category will be used, if no Google category is assigned to the second, the third will be used etc.

    To find the Google categories that match with your categories:

    Options: see {category_mapping}



    Retrieves the stock status "in stock" or "out of stock".

    For example:



    is the shortcut for:

    <g:availability>{is_in_stock?[in stock]:[out of stock]:[available for order]}</g:availability>

    Options: see {is_in_stock}


    Retrieves either "in stock" if the product is in stock, "out of stock" if the product is out of stock or "available for order" if the product is backordered.
    • value_if_in_stock value to retrieve if the product is in stock
    • value_if_out_of_stock value to retrieve if the product is out of stock
    • value_if_preorder value to retrieve if the product is backorderable

    For example:

    <g:availability>{is_in_stock?[in stock]:[out of stock]:[preorder]}</g:availability>


    Retrieves the available quantity.

    The quantity retrieved for the configurable products is based on the sum of simple products.

    For example:




    Retrieves the gender of the product.

    For example:



    Retrieves the age group of the product.

    For example:



    Retrieves the color of the product.

    For example:



    Retrieves the size of the product.

    For example:



    Retrieves the material of the product.

    For example:



    Retrieves the pattern of the product.

    For example:



    You can apply one or more functions to all attributes by using the following syntax:


    All options are executed in the written order eg:


    will produce:

    <title>NOKIA© 2610 Phone</title>
    <title>nokia&copy; 2610 phone</title>
    <title>Nokia&copy; 2610 Phone</title>


    Removes all html tags.

    For example:



    Removes all characters that don't belong to the utf8 charset.

    For example:



    Truncates the value.
    • max_length: maximum length of the value
    • end_string: string that will be added at the end of the string. By default: [...]

    For example:



    Transforms the value to upper case.

    For example:



    Transforms the value to lower case.

    For example:



    Removes all EOL characters from the value.

    For example:



    Converts all HTML entities to their applicable characters.

    For example:



    Converts all applicable characters to HTML entities.

    For example:



    Joins all array elements in a string.

    • separating_string: string used between each value. By default it is a comma (,).

    May be useful for multi-select attributes like color.

    For example:


    will give: black, blue, red, green.


    Converts a numeric value to a floating number.

    • decimals: number of floating number. By default [0].
    For example:


    The Stocks in The Channel users can use the following attributes in order to build their data feeds :

    {SC:URL} or {sc:url}

    Retrieves the canonical url of the product :


    {SC:EAN} or {sc:ean}

    Retrieves an unique ean value of the product:


    {SC:IMAGES} or {sc:images}

    Retrieves the associated image of each product :


    {SC:DESCRIPTION} or {sc:description}

    Retrieves the description for the product:

    <g:description>...product description ...</g:description>

    A default value is retrieved when the description is empty.

    PHP API for Simple Google Shopping

    With Simple Google Shopping you can use PHP scripts in different ways to fully customize and control the data feed output.

    Inline PHP scripts
    Scripts that are added directly to the data feed template surrounded by PHP short tags (<? ... ?>)

    API coding standards

    The Simple Google Shopping PHP API uses the exact same syntax and standards than any PHP coding.

    Attribute calls

    For performance reasons, Simple Google Shopping only loads in the collection of products the attributes that are explicitly required in the data feed template.

    This means that only the attributes that are called using the template placeholders, {attribute_code}, will be added to the collection of products.

    As a consequence, when you try to access the value of an attribute from the $product object, you must be sure that the attribute has been added to the collection.

    Most of the time when the returned value is null for a given attribute, it means the attribute is not loaded in the collection of products.

    The best way to be sure that all the attributes you need are well loaded in the collection, is to add at the beginning of your template a simple script that lists all the attributes required.

    /* list of required attributes 
    * {attribute_1} {attribute_2} {attribute_3} {attribute_4}...

    Then you should be able to get the values of these attributes in your PHP script:

    <? return $product->getAttribute1();?>
    <? return $product->getAttribute2();?>
    <? return $product->getAttribute3();?>

    PHP functions in attribute calls

    You can use any PHP function to apply in the attribute calls even if the function requires one or more additional arguments, for instance:


    You can use several consecutive functions:


    Conditional values

    To output values based on different conditions, use PHP conditional statements:

    • if/else
      /* attribute {sku} required */
      if ($product->getSku()=="abc"){
      return "Alphabetic";
      return "Numeric";
      return "Mixed";
    • switch/case
      /* attribute {sku} required */
      case "abc":
      return "Alphabetic";
      case "123":
      return "Numeric";
      return "Mixed";

    Opening and closing tags

    When using the PHP API inline directly in your data feed template, you must use the opening and closing short PHP tags (<? ... ?>)

    if($product->getData('size')=="X-Large") {
    return "XL";

    Outputting a value

    • Return
      Any value that you want to output in your data feed, must be returned with the return instruction.
    <? return "Don't miss! ".$product->getTitle(); ?>
    /* This script adds for each product in data feed  a new ouput line 
    *  Don't miss! Iphone 5
    *  Don't miss! Galaxy note 7
    *  ... 
    • echo, var_dump, print_r
      Any value printed in the data feed through these functions will be rendered at the top of the data feed and will not be added to the final file.
      Such functions must be used for debugging purposes.
    <? var_dump($product->getTitle()); ?>
    /* This script adds for each product in data feed  a new debugging trace 
    *  String(8) "Iphone 5"
    *  String(13) "Galaxy note 7"
    *  ... 

    Variables scope

    All variables available in PHP scripts have a local scope, this means they can't be shared between several scripts.

    If you wish to share a variable with different scripts all along the data feed generation process, then the variable must be set as a global variable.

    global $increment;
    return $increment;
    /* This script will output a incremental $variable
    * 1
    * 2
    * 3
    * ...

    API Objects, Variables and Methods

    Object $product

    $product is an instance of Mage_Catalog_Model_Product. It contains all methods available by default and some other specific to Simple Google Shopping.

    The list below is not exhaustive but lists the most useful methods.

    • $product->getCategoriesArray()
      Retrieves an array of arrays that describes the categories to which belongs the products
    • $product->getCategoryIds()
      Lists all category ids in which the product may be found
    • $product->getVisibility()
      Returns the visibility of the product (1 = not visible individually, 2 = catalog, 3 = search, 4 = catalog and search)
    • $product->getStatus()
      Returns the status of the product (1 = enabled, 2 = disabled)
    • $product->getData($attributeCode)
      Returns the value of the given attribute code
    • $product->getAttributeText($attributeCode)
      Returns the textual value of the given attribute code

    Object $this

    $this is an instance of Wyomind_simplegoogleshopping_Model_Feed. It provides a few useful methods.

    • $this->hasParent($product, $type="parent")
      Returns a Boolean value whether a product has a parent from the given type (parent, configurable, grouped, bundle) or not
    • $this->getParent($product, $type="parent", $strict=false)
      Returns a product object of the given parent type (parent, configurable, grouped, bundle) if available or the product object passed as 1st parameter when $strict parameter is set on false.
    • $this->skip()
      Skips the current product, useful to filter out some products based on specific condition

    Manage your Google Shopping data feeds in your Google Merchant Account

    Each store is different; this is why you must pay particular attention to how is configured your data feed to be sure that it matches your own needs. We highly encourage to read user guide before to start using our extension and before submitting your data to Google Merchant.

    A wrong configuration or an invalid data feed may result in the suspension of your Merchant account.

    Create a data feed in Google Merchant

    Go to your Google Merchant Center account in ProductsFeeds  and click on the PLUS icon, the data feed settings appear.

    Basic information

    • Type:  Product or local products
    • Target country

    Select the type Products and the country of your choice.

    Primary feed name and input method

    • Data feed name: the name of the data feed as it will appear in your merchant account 
    • Data source: Google sheets, Scheduled Fetch, Upload or Content API.

    Enter the data feed name and select either Scheduled Fetch or Upload. 


    • File name: the exact file name, for example: Googleshopping_full.xml
    • Fetch Frequency: daily, weekly or daily
    • Fetch Time: the time when Google must fetch the data feed
    • Time zone: your locale time zone
    • File URL: the URL that appears in your back office when the data feed is generated
    • Login and Password: if the data feed is protected with http authentication

    Fetch time must be synced with the data feed generation time, for example; the data feed is generated at 01:00 AM, Google must fetch the data feed at 02;00 AM.

    Fetch frequency must be synced with your catalog updates. A daily fetch frequency requires to monitor your data feeds daily.

    Click on save 

    Then the new data feed appears in the feeds page. Click on the new data feed name and ask Google to Fetch the data.
    Once the data have been fetched a report is generated including errors and warning that must be fixed.

    Fix errors and warnings of the data feed


    Here is below a few examples of the common errors in Google Merchant Center

    Invalid URL

    To start, all the errors linked to the URL are due to the fact that you didn't specify the URL of your website in your Google Merchant Center account, so go to:
    Google Merchant Center 
    Settings  General.

    Missing shipping information

    If you get this error, it is because you didn't configure shipping rule in your Google Merchant Center account or if you did, you didn't do it for the target country. For that, go to:

    Settings  Tax and Delivery.

    Here you can add a new rule just by clicking on + Delivery Method 

    Then, fill in the different fields and click on Save .

    Insufficient product identifiers: Missing brand attribute

    It seems here that some products don't have a brand. We can especially read that clothing items need a "brand" value. You can check the problem of each one of the 5 products sample by clicking on Show item.

    You have to add an attribute (for example brand_apparel) for clothing (shoes included) categories and define a brand for each one of those products (the brand can be for example the name of your website) from your admin:

    MagentoManage products.

    In the case where you didn't define a brand for your products, you can define in your data feed configuration that all products will get the brand XXX by writing: 


    Like below, in the case where your products don't have enough identifiers, you can define that there is no identifier existing by replacing




    Missing required attribute: age group

    Here, the error is due to the age group. In the case you don't sell items for children you could edit the template with:


    In the case you sell products for adults and for children, you will need to specify the age group for each one of your products in your Magento admin and keep:


    Missing required attribute: color

    Here, a product doesn't have "color" value, so you need to assign a color to that product in your Magento admin.

    Currency is not supported in the given country in attribute: price

    The currency is not supported here, so it means the currency defined in the template in not the same as the currency of your products. In that example, the currency defined in the template is in EUR whereas the products' prices are in USD. In the template, every EUR must be changed into USD.

    Missing required attribute: size

    Apparently, a size attribute is missing here. Indeed, if you check your products, you can find out that they are all shoes and that size attribute is missing. First of all, you need to check in the black box if there is already an existing size attribute for shoes by clicking on Check Attributes.

    The size attribute for shoes exists under the name of {shoe_size}. We will add it to our template just as below. The error is now corrected.


    With Google Merchant Center, you can also have an overview of the warnings. Warnings are not penalizing because your products are inserted to Google Shopping however it is better no to have some.  

    Missing recommended attribute: image link

    You need to understand here that some of the products don't have image link. Click on Show Item to have more information on products. Let's take the example of coal_sm.

    If we go to Catalog  Manage Products from our admin and if we have a look at that product, we find out that it is a product linked to a configurable.  

    The solution would be to modify the template and to replace



    {G:IMAGE_LINK parent}

     in order to get the image links of the parent products.

    Missing recommended attribute: description

    Here, it seems a description is missing for the product zol. Go to the product page in your admin and edit the product. 

    Missing recommended attribute: google product category 

    When Google product category is missing, it means that you didn't map your categories with Google ones.

    For that, go to Catalog  Simple Google Shopping in the Categories tab of your data feed.