Jump to content
gottaloveit

Automatically send data feed to Froogle

Recommended Posts

Jack,

 

I think it is being found because of the "Product Type" is set to put in the category that the item is in. If the item is in 2 or 3 different categories, it created the duplicate items in the feed with the only difference being the category that they are found in.

Share this post


Link to post
Share on other sites

Hi, I've updated all the file from the recent contribution download but it does not recognise it as v3.1 in my admin area! it still displays v2.9 also....I cant find the section in my database.php file to add the commands as stated in the instructions! :/ I'm running oscommerce 2.3.3.4 PLEASE HELP!!!!! Thank you :)

Share this post


Link to post
Share on other sites

My last version, mistakenly named 2.0 (should be 3.0), works fine with 2.3.3.4. I don't support the other versions so you'll have to wait for someone else to answer your question.

Share this post


Link to post
Share on other sites

Okay thank you, however these are the error messages I get when trying to create a datafeed...Fatal error: Call to undefined function tep_db_fetch_object() in...../googlefeeder.php on line 259

 

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /...../database.php on line 132

 

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

 

Warning: mysqli_errno() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

 

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

-

 

select count(*) as total from sessions where sesskey = ''

 

[TEP STOP]

Thank you :)

Share this post


Link to post
Share on other sites

I don't know why it is failing for you. I have version 3.0 installed in a 2.3.3.4 shop and it works fine. Are you sure you used the feeders file for 2.3?

Share this post


Link to post
Share on other sites

Hello. I hope someone can help me. I've installed Google Base Data Feeder Version: 3.0, and it's all working except for one important problem: it's not adding 20% UK VAT onto the data feed. The feed.txt file still shows the prices without VAT.

 

All products in the osCommerce database include a Net price (excluding VAT) and a Gross price (including 20% VAT)

 

Rather than paste the whole file, I'll just paste (what I understand to be) the relevant lines from Googlefeeder.php:

 

Line 46 (I set the value to 2):

define('OPTIONS_ENABLED_INCLUDE_TAX', 2);	 //0 = no tax, 1 = uses google method, 2 = UK Vat

 

Lines 83-84 (not edited):

define('OPTIONS_TAX_RATE' , '20.0'); //default = 0 (e.g. for 20.0% tax use "$taxRate = 20.0;") //only used in the next line
define('OPTIONS_TAX_CALC', (OPTIONS_ENABLED_INCLUDE_TAX == 2 ? (OPTIONS_TAX_RATE/100) + 1 : '1')); //UK. US tax rate - US is ignorded since it is 1

 

Line 207 (not edited):

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

 

Any advice would be much appreciated!

Edited by AXOSC

Share this post


Link to post
Share on other sites

It's better to use the tax setting in the googlebase account. Though I can't say if it works for the UK or not. I would check that first though.

Share this post


Link to post
Share on other sites

It's better to use the tax setting in the googlebase account. Though I can't say if it works for the UK or not. I would check that first though.

 

Thanks for the suggestion, but I had already checked that in the Google Merchant Centre account, and the tax setting is for US only, which is confirmed in Google's support docs:

 

"The 'tax' attribute is only applicable to feeds targeting the US – for all other countries except for Canada and India, value added tax (VAT) has to be included in the price."

 

"
tax

This attribute is only available in the US. For feeds targeting the United Kingdom the price attribute should include VAT."

 

Source: https://support.google.com/merchants/answer/188494?hl=en-GB

 

 

Just to confirm, I need the data feed to add UK VAT (20%) to the product prices.

 

Also, something I said in my earlier post was incorrect: "All products in the osCommerce database include a Net price (excluding VAT) and a Gross price (including 20% VAT)".

What I meant to say was that all the products in the database have VAT applied to them in the admin, but of course the only price stored in the products table in the database is the Net Price (excluding VAT).

Edited by AXOSC

Share this post


Link to post
Share on other sites

I don't know why it is failing for you. I've installed it in UK shops and not had a problem, as I recall. I know there are other shop owners with UK shops that have posted here and I vaguely remember a question about VAT. So all I can suggest is that you go back through the thread and see if you can find it or use google to search for it.

Share this post


Link to post
Share on other sites

I don't know why it is failing for you. I've installed it in UK shops and not had a problem, as I recall. I know there are other shop owners with UK shops that have posted here and I vaguely remember a question about VAT. So all I can suggest is that you go back through the thread and see if you can find it or use google to search for it.

 

I'm trying to search through previous posts, but with so many pages, it's not easy - especially when searching the thread with search terms 'uk', 'vat' and 'tax' as those words appear every time someone posts a copy of the PHP code, regardless of whether they are asking a question about a problem relating to tax being added to the feed or not.

 

Just noticed something in the comment on the following line of the PHP file:

 

define('OPTIONS_TAX_RATE' , '20.0'); //default = 0 (e.g. for 20.0% tax use "$taxRate = 20.0;") //only used in the next line

 

Is that comment saying that the tax value should actually be added as "$taxRate = 20.0;", as shown below?

 

define('OPTIONS_TAX_RATE' , '$taxRate = 20.0;'); //default = 0 (e.g. for 20.0% tax use "$taxRate = 20.0;") //only used in the next line

Edited by AXOSC

Share this post


Link to post
Share on other sites

Ignore my post above (I retained the first setting: '20.0'). It seems the feed is now adding VAT to the prices.

 

It started working after I switched on the setting to ignore products with price/qty of 0.

 

define('OPTIONS_IGNORE_PRODUCT_PRICE', 1);  //0 = include products with price of 0 in output, 1 = ignore products with price of 0
define('OPTIONS_IGNORE_PRODUCT_ZERO', 1);  //0 = include products with qty of 0 in output, 1 = ignore products with qty of 0

 

