Jump to content
gottaloveit

Automatically send data feed to Froogle

Recommended Posts

It's the same general problem. A shared server is setup with limits in place so that one account on the server cannot hog the servers resources. It might be that you have so many products, the script is taking too long to run. If you provide directions to your host as to how to duplicate the problem, or just send them what you posted here, they may be able to fix it. Some hosts allow modifying the settings a little. If they say they can't adjust the settings and it is due to the number of your products, then you don't have any choice but to change to a host that will allow the script to run. The mysql statement could, maybe, be modified to get a little extra speed but, if that works, it won't be enough to last for long since you are so close to the limit. And that would only apply if we are talking about many products. If you only have 500 or so, the problem isn't the script.

 

Thanks Jack

 

I have over 100,000++ products. Do you think having VPS hosting would solve the problem since i can manage the resource limit. Yeah, i have talked to my host (hostgator) and they said they cannot do anything about it since it's a shared server. They recommend me to purchase VPS or delicated server. Thanks

Share this post


Link to post
Share on other sites

Try this (assumes you SEO ENABLED). Find this block of code

      if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .
           preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .

and change it to

      $newName = $row->name . '-' . 'keyword'; 
     if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .
           preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($newName, $_cleaner_array) ) ) . "\t" .

 

That did it..

Thanks Jack..

Share this post


Link to post
Share on other sites

Thanks Jack

 

I have over 100,000++ products. Do you think having VPS hosting would solve the problem since i can manage the resource limit. Yeah, i have talked to my host (hostgator) and they said they cannot do anything about it since it's a shared server. They recommend me to purchase VPS or delicated server. Thanks

A VPS might be able to handle it. It is still just a shared server though and had limits. What those limits are will determine if it will work or not. Unfortunately, there's no way to know that without trying it.

Share this post


Link to post
Share on other sites

I have a wee bit of an issue not a biggie but I would like to solve it if possible.

 

I run CRE Loaded version of Oscommerce and I can get quite a few OScommerce addons to work but quite frequently the code in the various files do not match.

 

I have the feed generator working just fine but the code for the admin back end is different so I do not have the push button functionality.

 

Instruction #4

 

FIND:

'<a href="' . tep_href_link(FILENAME_DEFINE_LANGUAGE) . '" class="menuBoxContentLink">' . BOX_TOOLS_DEFINE_LANGUAGE . '</a><br>' .

 

ADD AFTER:

'<a href="' . tep_href_link('feeders.php') . '" class="menuBoxContentLink">' . BOX_FEEDERS_GOOGLE . '</a><br>'

 

 

 

 

Here is the code of my file admin/includes/boxes/tools.php,

 

 

<?php

$heading = array();

$contents = array();

$heading[] = array('text' => BOX_HEADING_TOOLS,

'link' => tep_href_link(FILENAME_BACKUP_MYSQL, 'selected_box=tools'));

 

You will notice that there is no '<a href="' . tep_href_link(FILENAME_DEFINE_LANGUAGE) . '" class="menuBoxContentLink">' . BOX_TOOLS_DEFINE_LANGUAGE . '</a><br>'

to be found.

 

Should I just throw in those two lines and see what happens or what??

 

Suggestions?

 

Cheers,

Krispie

Share this post


Link to post
Share on other sites

A site with the proper security add ons will not have a link to the Define Language file.

 

Is that ALL of the tools.php? You should be able to add the link in there anywhere within the links where you want it. I usually ordered my links in the various boxes to suit myself... but you should not have the link described.


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

I'm really new to Oscommerce and this contribution. I downloaded GoogleFeeder V 2.5 and start the installation, but stuck on step 3. Can anyone please help me with Step 3: (Create a directory named feeds in the root of your shop. Set the permissions on it to the same settings as the images directory)?

 

So, what should I do exactly? Where is the root of my shop? How do I create a directory? I'm very sorry that I have to ask such a basic question, but someone please help me?

 

Thank you sooooo much in advance!

Share this post


Link to post
Share on other sites

I'm really new to Oscommerce and this contribution. I downloaded GoogleFeeder V 2.5 and start the installation, but stuck on step 3. Can anyone please help me with Step 3: (Create a directory named feeds in the root of your shop. Set the permissions on it to the same settings as the images directory)?

 

So, what should I do exactly? Where is the root of my shop? How do I create a directory? I'm very sorry that I have to ask such a basic question, but someone please help me?

 

Thank you sooooo much in advance!

The root directory is where you shop is located. If your url is something like http://yourdomain.com/, then the shop is in the web root which is in the public_html or httpdocs directory for many servers. If it is something like http://yourdomain.com/store/, then the shop is in the store directory and that is the root. If you are still not sure, ask your host to explain it since it can vary with the host. You can create a directory using an ftp program (right click and choose make directory or whatever it says) or through your hosts control panel. Again, ask them for instructions if you are not clear.

Share this post


