Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically send data feed to Froogle


gottaloveit

Recommended Posts

hey calvin , thankx for replying.

 

can ya pleae check the code and see if i did it right.

 

 

[quote

 

function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )

{

set up basic connection

$conn_id = ftp_connect($ftpservername);

if ( $conn_id == false )

{

echo "FTP open connection failed to $ftpservername <BR>\n" ;

return false;

}

 

$login_result = ftp_login($conn_id, $ftpusername, $ftppassword);

 

if ((!$conn_id) || (!$login_result)) {

echo "FTP connection has failed!<BR>\n";

echo "Attempted to connect to " . $ftpservername . " for user " . $ftpusername . "<BR>\n";

return false;

} else {

echo "Connected to " . $ftpservername . ", for user " . $ftpusername . "<BR>\n";

}

 

if ( strlen( $ftpdirectory ) > 0 )

{

if (ftp_chdir($conn_id, $ftpdirectory )) {

echo "Current directory is now: " . ftp_pwd($conn_id) . "<BR>\n";

} else {

echo "Couldn't change directory on $ftpservername<BR>\n";

return false;

}

}

 

ftp_pasv ( $conn_id, true ) ;

$upload = ftp_put( $conn_id, $ftpdestinationfile, $ftpsourcefile, FTP_ASCII );

 

if (!$upload) {

echo "$ftpservername: FTP upload has failed!<BR>\n";

return false;

} else {

echo "Uploaded " . $ftpsourcefile . " to " . $ftpservername . " as " . $ftpdestinationfile . "<BR>\n";

}

 

ftp_close($conn_id);

 

return true;

}

 

ftp_file( $ftp_server, $ftp_user_name, $ftp_user_pass, $source_file, $ftp_directory, $destination_file);

Edited by sinryder
Link to comment
Share on other sites

Sinryder,

 

At the bottom of froogle.php look for */. It shold be the second line from the end. Remove it then look for a matching /* further up in the file and remove it. Everything between /* and */ is just a comment until you remove them.

 

Good Luck,

Rick Knight

Link to comment
Share on other sites

oops, sorry I see that i missed the answer to my question that had already been given. So basically if I update to the new version I will be fine. Qurstion about the update, do I just need to overwrite the froogle.php file and enter my ftp info to upgrade the version I have?

Link to comment
Share on other sites

I get this error when checking mydomain/admin/froogle.php

 

