Adding Magento products to Google Base
55 Comments 13th JAN 2010 | Posted by Toni Anicic in Magento

Magento made adding products to Google Base (Google Product Search) a pretty simple process that can be done using Magento’s admin interface. This guide will tell you how to do it and how to fix known issues.
First of all, I wanna show you this really nice screencast I found on Vimeo that guides you through the process of adding your Magento products to Google Base, however you will probably have some issues after you follow the screencast since it doesn’t really tell you everything there is to know.
Step by step guide to importing Magento products into Google Base:
Step 1: Create a Google Base (merchant) account. This is the first thing you need to do since you’ll need to enter account access data in the next step.
Step 2: Log-In to your Magento admin panel and go to System > Configuration > Google API > Google Base and enter your Google Base account data, Save Config.
Step 3: Go to Catalog > Google Base > Manage Attributes and synchronize the applicable Magento’s attributes with Google Base attributes.
Step 4: Go to Catalog > Google Base > Manage Items. View Available Products button will show you items in your store that can be added to the Google Base.
That’s it, pretty simple, right?
Known issues:
Expected response code 200, got 400. Type: data. Field: condition. Reason: The item is missing a required attribute.
Google Base requires an attribute that describes the item’s condition. This is the solution for this problem:
Step 1: Go to Catalog > Attributes > Manage Attributes. Create a new attribute called “Condition” with dropdown values “New” and “Used” available.
Step 2: Go to Catalog > Attributes > Manage Attribute Sets and drag the attribute “Condition” from the right column to the appropriate place in the left column. Make sure you have dragged it into the attribute set you’re using with Google Base if you have more then one attribute set defined.
Step 3: Go to Catalog > Google Base > Manage Attributes and synchronize Magento’s “Condition” attribute with Google Base’s “condition” attribute.
Step 4: Edit products you wish to include in Google Base and give them appropriate Condition attribute value (New or Used).
Expected response code 200, got 400. Type: data. Field: description. Reason: There is a problem with the character encoding of this attribute.
This error is shown when you have characters in your product description that are not supported by Google Base. This (or similar) error is also shown when you’re using code in your product description.
Removing the code or some strange characters from your product’s description should fix this problem.
A similar error will also appear if you left your description blank. You will need to add some description to every product you wish to add to the Google Base to fix the issue.
Unable to read response, or response is empty
We’re still trying to find a solution for this one. It might be a problem on Google base’s side.
Resubmitting products to Google base
Products in Google base expire in 30 days. In order to resubmit your products to Google base, you’ll need to synchronize the products from Magento’s Google base interface so that Magento would know that products are no longer available at Google base (expired).
Then you can submit your products once again by following simple steps described at the beginning of this article.
If you still can’t get your head arround this, CreareGroup has provided an alternate way to submitt your Magento products to the Google Base.
To post code in comments, place your code inside [code] and [/code] tags.


















