Page 1 of 2

How-to Google Upload of Store Products

Posted: Sat Jan 23, 2010 4:16 am
by Litriem
Google Base: How-to Google Upload of Store Products

Google provides for free a way to upload your store products to it's search engines for free. The OpenCart store offers a a Module called "Google Base" as a way to produce the data needed to upload to Google. Google allows for automated uploading of your store products.

If you don't have UPC codes then following these steps update the following OpenCart site file to keep Google from erroring on your uploads.

Open Cart - Google Base (fix)
==============================
1) Locate file: catalog\controller\feed\google_base.php
2) Find the line with:
"$output .= '<g:upc>' . $product['model'] . '</g:upc>';"
3) Change the line to this:
"//$output .= '<g:upc>' . $product['model'] . '</g:upc>';"
4) NOTE: the only change is that I commented out the code.

SETTING UP GOOGLE
====================
1) Open your browser and navigate to http://www.google.com
2) Find the link on the bottom of the page called "Business Solutions" and click on it.
3) Find the link about the middle of the page called "Merchange Center" and click on it.
4) Do you have a google account?
a) YES: login and follow the prompts for setting up and account.
b) NO: click on the "Create an account now" link and follow the prompts.
5) Click on the "Data feeds" link
6) Click the button "New Data Feed"
a) Target country: choose a country
b) Data feed type: googlebase
c) Data feed filename: just make up a name with no spaces and with an extension of ".xml".
d) Click the button "Save changes"
e) Click the "Data feeds" link above
7) In the Data feeds listing
a) click on the "Create" link for the feed you just created.
b) setup the automated schedule you desire.
c) In the "Url of file" you will see your website url
d) Add the following to the end of your website name "/index.php?route=feed/google_base"
e) click the button "Schedule"
f) NOTE: I found that I see results about 15-20 minutes after the time I place in the schedule.
g) NOTE: The Data feeds shows a "Status" field with when the automation expires so you may have to check this and/or just click edit on your feed and then click the button "Update Schedule" to extend your expiration.

Re: How-to Google Upload of Store Products

Posted: Sun Jan 31, 2010 8:42 am
by tagman25
This was my best help in trying to figure out Google Base. Thanks a ton!

Re: How-to Google Upload of Store Products

Posted: Tue Feb 02, 2010 4:59 pm
by DannyMacD
hey, i have done all this but i seem the get this from googlebase..


Data feeds >
Feed status summary for disifinfeed.xml
No items inserted - Processed on 01-Feb-2010 22:09 GMT

Detected file format: XML



im not sure why no products are uploading??

any hope??

Re: How-to Google Upload of Store Products

Posted: Thu Feb 04, 2010 6:55 am
by DannyMacD
any thoughts? :)

Re: How-to Google Upload of Store Products

Posted: Fri Apr 15, 2011 10:58 pm
by Tom52
Hello,

Will this work for 1.4.9.4

Thank you
Tom

Re: How-to Google Upload of Store Products

Posted: Wed Jul 27, 2011 9:19 am
by noidea
Thanks, but i did that and i still get this-
Your items contain fewer attributes than those specified in the header row

Re: How-to Google Upload of Store Products

Posted: Wed Jul 27, 2011 6:47 pm
by uksitebuilder
there should be no header row if sending xml
header rows are only in the text file feeds type

are you sure are running the correct feed script to generate your feed ?

Re: How-to Google Upload of Store Products

Posted: Wed Jul 27, 2011 11:35 pm
by noidea
uksitebuilder wrote:there should be no header row if sending xml
header rows are only in the text file feeds type

are you sure are running the correct feed script to generate your feed ?
Thank you for your responce :)

I think so, i created the google base file name with the xml extention. i added the // infront of the google base.php to make //$output .= '<g:upc>' . $product['model'] . '</g:upc>';

Sent the feed as- website name/index.php?route=feed/google_base

it came back with the said error.

Looking at it again the google base details state [ Detected file format: Text ] so i looked at the base.php coding and found [$output = '<?xml version="1.0" encoding="UTF-8" ?>';] in line 5, i'm no coder but that seems right to me.