Link to post
Share on other sites

The root directory is where you shop is located. If your url is something like http://yourdomain.com/, then the shop is in the web root which is in the public_html or httpdocs directory for many servers. If it is something like http://yourdomain.com/store/, then the shop is in the store directory and that is the root. If you are still not sure, ask your host to explain it since it can vary with the host. You can create a directory using an ftp program (right click and choose make directory or whatever it says) or through your hosts control panel. Again, ask them for instructions if you are not clear.

 

 

Thanks sooooooo much Jack! I got it and it's working now :-)

Share this post


Link to post
Share on other sites

I sure could use a little help / advise!

 

 

I have been using Google Feeder for some time so I thought I knew what I was doing. BUT; I recently changed hosting providers and when I run google feeder now, I get this after the page loads and starts to run for about 30 seconds.

 

http://www.globalnet-marketing.net/admin/feeders.php?osCAdminID=eafb5b324778f5e7e2b2cf3e9f44209c 173.17.14.229 /admin/googlefeeder.php?osCAdminID=eafb5b324778f5e7e2b2cf3e9f44209c www.globalnet-marketing.net Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 500

 

The weird thing is; the google feed will be uploaded in the feeds directory but only 2983 products are listed instead of all of them around (25,000).. On the old host the page would load as a .txt and all the products would automatically get listed in the feeds directory and sent to google..

 

Even when I set googlefeeder to upload directly to Google it does not. I had to FTP the feed directly to google to get the products which were created listed..

 

Even though google feeder is NOT creating all the products.. The feed that is being created is in the proper format..

 

Greg

Share this post


Link to post
Share on other sites

I have been using Google Feeder for some time so I thought I knew what I was doing. BUT; I recently changed hosting providers and when I run google feeder now, I get this after the page loads and starts to run for about 30 seconds.

If the code was working on the previous host and isn't now, the problem is with the server settings of the new host. You may be on a server that has lower resource limits or a less powerful server. Please see the posts regarding timeouts on the previous page.

Share this post


Link to post
Share on other sites

I would start looking at it as a timing issue. The fact that the old host worked and the new host will not makes me think that a setting is different between the two. Do you have access to the logs?

 

 

 

Oh, and for security reasons, deny access to directory listings through the use of an .htaccess or server setting. Complain to your host. It should be set system wide.


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

I don't believe that it is a timing issue. The error posted above is displayed after about 10 seconds. I have used the set_time_limit() function to increase the timeout to 5 minutes, but it makes no difference. I have increased the memory limit to 64mb through the php.ini file and that did not help either. The error_log file doesn't show any entries relating to the script.

Share this post


Link to post
Share on other sites

Changing limits like that won't work on all servers since some hosts won't allow it. You will need to check with your host to see if the settings actually change.

 

I once had a client on a host where he couldn't increase the limits and the script wouldn't run due to the size of his database. I ended up adding sleep commands throughout the script. It worked, though the script took about 5 minutes to complete. You may want to give that a try.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Hi Jack,

 

i want to display the two field manufacturers.manufacturers_name and the products_description.products_name just as one field as title (name).

how can i combine this to fields in one?

 

thanks :)

Share this post


Link to post
Share on other sites

You'll need to find the places in the code where both are added to the output and combine then as you like, something like

$row->name . $row_manufacturer

Share this post


Link to post
Share on other sites

I got my timeout problem resolved. Turns out, (You Guys were right on the money), the problem was that the script was using too much CPU, and the host had a program that would end scripts that used too much CPU. I added usleep() to the main while loop to prevent it from using too much CPU and the problem is fixed.

 

If you look at code below and compare it with that in googlefeeder.php you will see where I added the extra line of code:

 

$loop_counter = 0;

 

while( $row = tep_db_fetch_array( $result ) )

{

usleep(500);

if (isset($already_sent[$row['id']])) continue; // if we've sent this one, skip the rest of the while loop

 

 

 

Thank all of you for your help and advise...

Edited by GlobalNet

Share this post


Link to post
Share on other sites

Try using the last version I uploaded. It should work for you.

 

 

Hi Jack,

 

Your last version is actually the one I installed.

 

Thats the error I'm having.

 

Any thoughts?

 

Thanks

 

Warning: mysql_query() [function.mysql-query]: Unable to save result set in

 

/home/xxx/public_html/xxx/googlefeeder.php on line 250

: SQL error MySQL client ran out of memory| sql = SELECT concat( 'product_info.php' ,products.products_id) AS product_url,

 

products_model AS prodModel, products_weight, manufacturers.manufacturers_name AS mfgName, manufacturers.manufacturers_id,

 

products.products_id AS id, products_description.products_name AS name, products_description.products_description AS

 

description, products.products_quantity AS quantity, products.products_status AS prodStatus, FORMAT(

 

IFNULL(specials.specials_new_products_price, products.products_price) * 1,2) AS price, CONCAT(

 

'http://www.yourwebsite.com/images/' ,products.products_image) AS image_url, products_to_categories.categories_id AS

 

prodCatID, categories.parent_id AS catParentID, categories_description.categories_name AS catName FROM (categories,

 

categories_description, products, products_description, products_to_categories) left join manufacturers on (

 

manufacturers.manufacturers_id = products.manufacturers_id ) left join specials on ( specials.products_id =

 

products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date is NULL) ) AND (

 

specials.status = 1 ) ) ) WHERE products.products_id=products_description.products_id AND

 

