New Zenner
- Join Date:
- Aug 2009
- Posts:
- 30
- Plugin Contributions:
- 0
Google Base Feeder Support Thread [OLD]
edit - ignore this post
Views: 806,462
New Zenner
edit - ignore this post
New Zenner
Wow, the santizer is causing more problems than just absence of spaces. It's stripping off the '&' in my categories as well (Media > DVDs & Videos) which results in gibberish to google feeder. Instead of translating to (Media > DVDs & Videos), it's just seeing it as (Media gt; DVDs amp; Videos).
Totally Zenned
hypercoyote:
Wow, the santizer is causing more problems than just absence of spaces. It's stripping off the '&' in my categories as well (Media > DVDs & Videos) which results in gibberish to google feeder. Instead of translating to (Media > DVDs & Videos), it's just seeing it as (Media gt; DVDs amp; Videos).Look a coupla pages back in this thread.. I posted my fix for the ampersands as well the fix for quotations in description and product titles.... my fix incorporates Dave's fix for the "<" and ">" characters..
If you would be so kind as to post how you addressed the spaces, that would be nice??:smile:
New Zenner
I'll give that fix a shot. LOL, the only thing I could come up with was to put a space at the end of each of my lines in the HTML. Very low tech, but it worked.
New Zenner
DivaVocals:
Look a coupla pages back in this thread.. I posted my fix for the ampersands as well the fix for quotations in description and product titles.... my fix incorporates Dave's fix for the "<" and ">" characters..
If you would be so kind as to post how you addressed the spaces, that would be nice??:smile:
Is this the fix:
// $str = str_replace(array("<", ">"), array("<", ">"), $str);
// 10-01-2009 Updated to correct quotation marks and ampersands in product titles and descriptions
$str = str_replace(array("lt;", "gt;", "quot;", """, "amp;"), array("<", " &qt; ", """, """, "&"), $str);
I put it in my code but as far as I can tell, it didn't make a difference. When you put in &'s and >'s, do you store them in XML friendly format into your table or do you store them in plain format? I actually have it in their both ways
Media > DVDs & Videos
and
Media > DVDs & Videos
both of them still come out as
Media gt; DVDs amp; Videos
in the feeder xml.
I mean, do I need to put quotes around them or do something else?
New Zenner
DivaVocals:
Look a coupla pages back in this thread.. I posted my fix for the ampersands as well the fix for quotations in description and product titles.... my fix incorporates Dave's fix for the "<" and ">" characters..
If you would be so kind as to post how you addressed the spaces, that would be nice??:smile:
hypercoyote:
Is this the fix:
// $str = str_replace(array("<", ">"), array("<", ">"), $str);
// 10-01-2009 Updated to correct quotation marks and ampersands in product titles and descriptions
$str = str_replace(array("lt;", "gt;", "quot;", """, "amp;"), array("<", " &qt; ", """, """, "&"), $str);I put it in my code but as far as I can tell, it didn't make a difference. When you put in &'s and >'s, do you store them in XML friendly format into your table or do you store them in plain format? I actually have it in their both ways
Media > DVDs & Videos
and
Media > DVDs & Videos
both of them still come out as
Media gt; DVDs amp; Videos
in the feeder xml.
I mean, do I need to put quotes around them or do something else?
LOL, I guess it would help if I actually read the post and went to line 202. I did a Find on the code to replace instead and ended up on an earlier line. So the code actually did work, although it has one error, it replaces 'gt' with 'qt' (a Q), so after fixing that, it seems to be working :)
New Zenner
bookmarked and b back l8er, bro, :-)
Totally Zenned
Hi
Can anyone help? I think I have set all parameters up correctly on Google Base feeder. I have also set up the FTP account on google as I tested using filezilla and it connects fine. However When I click on the:
Upload Product Feed: Click [HERE] to upload products feed to Google Base.
I get the following message:
Google Base Feeder v1.7.4 started 2009/10/25 13:02:44
Feed file - /home/fancie/public_html/feed/domain_products.xml
Processing: Feed - No, Upload - Yes
Upload started...
Connection failed: uploads.google.com
Upload failed...
Am I just being thick? The FTP details are all correct in the configuration also.
Please can anyone advise???
Regards,
Phil
New Zenner
philip937:
Hi
Can anyone help? I think I have set all parameters up correctly on Google Base feeder. I have also set up the FTP account on google as I tested using filezilla and it connects fine. However When I click on the:
Upload Product Feed: Click [HERE] to upload products feed to Google Base.
I get the following message:
Google Base Feeder v1.7.4 started 2009/10/25 13:02:44
Feed file - /home/fancie/public_html/feed/domain_products.xml
Processing: Feed - No, Upload - Yes
Upload started...
Connection failed: uploads.google.comUpload failed...
Am I just being thick? The FTP details are all correct in the configuration also.
Please can anyone advise???
Regards,
Phil
Bear with me. You said you have the settings correct, but just to be thorough....
First, have you set up an FTP account with google merchant? It's under settings -> FTP I believe. Make sure that matches up with your GoogleBase settings. Also, under Google Base Feeder Configuration on Zen Cart, I had to set Use PASV to FALSE instead of the default value of True.
Next, can you manually FTP into the server? If you don't have software, just pull up a command prompt in Windows by going to Run on the start menu and typing CMD and hitting enter. Then type FTP UPLOADS.GOOGLE.COM and use the username and password you set up on Google Merchant site. If you can't login manually using your username and password, then the problem lies with those. If you can login manually, then the problem is with your site settings.
New Zenner
By the way, does anyone know why base feeder won't pass a 'weight' attribute to the XML? I've got values in both weight and weight type. I assume the feeder combines those into one attribute called weight, but apparently it doesn't. Or has someone come up with a fix for this?
New Zenner
Here's a suggested easy fix for adding spaces in the generated XML where there used to be <br> or <li> that created the line breaks.
Around line 185 of store/includes/classes/google_base.php, replace this:
$str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
with this:
$str = str_replace(array("<br />","</li>","\t" , "\n", "\r"), ' ', $str);
And it will add a space at the end of bulleted lists and line breaks. This is assuming your break tags are formatted the way zencart formats them, <br /> as opposed to <br>. This is because it will only replace those that match the arguments in the list.
Totally Zenned
hypercoyote:
Here's a suggested easy fix for adding spaces in the generated XML where there used to be <br> or <li> that created the line breaks.
Around line 185 of store/includes/classes/google_base.php, replace this:
$str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
with this:
$str = str_replace(array("<br />","</li>","\t" , "\n", "\r"), ' ', $str);
And it will add a space at the end of bulleted lists and line breaks. This is assuming your break tags are formatted the way zencart formats them, <br /> as opposed to <br>. This is because it will only replace those that match the arguments in the list.Or you could just add another argument to the list to cover all bases..:smile: (Like clients who don't know how to format line breaks as <br /> no matter how many times you show them:laugh:)
New Zenner
DivaVocals:
Or you could just add another argument to the list to cover all bases..:smile: (Like clients who don't know how to format line breaks as <br /> no matter how many times you show them:laugh:)
Yep, sure could. I didn't bother because if you are working in the catalog interface, even if you try to do <br>, zencart will replace it with <br />
Totally Zenned
hypercoyote:
Yep, sure could. I didn't bother because if you are working in the catalog interface, even if you try to do <br>, zencart will replace it with <br />True enough..:smile:
BTW.. Thanks for sharing your code..:smile: Gonna update the client site tonight..
New Zenner
DivaVocals:
True enough..:smile:
BTW.. Thanks for sharing your code..:smile: Gonna update the client site tonight..
Heh, no problem, it's not that clever anyway. Just make sure it's inserted where that other code is, it has to run before the HTML code santizer function or that will strip out the <br> tags first.
New Zenner
DivaVocals:
True enough..:smile:
BTW.. Thanks for sharing your code..:smile: Gonna update the client site tonight..
Hey, do me a favor. When you update your code, generate a feed and send it to google. I think that's the only change I made between now and my last successful feed upload, but all my items now receive an error that the quantity must be greater than 0 and two items say they have invalid words in the title. Not really sure why spaces would cause all those problems.....but it's late, so I'll look into it more tomorrow.
New Zenner
hypercoyote:
Hey, do me a favor. When you update your code, generate a feed and send it to google. I think that's the only change I made between now and my last successful feed upload, but all my items now receive an error that the quantity must be greater than 0 and two items say they have invalid words in the title. Not really sure why spaces would cause all those problems.....but it's late, so I'll look into it more tomorrow.
What the heck. Okay, took out the change, still getting those errors. Did Google change something? I've even set in the GB config the default quantity is 1 for items with 0 and to not include items with quantity of zero. Checking the XML file, it's not even including a quantity attribute at all. What gives?
New Zenner
Okay, new problem. How do you get Google to use your calculated USPS and UPS shipping rates? The only options I see for shipping methods are:
zones table rate
flat rate
per item
per weight unit
table rate
zones
percategory
free shipping
free rules shipping
Of which I use none of those. Is it a PHP edit and if so, where at?
New Zenner
hypercoyote:
Okay, new problem. How do you get Google to use your calculated USPS and UPS shipping rates? The only options I see for shipping methods are:
zones table rate
flat rate
per item
per weight unit
table rate
zones
percategory
free shipping
free rules shippingOf which I use none of those. Is it a PHP edit and if so, where at?
Okay, scratch half of that. I have google base feeder set to None for the shipping rates, which means it should pull my shipping settings from Google's site itself, where I have setup 3 services. However, still nothing shows up for shipping when I go through the checkout process via google's site.
New Zenner
Weirdly the  (weird A) fix didn't work for me:
bhunted:
THAT WORKED! Many thanks... just wish I knew that before I changed about 50 products manually. Spent many hours on this. Thanks thanks thanks! :D:clap:
I had to add the ultra low tech:
$str = eregi_replace("Â", "", $str);
line below it to correct the problem. I don't get why it isn't caught in the line :
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?ÀÂÄßÈÉÊËÎÏÔÖÙÛÜàâäèéêëîïôöùûüÿÇç«»]", "", $str);
Which already exists in the code as the character is obviously in the list, but it doesn't work, so that's that...
Cheers all contributors for this thread for the leads that have helped me fix my problems so far!:clap:
Tell staff why this post should be reviewed.