Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically send data feed to Froogle


gottaloveit

Recommended Posts

I have added a new googlefeeder.php file. (just the one file not a complete package)

 

It was a bit "thrown together" but should achieve the following: -

 

Includes the correct application_top and application_bottom files and therefore can use all standard functions including any other url rewriter (like ultimate seo urls 5) not just the old series 2 seo urls.

 

The only change needed other than swapping out this file would be the way you write the cron job as follows: -

* * * * * wget -q http://www.mysite.com/possible_directory/googlefeeder.php >/dev/null

 

Another point to note is that the old googlefeeder.php has a horrific query.

 

On a bog standard install it returns 247 rows for what should be just 27 rows, it also returns languages incorrectly and this has been corrected.

Edited by FWR Media
Link to comment
Share on other sites

Don't talk rubbish Jack! you'll just make yourself look stupid.

 

The real issues are: -

 

osCommerce uses a little thing called tep_href_link() Jack .. ever heard of it? it is the standard function seen all over osCommerce that is used to get links. Now you know eh.

 

This contribution like the XML feed that you put up DOES NOT use tep_href_link() as defined by application_top.

 

YOU hardcode in series 2 seo urls and therefore make the thing hardcode reliant on one particular url rewriter, YOU create incompatibility no one else.

 

For the last time (hopefully) all you have to do when writing these things is to use wget in the cron so you can access the file via HTTP like ..

 

* * * * * * wget -q http://www.somesite.com/folder/somefile.php >/dev/null

 

You can then properly call application_top.php at the start and application_bottom at the end and all the osCommerce functions will be available.

 

How dare you suggest "He doesn't code his contributions to be compatible" when it is YOU who is incapable of using standard oscommerce functions and hardcoding the damn thing.

 

If you are going to hijack other peoples contributions then try and get it right occasionally.

 

Robert,

Please don't get all pissy with Jack. He didn't add the SEO URL support; it has existed in this contribution since v1.03a. He simply took some bad code and modified it a bit to support the v2.x SEO URL version, which many of us still use for one reason or another.

 

I agree that the standard tep_href_link is the proper way to reference items in the shop, and thank you for your update. This contribution needs a lot of cleanup to meet proper coding standards, but it works for me as it is and I don't have the time at the moment to do the work.

 

--Glen

Link to comment
Share on other sites

Robert,

Please don't get all pissy with Jack. He didn't add the SEO URL support; it has existed in this contribution since v1.03a. He simply took some bad code and modified it a bit to support the v2.x SEO URL version, which many of us still use for one reason or another.

 

I agree that the standard tep_href_link is the proper way to reference items in the shop, and thank you for your update. This contribution needs a lot of cleanup to meet proper coding standards, but it works for me as it is and I don't have the time at the moment to do the work.

 

--Glen

 

I hate having to post like that Glen I only get "all pissy" when I am attacked wrongly.

 

That's an issue with that contribution. He doesn't code his contributions to be compatible so you will find a number of problems like that.

 

That is entirely wrong as my contributions are painstakingly error free and osC compliant, there is therefore zero chance of my not reacting to such cheap shots.

Link to comment
Share on other sites

Froogle will eventually reject your feed if you tamper with the data, if you append something like "FREE SHIPPING!" to any products. They'll match up your feed to your site, then deactivate your feed.

 

Did anyone figure this out... I need to add text after the title.. I contacted my google rep and she stated as long as I don't add promotional text then all is fine.. So, I just need to know where to add it...

Link to comment
Share on other sites

Did anyone figure this out... I need to add text after the title.. I contacted my google rep and she stated as long as I don't add promotional text then all is fine.. So, I just need to know where to add it...

I don't understand your question. Are you wanting to add promotional text, which your rep said not to add?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't understand your question. Are you wanting to add promotional text, which your rep said not to add?

 

Not promotional text.. adding a descriptive word.. Promotional text is ie.. "Free shipping" "Discounts" or anything to upsell...

 

Example.. "Title" + "Keyword" = "Turtle" + "Sticker" = Turtle Sticker

Keyword being the same for all products..

Link to comment
Share on other sites

Not promotional text.. adding a descriptive word.. Promotional text is ie.. "Free shipping" "Discounts" or anything to upsell...

 

Example.. "Title" + "Keyword" = "Turtle" + "Sticker" = Turtle Sticker

Keyword being the same for all products..

The correct way to do it would be to add the keyword to your title. If you have Header Tags SEO installed, it can easily be done in page control. But to do it here, you can try this, untested, change. In admin/googlefeeder.php, find this code (around line 338)

      if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .

and right befor it add this line

$row->name .= 'Keyword';

replacing keyword with the word(s) you want to add, of course. I suggest you turn off the ftp option so you can test this without uploading. It is doesn't work for some reason, uploading it may invalidate your current listings.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The correct way to do it would be to add the keyword to your title. If you have Header Tags SEO installed, it can easily be done in page control. But to do it here, you can try this, untested, change. In admin/googlefeeder.php, find this code (around line 338)

      if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .

and right befor it add this line

$row->name .= 'Keyword';

replacing keyword with the word(s) you want to add, of course. I suggest you turn off the ftp option so you can test this without uploading. It is doesn't work for some reason, uploading it may invalidate your current listings.

 

Didn't work.. I get the following error...

Warning: Attempt to assign property of non-object in /home/XXXXXXXXX/public_html/XXXXXXX/googlefeeder.php on line 293

 

This was added on the line before

 if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .

 

Here is what my SEO Enable looks like

