Jump to content
gottaloveit

Automatically send data feed to Froogle

Recommended Posts

:D Problem solved! I had a space I didn't see between the quote mark and first forward slash (" /) in the $OutFile = line. Once I took that space out the error messages went away. :D

Share this post


Link to post
Share on other sites
i just downloaded version 1.62 dated 12/21/05 and the seo url tips calvin posted a few months back are nonexistent in the new version.

 

has anyone been able to get the froogle output to work with urls like mysite.com/product/Product_Name.html ?

 

or does anyone have an idea how to do it?

 

 

anyone know how to do this?

Share this post


Link to post
Share on other sites

Warning: unlink(/home/xtreme41/public_html/images/froogle.txt): Permission denied in /home/xtreme41/public_html/store/froogle.php on line 70

 

Warning: fopen(/home/xtreme41/public_html/images/froogle.txt): failed to open stream: Permission denied in /home/xtreme41/public_html/store/froogle.php on line 72

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xtreme41/public_html/store/froogle.php on line 73

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/xtreme41/public_html/store/froogle.php on line 74

Connected to hedwig.google.com, for user ace27

Uploaded /home/xtreme41/public_html/images/froogle.txt to hedwig.google.com as froogle.txt

 

i dont know what im doing wrong check out the source

 

<?php
$OutFile = "/home/xtreme41/public_html/images/froogle.txt";
$destination_file = "froogle.txt";
$source_file = $OutFile;
$imageURL = 'http://www.xtremepbma.com/store/images';
$productURL = 'http://www.xtremepbma.com/store/product_info.php?products_id=';


$home = "localhost";
$user="xxxxxxxx";
$pass="xxxxxxxx";
$base="xxxxxxxx";

$ftp_server = "hedwig.google.com";
$ftp_user_name = "xxx";
$ftp_user_pass = "xxxxxxx";

if (!($link=mysql_connect($home,$user,$pass)))
{
echo "Error when connecting itself to the data base";
exit();
}
if (!mysql_select_db( $base , $link ))
{
echo "Error the data base does not exist";
exit();
}

$sql = "
select concat( '$productURL' ,products.products_id) AS product_url, 
products_description.products_name AS name, 
products_description.products_description AS description, 
FORMAT(products.products_price,2) AS price, 
CONCAT( '$imageURL' ,products.products_image) AS image_url, 
concat_ws( ' > ' , catdescparent.categories_name , catdesccurrent.categories_name ) AS category 
FROM categories , 
products, 
products_description, 
categories_description as catdesccurrent, 
products_to_categories 

left join categories_description as catdescparent on ( catdescparent.categories_id = categories.parent_id )

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 catdesccurrent.categories_id = categories.categories_id
";

$_strip_search = array(
"![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array(
'',
'');


$output = "product_url name description price image_url category\n";
$result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );
while( $row = mysql_fetch_object( $result ) )
{
$output .= $row->product_url . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( $row->name ) ) . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( $row->description ) ) . "\t" .
$row->price . "\t" .
$row->image_url . "\t" .
$row->category . "\n";
}
if ( file_exists( $OutFile ) )
unlink( $OutFile );

$fp = fopen( $OutFile , "w" );
$fout = fwrite( $fp , $output );
fclose( $fp );


// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!<BR>";
echo "Attempted to connect to $ftp_server for user $ftp_user_name<BR>";
exit;
} else {
echo "Connected to $ftp_server, for user $ftp_user_name<BR>";
}

// upload the file
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

// check upload status
if (!$upload) {
echo "FTP upload has failed!<BR>";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file<BR>";
}

// close the FTP stream
ftp_close($conn_id);
?>

 

 

may someone please help me fix these errors

 

 

 

OH CAN ANYONE TELL ME WHERE I CAN DOWNLOAD THESE PROGRAMS I CANT FIND THE DOWNLOADS

Edited by ace27

Share this post


Link to post
Share on other sites

Hello,

 

I have a problem with my Froogle. I just install it and I got this message when running admin -> froogle.php

 

