Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically send data feed to Froogle


gottaloveit

Recommended Posts

i assume the issue is that it is connecting to a different database than the one I use for my site.

 

I went into googlefeeder.php and changed it to the database, username, and password i use and it still comes up with the same results.

Hmm, there aren't any settings in that file for the shops username/password so it seems you are not using this contribution or have made some mistake in the installation.

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 just changed DB_SERVER, DB_USERNAME, DB_PASSWORD to my database for oscommerce

I don't understand what that means but there aren't any such definitions in the contribution so, as mentioned, you don't appear to be using this one. I suggest you start over by downloading my last version and using it.

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,

 

In the UK we have just changed our tax rate over to 20%.

 

As a result I have modified the googlefeeder.php file as follows:

 

define('OPTIONS_TAX_RATE', '20.0'); //default = 0 (e.g. for 17.5% tax use 17.5)

 

However, the prices that are created within the feed are on occasions showing a different value than oscommerce prices. For example there is, in about 10% of products, a difference of 1p in the price that is shown on google shopping and the price that is shown in the osC store. It appears the following code is doing the calculation is the googlefeeder.php page:

 

$taxCalc = (OPTIONS_ENABLED_INCLUDE_TAX ? (OPTIONS_TAX_RATE/100) + 1 : 1);  //Do not edit

 

Is there a simple way to harmonise the prices produced by googlefeeder.php to those produced by osCommerce?

 

Any help much appreciated.

 

Kind regards,

 

Wolfmann

Link to comment
Share on other sites

In the UK we have just changed our tax rate over to 20%.

 

As a result I have modified the googlefeeder.php file as follows:

 

define('OPTIONS_TAX_RATE', '20.0'); //default = 0 (e.g. for 17.5% tax use 17.5)

 

However, the prices that are created within the feed are on occasions showing a different value than oscommerce prices. For example there is, in about 10% of products, a difference of 1p in the price that is shown on google shopping and the price that is shown in the osC store. It appears the following code is doing the calculation is the googlefeeder.php page:

 

$taxCalc = (OPTIONS_ENABLED_INCLUDE_TAX ? (OPTIONS_TAX_RATE/100) + 1 : 1);  //Do not edit

 

Is there a simple way to harmonise the prices produced by googlefeeder.php to those produced by osCommerce?

The code you show is correct. It will end up producing, in your case, 1.200. So if a product is $10, the final price would be $10 x 1.200, or $12, which is correct. I suspect the difference is coming from the rounding code. In this contribution, the code is using mysql's in-built fomrmatting option. While in the shop, it is using php code. That php code could be added to this contribution and should provide the same result. But the php code uses a lot of settings from the shop to calculate the tax and those items are not available in this contribution. All of that can be added but it is not a simple job. At least not to do it the way the shop's code does. And that is not somehing that can be covered in a support thread like this.

 

However, you could bypass all of the above and just use the round function and it will may work. But if you ever change anything to do with tax or how it is calculated in the shop, you would probably have to adjust the code in this contribution too. Still, if you want to give it a quick try, change

FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price,

to

FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",4) AS price,

And then add above

$row->price = ereg_replace("[^.0-9]", "", $row->price);

this

$row->price = round($row->price, 2);

In theory, it should not make any difference but it is worth a try, I suppose.

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 just redownloaded it from oscommerce contributions. Its your version and on the version checker says I have the lastest version.

 

I even redownloaded and uploaded...

Hmm. Please provide a line number where you see DB_USERNAME in the googlefeeder.php file and I will take a look.

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 got it on line 124

 

