Hi,
I've just got 1.10.2 running on Zen 1.3.8a and all looked ok. However, spotted a problem happening which was reported earlier in this mammoth thread but the fixes suggested then applied to code which is now different.
Basically, the feed contained things like:
' where the first 5 characters there should actually be an ampersand
the Google Product Category line was coming out as...
<g:google_product_category>Arts &amp; Entertainment &gt; Party Supplies</g:google_product_category>
etc.
The relevant bit of code in includes/classes/google_base.php , in 1.10.2 anyway, is...
function google_base_sanita($str, $rt=false) {
//global $products;
$str = str_replace("\r\n", ' ', $str);
$str = strip_tags($str);
$str = preg_replace('/\s\s+/', ' ', $str);
if (phpversion() >= 5) $str = htmlspecialchars_decode($str);
$charset = '';
if (defined(CHARSET)) {
$charset = strtoupper(CHARSET);
}
$str = html_entity_decode($str, ENT_QUOTES, $charset);
$str = htmlentities($str, ENT_QUOTES, $charset);
return $str;
}
/*
function google_base_xml_sanitizer($str, $cdata = false) {
$str = $this->google_base_sanita($str);
$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))) && ($current > 10) ) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}*/
function google_base_xml_sanitizer($str, $products_id = '') { // products id added for debugging purposes
$str = $this->google_base_sanita($str);
$strout = null;
for ($i = 0; $i < strlen($str); $i++) {
$ord = ord($str[$i]);
if (($ord > 0 && $ord < 32) || ($ord >= 127)) {
$strout .= "&#{$ord};";
}
else {
switch ($str[$i]) {
case '<':
$strout .= '<';
break;
case '>':
$strout .= '>';
break;
case '&':
$strout .= '&';
break;
case '"':
$strout .= '"';
break;
default:
$strout .= $str[$i];
}
}
}
return $strout;
}
There are 2 versions of the function google_base_xml_sanitizer , one commented out. Swapping which was commented out made it work correctly for me. Not sure if there are any other implications mind you! Just posting this in case it's any use for anyone else.
I have been reading every post I could find that looked like a possible answer.
I deleted (several times) the sql file and then reinstalled it 3+ times and got several "duplicate copy" messages.
And voila I have a perfect output file for Google.
Only took 4 days.
Now the last question" why is my file name - domain_products_en.xml instead of the file name in the config setup dor the feed??
Any ideas? Do I have to change code in some file??
BINGO!!!
I SOLVED THE "domain_products_en.xml" PROBLEM.
For some reason, without realizing it, I suddenly have two configuration options for Google:
- Google Base Feeder Configuration
- Google Merchant Center Feeder Configuration
Google Base is the old one which I tried to change but nothing worked.
My first change of Google Merchant Center did the trick and all is well.
Thanks to everyone who tried to help.
Hi ppl, Ive look throuh this thread and sorted a few bits that were wrong with mine,,
The bit i cant get working is the "download link" within the module,,
It processes the file , but in the blue bit where its says download,, the link isnt clickable??
Could someone show me why it isnt a clickable link, please
Nice - funny how it boils down to this - yet this happened to me too as it was installed beyond my screen resolution and never saw it! I assume this is due to an improper uninstall.sql? I assume that with all the attempts you and I were doing, that was missed along the way.
So is my "google merchant center feeder configuration" correct in only having only 12 Title parameters? The last is "Output Directory"
I am still getting 0 of 0 products but the OLD "Google Base Feeder Configuration" is set for.....
Show Quantity true
Include Zero Quantity false
Default Quantity 0
I am also assuming that having TWO configurations is not normal.
Having two configuration options simply means the old version wasn't uninstalled. It shouldn't effect functionality of the new version though. I have both Google Base Feeder Configuration, (which was version 1.7.4), and Google Merchant Center Feeder Configuration, (version 1.10.2), on one of my sites, and the latter works fine.
There should be way more settings than that.So is my "google merchant center feeder configuration" correct in only having only 12 Title parameters? The last is "Output Directory"
*** Multiple Configs in Admin solved
Post #3249 Solved this for me - I am up and running.
Read over Stedman's troubles around pages 325 or so.
What helps is post 3249 to wipe out all traces of google, then running the install.sql to whatever version you run.
I am running 1.10.2 (on 1.3.8a) with only image and description problems with "&" and foreign letters respectively. I am weeding these out as I speak (write).
Bookmarks