Results 1 to 10 of 3563

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,567
    Plugin Contributions
    74

    Default Re: Google Base Feeder Support Thread

    However, this didn't work. I created the file again and reuploaded and I still get the same error from Google and line 4 still says:
    <title>S&A</title>

    Any other ideas?
    In the meantime, I've manually edited the xml file and changed that line to
    <title>S&amp;A</title>
    Take that line out, it will actually create more bugs than it'll fix. Let's try this instead:

    PHP Code:
        function zen_xml_sanitizer ($str) {
            
    $_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
            
    $_strip_replace = array('',' ');
            
    $_cleaner_array = array(">" => "> ""&reg;" => """®" => """&trade;" => """™" => """\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 str_replace('&''&amp;'$str); // changes & to &amp
            
    $str htmlentities($str);
            
    $str str_replace('&amp;amp;''&amp;'$str); // replaces occurences of &amp;amp; with &amp;
        


  2. #2
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Google Base Feeder Support Thread

    Quote Originally Posted by numinix View Post
    Take that line out, it will actually create more bugs than it'll fix. Let's try this instead:

    PHP Code:
        function zen_xml_sanitizer ($str) {
            
    $_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
            
    $_strip_replace = array('',' ');
            
    $_cleaner_array = array(">" => "> ""&reg;" => """®" => """&trade;" => """™" => """\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 str_replace('&''&amp;'$str); // changes & to &amp
            
    $str htmlentities($str);
            
    $str str_replace('&amp;amp;''&amp;'$str); // replaces occurences of &amp;amp; with &amp;
        


    Unfortunately, that didn't work either, still getting this on line 4:
    <title>S&A</title>



    Also, with a different file feed from another website I get this error from Google:
    Error Bad data Line #6
    We found a mismatched XML tag. - help

    This is what line 6 has for this file:
    Code:
    <description>Sells fine solid gold jewelry.</description>r-jewelry.com/images/large/gld/r3248_LRG.jpg</g:image_link>
    Any ideas on this other one?

    Thanks.

  3. #3
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,567
    Plugin Contributions
    74

    Default Re: Google Base Feeder Support Thread

    Could it be possible that your title is too short??? I think the XML editor is displaying it as &. Try opening with a text editor like notepad and see if it really is & or &amp;

  4. #4
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Google Base Feeder Support Thread

    Quote Originally Posted by numinix View Post
    Could it be possible that your title is too short??? I think the XML editor is displaying it as &. Try opening with a text editor like notepad and see if it really is & or &amp;
    I really don't think it has anything to do with the title being too short. I've only opened the file with the text editor UltraEdit and it shows just like I mentioned before <title>S&A</title>

    Anyway, my php knowledge is very limited, but I think I found the reason. In line 79, the title line is not being sanitized (not sure if that's what you call it).
    PHP Code:
    $content["title"] = '<title>' STORE_NAME '</title>'
    Shouldn't it be like below?
    PHP Code:
    $content["title"] = '<title>' zen_xml_sanitizer(STORE_NAME) . '</title>'
    I tried that, and it results in:
    <title>SA</title>

    While this is good and eliminates the error reported by Google, how can I get it to work properly and output <title>S&amp;A

  5. #5
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Google Base Feeder Support Thread

    I have three websites, this mod worked on two of them, but on one of them Google gave the following error.

    Error Bad data Line #6
    We found a mismatched XML tag. - help

    This is what line 6 has for this file:
    Code:
    <description>Sells fine solid gold jewelry.</description>r-jewelry.com/images/large/gld/r3248_LRG.jpg</g:image_link>
    There are obviously broken tags on this line. I wasn't able to figure out why this happened. This was with v1.6.0 and 1.6.1.
    I just tried v1.6.2 and I no longer have the problem reported above; however, now the file generated is missing more than half the items.

    I'll wait and see if anyone else has this issue or if it could be an issue on my server.

    BTW, do you have a link where I can download the last version that created tab delimited files. Old links in this thread don't seem to work. I'd like to take a look at it and see if I can integrate some of its features to EasyPopulate.
    Last edited by tj1; 3 Oct 2007 at 02:00 AM.

  6. #6
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,567
    Plugin Contributions
    74

    Default Re: Google Base Feeder Support Thread

    You can find older versions in the Zen Cart Downloads section of this website.

    You still haven't said what is different about the missing products. Perhaps they were inactive, some custom product type, etc.

    The Google Base Feeder only supports the 5 product types found in Zen Cart by default. To add additional customized product types, you would add the following line to the SQL query for your feed type:

    PHP Code:
    OR p.products_type 
    Where # is the product_type id.

  7. #7
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Google Base Feeder Support Thread

    Thanks, I found and downloaded the older versions.

    There's is nothing different about the missing products. They're all general products.

    Actually, after opening the file generated I'm seeing it's missing the the closing tags as well, so this might indicate a time out, correct?

  8. #8
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,567
    Plugin Contributions
    74

    Default Re: Google Base Feeder Support Thread

    Yes, it's timing out then.

  9. #9
    Join Date
    Apr 2004
    Posts
    103
    Plugin Contributions
    0

    Default Re: Google Base Feeder Support Thread

    Some of our product names include a percent sign -- e.g., "100&#37; Kona Coffee (1 Pound Bag)". That percent sign is important to our "branding" ... no blend of beans grown other than on the Kona Coast of the Big Island of Hawaii may use the "100% Kona Coffee" appellation.

    But the percent sign (which shows up just fine on our Zen Cart pages) disappears from the XML file which we send to Google Base. BTW, the same "disappearing act" is true of the Windows Live Product Search file. We aren't using the Yahoo feeder, but I would guess that similar code is used there as well.

    I tried to look at the code but I must admit that my eyes glazed over when I got to the "sanitizer" function.

    Numinix, is there a chance that you could look at the Google / Live (and Yahoo!) code to see if the percent signs could be preserved in the output? Or, perhaps, is there a workaround that I should use in the original ZC product entries?

    We really need those little percent sign devils to show up in the product search results.

    TIA
    Thanks,
    Tony Benedetti

 

 

Similar Threads

  1. v150 Google Merchant Center Feeder for ZC v1.5.x [Support Thread]
    By DivaVocals in forum Addon Admin Tools
    Replies: 504
    Last Post: 19 Nov 2024, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg