Google Shopping Feed
Table of Contents
- Best Practices
Extension page: http://www.rocketweb.com/google-base-feed-generator
Supply Google with a properly formatted product text file that will be fetched on a schedule.
- Meet all requirements for free Google Shopping listings and paid Product Listing Ads
- International support for Google Shopping listings in US, Europe and South America
- Support for large catalogs using batch segmentation
- Support for multiple stores
- Support for all product types Google supports
- Support for shipping, AdWords, and dozens of other features
Backup your data
Backup the database and your store's web directory.
This step is for Magento 1.4+ versions. If you are running an older version, this step can be skipped. In the Magento admin panel, go to System->Tools->Compilation. In case "Compiler Status" is "Enabled", click on the "Disable" button (in case the status is disabled you can skip this step):
This screen should now look like this:
Download and Extract
Download and extract (unzip) the extension's contents on you computer. Navigate inside the extracted folder.
Using a FTP client, upload the content of the extension directory to the store's document root, so that the app directory in the extension folder merges with the app directory on the server. If asked to replace any files, select "Yes".
Clear the cache
In the Magento admin panel, go to System->Cache Management and press the "Flush Magento Cache" button:
After the extension is installed, you can visit System->Configuration->Google Shopping Feed Generator in the Magento admin panel to see the main configuration options. This extension has many features but also can be quite complex. We highly recommend configuring a few settings at a time and generating a test feed as you are configuring to see how your product data is being generated. We have done our best to make sure this extension will have an answer for almost any Magento catalog. Often there are several different ways to produce a valid feed. The best solution for your catalog may require a little experimentation and patience.
Configuration / General Settings
Admin option to enable or disable the generator. If you would like to disable this extension on a specific store then switch to store view and save this option as "No".
Changing the language of your feed affects how Apparel products are matched using Google taxonomies. Your products should also be in the same language. Refer to Google Category of the Item attribute. Note, this setting does not affect price formatting. Price formatting depends on what is set for your store under System->Configuration->Locale Options->Locale. Also be sure to review the setting "Add Tax to Price" to specify if you want tax included in the display of all your feed prices.
"Feed path" is relative to the web root like: my_dir Allows you to to set an alternate save path. By default the feeds are stored in this directory: [path to magento]/var/rw_google_base/ If you’d like to use the default path than leave this option blank. Make sure the feed path has enough write permissions for both web server’s user and cron user if they are different. Ask your web hosting company for help if needed. Feed files can be created for every store. Files will have following file name format: google_base_[store code].txt Magento comes by default in single store mode with the store code default. If unchanged, this feed file will be in: [path to magento]/var/rw_google_base/google_base_default.txt
Generate Feed Now button:
This will generate the feed on demand. This button is meant to help you quickly test your configuration. It’s not recommended to use this button on catalogs with more than 1000 products. If Magento cron is setup for your system, your feed will be automatically generated each day at 1am server time. This button has a limit of 1000 products. If you know your server can handle more products at one time you can change the limit. Edit app/code/community/RocketWeb/GoogleBaseFeedGenerator/config.xml, tag <button_max_products>1000</button_max_products>
Test Feed Now button:
We highly recommend using this button to see if data fetched from a selection of products is well formed. There are 3 additional fields which specify which product(s) to test. You can load a specific sku, or a range of products with the offset and limit. To view the first product you entered in your Magento catalog set the offset to 0. The offset can be from 0 to the total number of products – 1. Limit can be maximum of 100 and will instruct the test to return that number of products. Using this button won’t write into the main file. It will write in an alternate file with the format: test_google_base_[store code].txt in the feed save path.
Submit only products of these types:
You can specify by store what types of products should be included in the feed. Adding configurable or bundle types will actually pull also associated simple products if it's specified in the 'Configurable products - non apparel' or 'Apparel' sections.
Add Out of Stock Products:
This rule is applied to standalone simple products or configurable products. Associated simple products have other rules defined in "Configurable products - non apparel" and "Grouped products - non apparel"
Use Batch Segmentation:
This feature is meant to help with large catalogs or to spread out the server load over time. A concern may be memory consumption when loading large collection of products. The script is optimized to load the minimum data in the collection of products by Magento's native model, but memory leaks will keep consuming more memory as the script runs longer.
Submit Products Without Images:
If set to 'No' it will skip all products without an image explicitly assigned to a product. Google Shopping Specification states that all feed's items (lines) should have set an image. In this case this option should be set to Yes. If the feed does not generate some products that are displaying images on your website, you may have customized your site to ignore product image assignments. In that case, try setting this value to Yes and you should see the feed properly generated with image URLs.
If Magento logging is disabled and this option is Yes it will log anyway. The logs are located in var/log/google_base_[store code].log
Auto Skip Products:
By default this feature is set to "Yes", meaning products that do not meet Google feed data requirements will be skipped. Setting it to "No" will force products to be added to the feed, but will still skip products matching the "Skip by Category" setting or if the product is specifically set to be skipped in the product attributes. Setting this to "No" and opening the feed output in a program like Microsoft Excel or Google Docs can help you identify missing info in your product data.
Log skip products messages:
Will add various messages with brief explanation why a product wasn’t added to the feed. These messages will be located in var/log/google_base_[store code].log
Configurable and Grouped Products / Non-Apparel
This section applies to configurable and grouped products that are not matched as apparel. Note: apparel matching is done based on the taxonomy used in the 'google_product_category' column.
How to add associated products:
Defines the way the product entity is been presented in the feed, as one or multiple lines.
Add Out of Stock Products - Associated:
Specify whether the stock is being managed per associated product or not.
This setting only applies for grouped products and defines the strategy of how the price is being computed for the parent product.
Associated products - Fetch description from:
Defines the criteria for how to populate description filled. Some stores will not have a description defined for the associated simple products. Others may have the most meaningful description set in the parent product. Pick the option that provides the most useful information. This option does not apply to apparel products with variants.
Associated products - Fetch link from:
Defines the criteria for how to populate URL filled. The link of the associated product item can be fetched from the parent configurable so all associated products line items in the feed will point to configurable product page. This option coupled with Associated products Form unique URLs for not visible associated products will generate unique URLs like: http://example.com/configuable.html?color=123&size=99 Second option 'Associated if is visible in catalog, otherwise from configurable' will try to grab a url from the visible associated product first. Option does not apply to apparel products with variants.
Associated products - Form unique urls for not visible associated products:
When this option is turned ON, The URL in the feed is targeting the specific product configuration that it refers to, using sub-items information like: product id, color, size, etc. EX: http://example.com/configuable.html?color=123&size=99.
Associated products - Fetch main image from:
Defines the criteria on how to populate the image URL. You can grab the image link from configurable product, associated product or either one. There is no support for additional images of associated products. Option does not apply to apparel products with variants.
Configuration / Feed's Map
Your Google Shopping Product Feed depends on your store configuration, types of products and available data stored in your products. Please carefully read Google Products Feed Specification https://support.google.com/merchants/answer/188494?hl=en to configure this extension properly.
Feed Columns Map allows you to associate any column of the feed with product attributes or hard-coded directives. Generally it is recommended to associate directives (the first grouping in the dropdowns) to corresponding columns. Column names must be exactly as Google specifies. English column names are acceptable for any locale but you may also specify local column names that Google approves. By default the extension comes configured with a minimal set of column associations. Most countries now require a valid mpn or gtin for products along with the brand. You should at least add one of these 2 columns before submitting your feed. To configure apparel products you should add the additional columns: color, age_group, gender, size, item_group_id and optionally material and/or pattern. If Static Value is filled, it will be used instead of the Product Attribute unless otherwise specified in the extension config notes below. Order will sort the columns in the feed. Google Shopping does not need Feed Columns to be in any order, use this mostly for your own readability as you review the feed output.
- id: A product's id must be unique across all feeds from a Google Shopping Account, so it's better to define it using the Product ID directive.
- title: No custom processing is made, so it is mapped by default to the "name" attribute of products. Google Shopping recommends titles with a maximum length of 70 characters.
- description: It is mapped to "description" attribute. Processing is done so that longer texts will be chopped by setting Maximum Length of Description below. Recommended max length is 500-1000, but no longer than 10000. Set Maximum Length of Description to empty if you want the description not be chopped.
- link: Should be associated with Product URL directive only.
- image_link: Should be associated with Product Image URL directive only.
- additional_image_link: Should be associated with Additional URLs of images of the item directive only. Remove the column if you want to add only the main image in the feed.
- price: Should be associated with Price directive only.
- sale_price: Mapped by default to "Sale Price - Special Price" directive. Will fetch special price if available.
- sale_price_effective_date: Mapped by default to "Sale Price - Date Range" Date time when the special price is active. The interval of dates will include the current date of the feed creation.
- availability: Whether a product is available to purchase. Should be associated with Availability directive only.
- shipping_weight: Associated by default with Magento attribute weight. Unit of measure must be specified in option Weight Unit of Measurement below.
- brand: By default it is associated with directive "Manufacturer – Brand" and should remain like this. Review the Manufacturer Attribute setting below.
- condition: By default it is associated with "Product Condition" directive.
- product_type: Associated by default with the attribute created by this extension: "Google Shopping Product Type". It can be found in admin product view page, tab Google Shopping Feed. You could define another attribute of type multiselect and associate it with this column. Multiple values are split by comma as in Google Shopping specification. You can use Product Type by Category to map your Magento category names to product types. New to version 1.5.14 is a directive called "Product Type using Magento Category". When this is enabled, the product type is automatically generated based on your Magento Category structure. If you use this function and you notice your product types are being exported starting with a category you do not want to include, enter that category name in the Static Value field and it will be removed. This can be common in multiple stores if you have multiple category trees. For example Store 1->Mens->Shirts, Store 2->Womens->Shirts ... in this care you can enter Store 1, Store 2 in the Static Value field to remove those initial categories from the output. Example valid Google Product Type: Home & Garden > Kitchen & Dining > Appliances > Refrigerators
- google_product_category: Associated by default with the attribute created by this extension: "Google Category of the Item". It can be found in admin product view page, tab Google Shopping Feed. You can use Google Product Category by Category below to map your Magento categories to Google product categories. Example: Apparel & Accessories > Clothing > Dresses
Additional URLs of images of the item:
This directive outputs a comma separated list of active image URLs for the product.
Directive not mapped by default. This directive is used to map the "adwords_redirect" column, as described in the Google Shopping specification. Whenever this directive is being used, also configure the text to be appended at the end of URL in "Add to Adwords Product URL".
Apparel - Age Group:
Displays a value using defined attributes in the "Apparel" section. See "Age Group Attributes" option. To use this add the Google Shopping Feed Column "age_group" and use the Directive "Apparel - Age Group" for Product Attribute under the Feed Columns configuration tab.
Apparel - Color:
Displays a value using defined attributes in the "Apparel" section. See "Color Attributes" option. To use this add the Google Shopping Feed Column "color" and use the Directive "Apparel - Color" for Product Attribute under the Feed Columns configuration tab.
Apparel - Gender:
Displays a value using defined attributes in the "Apparel" section. See "Gender Attributes" option. To use this add the Google Shopping Feed Column "gender" and use the Directive "Apparel - Gender" for Product Attribute under the Feed Columns configuration tab.
Apparel - Item Group Id:
Pulls the mapped Product ID of the parent product (configurable, bundle, etc) so that all variants of an apparel item are associated with parent product. To use this add the Google Shopping Feed Column "item_group_id" and use the Directive "Apparel - Item Group ID" for Product Attribute under the Feed Columns configuration tab.
Apparel - Material:
Displays a value using defined attributes in the "Apparel" section. See "Material Attributes" option. To use this add the Google Shopping Feed Column "material" and use the Directive "Apparel - Material" for Product Attribute under the Feed Columns configuration tab.
Apparel - Pattern:
Displays a value using defined attributes in the "Apparel" section. See "Pattern Attributes" option. To use this add the Google Shopping Feed Column "pattern" and use the Directive "Apparel - Pattern" for Product Attribute under the Feed Columns configuration tab.
Apparel - Size:
Displays a value using defined attributes in the "Apparel" section. See "Size Attributes" option. To use this add the Google Shopping Feed Column "size" and use the Directive "Apparel - Size" for Product Attribute under the Feed Columns configuration tab.
Whether a product is available for purchase. Accepted values: in stock, available for order, out of stock, preorder. Any other values will be replaced with "out of stock". By default it uses a product’s stock status. Possible values built into Magento are in stock or out of stock. If "Use default Stock Statuses" is set to No an additional attribute must be specified for use instead of product’s stock status in the option Alternate Stock/Availability Attribute. This is visible when Use default Stock Statuses is set to No
Manufacturer / Brand:
"Manufacturer Attribute" option specifies which attribute contains the manufacturer. By default is set to attribute "manufacturer". If there is no attribute set to Manufacturer Attribute or the attribute does not exists the column will be removed from the feed.
This is depreciated as of 1.5.15 as Google not longer has this field listed in the Products Feed specification.
Configurable, bundle and grouped items will have the minimal price of an item. When a product has special price than this price will be used instead for all product types. Setting Add Tax to Price option below to Yes will add tax to all price columns. For US all prices should not include tax.
The directive fetches only the static value of this column. Default static value is new. The directive accepts only these values: new, used, refurbished. Alternatively it can be associated with an attribute. The attribute should contain the values above only as these values are all that Google will accept.
Product Expiration Date in Feed:
Computes an expiration date based on product creation and the "Days from Today that Feed Will Expire" option below. Set "Days from Today that Feed Will Expire" option to increase or decrease this date limit. This field is not longer required as of 1.5.15.
Setting "Add Store Code to Product Id" to Yes will allow to append to the product id the current store code. In some cases it is not enough to have unique values in column id. Setting "Unique Identifier to Id" will replace the appended store code with a custom text. Can be set in Store View only. Example: 2 Magento installs with 2 stores that have as store code [default]. In both feeds 2 products with id 1 can have in column id the value default. To avoid it set Unique Identifier to Id for both stores.
Product Image URL:
Simply pulls the product's main image URL. If you're product does not have an image assigned as the Base Image, your product may be skipped if "Submit Products Without Images" is set to "No". If you notice problems, try setting that to "Yes".
Product Category Image URL:
Returns category image of the first category assignment found for your product. This should only be used for special cases where product images are defined on the category level.
Product External Image URL:
Returns the value of product's "image_external_url", which comes packed with Toybanana_ExtImages extension. If you do not have the extension, you can simply create the image attribute and fill in the data for products.
Product Review Average:
This directive can be used to output product's average rating in the interval 1 - 5. To use this add the Google Shopping Feed Column "product_review_average" and use the Directive "Product Review Average" for Product Attribute under the Feed Columns configuration tab.
Product Review Count:
This directive can be used to output a column with the number of reviews products have. To use this add the Google Shopping Feed Column "product_review_count" and use the Directive "Product Review Count" for Product Attribute under the Feed Columns configuration tab.
Product Type using Magento Category:
Generates a string representing the category tree starting from the product's category node. You may omit some categories from the "Product Type using Magento Category" directive by specifying words matching the target categories.
Does processing on product urls so that they match the type of product and listing in the feed. Set the additional config "Add to Product URL" to customize further the end of a product URL with custom string. Can be used to track referring URLs in web analytics software. Setting this to ?utm_source=google_shopping will generate links like: http://mystore.com/product-url.html?utm_source=google_shopping. Products without assigned categories will not use the seo friendly version of the URL.
Sale Price - Special Price:
Will fetch special price if available on products.
Sale Price Data Range:
Date time when the special price is active. The interval of dates will include the current date of the feed creation. Otherwise Sales Price and Sales Price Effective Date won’t be set.
Outputs values generated by the "Shipping" engine which is configured in the section with the same name. To use this add the Google Shopping Feed Column "shipping" and use the Directive "Shipping" for Product Attribute under the Feed Columns configuration tab.
This directive should be used only with Static Value overwrite defined next to it. This directive exists to avoid assigning real attributes to the column when the intention is to never use it but just the static value.
Other Mapping Settings
Days from Today that Feed Will Expire:
Number of days. Used to set expiration date of the product feed. Use of this feature is depreciated as of version 1.5.15 as Google no longer requires it but will set the feed expiration to 30 days by default. Your product data will still be updated at the frequency you upload it. To use this add the Google Shopping Feed Column "expiration_date" and use the Directive "Product Expiration Date in Feed" for Product Attribute under the Feed Columns configuration tab.
Add Store Code to Product Id:
In multi-store configuration ids must be unique across all feeds in your account. If set to Yes, this will concatenate the product id and the store code. Check the Google Shopping spec here. Unique Identifier to Id config option from store view config may be used also.
Max Length of Description:
Maximum length of description. Longer text will be chopped. Recommended max length is 500-1000, but no longer than 10000. Set to empty, the description will not be chopped.
Add to Product URL:
Product URL will be concatenated with the text above. Can be used to track referral URLs in web analytics software. e.g. ?utm_source=google_shopping
Add to Adwords Product URL:
Adwords Redirect directive will utilize this value to append at the end of regular product url. See "Adwords Redirect" directive definition. Can be used to track Adwords URLs. e.g. ?utm_source=product_listing_ad. To use this add the Google Shopping Feed Column "adwords_redirect" and use the Directive "Adwords Redirect" for Product Attribute under the Feed Columns configuration tab.
Use default Stock Statuses:
To fill availability with in stock or out of stock, corresponding to product's stock status. If set to No, a valid product attribute is required.
Alternate Stock/Availability Attribute:
Visible when Use default Stock Statuses is set to No. Use this to define the attribute you want used for specifying stock statuses to Google.
Add Tax to Price:
For US, 'price' should not include tax. Many other countries do include Tax or VAT to prices displayed to all customers in the country.
Apply Catalog Price Rules:
Whether to include Magento catalog rules when computing prices on products.
Whether to format price according to the store's locale settings.
Specifies which attribute to be used with "Manufacturer - Brand" Directive.
Weight Unit of Measurement:
Specifies which unit to be appended to the weight value when populating the column feed.
This is depreciated as of 1.5.15 as this column is no longer in the Google Shopping Feed specification.
Google Product Category by Category:
Will allow you to assign Google product categories to Magento categories. Columns must be in Feed Columns Map.
If you only specify a parent category, the Google Product category you set for the parent will be applied to all child subcategories as well.
Values set for this option override Static Value if any is set for google_product_category column.
Rule Order number is relevant to set when you have a parent category and a subcategory with different Google Product categories. Rules with empty order are processed last.
Using the "Use My Categories" button will fill in each role entry with the category path of the selected node in the left. Example: Parent category has Google category Apparel & Accessories > Clothing and child category has Apparel & Accessories > Clothing > Dresses. To match Apparel & Accessories > Clothing > Dresses for this product, make sure to set the order to a higher value than the parent category where you defined Apparel & Accessories > Clothing.
Here are links to text files that list the product taxonomies for supported countries and languages. Note the date at the the top of these files. Google does modify their product taxonomies regularly. It is a good idea to review this a few times per year to see if you can better classify your items.
- BR: http://www.google.com/basepages/producttype/taxonomy.pt-BR.txt
- CZ: http://www.google.com/basepages/producttype/taxonomy.cs-CZ.txt
- DE: http://www.google.com/basepages/producttype/taxonomy.de-DE.txt
- ES: http://www.google.com/basepages/producttype/taxonomy.es-ES.txt
- FR: http://www.google.com/basepages/producttype/taxonomy.fr-FR.txt
- GB: http://www.google.com/basepages/producttype/taxonomy.en-GB.txt
- IT: http://www.google.com/basepages/producttype/taxonomy.it-IT.txt
- JP: http://www.google.com/basepages/producttype/taxonomy.ja-JP.txt
- NL: http://www.google.com/basepages/producttype/taxonomy.nl-NL.txt
- RU: http://www.google.com/basepages/producttype/taxonomy.ru-RU.txt
- US: http://www.google.com/basepages/producttype/taxonomy.en-US.txt
Product Type by Category:
This option has the same functionality as Google Product Category by Category. Columns must be in Feed Columns Map.
Values set for this option override Static Value if any is set for product_item column.
Using the "Use My Categories" button will fill in each role entry with the category path of the selected node in the left.
Using the "Copy Google Product Category by Category" will fill in the exact same settings from Google Product Category by Category to help speed up data entry for you. Data from Copy Google Product Category by Category is not saved until the general "Save Config" is pressed.
Adwords Grouping by Category:
Similar functionality as "Product Type By Category", but it applies directly to the 'adwords_grouping' when it's added to the map. To use this add the Google Shopping Feed Column "adwords_grouping" and use the attribute "Adwords Grouping" for Product Attribute under the Feed Columns configuration tab.
Adwords Labels by Category:
Similar functionality as "Product Type By Category", but it applies directly to the 'adwords_labels ' when it's added to the map. To use this add the Google Shopping Feed Column "adwords_labels" and use the attribute "Adwords Labels" for Product Attribute under the Feed Columns configuration tab.
Replace empty values:
Use this option when an item of the feed has an empty value for a column and you’d like it be replaced with a value from another attribute. Rules with empty order are processed last.
Skip Products with empty:
Use this option when an item of the feed has an empty value for a column and don’t want the item to be added to the feed. Columns must be in Feed Columns Map. Note this applies to empty columns, not empty attribute values and/or missing attributes. Example: When mpn column is empty don't add the product to the feed.
Skip Products From Categories:
Don't add products in the feed from selected categories. If a product has multiple categories and a category is selected in this option than it won't add the product to the feed. Option does not apply to apparel products with variants.
Configuration / Shipping
This section configures output of the "Shipping" directive. If the shipping is disabled here, no output will be generated for the directive.
The configuration options here are meant to construct the output required by Google Shopping Specification docs. Only table rates and static shipping methods are available for use here. Setting up real time shipping methods must be done within Google Merchant Center. Simple shipping rates by price and weight can be defined in Google Merchant center as well so you may wish to check those options and skip this section. Note: because computing shipping rates for each product can bring significant server overhead, the values are being cached throughout feed generation. The time which shipping options are cached is configurable below.
To use this add the Google Shopping Feed Column "shipping" and use the Directive "Shipping" for Product Attribute under the Feed Columns configuration tab.
Configuration / Apparels
This section applies to clothing, apparel and items that fall within the broad categorization of Apparel & Accessories, e.g. Shoes, Handbags, Jewelry, Accessories, etc. Please review the requirements for apparel products: http://support.google.com/merchants/bin/answer.py?hl=en&answer=1347943. To enable apparel functionality, the Google Product Category of an item or Magento category of items should be set to Apparel & Accessories > Clothing or the equivalent for your locale.
When using Apparel, Apparel columns used must be manually added to Feed Columns Map.
Possible columns for apparel: color, size, age_group, gender, material, pattern, item_group_id. item_group_id is mandatory for apparel variants as it offers a way of grouping them back with the parent product. Its value is the configurable product id. All apparel columns should be associated with the corresponding directives. Assigning attributes instead of directives will often result in not well formed feed data. Apparel columns like age_group and gender may use a static value if all your products are apparel.
Apparel products are identified by the Google Category of the Item: Apparel & Accessories (including all subcategories). Clothing products are identified by the Google Category of the Item: Apparel & Accessories > Clothing (including all subcategories). Shoe products are identified by Google Category of the Item: Apparel & Accessories > Shoes (including all subcategories).
- Enabled: If this option is set to No, products containing Google product category Apparel & Accessories will be skipped.
- Configurable attribute overwrites: Specifies which of the attributes of a configurable product will be used for all associated simple products in the feed as apparel variants. Works like an overwrite of the line item's attribute from a configurable product. You may for example wish to use the configurable product description for each variant rather than the associated simple product description. Overwrite of configurable options attribute like 'size' will be ignored because overwriting it, will ignore apparel detection.
- Submit Apparel Products Without Images: Google Shopping Specs state that apparel items should have an image. Set to No all apparel items without an image will be skipped.
- Submit Apparel Variants Without Images: Google Shopping Specs states that apparel variant items should have the variant’s image. If set to No it will use configurable’s product image.
- Allow Apparel without Color or Size: When set to NO, the functionality applies to all other apparels than configurable ones, where products with missing color or size are skipped. Configurable apparels are not been skipped but instead, they are been replaced with the valid associated product having minimal price.
- Age Group Attributes: Used to fill age_group column. The attribute values can be: Kids, Adult. Other values will be replaced with an empty value. For apparel variants, age_group should be added to the configurable product attribute. If the configurable product has an empty value in age group attribute it tries to fetch age group attribute values from associated products. To use this add the Google Shopping Feed Column "age_group" and use the Directive "Apparel - Age Group" for Product Attribute under the Feed Columns configuration tab.
- Gender Attributes: Used to To fill gender column. The attribute values can be: Male, Female, Unisex. Other values will be replaced with an empty value. Same functionality as Age Group Attributes option. To use this add the Google Shopping Feed Column "gender" and use the Directive "Apparel - Gender" for Product Attribute under the Feed Columns configuration tab.
- Color Attributes: Apparel products for most countries not require the color column. Color Attributes can be of any type (dropdown, multiselect, text etc.). If there are multiple values in an attribute (multiselect) it will add all in same cell separated by slash as Google Shopping specifications define. To use this add the Google Shopping Feed Column "color" and use the Directive "Apparel - Color" for Product Attribute under the Feed Columns configuration tab.
- Size Attributes:
Has relevance only for products with US Google product category or the relevant equivalent for your locale:
- Apparel & Accessories > Clothing
- Apparel & Accessories > Shoes
To use this add the Google Shopping Feed Column "size" and use the Directive "Apparel - Size" for Product Attribute under the Feed Columns configuration tab.
Variants are recommended to be used with Use Batch Segmentation: ‘Yes’ to avoid high memory usage if you have more than 2000 skus. Variants are formed from the associated simple products of a configurable products.
Variants columns (color, size, pattern, material) can be associated with configurable attributes in this extension. If a color or a size attribute assigned in this configuration section is present in the configurable product it will use that value. Otherwise it will try to fetch the value from attributes set in the Apparel non-variants section. If no value is set it will further try to fetch a value from the configurable (non variant attributes). There may be some product cases when the color is not among the configurable attributes (options of configurable product).
Pattern and Material attribute values will be placed only if there are at least 2 unique values for variants with same group_item_id (if variants belong to same configurable). If there are no variations, an empty value will be placed instead.
For US, UK, DE, FR, and JP feeds:
Resulting variants must vary by the combination of the variant attribute values. Example: 2 variants of a configurable product can't both have color White and size: XL for the same line item.
Poorly formed variants won’t be submitted. Instead the generator will try to send only one variant. It will try to fetch the associated product with the minimal price that has an image. Failed variants will not be sent, configurable will be added as non variant apparel if it is a valid apparel item.
For Other feeds:
If variants do not validate than the generator will try to add a single line with color and size compressed. Example: 2 associated products have color Red and Blue. The color column will have Red, Blue as value.
For all feeds if there are less than 2 variants the generator will try to add the product as a non variant apparel item.
The feed text file is generated on the server via cron, usually this is done daily if any product details commonly change each day.
When you log into Google Merchant Center you can add the url for your datafeed and tell Google to fetch it from your server either daily, weekly or monthly. It's common to just have Google fetch it daily after your feed is scheduled to build.
Is Magento Cron setup so that you're running cron.php or cron.sh every 5 minutes or so? If it is and you don't have batch segmentation setup, the feed is set to run each morning at 1am server time.
Sometimes Magento cron can be a bit finicky, for more control you can run the feed generation script directly on the command line to test or via cron.
cd [MAGENTO_ROOT]/shell && php -f gen_gbase_feed.php --help Usage: php -f gen_gbase_feed.php -- [options] store_code <string> Store Code (e.g. my_store_code or default). Store must exist and should be enabled. By default uses 'default' value. batch_mode <int> Segment the feed generation. Values accepted: 0 or 1. Default is 0. test_mode <int> Enable test mode or not. Default is 0. test_sku <string> Generate the feed only for a product sku. To be used for tests and debuging. test_limit <int> Sql limit parameter in test mode. Is applied to the select of the collection of products. test_offset <int> Sql offset parameter in test mode. Is applied to the select of the collection of products. verbose Outputs skus and memory during processing help This help e.g. php -f gen_gbase_feed.php --store_code 'my store code' --batch_mode 0
If you are using batch segmentation it's best to run this script directly. Turn on batch segmentation and set the number of products to include at each time. If you have 15,000 products and you build the file in batches of 1,000 try running gen_gbase_feed.php on the command line once to see how long it takes to run. If it takes 2 minutes for example, then setup cron to run at least 15 times every 5 minutes for a couple hours like:
*/5 2,3 * * * php -f [MAGENTO_ROOT]/shell/gen_gbase_feed.phpSomething like the above command will run the script 24 times and should work for up to 24,000 skus. When the script runs for the 16th time in this example, it will see it has found all the products and will immediately quit. So it's OK to run the script several more times than needed each night.
Add attribute values to Magento products
If you look in the Feed Columns section of the Google Shopping Feed Generator you will see where you can set default, static values for attributes. This is the easiest way to set values if all or most rows in a column will be the same. Set some defaults as appropriate. Set the product_type and google_base_product_category. Go here to review Google's Product Taxonomy. If you do not have a logical, meaningful category hierarchy on your own site, just set product type to the same thing as product category.
If you scroll down in the feed settings, you will see Google Product Category by Category and Product Type by Category. Here you can easily specify new product types and Google product categories depending on your specific category.
You can also set product attribute values in bulk by going to Catalog -> Manage Products.
- Select the products you want to edit.
- Now choose update attributes in the Actions dropdown box and click Submit.
- You will be taken to a screen where you can set attributes in bulk.
- Enter your value for the set of products, check the Change checkbox and click the Save button. You’ve now updated attributes for a set of products.
- For attributes other attributes, you can set some defaults in the Feed Columns map if you like and then edit those attributes in your products.
The Extended Product Grid with Editor is a great extension for giving you more control over what you select and edit in the Manage Products grid.
Increase the limit for Generate Feed Now button
The Generate Feed button has a limit of 1000 products set by default to protect the script from crashing if it tries to process to many products at once during your regular business hours.
To increase this limit you can edit:
Look for the button_max_products setting and adjust this to a limit you're comfortable with. Save the file and you can use the button for product catalogs up to the new limit.
Localization / Data Encoding
For stores that offer languages other than english or have any special characters in product names or descriptions, it is best to use a UTF-8 encoded source of text when pasting into magento products forms to avoid bad character encoding at output. Magento and this extension do not control your data encoding.
Assuming your data has been entered properly, a good practice is to also to configure Apache to append UTF-8 in response headers. It has been proved that in many cases this solution worked where special characters were previously not displaying properly in the feed file.
Add or edit the .htaccess file to you feed output folder and add the following lines to the .htaccess file:
AddDefaultCharset UTF-8 AddType 'text/css; charset=UTF-8' txt
Generate Feeds for Multiple Stores
To generate a feed for multiple stores first get your Magento store codes in the admin.
In the admin go to System -> Manage Stores. Click on the store view name for each store and make a note of the value in the code field. If you did not change the code for your first store, this value would be "default". The store code is used when the feed generation script is called and when your feed file is built. So if your first store has the code "default" the feed file would be called google_base_default.txt. If your second store has the code of store2, the file for that store would be called google_base_store2.txt.
To generate these files, it's best to disable the Magento cron entry for building a single feed file.
Open the file:
[MAGENTO_ROOT]/app/code/community/RocketWeb/GoogleBaseFeedGenerator/etc/config.xmlAnd remove this entire block of code from the opening
<crontab> to the closing </crontab>
<crontab> <jobs> <googlebasefeedgenerator_generate> <!-- In batch mode (use_batch_segmentation==1) must be set after midnight otherwise will not finish the queue. --> <!-- each 1 am --> <schedule><cron_expr>0 1 * * *</cron_expr></schedule> <run><model>googlebasefeedgenerator/observer::generateFeed</model></run> <!--<store>default</store>--> </googlebasefeedgenerator_generate> <!-- Setting generator to run for other stores in a multistore configuration. <googlebasefeedgenerator_generate_store_2> <schedule><cron_expr>0 2 * * *</cron_expr></schedule> <run><model>googlebasefeedgenerator/observer::generateFeed</model></run> <store>store_code_2</store> </googlebasefeedgenerator_generate_store_2>--> </jobs> </crontab>
Now you should start using the shell script which comes with extension. See section "Shell" for more more details.
php -f [MAGENTO_ROOT]/shell/gen_gbase_feed.php --store_code "STORE_CODE" --verboseUsing verbose here will give you more detail output, so do not use it when setting up the cron.
If you have ssh access to your server, you should try running the script on the command line to make sure it completes successfully for each store.
It's a good idea to make sure you have logging turned on so you can review the log file after the script runs. Go back into the admin to System -> Configuration -> Google Base Feed Generator and in the Settings tab set Force Logging to Yes and Log skip products messages to Yes.
Now a text log file will be created at
If you are not using ssh or your ftp client does not support viewing files, you can download this file to your computer and open it in any text editor.
This file will tell you how many products are added and how many are skipped:
2013-06-24T08:55:04+00:00 INFO (6): (mem 42.33 Mb) products (items added, skipped)(1913, 1) to file /home/user/public_html/media/google_base_default.txtWhen products are skipped, you'll see notices explaining why:
2013-06-24T08:53:02+00:00 INFO (6): (mem 20.05 Mb) product id 111 product sku ABC123, skipped - product has price 0 = '0'.Depending on how many products you have and how much memory you allow php to use, you may run out of memory trying to build the file.
If this happens, you'll simple need to enable batch segmentation by running the script with this option.
php -f [MAGENTO_ROOT]/shell/gen_gbase_feed.php --store_code "STORE_CODE" --batch_mode 1 --verboseGo in System -> Configuration -> Google Base Feed Generator Settings and set the batch limit. Look back in your log file and see how many products were processed before the script ran out of memory. You may see a final line like:
2013-06-24T08:53:51+00:00 INFO (6): (mem 129.01 Mb) (1100, 15000) products (processed, max)This tells us that the feed generated 1100 out of a total of 15,000 products. So set your batch limit to 1000 to be safe and allow for a little more buffer.
You should also look at how long it takes to run the script for one store. If it takes 2 minutes for example, then setup cron to run at least 15 times every 5 minutes for a couple hours like:
*/5 2,3 * * * [PATH_TO_PHP] [MAGENTO_ROOT]/shell/gen_gbase_feed.php --store_code "STORE_CODE" --batch_mode 1Something like the above command will run the script 24 times from 2am to 3am and should work for up to 24,000 skus. When the script runs for the 16th time in this example, it will see it has found all the products and will immediately quit. So it's OK to run the script several more times than needed each night.
With multiple stores, it's common to just build one file completely first and then run the second script to build the next one. A cron job for the second store following the first one would look like:
*/5 4,5 * * * [PATH_TO_PHP] [MAGENTO_ROOT]/shell/gen_gbase_feed.php --store_code "STORE_CODE" --batch_mode 1
Submitting a Feed to Google Merchant Center
The extension generates a text file of your product data in a format Google defines for feeds. Then you can instruct Google to grab that text file on a schedule to keep your product listings up to date.
The easiest way to submit your feed to Google Merchant Center is to make sure your feed is accessible on the web. In the extension configuration look in the settings tab and put "media" without quotes in the Feed Path field.
Now generate your feed.
This will put your feed in http://www.domain.com/media/google_base_default.txt ;... or http://www.domain.com/media/google_base_[store_code].txt if you use a store code other than "default". You should be able to visit this url for your stores hostname in your browser and see the contents of your feed.
Now login to Google Merchant Center: http://www.google.com/merchants/merchantdashboard
- Click Data Feeds in the left navigation.
- Click the New Data Feed button.
- Select your Target country
- Leave the Format as "googlebase"
- Specify a Data feed filename for your reference.
- Click Save Settings.
- Now in the Data feeds screen click the "Create Schedule" link for your new feed.
- Set the feed to update daily at some time after your feed finishes building each night.
- Set your server's timezone.
- Enter the feed url you tested in your browser earlier.
- Now click schedule and fetch now.
Google will grab the feed file from your server and then fetch it regularly according to the schedule you picked.
NOTE: Google will also accept ftp or sftp urls if you'd like to give Google your ftp password and keep the feed in a non web accessible directory.
When I try to access your extension's configuration at System->Configuration->Google Shopping Feed, I get a 404 error
Logout & Login back into the Magento admin panel.
My site is broken.
Please verify that you have turned off compilation see this link for help if you cannot log into your admin, http://kb.magenting.com/content/24/81/en/disable-magento-compiler.html. If compilation is off, make sure you have uploaded all the code. If you have uploaded all the code, try reverting from a backup and contact us for support though http://help.rocketweb.com if you do not have a backup, open your installer file and review the files included so that you can delete these files from your installation. Our extension is significantly modularized and we have never yet seen it break any site when it's fully uploaded and compilation is off.