Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

Com GoogleBaseXML Documentation (Legacy Versions)

Installation

Upload and install as normal using the Joomla! installer.

Usage

Usage is quite straightforward. Once you have installed the component go to components->Googlebasexml on your admin menu. This will bring up a simple control panel for Googlebasexml. Click the 'parameters' button, this will bring up the component parameters. Set these as required and then click 'save' - see below for further details on the parameters.

The link for your product data feed is displayed on the Googlebasexml control panel. If you change the target country parameter you will need to refresh the page to display the correct feed.

Click to view the control panel

You can use the product data feed link in two ways:-

1) If you click the link then the page which is opened will display the xml data feed. You can save this page. Click 'file->save as' on your browser. Give the file a name, you can save the file either as a text file, or use type 'all files', and save it with a .xml extension.

Once you have save the file to your hard drive you can upload it manually to your Googlebase account.

2) You can submit the link itself for a scheduled upload. The link will continue to work so Google can automatically load the data on a regular basis.

Target Countries

Google currently supports these target countries: USA, Great Britain, Germany, France, Italy, Netherlands, Spain, China, Japan, Australia, Brazil and Switzerland. You can have a data feed for each country, they will take the format for example:-

  • Germany: http://www.example.com/index.php?option=com_googlebasexml&format=xml&product_currency=EUR&product_country=DE
  • GB: http://www.example.com/index.php?option=com_googlebasexml&format=xml&product_currency=GBP&product_country=GB
  • USA: http://www.example.com/index.php?option=com_googlebasexml&format=xml&product_currency=USD&product_country=US

So you can see that the country links just differ by the product_currency and product_country request parameters, hence it is possible to set up product feeds for all three target countries simultaneously.

If you are unsure about the correct link for your site, the link for your product data feed is displayed on the Googlebasexml control panel. If you change the target country parameter you will need to refresh the page to display the correct feed.

Parameters

The component parameters are shown in the links  below:-

Parameters 1 (basic parameters)

Parameters 2 (advanced options)

 

Product Categories

You can select specific parameters in the component parameters, to generate category-specific data feeds. This can be useful when you have a very large number of products, because it means you can split the upload. (See the section below on troubleshooting).

Select multiple categories using control-click or shift-click (to select a range). Save the parameters then close the options dialogue. You will need to refresh the admin page to see the new link.

Feed Specification

You can find details of Google's feed specification here. You should read it carefully.

The format of the product data stored by Virtuemart is substantially different from that required by the Googlebase feed specification, hence it requires some extra work to support all the Google feed attributes. However this can be done with GooglebaseXML.

The component supports the following main product attributes:-

 id, title, link, price, sale price, sale price effective date, description, condition, gtin, brand, mpn, image link, additional image links, product type, google product category, availability, quantity, shipping, manufacturer, shipping weight, featured product.

Additionally the component allows for the variant attributes: size, color, age group, gender, pattern and material. If your Virtuemart products include child products then the component can display these as product variants. If you are going to do this it is important to read Google's feed specification carefully.

Because Virtuemart does not directly support many of these attributes it is necessary to use a bit of ingenuity to use them. Where the attribute will normally have a constant value for most or all your products the easiest way is to to define a default value in the component parameters. For example you may only sell new products, in which case the condition attribute will always be 'New', so the easiest thing is to set this as a default value for the 'Default Product Condition' parameter.

Virtuemart Custom Fields (Virtuemart 2)

The most effective way to include the attribute data that Google requires is through the use of Virtuemart product custom fields. We have a general guide to creating custom fields in Virtuemart 2 here (in Virtuemart 1.1x the equivalent is to use product types, described below). You can use this method to include variant attributes for your products, also to include mpn, gtin, condition, availability and google category information.

The process is:

  1. Create a product custom field, called for example gtin. This only needs to be a simple string field, and not a cart attribute;
  2. In your product editor, go to the custom fields tab, select the custom field and add the required value, then save;
  3. Now open the Googlebase XML options, under Custom Field For GTIN you should see the custom field listed, select it and save, so that the feed know which custom field to use.

The process needs to be done in that order because until some custom fields are defined they will not be available as options in the GooglebaseXML configuration.

There is also a simple method of embedding condition, mpn and gtin data, simply by including it in the product description (this is described below), however recommend using the custom field approach, it is more flexible, for example you can choose to hide it from customers by making it a hidden field.

Virtuemart Product Types (Virtuemart 1.1x)

The most effective way in Virtuemart 1.1x to include the attribute data that Google requires is through the use of Virtuemart product types. Virtuemart uses product types to define additional data for products. If you want to use this method for your product feed you can define a 'Google' product type, and assign it to all your products. Then you can create the data fields for this product type, and assign them to your product feed in the GooglebaseXML parameters. There is more information about setting up product types here: http://www.spiralscripts.co.uk/Joomla-Tips/using-virtuemart-product-types.html