if (!($link=mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD)))
{

You said DB_USERNAME. The above says DB_SERVER_USERNAME. They may look similar but are totally different. Regardless, they are not part of the options and changing them is not recommended.

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

You said DB_USERNAME. The above says DB_SERVER_USERNAME. They may look similar but are totally different. Regardless, they are not part of the options and changing them is not recommended.

 

 

Yeah, I ended up reinstalling the contribution and kept the original values and it still comes up with the original software products.

 

Damn do i want this to work!

Link to comment
Share on other sites

Yeah, I ended up reinstalling the contribution and kept the original values and it still comes up with the original software products.

 

Damn do i want this to work!

There isn't any way for the contribution to create products that are not in the datasbase so the problem is in your shop somehow.

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 know if you know this or not but I figured I would try.

 

I have my feed setup for googlebase, but I know that there are other options (shopping.com and shopzilla). I tried to create a new datafeed listing and use the same datafeed file for shopping.com but it said that my feed was already being used (by googlebaese).

 

So my question is when I submit a feed to googlebase, does it automatically include all of my products into shopping.com and shopzilla too? Or are they separate from googlebase. If they are separate, how do I setup a feed for those other sites?

Link to comment
Share on other sites

I have my feed setup for googlebase, but I know that there are other options (shopping.com and shopzilla). I tried to create a new datafeed listing and use the same datafeed file for shopping.com but it said that my feed was already being used (by googlebaese).

 

So my question is when I submit a feed to googlebase, does it automatically include all of my products into shopping.com and shopzilla too? Or are they separate from googlebase. If they are separate, how do I setup a feed for those other sites?

That might be something with how shopping.com works but shopzilla requires its own feed. The format is very similar to googles though so all you need to do is rename the googlefeeder file to something else, change the few things that apply to that feed and run the new 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

I've been using this contribution for a while and recently encountered the following error:

 

: SQL error Incorrect key file for table '/tmp/#sql_1413_0.MYI'; try to repair it| sql = SELECT concat( 'http://xxxxxxxxxxxx.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://xxxxxxxxxxxx.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 AND categories_description.language_id = 1 AND products_description.language_id = 1 ORDER BY products.products_id ASC

 

I tried repairing the tables but the error was not eliminated. Any guidance? I don't remember making any changes to the store since the last time the php was run.

 

Thanks,

Cary

Link to comment
Share on other sites

I've been using this contribution for a while and recently encountered the following error:

 

: SQL error Incorrect key file for table '/tmp/#sql_1413_0.MYI';

 

I tried repairing the tables but the error was not eliminated. Any guidance? I don't remember making any changes to the store since the last time the php was run.

That's a mysql error. If repairing the table didn't help, it might have something to do with the version you are using. Maybe your host just upgraded, explaining why it ran before. You should ask them to take a look at it.

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

My feeds have an expiration date of about a month.

 

Is the expiration date required?

 

How would I remove that field from generating and or modify it to be longer than a month?

Yes, it is required. Google won't keep the products on their server once they expire and they allow a maximum of one month for that. That's why you need a cron job setup to continually renew the feed, whether it changes or not.

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

Yes, it is required. Google won't keep the products on their server once they expire and they allow a maximum of one month for that. That's why you need a cron job setup to continually renew the feed, whether it changes or not.

 

Oh okay.

 

Could you refer me to where I would find out how to setup a cron job to automatically renew it?

Link to comment
Share on other sites

Oh okay.

 

Could you refer me to where I would find out how to setup a cron job to automatically renew it?

Besides following the instructions that come with the contribution, you could ask your host or search google.

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

Besides following the instructions that come with the contribution, you could ask your host or search google.

 

Okay did some searching and I *think* I have an idea of what to do, but it may very well be wrong.

 

Should I contact my host and ask them how they require me to setup a cron job on this file of my site? -

"http://mysite.com/adminsection/googlefeeder.php"

 

Does the cron job just have to go to that page and then the file is updated?

Edited by ggrant3
Link to comment
Share on other sites

hi,

 

I have googlefeeder running perfectly and have for some time, all products list ok, and a couple are actually listed within the top 3 for my keywords, however i have noticed that the url's generated are https:// - i have ssl so the url's are valid, however i would prefer normal url's as my standard store pages and google sitemap etc dont use ssl (ssl only used for checkout etc.)

 

Question 1. how can i rectify this

Question 2. should i rectify this

question 3. is there any bennefit either way ?

 

thanks

Link to comment
Share on other sites

Okay did some searching and I *think* I have an idea of what to do, but it may very well be wrong.

 

Should I contact my host and ask them how they require me to setup a cron job on this file of my site? -

"http://mysite.com/adminsection/googlefeeder.php"

 

Does the cron job just have to go to that page and then the file is updated?

Send the part of the instructions that deal with setting up a cron job.

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 have googlefeeder running perfectly and have for some time, all products list ok, and a couple are actually listed within the top 3 for my keywords, however i have noticed that the url's generated are https:// - i have ssl so the url's are valid, however i would prefer normal url's as my standard store pages and google sitemap etc dont use ssl (ssl only used for checkout etc.)

You shouldn't be seeing https for any link this contribution creates. If you do, your configure file is setup incorrectly.

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

Send the part of the instructions that deal with setting up a cron job.

 

Umm...Okay that was easier than I expected it to be. Looks like I overcomplicated the process in my head again :)

 

GoDaddy has a "Cron Manager" in the Cpanel and it was a step by step setup process.

 

Thank you Jack for you assistance with this.

Link to comment
Share on other sites

  • 3 weeks later...

had 2.6 working fine. this year i've added some new products and they aren't showing in my feed which is unusual. Also the expiration date it's putting in the file is 21st Jan 2011, so I'm having to do a manual find/replace before uploading the file.

 

has anyone else hit these issues?

 

i've gone and deleted the txt file from my feeds folder just to make sure a new one is being created which it is, but these problems are still there.

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