Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
How do I export to google products?
Posted: 20 April 2010 02:31 PM   [ Ignore ]
Wallflower
Rank
Total Posts:  3
Joined  2010-03-22

As the title suggests…

How would I go about exporting to google products?

Profile
 
 
Posted: 20 April 2010 03:40 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRank
Total Posts:  152
Joined  2010-01-19

You should be able to do this with a straightforward RSS template and then have Google Product search grab the data from there periodically.

I will be doing this in the next few days and will post my template here.

It may be something that would be good to build in to CartThrob anyway.

 Signature 

Pete Eveleigh | Fantastic Machine | Gloucester, UK | vCard | Twitter

Profile
 
 
Posted: 20 April 2010 03:47 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

We may eventually add some sort of exporting feature, but since RSS and XML are already a feature of EE, It’s not high on the priorities list.

One of my other clients need a google product feed and it was basically XML / RSS as Pete mentions. If he doesn’t get his wrapped up, we can try to find ours (but it may be out of date, it’s on a 6 month old installation of CartThrob.)

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 20 April 2010 03:55 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRank
Total Posts:  3369
Joined  2009-05-29

Here’s an example feed template to get you started:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0">
<
channel>
    <
title>My Store</title>
    <
link>{site_url}</link>
    <
description>My store description</description>
{exp:weblog:entries weblog="products"}
    
<item>
        <
id>{entry_id}</id>
        <
guid>{entry_id}</guid>
        <
title>{title}</title>
        <
link>{url_title_path=products/detail}</link>
        <
description>{product_description}</description>
        <
g:brand>{product_brand}</g:brand>
        <
g:image_link>{product_image}</g:image_link>
        <
g:price_type>{product_price}</g:price_type>
        <
g:product_type>{categories backspace="3"}{category_name} {/categories}</g:product_type>
        <
g:upc>{product_upc}</g:upc>
        <
g:isbn>{product_isbn}</g:isbn>
        <
g:weight>{product_weight}</g:weight>
    </
item>
{/exp:weblog:entries}
</channel>
</
rss
Profile
 
 
Posted: 20 April 2010 04:02 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

Dang dude. Even I think you’re ridiculously fast.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 20 April 2010 04:19 PM   [ Ignore ]   [ # 5 ]
Wallflower
Rank
Total Posts:  3
Joined  2010-03-22

Cheers guys, I haven’t reached this part of my store build yet but it just crossed my mind, so thought I’d ask.

Profile
 
 
Posted: 20 April 2010 05:33 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRank
Total Posts:  152
Joined  2010-01-19

There are a number of ways to submit to Google Product Search and a few different file formats.

You could just have a template that outputs a tab delimited list of products and product info then point Google at it and tell it to get the data every day/week whatever.

There is also an API, so it might be possible to “push” the data to Google.

 Signature 

Pete Eveleigh | Fantastic Machine | Gloucester, UK | vCard | Twitter

Profile
 
 
Posted: 18 May 2010 01:09 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRank
Total Posts:  152
Joined  2010-01-19

I forgot all about this.

I had a play around and while I can almost get the data out (problem with departments and image URLs) I can’t think of how I can get that to create a file that Google can fetch.
Producing the page dynamically doesn’t seem to work but this might be down to the aforementioned problem with departments and image URLs.

 Signature 

Pete Eveleigh | Fantastic Machine | Gloucester, UK | vCard | Twitter

Profile
 
 
Posted: 18 May 2010 06:15 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

Are you producing a file called “something.xml” with the type set to XML?

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 12 July 2010 07:34 PM   [ Ignore ]   [ # 9 ]
Is a Really Great Dancer
RankRank
Total Posts:  69
Joined  2010-04-20

Haven’t finished trying this, but it may be the same issue as for XML sitemaps - it needs a file rather than a folder name to fetch

I get round this using a PHP file that just reads the template churning out the XML data:

<?php
// Prevent content to be cached
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Content was generated on past
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); //Content is always modified

// Inform user agent that content is XML and is UTF-8 encoded
header('Content-type: text/xml; charset=UTF-8');

// Read content from template and show it
@readfile ('http://shinemarketing.com/sitemap/');
?> 

Just change the url in the last bit and you should be OK
It seems to accept .php as a file extension for product feeds

Profile
 
 
Posted: 13 July 2010 07:37 PM   [ Ignore ]   [ # 10 ]
Is a Really Great Dancer
RankRank
Total Posts:  69
Joined  2010-04-20

I wrote this up on our howto blog
http://shinemarketing.com/howtoshine/cartthrob-google-base-feed

This is one of the products from our dummy site:
http://www.google.co.uk/products?q=martha+perforated+clutch&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&um=1&ie=UTF-8&ei=_-c8TPaZMpmI0wSAz9CLDg&sa=X&oi=mode_link&ct=mode&ved=0CBIQ_AU

Profile
 
 
Posted: 14 July 2010 01:46 AM   [ Ignore ]   [ # 11 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

“Article restricted to staff”

Might need to change that.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 14 July 2010 05:44 AM   [ Ignore ]   [ # 12 ]
Is a Really Great Dancer
RankRank
Total Posts:  69
Joined  2010-04-20

Fixed, thanks for pointing it out.

How To Shine is our brain dump of how we work here. We took a decision a while back to open up some of the code snippets and non commercially-sensitive bits for the Magento and EE communities.
I still keep forgetting the checkbox that does that bit!

Profile