Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically send data feed to Froogle


gottaloveit

Recommended Posts

according to the "froogle_feed_instructions.pdf' file sent when you get your account setup, the description can have 65,536 characters to descripe the product:

 

"Full text from your web site describing the product and its features. Froogle searches this text when matching user queries to your product. The maximum length for the description is 65,536 characters."

 

i use the header_tags within products_description table. how can i implement this extra description from the header tags into the 'description' array? i believe the query needs to be changed a bit and then this needs to be changed:

 

preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->description) ) ) . "\t" .

 

I am not sure how to do this, any tips?

 

thanks,

mac

Link to comment
Share on other sites

Where n is the number of products and m is the number of categories.? This is an approximate number of operations, I did not include operations on the descriptions, etc.? It only includes approximates of the major additions.

 

The original code, before version 1.0 was O(n) operations.

Version 1.0 is O(2n) operations (addition of specials).

Version 1.1 is O(2n) operations (modified html handling)

Version 1.2 is (3n) or (2n) operations (addition of currency conversion).

Version 1.3 is? O(n*(n*m)) or (3n) or (2n) operations (addition of all categories).

 

Meaning... version 1.3 is in the order of O(m*n^2) time due to the recursive nature of finding the categories to the root.? Version 1.3 features a maxCatDepth, so for incredibly large databases, it will still be able to run in the order of O(n) when maxCatDepth is set to 0.

 

Version 1.4 will update the Froogle Data Feeder to Advance Format... unless there is strong oposition.? This will require everyone to contact froogle to switch over, if they are currently using the basic format.

 

Version 1.5 will remove all of the excess for users, and focus on performance.

 

I suggest using the lowest version possible up until v1.12.? So if you don't need currency conversion, or a category depth greater than two, use v1.12!

Version 1.3.5 should be optimized down to in the order of O(n+m^2) once indexing is implemented. Version 1.3.6 will feature even more improvements to the run time of finding the categories.

 

Note: Versions 1.2 and beyond have not been released to the public, but will be realeased shortly after final testing is completed by several forum members.

 

Version 1.5 Update: Version 1.5 will remove all of the excess for users, and focus on performance and will run in the order of O(n).

Edited by FlyingMonkey

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

Link to comment
Share on other sites

Additonal Information about the Version 1.5 Update:

 

Version 1.5 will remove all of the excess for users, and focus on performance and will run on the order of O(n) with improved category search compared to versions 1.2 and below.

 

umm... maybe i should be studying for my algorithm design midterm instead of doing this.

Edited by FlyingMonkey

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

Link to comment
Share on other sites

I am trying to use the cron job as per the details in read me file but get this error in my email

 

/bin/sh: 0: command not found

 

This is the command I set up Cron <mystore@server5> 0 4 * * 3 /usr/bin/php -q /home/mystore/public_html/admin/froogle.php

 

and instead of sending feed every day how do I setup so it only send the feed once per month or 30 days.

Link to comment
Share on other sites

After a huge setback in coding version 1.3.5+ for the last couple of weeks, the problem is now understood. More details are in the following forum topic: http://www.oscommerce.com/forums/index.php?act...=10#entry384121

 

After all of the functionallity of the Froogle Data Feeder is completed with version 1.5, an administration control panel will be added and released as version 2.0

Edited by FlyingMonkey

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

Link to comment
Share on other sites

Hey, I know I am jumping into this conversation. But, I am having an issue with the froogle feeder not uploading my specials. It is the stock specials that comes with OSC, nothing crazy. Any area in the mod that I can look at to troubleshoot?

Link to comment
Share on other sites

Any chances of getting notification when 2.0 goes up? I already have email notification on this thread, so if you can just update this thread when the new version is up.

 

It would be very much appreciated. ;)

 

Patrick

Link to comment
Share on other sites

Any chances of getting notification when 2.0 goes up? I already have email notification on this thread, so if you can just update this thread when the new version is up.

 

It would be very much appreciated.? ;)

 

Patrick

yes, but it won't be released probably until august. i have limited time to work on this due to other obligations from school and the consulting i do.

Edited by FlyingMonkey

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

Link to comment
Share on other sites

Hey, I know I am jumping into this conversation. But, I am having an issue with the froogle feeder not uploading my specials. It is the stock specials that comes with OSC, nothing crazy. Any area in the mod that I can look at to troubleshoot?

Bump...