If you are using child products as product variants, you can also use the child product attributes to supply the variant attribute data. Simply assign the appropriate attribute field in the Googlebase XML attribute options.

ID:

Google requires a unique id for each product listing. The Googlebasexml component uses the product SKU. You can choose whether to include the country code in the ID as well using the 'Add Country Code to SKU' parameter. This is useful if you want to submit a data feed of your products to more than one target country, since it generates separate IDs then for each country.

Condition:

Google accepts only the following values for this: new, used, or refurbished. You can set the default value for this attribute for your site using the component 'default product condition' parameter. You can create a custom field to supply the value (see custom fields above). You can also over-ride the default value for an individual product by including one of the following in your product description:-

  • Condition: New
  • Condition: Used
  • Condition: Refurbished

 

For example, if your site sells mostly new stuff with a few refurbished items you might want to set a default value of 'new' for your products' condition, and include the string 'Condition: Refurbished' somewhere in your product description.

The other required attributes are self-explanatory, since they match Virtuemart data fields. Note that Googlebase will not accept free items, so the component tests whether the product price is greater than 0 before listing a product.

gtin

GTIN stands for Global Trade Identification Number. This is a unique product identifier for your product. These identifiers include UPC (in North America), EAN (in Europe), JAN (in Japan), and ISBN (for books). You can include any of these values within this attribute. You can create a custom field to supply the value (see custom fields above).

Alternatively you can embed the information in the product description. To include a gtin, add one of the following to your product description:-

  • upc: 001234567891
  • ean: 1001234567891
  • jan: 123456789
  • isbn: 0451524233
  • gtin: 0451524233

Note that the numbers above are examples, you will need to replace them with the actual product code number.

mpn

MPN stands for manufacturer product number (the number which uniquely identifies the product to it's manufacturer). You can create a custom field to supply the value (see custom fields above). Alternatively, to include this attribute, include the following in your product description:-

  • mpn: GO1234568OOGLE

Please note that the number is an example, replace this with your actual number. The code can accept the following characters: a-z A-Z 0-9 :\-_

Product Type

Google accepts text such as 'Home & Garden > Kitchen & Dining > Appliances > Refrigerators' for this attribute. The Googlebasexml component constructs this from the category path for the product.

Google Product Category

Google product category must correspond exactly to the product taxonomy defined here: http://www.google.com/support/merchants/bin/answer.py?answer=160081

For example: Food, Beverages & Tobacco > Food Items > Grains, Rice & Cereals.

There is no need to worry about escaping the > and & characters, this will be done automatically when the feed is generated.

If most of your products belong to the same category the easiest way to set this attribute is through setting a default value in the GooglebaseXML parameters. If you want to override this for an individual product you can do this by setting up a custom Google category field as a product custom field (see custom fields above).

Availability

This attribute consists of text with only three accepted values: 'in stock', 'out of stock', 'available for order','preorder'. You can set the default value for this attribute using the component 'Default Product Availability' parameter. If you want to override this for an individual product you can do this through the Virtuemart product editor, which includes an 'availability' field (on the product status tab), or through setting up a custom product availability field.

Shipping

You set the main shipping data through the Google merchant centre control panel. If you are using weight-based shipping the feed can display shipping weights. If you are not using weight based shipping it is best to turn off the 'show weight' option, it may cause problems for your feed.

 

The other recommended attributes are self-explanatory because they correspond to Virtuemart data fields.

 

Troubleshooting

Problem. The page takes a long time to load, and finally you get a blank page.

When this happens it is because the script is running out of memory, which can happen if you have a large number of products.

Solution

The script includes code to increase the memory size by changing the PHP configuration, but some hosting providers do not allow the configuration to be changed at run-time.

You may be able to solve this by putting a text file in the root folder of your site called php.ini - this should contain the line:-

 

memory_limit=32M

 

which will increase the memory to 32 megabytes. You can experiment with this value if you require more.

 

If you are using an Apache server you can also try putting the following in your .htaccess file:-

 

RLimitMem 32000000

 

As a last resort you can try uploading your products by category, by appending the category id to the product feed url, for example:-

 

http://www.mysite.com/index2.php?option=com_googlebasexml&format=xml&product_currency=GBP&product_country=GB&catid=6,7,8

 

This will display products from the categories with id numbers 6, 7, and 8. If you use this approach please note that the category id is the number displayed in the far right column, not the left hand column, when viewing the Virtuemart category id. The categories can be generated automatically using the component parameters - see the section above on categories.