Warning: fopen(http://www.livewirehardare.com/feeds/lwhfroogle.txt): failed to open stream: HTTP wrapper does not support writeable connections. in /home/jaychamp/public_html/redsox/froogle.php on line 312

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/jaychamp/public_html/redsox/froogle.php on line 313

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/jaychamp/public_html/redsox/froogle.php on line 314

 

Script timer: 0.443431 seconds.

Any suggestions? I did chmod the output file.

 

Here are those lines of code:

 

$fp = fopen( $OutFile , "w" );

$fout = fwrite( $fp , $output );

fclose( $fp );

Edited by xPATRIOTSx

Go New England Patriots!!!!

Link to comment
Share on other sites

Please anyone?

 

I tried this with a temp folder in my /catalog but I'm still getting a similar error. I really want to get this working. I checked the directions over and over again, quadruple checked the code and I really can't find anything wrong.

Go New England Patriots!!!!

Link to comment
Share on other sites

Please anyone? 

 

I tried this with a temp folder in my /catalog but I'm still getting a similar error.  I really want to get this working.  I checked the directions over and over again, quadruple checked the code and I really can't find anything wrong.

 

 

There are 2 things that normally cause this error.

1. A typo in the path, including incorrect case

2. The directory not being writable by the webserver. For this to work, the directory should be chmod 777.

 

Dan

Dan Stevens

Link to comment
Share on other sites

There are 2 things that normally cause this error.

1.  A typo in the path, including incorrect case

2.  The directory not being writable by the webserver.  For this to work, the directory should be chmod 777.

 

Dan

Thanks for the reply. The temp folder and txt file are both 777, and I couldn't find a type-o in the code anywhere. Do you see anything wrong with the code?

<?php

//  Start TIMER

//  -----------

$stimer = explode( ' ', microtime() );

$stimer = $stimer[1] + $stimer[0];

//  -----------

 

 

$OutFile = "http://www.livewirehardware.com/store/temp/livefroogle.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";

$destination_file = "livefroogle.txt";  //"CHANGEME-filename-to-upload-to-froogle.txt" ;

$source_file = $OutFile;

$imageURL = 'http://www.livewirehardware.com/store/images/';

$productURL = 'http://www.livewirehardware.com/product_info.php?products_id=';

$already_sent = array();

 

$home = "localhost" ;

$user="EDITED";

$pass="EDITED";

$base="EDITED";

 

$ftp_server = "hedwig.google.com" ;

$ftp_user_name = "EDITED";

$ftp_user_pass = "EDITED";

$ftp_directory = ""; // leave blank for froogle

Go New England Patriots!!!!

Link to comment
Share on other sites

Froogle Data Feeder v1.5.2a

Released By: Calvin K

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

 

Date: September 22, 2004

 

Description: Creates and automatically sends a data feed to Froogle, to provide product information and pictures. This Froogle Data Feeder, handles product duplicates, specials(if available), currency conversion, html descriptions, full category trees, and automatic upload. In addition, the Froogle Data Feeder supports advance feeds. With the advance feed option enabled and the "instock" field enabled, it will create a feed with all of the products. Without the advance feed option enabled, it will only submit in stock items. Download Now!

 

Forum Thread: http://www.oscommerce.com/forums/index.php?sho...ic=71088&st=386 (aka FlyingMonkey on the forums)

 

This version cleans and optimizes the code for performance, adds support for uber-sized stores, and includes a "beta" admin panel.

 

Special Thanks to djs (Dan) for help with the uber-sized stores.

Edited by FlyingMonkey

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

Link to comment
Share on other sites

The admin panel provided with 1.52 is fairly simple, and is not in its final state. In the next releases (currently under production), I have modified the way the admin panel works to make installations smoother and easier. It is specfically designed for v2. I do not recommend installation of the admin panel, if you plan to use v2. It will not interfer with v2, but may cause osC code bloat.

 

Please note 1.52, may be my final "free" release. I have too many obligations outside of this, to keep this up for free.

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

Link to comment
Share on other sites

Warning: fopen(http://www.livewirehardare.com/feeds/lwhfroogle.txt): failed to open stream: HTTP wrapper does not support writeable connections. in /home/jaychamp/public_html/redsox/froogle.php on line 312

 

is in a different location than:

 

$OutFile = "http://www.livewirehardware.com/store/temp/livefroogle.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";

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

Link to comment
Share on other sites

Warning: fopen(http://www.livewirehardare.com/feeds/lwhfroogle.txt): failed to open stream: HTTP wrapper does not support writeable connections. in /home/jaychamp/public_html/redsox/froogle.php on line 312

 

is in a different location than:

 

$OutFile = "http://www.livewirehardware.com/store/temp/livefroogle.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";

Yes, that was just me trying different things, so the code I posted was different than the one I got the error with.

 

I got someone to fix it for me, don't know what he did but it works :lol:

Go New England Patriots!!!!

Link to comment
Share on other sites

Ok, I installed 1.44 and it seemed to work well, up through the FTP.

 

A day or so later I installed 1.52 and it also works up through the FTP.

 

My account is listed as ACTIVE on Froogle, however every time I get a file uploaded it says:

 

SUCCESS WITH ERRORS.

 

11 products processed

11 products suceeded

0 products active

 

The best I can figure is that perhaps Froogle has not verified my data?

 

If that is the case, I had the file there for 48 hours and uploaded another.

 

Does anyone know how long it takes them to verify your data?

 

Here are a couple of entries just incase there really IS an error somewhere. Note that not all lines have an asterec in them, so I don't think that is the problem.

 

 

product_url name description price image_url category offer_id

http://www.itskona.com/catalog/product_inf...?products_id=28 Pele's Passion - 8 oz - Extra Fancy - Full City Plus Roast Pele's Passion, an 8 oz, in a Full City Plus Roast. Whole Bean. These are Extra Fancy beans.(going from light to dark):* Cinnamon* Medium* Full City* Full City Plus (Vienna) 12.00 http://www.itskona.com/catalog/images/8ozcompressed.jpg Roasted Coffee 28

http://www.itskona.com/catalog/product_inf...?products_id=40 Pele's Passion - 1 lb UNROASTED EXTRA FANCY BEANS For the Connoisseur who prefers to roast his own coffee, we present a 1 pound bag of Pele's Passion green beans, just ready for roasting.This is a green, whole bean product in Extra Fancy size. 14.00 http://www.itskona.com/catalog/images/1945332.jpg Unroasted Coffee 40

Edited by Lavarock
Link to comment
Share on other sites

What's the error?  Froogle tells you.

 

Are you using advance feed options?

 

I see no error at all and I have looked. I am NOT using advanced options.

 

There are no lines of text where I would expect the errors to be listed. That is why I thought it might be that Froogle had not reviewed my data. If they are responding quickly, I'll email them and ask what's up. I just didn't want to bother them if they are taking 3 days to review the feeds and I was jumping the gun.

 

=====

 

All uploads for test.txt

 

 

Uploaded at â–¼ Processed at Outcome # of active products # of errors

2004-09-23 14:36:46.0 2004-09-23 14:52:07.0 Success with errors 0 1

2004-09-21 12:02:13.0 2004-09-21 12:16:20.0 Success with errors 0 1

2004-09-21 11:51:34.0 2004-09-21 12:07:46.0 Success with errors 0 1

 

 

=====

 

2004-09-23 14:36:46.0 upload View all uploads

 

Outcome: Success with errors

Number of products processed: 11

Number of products succeeded: 11

Number of active products: 0

Feed file name: test.txt

Uploaded at: 2004-09-23 14:36:46.0

Processed at: 2004-09-23 14:52:07.0

 

 

 

 

Errors

 

 

Line # â–² Error Bad feed data

Feed will not go live - help

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