Jump to content
gottaloveit

Automatically send data feed to Froogle

Recommended Posts

i can't figure out why my file wont upload... here is my code

i have set modify permissions on my froogle dir. and file.

 

REMARK: CODE DELETED.

the code looks fine from what i can tell. in the future please just post the error message if your not sure and unless you know it's the code that's broken otherwise don't post the entire code, and expect someone to look through all of it. your more likely to get a response from someone if they can solve the problem instantly than looking through pages of code.

Edited by FlyingMonkey

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

Share this post


Link to post
Share on other sites

Has anyone figured out how to get the froogle data feeder to work with salemaker? It appears that the script only uses the regular prices, becuase of this my data feed was not accepted by froogle. If anyone could help or point me in the right direction that would be great. thanx in advance

Share this post


Link to post
Share on other sites

Thanks for the great contribution. I everything installed and the file is being written correctly. But when I uncomment the FTP part of the code so it will send, I get this error:

 

Fatal error: Call to undefined function: ftp_connect() in /usr/www/users/domyow2/admin/froogle.php on line 152

 

Any ideas?

Share this post


Link to post
Share on other sites

Hey, once again thanx for the great contribution, but has ANYONE figured out how to get the script to include the sale prices created by salemaker. PLEEEAASSSEEE lol. i must know, there must be a way. and someone knows it, im sure ...for the love of god ... HEELLLLPPPPPPPPP !!!!! lol

Share this post


Link to post
Share on other sites

I'm having trouble with the output image path. For some reason the / between the images folder and the image name is missing. For example:

 

http://www.domain.com/catalog/imageswidget.jpg

 

should read:

 

http://www.domain.com/catalog/images/widget.jpg

 

Where might my problem be? I checked froogle.php and the path to /images is there. Ideas? Thanks!

Share this post


Link to post
Share on other sites

Whoops! My mistake. It was as simple as adding the slash (/) to the end of the images url. Great contribution...I'm now ranking #1 on Froogle for the products I sell. All I need is customers now!

Share this post


Link to post
Share on other sites

sfsurfcat: ahh... good stuff. great to hear your ranking #1 on froogle.

 

Annoucement: the long awaited version 1.3.7 has finally been released for limited beta testing. a couple of people have been pm'd. if you would like to help test the beta release. please pm me. this version incorporates the "high" speed category tree indexing. it theoretically still runs on the order of O(n). though, it's more like 5n =)

 

Note: The original version 1.3 was only released to a few testers and was found that O(n^3) time was too slow and the following versions 1.3.5 and 1.3.6 were working developmental steps towards 1.3.7


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

Share this post


Link to post
Share on other sites

guys!

i am confused so plz answer me in engish. i have no clue what is cron etc....

 

i have a wbserver at my hoting company which is iis 6.

 

 

this is what i did.

 

i downloed teh contribution from contr section.

i open the froogle.php in dreamweaver.

i did this change first:

$OutFile = "../tmp/froogle.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";
$destination_file = "froogle.txt";  //"CHANGEME-filename-to-upload-to-froogle.txt";
$source_file = $OutFile;
$imageURL = 'http://www.mysite.com/images/';
$productURL = 'http://www.mysite.com/product_info.php?products_id=';
$already_sent = array();

 

is it correct above.?

what is that path means. ""../tmp/froogle.txt"; "

i mean should i create that tmp folder in admin section or in my html folder

my site is like that:

one html folder. in that all catalog files and one admin folder. etc....

 

so where i create that tmp folder?

will that outfile will be saved in that folder.

 

 

 

now secondly i did this:

 

$home = "localhost";
$user="mydbusername";
$pass="mydbpassword";
$base="mydbname";

$ftp_server = "hedwig.google.com";
$ftp_user_name = "myloginidforfrrogle";
$ftp_user_pass = "mypasswordforfroogle";

 

is it correct?

why i keep local host. why not the ip address of my server up there?

 

now then i did this:

$convertCur = false; //default = false
$curType = "USD"; // Converts Currency to any defined currency (eg. USD, EUR, GBP)
if($convertCur)
{
$productURL = 'CHANGEME-http://www.yourwebsite.com/product_info.php?currency=CURTYPE&products_id=';  //where CURTYPE is your currency type (eg. USD, EUR, GBP)
}

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_model , products_weight ,
manufacturers.manufacturers_name ,
products.products_id AS id,
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 )
left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_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
AND products.products_status != 0
ORDER BY
products.products_id ASC
";


//Check for any applicable specials for the corresponding products_id
$sql2 = "
SELECT
specials.products_id AS idS,
FORMAT(specials.specials_new_products_price,2) AS priceS
FROM
specials,
products
WHERE
specials.products_id=products.products_id
AND specials.status != 0
AND products.products_status != 0
ORDER BY
specials.products_id ASC
";

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

$output = "product_url \t name \t description \t price \t image_url \t category\n";

$result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );

//Specials Checker
$result2=mysql_query( $sql2 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql2 = " . htmlentities($sql2) );
$row2 = mysql_fetch_object( $result2 );

//Currency Information
if($convertCur)
{
$sql3 = "
SELECT
currencies.value AS curUSD
FROM
currencies
WHERE currencies.code = '$curType'
";

$result3=mysql_query( $sql3 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql3 = " . htmlentities($sql3) );
$row3 = mysql_fetch_object( $result3 );
}

while( $row = mysql_fetch_object( $result ) )
{
if ($already_sent[$row->product_url] == 1) continue; // if we've sent this one, skip the rest of the while loop

// reset the products price to our special price if there is one for this product
if( $row2->idS == $row->id ){
 $row->price = $row2->priceS;
 $previdS = $row2->idS;
 while ( $row2->idS == $previdS )
 {
 $row2 = mysql_fetch_object( $result2 );  //advance row in special's table
 }
}

if($convertCur)
{
 $row->price = $row->price *  $row3->curUSD;
 $row->price = number_format($row->price, 2, '.', '');
}

$output .= $row->product_url . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->name) ) ) . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->description) ) ) . "\t" .
$row->price . "\t" .
$row->image_url . "\t" .
$row->category . "\n";