if(SEO_ENABLED=='true'){
           $output .= tep_href_link($productURL,$productParam . $row['id'], 'NONSSL', false) . "\t" .
           preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row['name'], $_cleaner_array) ) ) . "\t" .
           preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row['description'], $_cleaner_array) ) ) . "\t" .
           $feed_exp_date . "\t" .
           $row['price'] . "\t" .
           $row['image_url'] . "\t" .
           $catIndex[$row['prodCatID']] . "\t" .
           $row['id'];

Edited by Oggster
Link to comment
Share on other sites

Didn't work.. I get the following error...

 

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" .

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I can't get google to accept the datafeed.

 

 

Disapproved

Uploaded at: 05 January 2010 15:33:17 EST

Processed at: 05 January 2010 15:33:26 EST

 

For more details on the status of your data feed, go to ......

 

Not any specific info why.

 

Maybe because the shop uses AUD, oscthumb, has pop up images, not a us or uk or eur shop. I will live without it.

Link to comment
Share on other sites

I can't get google to accept the datafeed.

 

Disapproved

Uploaded at: 05 January 2010 15:33:17 EST

Processed at: 05 January 2010 15:33:26 EST

That's a general error message. You have to look at the detail of the errors in your googlebase account.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Guys,

 

I just installed this contribution to one of the websites I'm managing. I have this errors:

 

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

 

Anyone here got the same problem like me? Please help.

 

Thanks! :)

Birds with same feathers, are same birds.

Link to comment
Share on other sites

I just installed this contribution to one of the websites I'm managing. I have this errors:

 

Anyone here got the same problem like me? Please help.

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi

 

Quick Question!

 

Does the googlefeeder.php file have settings so I can list products from specific categories.

 

Example: My store has several categories and I would like to submit say, the products located within the electronics category in leiu of all the products on my site.

 

I've searched the forum but can't find any information on this.

 

I have the lastest version installed along with the last updated googlefeeder file installed that call the application top file and so on..

 

Thanks

Greg

Link to comment
Share on other sites

Post the top 3-4 lines of your feed file and let's all have a look at it for errors.

 

Thanks!

Please reference: ( I have change my site name to www.mysite.com on below)

 

 

 

link title description expiration_date price image_link product_type id condition

http://www.mysite.com/evisu-hoody-no10510-p-1016.html Evisu hoody for hip hop No.10510 size M/L/XL/XXL/XXXL color black/white 2010-02-04 52.00 http://www.mysite.com/images/10510_1_small.jpg Evisu, Hoody 1016 New

http://www.mysite.com/evisu-hoody-no10508-p-1017.html Evisu hoody for hip hop No.10508 size M/L/XL/XXL/XXXL color black/white 2010-02-04 52.00 http://www.mysite.com/images/10508_1_small.jpg Evisu, Hoody 1017 New

http://www.mysite.com/evisu-hoody-no10509-p-1018.html Evisu hoody for hip hop No.10509 size M/L/XL/XXL/XXXL color black/white 2010-02-04 53.00 http://www.mysite.com/images/10509_1_small.jpg Evisu, Hoody 1018 New

http://www.mysite.com/evisu-original-jeans-noevsmjeans186-p-1028.html Evisu Original Jeans for Hip Hop No.evsmjeans_186 Size 30/32/34/36/38   2010-02-04 98.00 http://www.mysite.com/images/04441_small.jpg Evisu, Jeans 1028 New

http://www.mysite.com/evisu-jeans-noevsmjeans138-p-1032.html Evisu jeans for hip hop No.evsmjeans_138 size 30/32/34/36/38/40/42 color blue 2010-02-04 65.00 http://www.mysite.com/images/10507_small.jpg Evisu, Jeans 1032 New

 

Best regards,

sunrise99

 

 

 

 

Link to comment
Share on other sites

Offhand I don't see anything wrong but Jack is the expert, he might see something. You might try changing the time of expiration on about line 120 from 2592000 to 2419200. That will cause the expiration date to be one day less. Sometimes it causes the feed to be disapproved although I have seen that error described. It's probably not your problem but worth a try.

Community Bootstrap Edition, Edge

 

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

Link to comment
Share on other sites

Offhand I don't see anything wrong but Jack is the expert, he might see something. You might try changing the time of expiration on about line 120 from 2592000 to 2419200. That will cause the expiration date to be one day less. Sometimes it causes the feed to be disapproved although I have seen that error described. It's probably not your problem but worth a try.

 

 

Thanks!

Now it is $feed_exp_date = date('Y-m-d', time() + 2505600 ); , I wii try yours.

 

Best Regards,

 

 

Link to comment
Share on other sites

Hi

 

When I try to run googlefeeder.php, I receive this error below.

 

Fatal error: Out of memory (allocated 19922944) (tried to allocate 262121 bytes) in /home/tna91733/public_html/admin/googlefeeder.php on line 435

 

I really appreciate for any help.

 

Thanks

Link to comment
Share on other sites

When I try to run googlefeeder.php, I receive this error below.

 

Fatal error: Out of memory (allocated 19922944) (tried to allocate 262121 bytes) in /home/tna91733/public_html/admin/googlefeeder.php on line 435

Mention that to your host and see if they will increase the memory size in your admin.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Mention that to your host and see if they will increase the memory size in your admin.

 

Thanks Jack

 

sometime I also receive this error too.

 

: SQL error MySQL server has gone away| sql = SELECT concat( 'http://tnaautoparts.com/product_info.php?products_id=' ,products.products_id) AS product_url, products_model AS prodModel, 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, products.products_weight AS prodWeight, FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * 1,2) AS price, CONCAT( 'http://tnaautoparts.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) OR (specials.expires_date = 0) ) 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

 

what should i do to fix this issue?

Thanks

Link to comment
Share on other sites

sometime I also receive this error too.

 

: SQL error MySQL server has gone away|

 

what should i do to fix this issue?

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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...