Hi all,
I have the latest version working on a v1.5.5a cart for a UK GBP feed. I modified a few files for my specific purpose, but it shouldn't be something you all need to do.
My advice would be to get it to generate your xml feed and then open it in a text editor and check for the missing tags. Google needs to see at least two of the mentioned three tags in the feed for each product. I have mpn and brand, as we don't have GTINs.
I was missing the g:brand tag from mine, but to fix this I just went into admin > catalog > manufacturers and added the brands. Then added the brands to each of the products in my shop. Luckily mine are all one brand, so I used phpmyadmin navigated to the 'products' table and used an SQL statement to update the manufacturer_id to the id of the brand I wanted to apply to all the products (in my case it was number 1).
Code:
UPDATE `products` SET `manufacturers_id`=1 WHERE `manufacturers_id`=0
I always find the product type to be incorrectly generated. So I normally comment out / add a few lines into googlefroogle.php and google_base.php. What I do to make my feed work is as follows:
OBVIOUSLY THESE SPECIFICS WON'T APPLY TO EVERYONE - BUT MAY GIVE YOU A LITTLE HELP TO CORRECT YOUR FEEDS
add into googlefroogle.php - around line 44
Code:
@define('NL', "<br />\n");
@define('BRAND', "Whatever Brand I Want");
@define('GOOGLE_PRODUCT_TYPE_CATEGORY', "Office Supplies > General Supplies");
@define('PRODUCT_TYPE_CATEGORY_1', "A Category > Sub Category");
@define('PRODUCT_TYPE_CATEGORY_2', "A Category > Sub Category > Further Subcategory");
also in googlefroogle.php - around line 399
Code:
$item->appendChild($variantsTitle);
$item->appendChild($dom->createElement('g:brand', BRAND));
$item->appendChild($dom->createElement('g:google_product_category', GOOGLE_PRODUCT_TYPE_CATEGORY));
$item->appendChild($dom->createElement('g:product_type', PRODUCT_TYPE_CATEGORY_1));
$item->appendChild($dom->createElement('g:product_type', PRODUCT_TYPE_CATEGORY_2));
$item->appendChild($dom->createElement('g:identifier_exists', 'false'));
comment out in google_base.php - somewhere around line 372
Code:
// Removed as provides a product type tag in xml file that isn't what we require
// if ($product_type) {
// $item->appendChild($dom->createElement('g:product_type', $product_type));
// }
add into google_base.php - somewhere around line 388
Code:
// only include if less then 30 days as 30 is the max and leaving blank will default to the max
if (GOOGLE_PRODUCTS_EXPIRATION_DAYS <= 29) {
$item->appendChild($dom->createElement('g:expiration_date', $this->google_base_expiration_date($products->fields['base_date'])));
$item->appendChild($dom->createElement('g:google_product_category', GOOGLE_PRODUCT_TYPE_CATEGORY));
$item->appendChild($dom->createElement('g:product_type', PRODUCT_TYPE_CATEGORY_1));
$item->appendChild($dom->createElement('g:product_type', PRODUCT_TYPE_CATEGORY_2));
One further problem for my UK feed is the need to have the tax show, so I go into admin > configuration > googlemerchant center feeder configuration and change the 'tax country' to GB, the 'tax rate' to 20 and the 'tax on shipping' to y. then in both of the above mentioned files change the tax lines as follows:
googlefroogle.php - somewhere around line 385
Code:
$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '')));
if (GOOGLE_PRODUCTS_TAX_DISPLAY == 'true' && GOOGLE_PRODUCTS_TAX_COUNTRY == 'GB' && $tax_rate != '') {
$tax = $dom->createElement('g:tax');
google_base.php - somewhere around line 303
Code:
$item->appendChild($dom->createElement('g:price', number_format($price, 2, '.', '')));
if (GOOGLE_PRODUCTS_TAX_DISPLAY == 'true' && GOOGLE_PRODUCTS_TAX_COUNTRY == 'GB' && $tax_rate != '') {
$tax = $dom->createElement('g:tax');
Changed bits highlighted in red.
Now all I need to do is to figure out why this latest version isn't specifying all my large images? When the cart was v1.5.1 the large images worked, but now they don't. Google are soon updating their requirements in some countries to have images that are a minimum of 100px x 100px, with a recommended size of 800px x 800px. Unfortunately, my small images are only 80px x 80px!
Bookmarks