$already_sent[$row->product_url] = 1;
}

if ( file_exists( $OutFile ) )
unlink( $OutFile );

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

 

i left the rest of the code same. i dont need currency conversion. i use usd and wanna stick with that.

 

 

then now i dont understand cron, autometic feed. seems like this contribution is for linux uses. or plz help me to understand following code.

what do i do to have it autometic update?

/*  //Start FTP to Froogle

// 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 <b>FAILED!</b> source: $source_file  dest: $destination_file<BR>";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file<BR>";
}

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

*/  //End FTP to Froogle
?>

 

Now 2 main questions.

 

 

1) I ran this page with all changes i mentioned above and the code from above, i got a a blank page when i went to my site on that froogle.php page. whats wrong?

2) I use sts, will thsi work with that.

3) my admin section has password on it. if i save the file there, how will it run.

4) how often the data is submitte dto froogle.

5 how do i check that data has been submitted to froogle

6) i use html code with table and images for product description and i also have a short product desc that has both text and html. will they also be submitted or not. i want them too.

7) price...will prce be submitted to them?

 

 

plz plz help.....

 

i m new to osc and php and have not done a lot of work on that.

 

thanks in advance..

Share this post


Link to post
Share on other sites

well your post is not very clear. this contrib does not require knowledge of CRON or anything. It practically runs itself if you follow the instructions properly. You need to fill in all the information at the top of the script (ex. path locations, username, etc.) when you run this file, you won't see much except that the file generated for Froogle is saved in the directory you entered above. Navigate to that location and see if the file is there. if not, you either did not specify the proper paths or permissions are not sent.

 

I would also recommend you use a better editor to view scripts...

Share this post


Link to post
Share on other sites
anyone please. its been a week. any free alterntaive for froogle or easy way to do that. i dont care about autometic insertion. ic an manually do that. how do i create that file they want. plz help.

 

thanks,

this module creates the froogle feed within seconds generally even for very large databases in a flash and is fairly easy to setup. i sent you a pm a few days ago.


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

Share this post


Link to post
Share on other sites
hi calvin,

but i cant afford 65 bucks now. any cheap alternative?

The module is free of charge as it is released under the GPL, I only asked a small fee for outside consultation for installation. You could try installing it yourself again by following the directions more closely and if you need help post in smaller chunks. I skimmed through your post earlier but i didn't have to the time to respond to it. It was just simply too long. The more time i spend having to answer post in this thread... the less time i have to develop newer versions of the contribution.

Edited by FlyingMonkey

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

Share this post


Link to post
Share on other sites
is this in the contribution area or is the code to be pieced together from in here?

This is where the code was being pieced together in the past, but it's been supporting a contribution for the past few months. I was planning to create a new thread in the contributions section, once the new version is tentatively released in a couple of weeks.


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

Share this post


Link to post
Share on other sites

Status Update: I've been working on the new version, but my database doesn't have enough products and categories. I added quite a few levels, and it seems to work fine. But not for any of the beta testers. Hopefully... I'll be able to find database that'll fully tests it.


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

Share this post


Link to post
Share on other sites
Status Update: I've been working on the new version, but my database doesn't have enough products and categories. I added quite a few levels, and it seems to work fine. But not for any of the beta testers. Hopefully... I'll be able to find database that'll fully tests it.

the problem Calvin seems to be related to a call or variable for the currency.... I can re-run and post if you want....

 

Just like Mibble, my db is over 4,000 with some categories 10+ deep...

Share this post


Link to post
Share on other sites
Status Update:  I've been working on the new version, but my database doesn't have enough products and categories.  I added quite a few levels, and it seems to work fine.  But not for any of the beta testers.  Hopefully... I'll be able to find database that'll fully tests it.

the problem Calvin seems to be related to a call or variable for the currency.... I can re-run and post if you want....

 

Just like Mibble, my db is over 4,000 with some categories 10+ deep...

the currency?

 

"Warning: Missing argument 4 for findcat() in /home/xxxxx/public_html/admin/froogle2.php on line 77"

 

function findCat($curID, $catTempPar, $catTempDes, $catIndex)

 

I thought the error was produced because of a misalignment with the number of variables in the calls. From FroogleDataFeeder_v13711_beta.zip to FroogleDataFeeder_v13712_beta.zip, there is a section of code that my system doesn't run because of my DB size. I believe the calls are fixed now, but I am just worried that the output isn't correct.


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

Share this post


Link to post
Share on other sites

Jeff, what do you mean the image and product url's?

 

The new froogle is working, I will add more to my particular case, as I have a few more things I send to froogle than what is output from the program.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
Jeff, what do you mean the image and product url's?

 

The new froogle is working, I will add more to my particular case, as I have a few more things I send to froogle than what is output from the program.

the "new froogle"? u mean the advance format? i was sent the api a while back, could someone send me the new api? so that i can integrate it, into version 1.4 as stated on the roadmap? thanks.


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

Share this post


Link to post
Share on other sites
Where do I find the folder where the image and product urls are?

there's some generic urls for both of those cases in the readme. it varies from site to site, but follow the same pattern.


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

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

×