products.products_id=products_to_categories.products_id AND products_to_categories.categories_id=categories.categories_id AND

 

categories.categories_id=categories_description.categories_id ORDER BY products.products_id ASC

Edited by mylane

Birds with same feathers, are same birds.

Share this post


Link to post
Share on other sites

Your last version is actually the one I installed.

 

Thats the error I'm having.

In that case, it could be a few things. First, try going into phpmyadmin, select your database, select all of the tables and run the repair option. If you don't get a fatal error, try the script again. The next thing to check is with your host. They may be preventing the script from working. Send them instructions with how to see the error and ask that they check it. Some hosts won't do that, even if it is there fault, so this one depends upon how good your host is. The last is that if your database is very large, it might be failing due to limits on your server. This is unlikley since it should timeout first, but I suppose that could be different with some hosts.

Share this post


Link to post
Share on other sites

Hi Jack,

 

I ran the repair to my whole database and there is no error, I ran the script again and encountered the same error. I will try to contact my web hosting. Thanks


Birds with same feathers, are same birds.

Share this post


Link to post
Share on other sites

You'll need to find the places in the code where both are added to the output and combine then as you like, something like

$row->name . $row_manufacturer

 

Hi Jack,

 

thanks for your advice. i got it.

 

if somebody else want to change the code like this, you have to replace this part of code:

preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row['name'], $_cleaner_array) ) ) . "\t" .

 

with this:

preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row['mfgName'] . ' ' . $row['name'], $_cleaner_array) ) ) . "\t" .

Edited by eFFeKt

Share this post


Link to post
Share on other sites

Hi Jack,

 

I'm back in this forum now :-) I'm still trying to figure the sitemap out, but I realized the my data feed stopped working. Now, when I click on Create and Upload a GoogleBase datafeed, it shows the message:

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php:68) in /hermes/web04/b1844/moo.harperds/shop/includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

File completed: data_feed.txt

Connected to uploads.google.com, for user harperds

Uploaded feeds/data_feed.txt to uploads.google.com as data_feed.txt

 

Script timer: 4.744044 seconds.

 

Would you please help? Thanks a ton!

 

 

Sabrina

Share this post


Link to post
Share on other sites

Hi Jack,

 

I'm back in this forum now :-) I'm still trying to figure the sitemap out, but I realized the my data feed stopped working. Now, when I click on Create and Upload a GoogleBase datafeed, it shows the message:

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php:68) in /hermes/web04/b1844/moo.harperds/shop/includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

File completed: data_feed.txt

Connected to uploads.google.com, for user harperds

Uploaded feeds/data_feed.txt to uploads.google.com as data_feed.txt

 

Script timer: 4.744044 seconds.

 

Would you please help? Thanks a ton!

 

 

Sabrina

Share this post


Link to post
Share on other sites

Hi Jack,

 

I'm back in this forum now :-) I'm still trying to figure the sitemap out, but I realized the my data feed stopped working. Now, when I click on Create and Upload a GoogleBase datafeed, it shows the message:

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php:68) in /hermes/web04/b1844/moo.harperds/shop/includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /hermes/web04/b1844/moo.harperds/shop/includes/application_top.php on line 68

File completed: data_feed.txt

Connected to uploads.google.com, for user harperds

Uploaded feeds/data_feed.txt to uploads.google.com as data_feed.txt

 

Script timer: 4.744044 seconds.

 

Would you please help? Thanks a ton!

 

 

Sabrina

 

Sabrina this is because Ultimate Seo Uls 5 detected a filename containing an hyphen, osCommerce filenames do not contain hyphens. you will find corrective files in the extras/ directory in the download (USU5 download).

Edited by FWR Media

Share this post


Link to post
Share on other sites

Sabrina this is because Ultimate Seo Uls 5 detected a filename containing an hyphen, osCommerce filenames do not contain hyphens. you will find corrective files in the extras/ directory in the download (USU5 download).

 

Haha, I'm still bugging you, I guess :-) Actually, I'm sorry about that :-(. So, there are a bunch of folders and files in the extras folder, which ones do I need to upload?

Share this post


Link to post
Share on other sites

Haha, I'm still bugging you, I guess :-) Actually, I'm sorry about that :-(. So, there are a bunch of folders and files in the extras folder, which ones do I need to upload?

 

extras/GoogleBase V 2.5/

 

I should rename it to the contribution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×