Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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:
Quote:
Originally Posted by
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 :)
Re: Google Base Feeder Support Thread
bookmarked and b back l8er, bro, :-)
Re: Google Base Feeder Support Thread
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
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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.com
Upload 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.
Re: Google Base Feeder Support Thread
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?
Re: Google Base Feeder Support Thread
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.
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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:)
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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 />
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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..
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
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.