Don't know why that would affect VAT being added to prices for products that weren't affected by the above settings (i.e. products that are in stock with a price set to more than 0), but it seemed to do the trick.

Share this post


Link to post
Share on other sites

Okay thank you, however these are the error messages I get when trying to create a datafeed...Fatal error: Call to undefined function tep_db_fetch_object() in...../googlefeeder.php on line 259

 

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /...../database.php on line 132

 

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

 

Warning: mysqli_errno() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

 

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /..../database.php on line 50

-

 

select count(*) as total from sessions where sesskey = ''

 

[TEP STOP]

Thank you :)

 

Hello All, I have exactly the same, has anybody found the fix for this yet ?

Thnaks

Share this post


Link to post
Share on other sites

I know it will be a very silly question, but ...

Does anyone know what it is and tell me how I can know the name of the file?

"define('FEEDNAME', 'your-outfile.txt'); //from your googlebase account"

Share this post


Link to post
Share on other sites

Hi All,

 

as you know google want now brand, mpn and gtin (2 of 3 min.).

I want to write code to have mpn = products_model if mpn is null.

I wrote this:

 

switch (OPTIONS_MPN) {

case 'name': $extraFields .= ' IFNULL (oscpro_products.products_details_original_supplier_code, oscpro_products.products_model) as mpn), '; break;

 

What's wrong?

 

Thank you,

Fabio

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

As Jack, I did not know the account database. Now I understand ... Many thanks.

When trying to make changes in step 7, I could not find the text;

"mysqli_fetch_field function ($ query) {

mysql_fetch_field return ($ query);

} "

The closest thing I've found is:

"tep_db_fetch_fields function ($ db_query) {

mysql_fetch_field return ($ db_query);

} "

And now I get the following error in the manager:

 

"Fatal error: Can not redeclare mysqli_fetch_object () in / home / www / domainname.com / admin / includes / functions / database.php on line 130"

 

And on the web;

 

"Fatal error: Can not redeclare mysqli_fetch_object () in / home / www / domainname.com / includes / functions / database.php on line 126"

I know nothing of progamación, I'm a rookie. . I do not know how to change those lines. Anyone have any ideas? Thanks

consuelo

Share this post


Link to post
Share on other sites

I have just installed the latest version of this on a copy of v2.3.3.4 and there seems to be a few minor problems 'straight out of the box'

 

I have followed all install instructions, but when running for the first time googlefeeder.php throws 3 error messages regarding call to undefined function tep_db_fetch_object, so I have changed these 3 references in googlefeeder.php to mysqli_fetch_object and the script runs without error.

 

The installation instructions state:

 

a) FIND:
function mysqli_fetch_field($query) {
   return mysql_fetch_field($query);
 }

ADD BELOW:
//BOF additional features 
 function mysqli_fetch_object($result,$class_name='stdClass') {
   return mysql_fetch_object($result,$class_name);
 }
//EOF additional features
B) FIND:
function mysqli_fetch_field($query) {
   return mysql_fetch_field($query);
 }

ADD BELOW:
//BOF additional features 
 function mysqli_fetch_object($result,$class_name='stdClass') {
   return mysql_fetch_object($result,$class_name);
 }
//EOF additional features

 

Surely there should be a reference to tep_db_fetch_object here somewhere?

 

Anyway, now to spend some time actually getting my configuration working as it needs to... :)

Share this post


Link to post
Share on other sites

hi to all!

 

I had the same issue in my 2.3.3.4 Version Shop as Paul_w (messages regarding call to undefined function tep_db_fetch_object). I replaced the 3 references in googlefeeder.php to mysqli_fetch_object and the script runs without error.

 

Okay, the script seems to run, but i do not get any products into the feed-file. Does anyone have any ideas where i can start so search after the problem? i just doubleckecked the files and installation....looks correct :-(

 

 

Share this post


Link to post
Share on other sites

Found it. I had the wrong language setting (german instead english)

define('DEFAULT_LANGUAGE_ID', 2); //Change this to the id of your language. BY default 1 is english

Share this post


Link to post
Share on other sites

I have just installed the latest version of this on a copy of v2.3.3.4 and there seems to be a few minor problems 'straight out of the box'

 

I have followed all install instructions, but when running for the first time googlefeeder.php throws 3 error messages regarding call to undefined function tep_db_fetch_object, so I have changed these 3 references in googlefeeder.php to mysqli_fetch_object and the script runs without error.

 

The installation instructions state:

 

a) FIND:
function mysqli_fetch_field($query) {
return mysql_fetch_field($query);
}

ADD BELOW:
//BOF additional features
function mysqli_fetch_object($result,$class_name='stdClass') {
return mysql_fetch_object($result,$class_name);
}
//EOF additional features
B) FIND:
function mysqli_fetch_field($query) {
return mysql_fetch_field($query);
}

ADD BELOW:
//BOF additional features
function mysqli_fetch_object($result,$class_name='stdClass') {
return mysql_fetch_object($result,$class_name);
}
//EOF additional features

 

Surely there should be a reference to tep_db_fetch_object here somewhere?

 

Anyway, now to spend some time actually getting my configuration working as it needs to... :)

 

 

Change to this quite easy

 

//BOF additional features

function tep_db_fetch_object($result,$class_name='stdClass') {

return mysql_fetch_object($result,$class_name);

}

 

//EOF additional features

 

works for me

Share this post


Link to post
Share on other sites

Hi,

I get this error message when try to upload to google

 

 

Fatal error: Call to undefined function ftp_connect() in /home/MYWEBSITE/htdocs/catalog/adminarea/googlefeeder.php on line 558

 

Any ideas?

 

Thanks


luke

Share this post


Link to post
Share on other sites

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

×