AlegroCart open source E-commerce
Web hosting by Host1Plus

Google Base/Merchant Center

General discussion about AlegroCart - Post here if you can't find another suitable forum

Google Base/Merchant Center

Postby Beachgirl » Sat Nov 13, 2010 12:18 pm

I was wondering if anyone is familiar with the Google Base / Merchant Center Data Feeds?

I am currently trying to figure out the easiest way to upload my products to google product search. I'm not exactly sure how to create the proper data feed type that will work with alegrocart. Currently I've created the text (spreadsheet) and although that works just fine, I would prefer to have a rss type feed setup to automatically update my products rather than manually add them.

I recently tried to create a rss feed that is a copy of alegrocart's rss.php file with modifications to the attributes that google requires (I renamed this file googlebasefeed.php). This did not appear to work and after re-reading googles instructions ( http://base.google.com/support/bin/answ ... 9461&hl=en ) I realized I may need to save the file as .xml and include the "Google Base Namespace Declaration" and will try this once my server is back up.

Google Base Namespace Declaration
Code: Select all
xmlns:g="http://base.google.com/ns/1.0"


Here's what I did with the attributes:
Code: Select all
       <g:id><?php echo $result['product_id']; ?></g:id>
                <title><?php echo $product['name']; ?></title>
      <description><?php echo $product['desc']; ?></description>
                <link><?php echo $product['url']; ?></link>
      <g:price><?php echo $product['price']; ?></g:price>
      <g:condition>new</g:condition>
      <g:image_link><?php echo $product['image']; ?></g:image_link>
      <g:quantity><?php echo $result['quantity']; ?></g:quantity>
      <g:availability>in stock<g:availability>
      <g:online_only>y</g:online_only>


Am I way off base on this? Any advise is greatly appreciated :)
Beachgirl
 
Posts: 51
Joined: Wed Oct 20, 2010 4:57 pm
Location: USA

Re: Google Base/Merchant Center

Postby Brent » Sat Nov 13, 2010 12:29 pm

I could create the Google RSS.
I used this format because it is usable with most search engine.
The Google one is specific to Google.
Let us think on that.
User avatar
Brent
Site Admin
 
Posts: 4371
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Google Base/Merchant Center

Postby Beachgirl » Sat Nov 13, 2010 12:37 pm

Thanks Brent! The current format you used has been great and I've been able to use it easily with most sites but it just figures that Google and a few others want their own specific formats.
I appreciate the help!
Beachgirl
 
Posts: 51
Joined: Wed Oct 20, 2010 4:57 pm
Location: USA

Re: Google Base/Merchant Center

Postby Brent » Wed Dec 08, 2010 6:15 am

I think this will work for you.
Just change the file name to rss.php and upload to your server.
Then you need to create your Google feed account with the link to this file.
Remember to set the scheduler so Google actually uploads the feed for their search files.
Let me know how it works.
Attachments
gbase_rss.zip
(1.53 KiB) Downloaded 309 times
User avatar
Brent
Site Admin
 
Posts: 4371
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Google Base/Merchant Center

Postby Beachgirl » Thu Dec 09, 2010 1:49 pm

I got it working after adjusting a few things.

I received the error "Too many attribute values for attribute: id error"
I did some research and found that guid and g:id are aliases and only one is allowed but never both; using both generally confuses google processing.

I removed <guid> as well as some others like product_type because I'm not sure how to integrate those with alegrocart
Code: Select all
<guid isPermaLink="true"><?php echo $product['url']; ?></guid>
 


It worked perfectly after that change except that it only updated the most recent 20 products listed.
I changed the number below from 20 to 200 and it updated all of them.
Code: Select all
// Product Data
$product_data = array();
$sql="select *, p.date_added as date_product_added from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where p.status = '1' and pd.language_id = '%s' and p.date_available < now() and p.status = '1' order by date_product_added desc limit 20";


So, I set up a specific rss feed for google_rss and left the original as the main site rss feed. Thanks so very much Brent, its going to be so nice to have this on auto and not have to think about it any more :)
Beachgirl
 
Posts: 51
Joined: Wed Oct 20, 2010 4:57 pm
Location: USA

Re: Google Base/Merchant Center

Postby Brent » Thu Dec 09, 2010 5:12 pm

That's great.
I'll remove the guid as well.
I should add a config setting to set the limit in admin.
And that's what I did as well on setting up the google feed, left the original rss on my test site.
User avatar
Brent
Site Admin
 
Posts: 4371
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Google Base/Merchant Center

Postby Beachgirl » Fri Dec 10, 2010 11:10 am

I just noticed that no images are showing up. I believe it needs a image url and advises to use full size images (400x400 pixels or larger) and not to use thumbnails. Any ideas?
Beachgirl
 
Posts: 51
Joined: Wed Oct 20, 2010 4:57 pm
Location: USA

Re: Google Base/Merchant Center

Postby Brent » Fri Dec 10, 2010 11:27 am

Not yet. I just put it on a live site this morning and am waiting for Google to upload.
I'll get back to you when I have results.
User avatar
Brent
Site Admin
 
Posts: 4371
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Google Base/Merchant Center

Postby Brent » Sun Dec 12, 2010 5:25 am

I have it working on a live test site.
When setting up the feed, don't use a default TYPE. Create your own, something like shopping.
If you use a default type, it appears you are limited to the type allowed fields. You are using custom fields here.
And yes, you are right about using both rss feeds. The Google feed is specifically for Google to upload. I left it as gbase_rss.php. The other feed is rss.php and is available for all other browsers. Here is a sample. I used 40 as the limit, which you can change.
GoogleRss.jpg
GoogleRss.jpg (29 KiB) Viewed 8546 times
Attachments
gbase_rss.zip
(1.46 KiB) Downloaded 300 times
User avatar
Brent
Site Admin
 
Posts: 4371
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Google Base/Merchant Center

Postby Beachgirl » Sun Dec 12, 2010 12:10 pm

When setting up the feed, don't use a default TYPE. Create your own, something like shopping.


I don't see where I can change this. I've checked all account and rss settings and even set up a new data feed to see if it would prompt me for it. It remains to be set at Type:Products .... I dont think that the Merchant Center lets you change that.

I did try the new file but received these errors: XML tag mismatch and Invalid RSS/Atom document format (Probably due to the custom fields) Just thought I would give it a try anyway.

As for the original gbase.rss it seems to be working great except for the images not appearing. Very strange but I have about 8 product images showing out of 148 ...

I added the weight attribute for setting up the shipping details to show in google product search.
Code: Select all
<g:shipping_weight><?php echo $product['weight']; ?></g:shipping_weight>
Beachgirl
 
Posts: 51
Joined: Wed Oct 20, 2010 4:57 pm
Location: USA

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron