Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
wagnerguy
How do i correctly patch the database, is it one of the sql folders? or correct the error that was made?
thanks for the reply
can anyone tell me how to patch my database?
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
wagnerguy
can anyone tell me how to patch my database?
By "Patching" your database they mean to install the SQL required in the instructions.
Open the file googlefroogle.sql in a text editor like Windows notepad.exe
In your ZenCart admin open Tools/Install SQL Patches
Copy the contents of googlefroogle.sql and paste into the box in your ZenCart Admin
Click Send
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
Stuff4Toys
By "Patching" your database they mean to install the SQL required in the instructions.
Open the file googlefroogle.sql in a text editor like Windows notepad.exe
In your ZenCart admin open Tools/Install SQL Patches
Copy the contents of googlefroogle.sql and paste into the box in your ZenCart Admin
Click Send
I have done that and i got this message
1062 Duplicate entry 'GOOGLE_BASE_MAP_PRICING' for key 2. I guess the sql has already been loaded. I cant figure out what the issue is.
Re: Google Base Feeder Support Thread
wagnerguy: did you have to merge any documents? Somehow I remember empty characters at the end screwed things up before... just a thought.
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
smtseng
I have to modify the *if statment*
in file googlefroogle.php Line 181, 267, 272
to:
if (1) {
to make it work.
Anyone had the same situation ?
Yes I had the same, thankyou - your fix worked!
Bad news is that I'm in the UK and subsequently found out that the GoogleCheckout Accepted icon appears on Base results only for US sellers. Doh!
Re: Google Base Feeder Support Thread
Anyone that is receiving data feed errors after upgrading to 1.7.1 please read:
As best I can tell, there was a shift in how special characters are handled in the includes/classes/googlebase.php file. Around line 169 there is a function called "google_base_xml_sanitizer".
I copied over some of the older scripting that did work for me and now my function looks like this:
Code:
function google_base_xml_sanitizer($str, $cdata = false) {
$_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array('',' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", " " => "");
$str = html_entity_decode($str);
$str = strtr($str, $_cleaner_array);
$str = preg_replace($_strip_search, $_strip_replace, $str);
$str = strip_tags($str);
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
$str = utf8_encode(htmlentities($str));
$str = str_replace('&', '&', $str);
$str = str_replace(array("®", "©", "™"), array('(r)', '(c)', '(tm)'), $str);
$out = "";
$length = strlen($str);
for ($i = 0; $i < $length; $i++) {
$current = ord($str{$i});
if (($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($out);
$str = str_replace(array("<", ">"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}
It's a little bit of a hack job but it works for me. I hope the author will see this and look into it because I love this addon! :clap:
Remember to make a copy before you make any changes to googlebase.php. And well, if it doesn't work .. I don't know what to tell you since I didn't write the script! :huh:
Note: One thing I noticed is that after making this change, my rss feeds seem to lose their HTML formatting. It's not crucial for me, and I'm not 100% certain that Base even allows it. So I may just be confusing myself here. :blush:
Re: Google Base Feeder Support Thread
Greetings...
ZC1.3.8a
Google Feeder 1.7.0a
I got this installed and I think its all right..but..
Out of about 30,000 products in my store, the XML file is only ending up with about 4400 products.
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
Stuff4Toys
In item number 2247 it looks like the character it's balking at is
: in the description here:
HTML Code:
No awkward stops and starts—and none of the echoes and distortion
Remove this character and you should be OK
JOhn ><>
Quote:
Originally Posted by
reppy
Anyone that is receiving data feed errors after upgrading to 1.7.1 please read:
As best I can tell, there was a shift in how special characters are handled in the includes/classes/googlebase.php file. Around line 169 there is a function called "google_base_xml_sanitizer".
I copied over some of the older scripting that
did work for me and now my function looks like this:
Code:
function google_base_xml_sanitizer($str, $cdata = false) {
$_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array('',' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", " " => "");
$str = html_entity_decode($str);
$str = strtr($str, $_cleaner_array);
$str = preg_replace($_strip_search, $_strip_replace, $str);
$str = strip_tags($str);
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
$str = utf8_encode(htmlentities($str));
$str = str_replace('&amp;', '&', $str);
$str = str_replace(array("®", "©", "™"), array('(r)', '(c)', '(tm)'), $str);
$out = "";
$length = strlen($str);
for ($i = 0; $i < $length; $i++) {
$current = ord($str{$i});
if (($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($out);
$str = str_replace(array("<", ">"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}
It's a little bit of a hack job but it works for me. I hope the author will see this and look into it because I love this addon! :clap:
Remember to make a copy before you make any changes to googlebase.php. And well, if it doesn't work .. I don't know what to tell you since I didn't write the script! :huh:
Note: One thing I noticed is that after making this change, my rss feeds seem to lose their HTML formatting. It's not crucial for me, and I'm not 100% certain that Base even allows it. So I may just be confusing myself here. :blush:
Thanks for this info. One of the most direct responses we have seen on here. We are giving it a try and will let you know if it works. In the meantime we'll also respond to the other posters message.
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
Stuff4Toys
In item number 2247 it looks like the character it's balking at is
: in the description here:
HTML Code:
No awkward stops and starts—and none of the echoes and distortion
Remove this character and you should be OK
JOhn ><>
Thank You for the reply. Question - how would you suggest one go about removing this character?
The bigger issue here is this. Prior to this upgrade, the upload worked FINE with NO ERRORS and none of the item descriptions have changed since the upgrade. So it seems the issue now is why did this upgrade all of a sudden cause some of our items to have reported errors with Google base when they didn't before the upgrade?
Thanks
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
JLA
Thanks for this info. One of the most direct responses we have seen on here. We are giving it a try and will let you know if it works. In the meantime we'll also respond to the other posters message.
AH - GREAT SUCCESS. This method did INDEED WORK. All of our items processed WITHOUT ERRORS!!!!