I was also getting a lot of [PHP Notice: Undefined index: weight_class in /home/####/public_html/catalog/controller/feed/google_base.php on line 78] error logs, but that was before i edited the base.pbp code.

I don't know why google base is detacting the feed as txt.

I'm using vertion 1.5.1
Might it be advisable to use v1.4.9.6 instead?

Edit- I changed the google base auto detect to xml, now it simply comes back as- Our system encountered an error when processing your data feed

Re: How-to Google Upload of Store Products

Posted: Wed Jul 27, 2011 11:54 pm
by uksitebuilder
the reason it detects it as text is because it is returning php errors.

Once these errors go away, it will detect it correctly as xml

I know there was a problem with 1.5.1 when it initially came out, and weight_class was definitely one of those bugs, so I urge you to grab 1.5.1.1 especially as there was a bug fix in that version.

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 2:12 am
by noidea
Right, i updated to 1.5.1.1 and it made no diffrance.

So i instaled 1.4.9.6 and it worked :)

Its a shame about 1.5 as i prefer the theme and layout, I think there might be some work left to do in it.

Thanks for your help :)

[Edite, actualy i'm not keen on 1.4 at all, some needed extentions are not in it, like atributes ect... so i'm going back to 1.5, i'm sure this problem will get sorted,- or i'll figure out where i'm going wrong lol]

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 4:25 am
by noidea
Fixed it! :)

For anyone having this problem in 1.5 it is a simple coding error

Go to- catalog\controller\feed\google_base.php

and find "weight_class" [line 78 on mine] and add in "_id" to the end so it reads "weight_class_id" save and close the code editor, and your done :)

From the post below, my thanks to eka7a for pointing me to it.

http://forum.opencart.com/viewtopic.php ... 80#p177417

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 9:47 am
by phonepartsusa
Hello All!

I followed all the steps above and i receive this error from google.

Code: Select all

The column delimiter could not be automatically detected from your feed. To select a column delimiter, click edit next to your feed name in your account and select the correct option. 
thank you in advance for your help everyone!

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 10:16 am
by phonepartsusa
I was getting that error because I did not enable the google base. I enabled it and google fetched 8/26 items. I have over 80 items in my store. 17 of the 26 that were not listed had too much code in the description.

I also get the following error

Code: Select all

 XML formatting error - Error
Our system encountered an error when processing your data feed. Learn more. 
Examples:
Line Nr.	Column Nr.
898	427	
Does anyone know how this can be fixed?

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 11:02 am
by noidea
phonepartsusa wrote:I was getting that error because I did not enable the google base. I enabled it and google fetched 8/26 items. I have over 80 items in my store. 17 of the 26 that were not listed had too much code in the description.

I also get the following error

Code: Select all

 XML formatting error - Error
Our system encountered an error when processing your data feed. Learn more. 
Examples:
Line Nr.	Column Nr.
898	427	
Does anyone know how this can be fixed?
If your using version 1.5 have a look at my post above you :)

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 11:13 am
by phonepartsusa
Nothing there.. but, i think i might be on to something.

Alot of my items have centimeter measurement by default and others i have manually chose inches. Im changing all of them to inches. more and more items are showing up each time i refresh the google feed.

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 12:20 pm
by phonepartsusa
Im sitting this error from column number 427.. does anyone know what that is? and how i can go about fixing this?

Code: Select all

XML formatting error - Error
Our system encountered an error when processing your data feed. Learn more. 
Examples:
Line Nr.	Column Nr.
132	            427

Re: How-to Google Upload of Store Products

Posted: Thu Jul 28, 2011 12:29 pm
by phonepartsusa
Installed Open Base instead... It worked great! Pulled all my items!

Re: How-to Google Upload of Store Products

Posted: Fri Jul 29, 2011 7:17 pm
by teratyke
Possibly due to invalid characters in your descriptions or titles.
I think this is an XML or RSS thing as you can use these characters if you upload your feed as a csv or similar (from past experience)..
I've only just started looking at this from an OpenCart perspective.
All sorts of special characters seem to be rejected regardless of how you enter them.
e.g.

Code: Select all

&pound;

Code: Select all

ยบ
I recommend you view your feed in internet explorer (for once IE seems better than FF at this)
Browse to your feed URL e.g.

Code: Select all

http://YOURURL.NET/index.php?route=feed/google_base
IE9 gives you a nice error message and you can click details to see the exact cause of the problem.

Easy to fix, just use different characters (there may be a cleverer way than this but easy is best in my book...).

Hope this helps
Rob

Re: How-to Google Upload of Store Products

Posted: Mon Aug 01, 2011 2:58 am
by phonepartsusa
Ya, but why really fix anything when Open Base module available in the extensions works great!

Re: How-to Google Upload of Store Products

Posted: Mon Aug 01, 2011 3:36 am
by uksitebuilder
Do you get any warning from Google about your products when using Openbase ?