Page 1 of 1
BulletProofOB for OC v1.5.x - Open Base for messy stores!
Posted: Tue Aug 23, 2011 7:48 am
by RitchieTheBrit
Hey peeps!
After trying to use the inbuilt
Google Base feed, I was getting so many errors and issues with HTML etc that I started going through and modifying it with my own classes, with the intent to make the output bulletproof. I was getting there, and then I came across the
Open Base Product Feed v1.5.0 by ajbarry99. At the point I was at, I was trying to clean the HTML up, so I gave it a whirl instead of reinventing the wheel.
Brilliant! The only problem I had was the admin had entered a lot of information that was causing issues, like uploading images with spaces in the title, ampersands in the product title, and leading and trailing whitespace all over the place.
I made a few small changes to the Open Base module based on the code I had written for the Google Base module, and it handles these mistakes quite elegantly.
Google Merchant accepted the feed right away last night, and my mates store has been listed today!
I renamed it
BulletProof OB for my own usage, but
ajbarry99 was happy for me to release it as a standalone module. If you are having trouble getting valid feeds, give this a try. It may be that you have a few invalid characters that this should clean up.
If you still have issues, try viewing the feed through IE, as an invalid feed with produce a helpful error message, allowing you to work out what is causing the issues. Whitespace errors aren't always whitespace, you will get the same error for an illegal character!
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Tue Aug 23, 2011 11:32 am
by Xsecrets
I don't understand. The only problem I've ever seen with the built in google base feed is invalid characters, so you are saying you had a bunch of invalid characters so the built in feed didn't work then you tried another went back and actually fixed your problem (the invalid characters) and now claim that it's the greatest thing since sliced bread?
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Tue Aug 23, 2011 6:26 pm
by RitchieTheBrit
Wow, kinda' harsh dude. It's not the greatest thing since sliced bread at all. I actually prefer fresh bread anyway.
I tried the Google Base feed. It threw a wobbly at the invalid character, but it also masses of HTML markup in the feed. Try running it through the W3C validator. I VQModded some code into it, and I was starting to work on cleaning up the HTML. I happened across ajbarry99's module when I was searching the forum, tried it, and the invalid characters still caused a problem, but the HTML tags were nicely stripped, so I moved a little of my code across to his module to handle the problem.
Google Base would be fine (other than the HTML) , as long as the admin is savvy enough to know what are reserved characters and what aren't. Unfortunately, my mate isn't up on the technical aspects. This just means I don't have to check everything he's done manually. There was also quite a few mentions in the forum of Google Base feeds being rejected by Google, which is why I was surprised when everything went like clockwork (with over 240 items that were littered with bad whitespace etc). Also, there is an error in the current distribution of the Google Base module, so I'm not sure how it could be fine unless you manually fixed that yourself (the reason I started tinkering with it in the first place)...
Original
'<g:weight>' . $this->weight->format($product['weight'], $product['weight_class']) . '</g:weight>'
Corrected
'<g:weight>' . $this->weight->format($product['weight'], $product['weight_class
_id']) . '</g:weight>'
I PM'd him yesterday asking if he wanted to incorporate the changes into his script, he told me to just release this.
If you think it's surplus to requirements, I'll remove it. I thought I may be helping the forum users out as a few people seemed to be having issues with feeds. I honestly didn't expect that kind of reaction, so thanks.

Most the time people come to forums asking how to do something that's been asked a million times before, with complete disregard for the search function. This was something like my 9th post, and I was trying to help others.
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Sun Sep 04, 2011 11:04 pm
by wratoon
Good Job
I installed and is worked without any problem!
Thank you Ritchie
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Wed Sep 07, 2011 6:24 am
by Degsey
Well done and thank you, I installed this and it worked straight away, whereas the the standard feed with opencart 1.5.1.1 just did not work at all.
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Fri Oct 07, 2011 12:42 am
by Minty
Hi,
I've really looked through the forum and can't find anyone experiencing this problem, any help would be really appreciated as google merchant centre is slowly driving me mad!
I'm using OC v1.5.1 and have now tried both the latest google_base.php with it's weight fix and other changes that make it compliant with googles latest september changes to it's product feed requirments, and bulletproofOB.php
Both give clean up-loads but NO IMAGES! the product data is all ok and goes into the product search all ok, lots of great products that you can't see - great.
So this is what I've check so far...
image names have no spaces or XML characters - I assume underscores are ok between words?
images in the standard folder for opencart
permissions as default on images folder
all products have images, some have several
image file sizes are 80-100kb and all 540x420 pixels
store in root /public_html
the store itself works fine, all images in admin and in store front appear fine
the only 'mod' is I've added the 'gentle' theme, but have checked the folders it touches and the feeds folder both admin and catalogue are not touched.
Is it possible to get a raw output of the feed so it can be checked manually?
Thanks
Minty
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Fri Oct 07, 2011 4:18 pm
by RitchieTheBrit
Do you mean the images aren't showing on the feed, or google isn't picking them up? If they aren't showing on the feed, don't worry too much.... they don't! That requires HTML code, which would cause a validation error form the doctype.
Open your feed, right click and select VIEW SOURCE. You can read through the feed here. I should have included proper linebreaks to make it easier to read, but I simply copy and paste it into a new XML file in Dreamweaver, the apply source formatting.
Be aware that I have recently had issues with the g:availability tag not being part of the feed. I may have to look at this, but for the time being the shop I modified the script for is switching over to UKSB Google Merchant / Base XML Feed + XML Sitemaps. It's a paid extension, but includes some additional DB changes which rectified the issues we're having, including the feed warnings about google shopping categories. Well, it will, once our hosts sort out the bloody FTP! Lol!
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Sat Oct 08, 2011 1:15 am
by Minty
I mean that google isn't picking them up.
btw I'd already edited your file to add the availability requirement

) , I just added $output .= '<g:availability>in stock</g:availability>';
Though i'm sure there's a far more elaborate solution that works out what your stock status is for each item!
I've also added a google category feed as below in line with their product catalogue structure.
$output .= '<g:google_product_category>Motor Vehicles > Vehicles > Motorcycles</g:google_product_category>';
I've now checked through the raw feed using view in IE and the image_link looks fine here's an example from the feed:
<g:image_link>
http://www.superbikemods.co.uk/image/ca ... image_link>
If I put that link into a browser I get this though...
Forbidden
You don't have permission to access /image/cache/data/1098_2007_2011_RadGuardPack-400x400.jpg on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at
www.superbikemods.co.uk Port 80
However if I put in
http://www.superbikemods.co.uk/image/cache/data
manually I then get the list of images and I can click one and it appears!
i.e this appears
Index of /image/cache/data
Parent Directory
1098_2007_2011_FFPB1-100x100.jpg
1098_2007_2011_FFPB1-400x400.jpg
1098_2007_2011_FFPB1-40x40.jpg
1098_2007_2011_RadGuardPack-100x100.jpg
1098_2007_2011_RadGuardPack-135x105.jpg
1098_2007_2011_RadGuardPack-320x248.8889.jpg
etc.
Any ideas, am I barking up the wrong tree ... does it matter that this url gets a 403 Forbidden or would this block access to google retrieving the images?
Minted-off.
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Sat Oct 08, 2011 3:35 am
by uksitebuilder
Something seems to be blocking access to your cache directory
Check the permissions on that directory
Check your htaccess doesn't have a rule blocking access to it
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Mon Oct 10, 2011 9:45 pm
by RitchieTheBrit
Yup, I agree with UKSITEBUILDER, seems like a permissions issue to me. If I manually browse to
http://www.superbikemods.co.uk/image/cache/data/ I don't get any listings.
Get my frame powder coated or hook me up with some braided hosing and 'll sort ya site out though

Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Tue Oct 11, 2011 2:52 am
by Minty
Thanks for the replies, I've had a good look at robot.txt which looks like it might be causing a problem, I made a change as per google spec to include an allow for the crawlers!
Reloaded the feed and 36 hours in no images!
I also have htaccess in the root and it's full of stuff, I set up a password to block site access when it was first under construction but it's obviously since been removed. I'll see what the hosting company come up with.
What kind of bike you got Ritchie?
Minty
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Wed Oct 12, 2011 3:21 am
by RitchieTheBrit
Minty, PM.
Re: BulletProofOB for OC v1.5.x - Open Base for messy stores
Posted: Sun Mar 11, 2012 7:53 pm
by albsim81
I get an error in internet explorer
Carattere non valido nel contenuto di testo ( translation = Unvalid charachters in text )
Riga: 1 Carattere: 713
Code: Select all
<g:brand>Sangalli</g:brand><g:condition>new</g:condition><g:id>289</g:id><g:image_link>http://spazio-natura.it/image/cache/data/fitosan_g-500x500.jpg</g:image_link><g:mpn>0221</g:mpn><g:price>14.60</g:price><g:product_type>ERBORISTERIA > Dolori, Articolazioni e Muscoli</g:product_type><g:product_type>ERBORISTERIA > Tinture Madri</g:product_type><g:product_type>ERBORISTERIA > Influenza e raffreddore</g:product_type><g:quantity>10</g:quantity><g:upc>0221</g:upc><g:weight>0.00kg</g:weight></item><item><title>Seres CAREZZA DI CREMA BABY ml 125</title><link>http://spazio-natura.it/index.php?route=product/product&product_id=330</link><description>Crema nutriente per bimbi a base di burro di karit
the last word is karitè