Download this script and upload it to your store's main directory (the directory where
init.php is located). Then, point Google to the URL and that's it! Google will fetch it, and it will return all your product data!
gfeed.php ( 5.62K )
Number of downloads: 259Also
available on GitHub. Social coding! Yeah!
Make sure all your products have a
short description because this is a
required attribute for Google!
If the feed is not fully imported, perhaps you need to change encoding here:
echo '<?xml version="1.0" encoding="UTF-8"?>
You may try to change UTF-8 to ISO-8859-1 or the one that has all your language's symbols.
Here's a screenshot of
Google Merchant Center with sample feed settings:

------8<-----The following is needed if you want to have your own categories (taxonomy) ------>8-----
Google suggests that you supply product type with your data (according to their
data quality report).
I found three categories that my products are a part of.
In order to add this to the file (the categories have to be all the same for all products in your store):
Find this code in the file:
echo "
<item>
<g:id>$id</g:id>
<title>$title</title>
<link>$link</link>
<g:price>$price</g:price>
<g:condition>new</g:condition>
<description>$description</description>
<g:brand>$brand</g:brand>
<g:image_link>$image_link</g:image_link>
<g:quantity>$quantity</g:quantity>
</item>";
At the very end, you can add another type, which is the product type Google tag.
So, the code would look something similar to this:
echo "
<item>
<g:id>$id</g:id>
<title>$title</title>
<link>$link</link>
<g:price>$price</g:price>
<g:condition>new</g:condition>
<description>$description</description>
<g:brand>$brand</g:brand>
<g:image_link>$image_link</g:image_link>
<g:quantity>$quantity</g:quantity>
<g:product_type>Full Taxonomy path 1</g:product_type>
<g:product_type>Full Taxonomy path 2</g:product_type>
<g:product_type>Full Taxonomy path 3</g:product_type>
</item>";
You can go to this
Google page, and it has a category tree that you can find your product in (Taxonomy).
You can enter as many as you want. Make sure to copy the XML Taxonomy and put that between the product type tags.
I set my Google account to fetch this daily. This means that Google will have a daily refresh of the data that I have in my store.
Post here if you have questions regarding this.
Thanks
Mike
Reason for edit: Updated the script