Notice: Undefined variable: FunctionName in D:\Web\usedkidsbooks\admin\froogle.php on line 205

: SQL error Unknown column 'products.manufacturers_id' in 'on clause'| sql = SELECT concat( 'http://www.usedkidsbooks.com/product_info.php?products_id=' ,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.usedkidsbooks.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 = 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

Share this post


Link to post
Share on other sites

Hello,

 

I have a problem with my Froogle. I just install it and I got this message when running admin -> froogle.php

 

Notice: Undefined variable: FunctionName in D:\Web\usedkidsbooks\admin\froogle.php on line 205

: SQL error Unknown column 'products.manufacturers_id' in 'on clause'| sql = SELECT concat( 'http://www.usedkidsbooks.com/product_info.php?products_id=' ,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.usedkidsbooks.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 = 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

 

I need help!

 

Thanks

Elisa Alexandra

Share this post


Link to post
Share on other sites
Hello,

 

I have a problem with my Froogle. I just install it and I got this message when running admin -> froogle.php

 

Notice: Undefined variable: FunctionName in D:\Web\usedkidsbooks\admin\froogle.php on line 205
: SQL error Unknown column 'products.manufacturers_id' in 'on clause'| sql = SELECT concat( 'http://www.usedkidsbooks.com/product_info.php?products_id=' ,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.usedkidsbooks.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 = 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

 

I need help!

 

Thanks

Elisa Alexandra

 

 

Based on this line:

FunctionName in D:\Web\usedkidsbooks\admin\froogle.php

 

it sounds like you have a configuration set wrong in the admin/froogle.php file.

Edited by cdi-buy.com

Share this post


Link to post
Share on other sites

wi3girls: which version of osC are you running?

 

ace27: search in the contributions; it has the instructions for the install too.

 

cdi-buy.com: did you ever get the feeder to work?


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites
Based on this line:

FunctionName in D:\Web\usedkidsbooks\admin\froogle.php

 

it sounds like you have a configuration set wrong in the admin/froogle.php file.

 

Hello, thanks for your reply!

It seems to me it looks like a PHP configuration or something, cause when I add on the beginning of the code

$FunctionName = "";

 

It generates just the SQL error...

 

It seems that it's not finding the variable...

 

Thanks

Elisa

Share this post


Link to post
Share on other sites
Hi!

I experience problem, error:

 

Warning: main(../includes/classes/seo.class.php) [function.main]: failed to open stream: No such file or directory in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 25

 

Warning: main() [function.include]: Failed opening '../includes/classes/seo.class.php' for inclusion (include_path='.;C:\php5\pear') in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 25

 

Fatal error: Class 'SEO_URL' not found in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 26

 

Anybody has idea about it

Thx

 

does anybody have an answer for this? I am having the same error.

Share this post


Link to post
Share on other sites

First of all, I want to thank FlyingMonkey and everyone else that has contributed to this contribution. I found the Bizrate contribution as well which was based upon this one. However, Bizrate now uses numbers for their categories. I would like to map my categories to the bizrate categories. I was thinking of creating a mapping table that would do this. Has anyone done this? I do not want to re-invent the wheel if someone already did this. Also, if someone could tell me what I would need to modify in the code to perform the lookup that would be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites

Some time ago there were some references to adding some functionality to make the Froogle Feed compatible with large product databases. I may have just missed it but I haven't found anything since about that being added to any of the existing versions. Is that out there somewhere?

 

I have over 40,000 products and have tried several versions of this contribution but none seem to work for me. I don't get any error messages though so I'm not certain that the problem is the number of products. I just suspect that it is.

 

When I run the routine to generate the feed the browser just runs for a while (5-10 minutes) and then stops. No new page is displayed. It just says "Done" at the bottom of the browser window the same as it does after correctly loading any regular web page. No file is ever generated though.

 

Is this due to the number of products? If so, is there a fix available? If not, does anyone know what else could be causing the problem?

 

Thanks,

Dan

Share this post


Link to post
Share on other sites

The functionality for large stores was added to the code some time ago, so I don't think that's actually your problem. Also, 40,000 products should write out in a few seconds, definitely under a minute, on a decent server. If it's taking 5-10, something else is wrong.

 

Since it's not writing the file, I assume you actually have a permissions problem, and that the webserver can't write to the folder that your trying to save the file to. Normally you get error messages when this happens though, but those might be suppressed. If it isn't a permissions or configuration issue (such as trying to write to an invalid folder) than I don't have many ideas.

 

Dan

 

 

Some time ago there were some references to adding some functionality to make the Froogle Feed compatible with large product databases. I may have just missed it but I haven't found anything since about that being added to any of the existing versions. Is that out there somewhere?

 

I have over 40,000 products and have tried several versions of this contribution but none seem to work for me. I don't get any error messages though so I'm not certain that the problem is the number of products. I just suspect that it is.

 

When I run the routine to generate the feed the browser just runs for a while (5-10 minutes) and then stops. No new page is displayed. It just says "Done" at the bottom of the browser window the same as it does after correctly loading any regular web page. No file is ever generated though.

 

Is this due to the number of products? If so, is there a fix available? If not, does anyone know what else could be causing the problem?

 

Thanks,

Dan


Dan Stevens

Share this post


Link to post
Share on other sites

Hello,

 

I just received this message from Google Base:

- Missing suggested attributes

 

-----------------

Missing suggested headers: We noticed that your bulk upload is missing suggested header attributes. For example, the label attribute is missing from your header line. Please be sure to include all appropriate attributes in your header. For more information about the Google Base bulk upload format and a complete list of attributes, please see the following link:

 

http://base.google.com/base/tab_instructions.html

 

After you've made any changes, please be sure to upload the new version of your bulk upload with the same filename.

 

Anybody else received it too? Any idea what could be done to include attributes?

 

Thanks a lot.


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites
Hello,

 

I just received this message from Google Base:

Anybody else received it too? Any idea what could be done to include attributes?

 

Thanks a lot.

 

I just went to google to manually test uplodaing a google base file and I can;t even get to there.

 

Google reports

 

===============================

Oops!

 

 

There was an error with the page you requested.

 

Please check back later.

==============================

 

Maybe that's your problem.. that's they are simply updating stuff.

Edited by custodian

My Contributions

 

Henry Smith

Share this post


Link to post
Share on other sites

Hi everyone, Thanks for a great contribution.... I'm just having a small problem getting it going....

 

I've had a good look through this post, but can't easily see the fix to my problem even though there have been similar posts.

 

I've made the changes in the install instructions, but when I run froogle.php I get the following SQL error;

 

: SQL error Unknown column 'products.manufacturers_id' in 'on clause'| sql = SELECT concat( 'http://www.yumyumtummyrumble.co.uk/product_info.php?products_id=' ,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.yumyumtummyrumble.co.uk/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 = 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

 

Any help would be gratefully recieved :D

 

BTW, I'm running osCommerce 2.2 Milestone 2 Update 051113

 

Thanks

Rob

Share this post


Link to post
Share on other sites

The special prices arnt included in the feed? Is it okay to change them manually and then upload it?

 

Or is there another conribution that includes the special prices?


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

Is this a solution to me above post?

 

 

http://www.creloaded.com/Forums/viewtopic/t=6172.html


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites
The special prices arnt included in the feed? Is it okay to change them manually and then upload it?

 

Or is there another conribution that includes the special prices?

 

Special prices are automatically included into the feed. However, if the special prices were set with a contribution and not via the default osC way, then you may have an issue.

 

But you can always change the prices in your feed (with a text editor or excel), then upload the file to Froogle.


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites
First of all, I want to thank FlyingMonkey and everyone else that has contributed to this contribution. I found the Bizrate contribution as well which was based upon this one. However, Bizrate now uses numbers for their categories. I would like to map my categories to the bizrate categories. I was thinking of creating a mapping table that would do this. Has anyone done this? I do not want to re-invent the wheel if someone already did this. Also, if someone could tell me what I would need to modify in the code to perform the lookup that would be greatly appreciated. Thanks!

 

nope, not to bizrate.... it would be custom for every store. it sounds like a tedious process.


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites
(eplaksienko @ Feb 6 2006, 07:23 PM)

 

Hi!

I experience problem, error:

 

Warning: main(../includes/classes/seo.class.php) [function.main]: failed to open stream: No such file or directory in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 25

 

Warning: main() [function.include]: Failed opening '../includes/classes/seo.class.php' for inclusion (include_path='.;C:\php5\pear') in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 25

 

Fatal error: Class 'SEO_URL' not found in d:\www\i\s\israel1shop.com\www\catalog\admin\froogle.php on line 26

 

Anybody has idea about it

Thx

 

does anybody have an answer for this? I am having the same error.

 

 

It appears that you do not have the SEO contribution installed. You should either install the SEO contribution or disable the SEO functionality in the Froogle Data Feeder.

 

-Calvin


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites
Special prices are automatically included into the feed. However, if the special prices were set with a contribution and not via the default osC way, then you may have an issue.

 

But you can always change the prices in your feed (with a text editor or excel), then upload the file to Froogle.

 

 

Thanks monkey, however I have made my specials through the standard oscommerce way and it isnt exporting the prices. What could I have done wrong? Have I maybe missed something in the configuration or when installing? If its any help I'm using the very latest version. Maybe I should try reinstalling an earlier version? Can someone confirm a version they are using that is able to export specials prices?

 

Thanks


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

I have just thought maybe my problem with the special prices is that I did enter the products using osCommerce Product Manager for Windows (oscpmwin) 0.1.2 (build 436) ( Great app by the way http://www.mariovaldez.net/software/oscpmwin/index.php?c=9)

 

Do you think that create special prices in a none compatible way? I will try opening and resaving the specials through the oscommerce admin and hope that sorts it.


__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

Solved it! The reason it wasnt exporting the special price was to do with them being created through the above software. The only issue I could see was that it had problems when a special was created and modified at the same time maybe?

 

Its sorted now by opening the specail in oscommerce admin and hiting update.

Edited by Caios

__________________________________________________________

Favourite and essential contributions in no particular order.

 

product tabs, ultra pics, description in product listings, ultimate SEO URLs, header tags controller, all products with pictures, RSS feed, easy populate, protx direct 2.0, gift cert and voucher, step by step manual order entry, guest account, featured products, live support, enhanced whos online, super tracker also main page before column left thread.

Share this post


Link to post
Share on other sites

Ok I have install mulit-store with php and oscommerce.

 

and I have no categories instead I have peacem_categories

 

: SQL error Table 'rainbow_peace.' doesn't exist| catInfo = SELECT categories.categories_id AS curCatID, categories.parent_id AS parentCatID, categories_description.categories_name AS catName FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id

 

and some where in this code the searching for categories and not finding it.

$sql = "
SELECT concat( '" . $productURL . "' ,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) * " . $taxCalc . ",2) AS price,
CONCAT( '" . $imageURL . "' ,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 = 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
";


$catInfo = "
SELECT
categories.categories_id AS curCatID,
categories.parent_id AS parentCatID,
categories_description.categories_name AS catName
FROM
categories,
categories_description
WHERE categories.categories_id = categories_description.categories_id
";

can someone help me to know where to to add the peacem to this code so it will work thank you very much

noppie

Edited by noppie

Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

hi! i have a dumb question...

if(SEO_ENABLED=='true'){
 $home = DB_SERVER;		  //  ****** revised these because we can....
 $user=DB_SERVER_USERNAME;
 $pass=DB_SERVER_PASSWORD;
 $base=DB_DATABASE;
}else{

 

I have Ultimate SEO installed... should I replace the DB_SERVER_USERNAME.. pasword and database? Or they are automatically changed?

Thank you!

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

×