Results 1 to 10 of 505

Threaded View

  1. #11
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Re: Google Merchant Center Feeder for ZC v1.5.x

    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 &gt; General Supplies");
      @define('PRODUCT_TYPE_CATEGORY_1', "A Category &gt; Sub Category");
      @define('PRODUCT_TYPE_CATEGORY_2', "A Category &gt; Sub Category &gt; 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!
    Last edited by bottyz; 29 Jun 2016 at 04:34 PM.

 

 

Similar Threads

  1. v151 Google merchant Centre Feeder query
    By Phil Lomas in forum General Questions
    Replies: 13
    Last Post: 24 Dec 2013, 03:37 AM
  2. Google Base Feeder Support Thread [OLD]
    By numinix in forum All Other Contributions/Addons
    Replies: 3562
    Last Post: 2 Apr 2012, 06:30 PM
  3. Removing products from Google Merchant Feeder
    By wonderbread101 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Dec 2011, 05:31 PM
  4. Google Merchant Center for Dummies?
    By xcergy in forum General Questions
    Replies: 7
    Last Post: 31 Mar 2010, 06:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR