Zen Cart Logo
Forums / All Other Contributions/Addons / Google Base Feeder Support Thread [OLD]

Google Base Feeder Support Thread [OLD]

Locked

Views: 806,491

Results 1,741 to 1,760 of 3,556
This thread is locked. New replies are disabled.
11 Aug 2009, 6:55 PM
#1741
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Google Base Feeder Support Thread [OLD]

sgflowers:

yes

i deleted and re-uploaded to be safe

not sure what is going on seems to be some of the code in the frooglegoogle in the admin is causing a 500 error

any ideas?

What version were you using before you upgraded ?

11 Aug 2009, 7:08 PM
#1742
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Google Base Feeder Support Thread [OLD]

sgflowers:

yes

i deleted and re-uploaded to be safe

not sure what is going on seems to be some of the code in the frooglegoogle in the admin is causing a 500 error

any ideas?

I would copy and paste the uninstall patch in you admin/tools/install_sql_patches, after that run this sql patch. Don't run this patch until you run the uninstall.sql

delete from configuration where configuration_group_id = 0;
```Install  the current version of google_base, and you should not have anymore 500 errors.
11 Aug 2009, 8:01 PM
#1743
sgflowers avatar

sgflowers

Totally Zenned

Join Date:
Jan 2004
Posts:
508
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

countrycharm:

I would copy and paste the uninstall patch in you admin/tools/install_sql_patches, after that run this sql patch. Don't run this patch until you run the uninstall.sql

delete from configuration where configuration_group_id = 0;



did all this with no luck

same errors:yuck:
11 Aug 2009, 8:24 PM
#1744
jasonnski avatar

jasonnski

New Zenner

Join Date:
Jun 2009
Posts:
1
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

Using the v.1.3.8a zen cart and v.1.7.4 Google Base Feeder.
I also have a database with over 13K products. This database contains many special characters for copyright, trademark, registered etc. along with double quotes, degrees, ampersand and again etc.

Out of the box about half or less of my items were getting listed. After playing around with google_base.php (with suggestions I found by searching because I have almost no php experience) I was able to get 100% of my products to list using the following found on the Numinix forum pg. 26:

I pasted the code in 1.7.0A from the same file that I am using and when I downgrade to 1.7.0A everything works fine.

    function google_base_sanita($str, $rt=false) { // currently using zen_xml_sanitizer below instead of zen_froogle_sanita
          $str = strip_tags($str);
          $str = str_replace(array("\t" , "\n", "\r"), ' ', $str);
          $str = preg_replace('/\s\s+/', ' ', $str);
      //  $str = str_replace(array("®", "®", "©", "©", "™", "™"), ' ', $str);
          $str = htmlentities(html_entity_decode($str));
          $in = $out = array();
          $in[] = "®"; $out[] = '(r)';
          $in[] = "©"; $out[] = '(c)';
          $in[] = "™"; $out[] = '(tm)';
      //    $str = str_replace($in, $out, $str);
          if($rt) {
            $str = str_replace(" ", " ", $str);
            $str = str_replace(" ", "", $str);
          }
          $str = trim($str);
          return $str;
        }
       
        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;
          $str = str_replace('&', '&', $str);
          //if (!$cdata) {
          //$str = htmlentities(html_entity_decode($str));
          //$in = $out = array();
          //$in[] = "®"; $out[] = '(r)';
          //$in[] = "©"; $out[] = '(c)';
          //$in[] = "™"; $out[] = '(tm)';
          //$str = html_translate($str);
          $str = trim($str);
          if ($cdata) {
            $str = '<![CDATA[' . $str . ']]>';
          }
          return $str;
        }
       
        function html_translate($value) {       
          $value = preg_replace("/À/", "À", $value);       
          $value = preg_replace("/Á/", "Á", $value);       
          $value = preg_replace("/Ä/", "Ä", $value);       
          $value = preg_replace("/Ç/", "Ç", $value);       
          $value = preg_replace("/È/", "È", $value);       
          $value = preg_replace("/É/", "É", $value);       
          $value = preg_replace("/Ë/", "Ë", $value);       
          $value = preg_replace("/Ì/", "Ì", $value);       
          $value = preg_replace("/Í/", "Í", $value);       
          $value = preg_replace("/Ï/", "Ï", $value);       
          $value = preg_replace("/Ò/", "Ò", $value);       
          $value = preg_replace("/Ó/", "Ó", $value);       
          $value = preg_replace("/Ö/", "Ö", $value);       
          $value = preg_replace("/Ù/", "Ù", $value);       
          $value = preg_replace("/Ú/", "Ú", $value);       
          $value = preg_replace("/Ü/", "Ü", $value);
          $value = preg_replace("/Ü/", "Ü", $value);
          $value = preg_replace("/ß/", "ß", $value);       
          $value = preg_replace("/à/", "à", $value);       
          $value = preg_replace("/á/", "á", $value);       
          $value = preg_replace("/ä/", "ä", $value);       
          $value = preg_replace("/ç/", "ç", $value);       
          $value = preg_replace("/è/", "è", $value);       
          $value = preg_replace("/é/", "é", $value);       
          $value = preg_replace("/ë/", "ë", $value);       
          $value = preg_replace("/ì/", "ì", $value);       
          $value = preg_replace("/í/", "í", $value);       
          $value = preg_replace("/ï/", "ï", $value);       
          $value = preg_replace("/ò/", "ò", $value);       
          $value = preg_replace("/ó/", "ó", $value);       
          $value = preg_replace("/ö/", "ö", $value);       
          $value = preg_replace("/ù/", "ù", $value);       
          $value = preg_replace("/ú/", "ú", $value);       
          $value = preg_replace("/ü/", "ü", $value);       
          return $value;   
        }

I replaced everything in the function google_base_sanita through the entire function google_base_xml_sanitizer section of google base feeder 1.7.4 google_base.php with the code above. After doing that I took a better look at:

$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", "    " => ""); 

located within the pasted code and easily realized that I could make simple changes to character substitution by adding more of or changing the existing substitution in this format: "[character_you_want_to_remove]" => "[the_substituted_character]". Examples: I wanted the trademark to display as "(TM)" instead of ""/just being removed. I also have different type hyphens in my text, so I used: "–" => "-", "—" => "--" to replace the google base unacceptable hyphens that were getting removed leaving no space between words, with the hyphen that is acceptable "-" or "--".

So hopefully this helps some with large databases that contain a variety of characters that are either getting left our or causing the item to not get listed due to invalid encoding.

Now here is my question: Is there any way to get the ampersand & and double " or even single quote ' characters to pass through the feeder and display with the product listing?

I don't really know php so I cannot see where they are being removed in this code, yet I think when I was messing with google_base.php before, I was able to get these characters to show up in my listings.

If I cannot get a solution, I'm going to leave as is because at least all of my products are getting listed and are searchable. It would just be a nicer presentation.

Thank you all by the way. I've been able to build my first shopping website with 13+K products and get it live with what I've already learned from you!

11 Aug 2009, 10:28 PM
#1745
sgflowers avatar

sgflowers

Totally Zenned

Join Date:
Jan 2004
Posts:
508
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

sgflowers:

did all this with no luck

same errors:yuck:

i was missing the version folder

11 Aug 2009, 11:49 PM
#1746
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Google Base Feeder Support Thread [OLD]

sgflowers:

i was missing the version folder

So now everything is working OK for you. It doesn't take much to miss something to keep it from working.

12 Aug 2009, 8:54 PM
#1747
tromak avatar

tromak

New Zenner

Join Date:
Aug 2009
Location:
Gray, TN, USA
Posts:
10
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

numinix:

You would register two different file names as they are separate feeds.

You either have the wrong login info for the FTP or your server is having difficulty. Double check the FTP account info matches your FTP account for Google Base and if it still fails try changing your setting for PASSIVE MODE in the configuration.

Numinix,

I haven't gone through all of the rest of the posts yet, but there were several people throughout the thread who were saying that when they would try to upload their feed through the GBF add-on, it would say "Upload started..." and then say "Done" in the browser's status bar after a little bit. I was experiencing this as well. I wasn't the one who set up ZC or GBF, but I was brought in to fix the issue. The customer thought that it was because he had over 1,000 products in his inventory.

After spending hours reading this thread from post #1, and mucking around with the code (googefroogle.php and then google_base.php), I found that it was the "Google Base PASV" setting being set to true. When I changed it to false, regenerated the feed file and trying the upload again, it worked.

So I guess those who've checked with their ISP and can do PHP FTP functions and have tried the php.ini trick to no avail, they can try changing that value and see what happens.

I figured it out after commenting out the ob_start() function and then commenting out the ftp_pasv() function in google_base.php. :cool:

12 Aug 2009, 9:12 PM
#1748
asauterchicago avatar

asauterchicago

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

I'm a little confused with steps 6 and 7. I guess lets start with 7:

Go to Admin->Tools>Google Base Feeder and follow instructions to create, view, and upload feed file.

When I go to Admin->Tools-> there is no option for "Google Base Feeder". Did I screw something up in the install?

12 Aug 2009, 9:57 PM
#1749
asauterchicago avatar

asauterchicago

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

asauterChicago:

I'm a little confused with steps 6 and 7. I guess lets start with 7:

Go to Admin->Tools>Google Base Feeder and follow instructions to create, view, and upload feed file.

When I go to Admin->Tools-> there is no option for "Google Base Feeder". Did I screw something up in the install?

Never mind, I figured this out. In the last security update they suggested you should change your /admin/ folder to something else. I needed to change the admin folder in the module to match mine on the server. I'm sure I'll have more questions soon though :-).

17 Aug 2009, 12:36 AM
#1750
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

I just installed this with zencart 1.3.7 and google base feeder 1.7.4. When I went to Admin->Tools->Google Base Feeder, I get an error message

Warning: require(includes/classes/google_base.php) [function.require]: failed to open stream: No such file or directory in /home/my-site/public_html/shop/my-admin/googlefroogle.php on line 18

Any ideas?

Vicky

17 Aug 2009, 2:13 AM
#1751
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Google Base Feeder Support Thread [OLD]

TrvlFox:

I just installed this with zencart 1.3.7 and google base feeder 1.7.4. When I went to Admin->Tools->Google Base Feeder, I get an error message

Warning: require(includes/classes/google_base.php) [function.require]: failed to open stream: No such file or directory in /home/my-site/public_html/shop/my-admin/googlefroogle.php on line 18

Any ideas?

Vicky

Check the folder structure again. Make sure you change the custom folders to match your custom template. Upload it again to make sure ever file uploaded right. Make sure the feed folder in the root has 777 write permission.

17 Aug 2009, 5:01 AM
#1752
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

I double checked folders and permission levels and still the same problem. I can get to everything except for Admin/Tools/Google base

17 Aug 2009, 4:07 PM
#1753
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Google Base Feeder Support Thread [OLD]

TrvlFox:

I double checked folders and permission levels and still the same problem. I can get to everything except for Admin/Tools/Google base
Are you sure you didn't rename your admin folder to something else for security reasons? If you did you make sure you rename the admin folder in the google_base folder the same thing before uploading. Seems like you missing the google_base/admin/includes/languages folder. That is were admin/tools/google_base is loaded from under tools.

17 Aug 2009, 7:00 PM
#1754
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

I checked all the files and still can't see anything missing. I reinstalled the files and they are all there.

I see it in the admin panel under tools but when I click on it, I still get the same error.

17 Aug 2009, 7:10 PM
#1755
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

Ok, I think I am closer. I looked at the code and realized that the folder "class" was suppose to be inside Admin. It wasn't so it didn't get uploaded to that folder.

Now I have a new error but it looks promising..

TEXT_GOOGLE_FROOGLE_STARTED
TEXT_GOOGLE_FROOGLE_FILE_LOCATION/home/barkands/public_html/shop/feed/barkandstuff_products.xml_products.xml
Processing: Feed - No, Upload - No

17 Aug 2009, 7:24 PM
#1756
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

I changed the file name in the set up so now I just get this message

TEXT_GOOGLE_FROOGLE_STARTED
TEXT_GOOGLE_FROOGLE_FILE_LOCATION/home/barkands/public_html/shop/feed/barkandstuff_products.xml
Processing: Feed - No, Upload - No

17 Aug 2009, 7:57 PM
#1757
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

Looks like I got it working! Yeah! I had also creted a file while trouble shooting in my feed folder because I couldn't figure out how the file got created. I guess it's automatically. Once I deleted that file, everything worked.

Still - the class file is in the wrong folder. It should be under admin/include/classes.

thanks
Vicky

17 Aug 2009, 7:59 PM
#1758
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

Well, nothing is ever easy. So I got my admin folder to show up, pressed all the buttons and I get this message

Google Base FTP content:
Connected to: uploads.google.com
Connection failed: uploads.google.com

17 Aug 2009, 8:59 PM
#1759
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Google Base Feeder Support Thread [OLD]

TrvlFox:

Well, nothing is ever easy. So I got my admin folder to show up, pressed all the buttons and I get this message

Google Base FTP content:
Connected to: uploads.google.com
Connection failed: uploads.google.com
Did you go to Google Base and create an account? If not you will have to do that first then Register Your Data Feed. The name you have for it in the google_base/ configuration, then google will recognize it.

17 Aug 2009, 9:09 PM
#1760
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Google Base Feeder Support Thread [OLD]

Yes. I was able to upload manually to google using the feed produced.