January 13th, 2010 at 15:48
Have you figured out how to set Magento’s Google Base integration so that it doesn’t expire every month? That’s my biggest pet peeve with the way it’s setup. It’s extremely time consuming to go through and re-add everything every month. On one of our sites I have a custom script setup to process the items to Google Base, but I have to remember to activate it every so often to update my listings so that’s not ideal either.
January 13th, 2010 at 15:54
@Sherrie Rohde
I’ll have to think about that one. I’ll probably post an update to this post if we find a good solution.
January 13th, 2010 at 22:35
I haven’t been able to find this out either way, but if you are using Configurable Products – do you have to submit the Configurable and Simple Products or just the Configurable Products?
At the moment I am just submitting all products as it is difficult to quickly submit just the Configurable Products.
January 14th, 2010 at 3:16
@Sherrie Rohde, @Toni Anicic
Would it be possible to setup a cron job to manage automatic updates of Google Base?
January 14th, 2010 at 4:54
I don’t think it sends a price when you submit Grouped or Configurable products. Have you successfully used this for Grouped/Config items?
January 14th, 2010 at 8:37
@eCommerceCircle – I didn’t have chance to use it with Grouped/Config items so I can’t tell but I guess there would be some issues.
@Robert Reynolds – I’m not sure if the time period (30 days) would be restarted if we simply rebuilt products without changing anything while having the “Update Google Base item when product is updated” dropdown set to “Yes” in System > Configuration > Google API > Google Base
If it does, it would be a pretty nice solution.
January 21st, 2010 at 17:45
I con’t get it to work! Why it’s so complicated?
February 9th, 2010 at 10:04
In Step 2 of the first error, I don’t see anything to “drag”. How do I do this? I am using Magento version 1.3.2.4. Thanks.
February 9th, 2010 at 10:34
I followed all of the steps for the first known issue but continue to receive the error when I try to add my products in Google Base > Manage Items. What could I be doing wrong? To start, I have only added condition and price as attributes. Do I have to add more?
February 9th, 2010 at 12:02
David,
Could you copy the text error gives you so we can see what is wrong?
February 9th, 2010 at 13:08
Expected response code 200, got 400. Type: data. Field: condition. Reason: The item is missing a required attribute.
February 9th, 2010 at 14:14
David, make sure:
1. You created the attribute “Condition”
2. You made it’s value “New” or “Used”
3. You assigned the value (New or Used) to the items you’re trying to add
4. You mapped the condition attribute to the condition attribute in Google Base
February 10th, 2010 at 14:43
@David,
I’ve seen your e-mail, you probably missed this step:
“Step 2: Go to Catalog > Attributes > Manage Attribute Sets and drag the attribute “Condition” from the right column to the appropriate place in the left column. Make sure you have dragged it into the attribute set you’re using with Google Base if you have more then one attribute set defined.”
February 10th, 2010 at 17:01
The connection to google shopping works fine. Now the first products have run out of the period.
I wonder how to restart the export process to google again. Until I do not delete the products completely from the google merchant center the products are not available in the magento backend for a new export.
WHY? And what is the easiest and fastest process to restart products that do not have any changes in their conditions?
Thanks for all your help
informixx
February 12th, 2010 at 17:43
Great!
I just followed your guide and did a test product and finally managed to get it up on GoogleBase!
Is there a way of making the default option “YES” as it doesn’t seem to do that in my store?
February 12th, 2010 at 17:54
@Scalesmart:
i think we did it this way: Set the field as required, and the default value to New. Then go and rebuild the catalog.
February 12th, 2010 at 18:51
Hi Toni
I tried that to no avail. For some reason i have to go in and set each product up as the default is blank, Neither Used or New is selected.
February 16th, 2010 at 10:40
Everything seems to be fine except that when I go to “3. You assigned the value (New or Used) to the items you’re trying to add” I do not see a field for Condition in the products I am trying to add. Do I have to add a new attribute again for each product? Is there a way to add new as the default for my entire store?
February 16th, 2010 at 10:54
@David,
You most likely don’t see it because you skipped the Step 2:
Step 2: Go to Catalog > Attributes > Manage Attribute Sets and drag the attribute “Condition” from the right column to the appropriate place in the left column. Make sure you have dragged it into the attribute set you’re using with Google Base if you have more then one attribute set defined.
February 16th, 2010 at 11:16
I have already set this to the attribute set I would like to sync with Google Base/Merchant Center.
February 16th, 2010 at 11:23
Are you sure your products are using that attribute set? Because if they are, there is no reason why the new condition value wouldn’t appear in these products.
February 16th, 2010 at 11:35
Where can I check this?
February 16th, 2010 at 11:45
@David:
If you go to Catalog > Manage Products, you will see a row that defines which attribute set is each of the products using.
It is most likely your products are using default attribute set. If so, make sure you’ve dragged the condition attribute into the default attribute set.
February 17th, 2010 at 18:44
Thank you all for your help.
February 21st, 2010 at 12:21
Lovely Video quality from Magento you can’t even see anything.
February 21st, 2010 at 13:39
Finally, the attribute appears. Now, is there a way to add the condition-new to all of my products in my shopping cart? I want to add 900 items to Google Base.
February 21st, 2010 at 14:46
@David: Try setting the field as required and default value to “New” and then go and rebuild the catalog.
February 21st, 2010 at 15:01
How do you rebuild the catalog after editing the attribute?
February 24th, 2010 at 1:40
Have you figured out a way to get the special price to map to the price attribute when submitting to Google Base? I’ve tried mapping ‘Special Price’ and ‘Minimal Price’ to ‘Price’ however none of those work.
February 24th, 2010 at 8:25
@David: Try system > Cash management > Rebuild Catalog Index
@Kris: Didn’t try it, don’t know.
February 24th, 2010 at 10:27
I set the field as required and default value to “New” but all products still do not show as New. Does it make a difference if this setting is Global, website, etc?
February 24th, 2010 at 11:02
@David, I’m not sure, but I think that’s the way we did it.
The other way around would be to find where the condition attribute is in the database and make an SQL query that will set all product values to New.
March 14th, 2010 at 15:39
Finally got the Magento/Base integration to work! Thanks for your help. Now the store wants to change prices on a number of products. How do I update my items in Google Base to reflect the changes in the shopping cart?
March 18th, 2010 at 9:41
Hi I want to add my configurable product in google base .
I have tried it and it only display basic information on the google base page . i want that configurable attribute to show on the google product page. is there i m missing to configure.
March 19th, 2010 at 16:28
Great got it working. Thanks!!
March 20th, 2010 at 19:29
@Toni
I am not sure how to write a query for SQL. What is the string to put in to run to mark them all new? This would save me a lot of time. I have tried rebuilding the index and it doesn’t set everything to new. I have to do 1500 products one by one.
I’m still unable to submit anything to GB. I keep getting service not found and I can’t seem to find anything that covers this issue. In the Google Base setup I put my username and password. Am I missing something? Why is it not finding the service?
Great video work and answers for everything else. I got everything setup…just can’t find the service.
March 25th, 2010 at 23:21
Here are the queries from a PHP script I wrote :
SELECT entity_id FROM catalog_product_entity WHERE sku = ‘???’
The above query gets the entity_id from the product you need.
INSERT INTO catalog_product_entity_int (entity_type_id, attribute_id, store_id, entity_id, value) VALUES (4, 535, 0, ‘entity_id’, 312)
Here is the insert for the attribute value.
Description of fields:
entity_type_id : Always 4 in my system – this comes from the eav_entity_type table. You need to look for the record where entity_type_code is ‘catalog_product’ and take the id from there.
Attribute ID : Look in the table eav_attribute for the attribute you created. You can search on the attribute_code field for the name you gave when you created the attribute. Probably the last field in the table – take the attribute ID from there.
Store_id : Look in table core_store and take the store_id from the ADMIN store. Usually 0
Entity_id : From the product table (see the first query)
Value : The numerical value allocated to the attribute value. This one is a little more tricky to locate. First search the eav_attribute_option table on the attribute_id field and use the value for attribute_id as determined above. Make a note of the option_id values. Now search the eav_attribute_option_value table for those option_id values. The TEXT you entered for the possible values comes up in the value field. When you finf the right text, use the correct option_id.
I hope this guides you all but as always DONT fiddle unless you are SURE you know what you are doing and always TEST IT FIRST on a copy database.
April 25th, 2010 at 6:48
do you know how to remove the ?___store=default that keeps on coming up on the end of the urls when they are submitted to google base? I am sure this must be a simple fix to remove this. Thanks
May 3rd, 2010 at 21:06
Expected response code 200, got 400. Type: data. Field: description. Reason: Duplicate description
I attempted all the directions above and got the following message. I ran a test using just one product
May 4th, 2010 at 7:38
Marcia,
It seems to me that you might have two different Magento’s attributes mapped to Google base’s description attribute. Remove one of them if this is the case.
May 5th, 2010 at 22:46
Does anybody know why in Magento, when I try to add an Attribute Mapping for Google Base, the following error occurs:
Notice: Undefined offset: 1 in /home/loviecom/public_html/app/code/core/Mage/GoogleBase/Model/Service/Feed.php on line 120
May 9th, 2010 at 7:21
Hi,
I think you might find out the clues in the disapproved email and then make changes to your sites accordingly.
All the best,
May 16th, 2010 at 21:37
@Toni…Thanks for your answer.
I have searched everywhere and I cannot see where the information is mapped per your response..” two different Magento’s attributes mapped to Google base’s description attribute”
Where can I search for where the atrributes are mapped
May 17th, 2010 at 15:12
@Bill and others, there is a workaround for the new Google Base issue with “Notice: Undefined offset: 1 in app/code/core/Mage/GoogleBase/Model/Service/Feed.php on line 120″… We wrote a detailed blog post about how to fix this issue. You can see it here:
http://www.storefrontconsulting.com/blog/2010/05/how-to-fix-new-magento-google-base-issue/
May 20th, 2010 at 15:12
can anyone help with this url issue on google base ?___store=default ?
May 27th, 2010 at 11:57
There is a MUCH easier way to update the “Condition” attribute on all of your existing products without using SQL.
0. Create the Condition attribute if not existing yet. Set default value as ‘New’ if that’s what you want.
1. Magento Admin -> Catalog -> Manage Products
2. Select all products or applicable products.
3. Under Action, select “Update attributes”.
4. On the next page, set ‘Condition’ attribute to ‘New’
5. Click Save/Update and you’re done.
June 4th, 2010 at 17:31
Toni – This is a great help to me.
I would never have got this working without your input.
Thanks for putting in your valuable time!
Best regards,
John
June 15th, 2010 at 16:52
Marcia, I got the same error message and managed to solve it by going back and NOT mapping any attributes to “description”. Google Base then seems to automatically take the long description to use.
July 12th, 2010 at 14:41
I was experiencing problems with products with no description. Google Base refuses to accept them.
I simply copied the file : /app/code/core/Mage/GoogleBase/Model/Service/Item.php
to: /app/code/local/Mage/GoogleBase/Model/Service/Item.php
and added these lines after:
if ($object->getDescription()) {
$content = $service->newContent()->setText( $object->getDescription() );
$entry->setContent($content);
}
I added:
else
{
$content = $service->newContent()->setText( $object->getName() );
$entry->setContent($content);
}
Change getName() to whichever attribute you want in the description.
August 18th, 2010 at 14:17
Hi,
anyone got any ideas about the ?__store=default at the end of the URLs??
it seems like it should be such a simple fix!
August 18th, 2010 at 14:39
In Magento Admin, select System -> Configuration -> Web
There’s a section for ‘Url Options’. Change this setting to No.
August 18th, 2010 at 14:52
Well,
We use Rewrite rules in the .htaccess file:
Here’s something to get you started :
## REMOVES ? parameters from URL
RewriteCond %{HTTP_HOST} ^desirable.*$ [NC]
RewriteCond %{REQUEST_URI} !^(.*)admin(.*)
RewriteCond %{QUERY_STRING} ^SID
RewriteRule ^(.*)$ /$1? [NE,R=301,L]
#RewriteCond %{HTTP_HOST} ^desirable.*$ [NC]
RewriteCond %{QUERY_STRING} ^p=
RewriteRule ^(.*)$ /$1? [NE,R=301,L]
#RewriteCond %{HTTP_HOST} ^desirable.*$ [NC]
RewriteCond %{QUERY_STRING} ^___SID
RewriteRule ^(.*)$ /$1? [NE,R=301,L]
#RewriteCond %{HTTP_HOST} ^desirable.*$ [NC]
RewriteCond %{QUERY_STRING} ^___from_store
RewriteRule ^(.*)$ /$1? [NE,R=301,L]
# END
Please note that :
RewriteCond %{REQUEST_URI} !^(.*)admin(.*)
Is critical as if you omit this then it chops of ? parameters in admin which (believe it or not) stops you uploading images on the product pages
August 18th, 2010 at 15:05
amazing thanks guys! will try this now
August 21st, 2010 at 8:56
Hi,
When i tried to submit items to googlebase from magento,i got “Expected response code 200, got 404. Type: request. Reason: Service not found. “.I have tried everything to solve the problem?Can anyguys help me to solve it or figure out what’s wrong.
Thanks!
August 25th, 2010 at 8:09
hi jenny
I get the same promble as you,”Expected response code 200, got 404. Type: request. Reason: Service not found.”,i don`t know why,If you have solves,please tell me,thank you,my email cawords66@yahoo.com