Link to comment
Share on other sites

Hey, I know I am jumping into this conversation.  But, I am having an issue with the froogle feeder not uploading my specials.  It is the stock specials that comes with OSC, nothing crazy.  Any area in the mod that I can look at to troubleshoot?

Bump...

that's pretty strange....

 

Which version are you using?

 

does it display 0 or null for the prices when it's a special? Or does it display the regular price?

 

It could be anywhere from the SQL query to the code that performs the comparison. Are you sure you haven't modded the code in any way?

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

Link to comment
Share on other sites

Which version are you using?

 

does it display 0 or null for the prices when it's a special? Or does it display the regular price?

 

It could be anywhere from the SQL query to the code that performs the comparison. Are you sure you haven't modded the code in any way?

It is just displaying the regular prices.

 

My store is modded but, not this code. I downloaded the latest one on the contribs page about 2 weeks ago.

 

Hmmm, ok seems like it might be a complex issue. I guess I will try to figure it out or try another method for froogle.

Link to comment
Share on other sites

which version are you using?

I am trying to determine that. Its ben a couple months since I added it. I don't see a version in the comments. I might just try reinstalling the lastest one (what a pain :-), since I am not 100% sure. I see that there was a bug fix for this issue. Maybe I am running the old one.

Link to comment
Share on other sites

Great work calvin! I'm going to install this in a minute and hopefully get it working!

You should. It is the bext tool to upload to froogle. It really simplifies their process.

Link to comment
Share on other sites

Great work calvin! I'm going to install this in a minute and hopefully get it working!

You should. It is the bext tool to upload to froogle. It really simplifies their process.

thanks for all of the compliments.

 

the previous versions weren't using an unique id to id the products thus causing the specials to not show up for some users in rare cases. that's why i was curious... as to why it still didn't work if you were using the new version. ;)

 

i have one finished for international currencies and i've been working on an updated version to support unlimited categories. the algorithm is pretty complex and should be superior compared to anything out there for what it does.

but i haven't had time to release it cause of school and work. and i have to put that before something that's "pro bono". something needs to pay for school and the bills. =(

Edited by FlyingMonkey

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

Link to comment
Share on other sites

Hi, I installed my osCommerce "admin" folder outside of /catalog and renamed it something other than "admin" when I originally installed osCommerce. Is this going to be a problem? or should I just put froogle.php and /froogle in this folder?

 

Also, how do I test to see if I installed it correctly?

 

Thank you!

Link to comment
Share on other sites

Version 1.22a was finally released, this adds currency conversion as stated in the previous roadmap. It is believed to be a stable release.

 

sfsurfcat: yes. you can test it by visiting the file it writes to.

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

Link to comment
Share on other sites

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.

 

 

<?php

$OutFile = "../froogle/dreamwayonline.txt";

 

//"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";

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

$source_file = $OutFile;

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

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

$already_sent = array();

 

$home = "localhost" ;

$user="??????";

$pass="?????";

$base="?????";

 

$ftp_server = "hedwig.google.com" ;

$ftp_user_name = "????";

$ftp_user_pass = "???";

 

 

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 );

 

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

}

}

 

$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 );

 

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

?>

Link to comment
Share on other sites

I'm waiting for the fix so that the category string includes the entire cookie crumb and not just the last two. In the meantime, I'm trying to think of solutions to do this. One of them involves just manually editing the categories to just the top two categories.

 

Does anyone know if froogle does not like this? They seem to have a thorough staff and was wondering if this would go unnoticed.

 

I don't want to upload it unless I'm sure as we get a decent amount of customers from froogle. I wouldn't want froogle to see this as a breakage and wait for me to fix the feed. In the meantime, my listings might be removed.

Link to comment
Share on other sites

I'm waiting for the fix so that the category string includes the entire cookie crumb and not just the last two. In the meantime, I'm trying to think of solutions to do this. One of them involves just manually editing the categories to just the top two categories.

 

Does anyone know if froogle does not like this? They seem to have a thorough staff and was wondering if this would go unnoticed.

 

I don't want to upload it unless I'm sure as we get a decent amount of customers from froogle. I wouldn't want froogle to see this as a breakage and wait for me to fix the feed. In the meantime, my listings might be removed.

Correct me if I'm wrong, but are you asking toohave the current froogle feeder feed the top two categories? If so, I believe the Froogle Data Feeder already does so.

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

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