Random Products
for osCommerce Online Merchant v2.2
This contributions, puts random products in the index, and buy with a click ........
Legend: 
Download

Report
Added the case French to random_pro.php
change the README.txt file.
Not much changed in this great package.
Just added some installation instructions and the last update into one.
I take no credit for any of this great work.
enjoy!
Just upload this file (formally called rnd_products.php) into the /includes/modules/ directory.
You need to do nothing more than backup and overwrite your current new_products.php file with this and you will have Random Products with the 'Buy Now' button below....
This is not a fix... I just renamed a file and uploaded it over the old one. Backup First!
Hi all,
daller did a wonderful job and was very kind to share his work with us. But his file (dated 31 March 2008) needs to be tweaked a bit in order to work properly though.
I use Winmerge to combined his work with the original code of the creator.
I've also revised the installation instruction to make it clear.
Why this contrbution is important? So that any of your products (new or old) will have an opportunity to be showcased on the font main index page.
This version should correct the previous problems that certain items keeps showing up more frequently than others.
I do not claim any credit. All credit goes to the original creator and special thanks to "daller"
-- Complete Package!
Ordering the products i 5 different ways, and then selecting a random order-method is not good (the pick was almost static among my ~25000 products)
Use rand() in the SQL call:
tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS);
I have attached my rnd_products.php (zipped)
I have just noticed a typo near the bottom of my update file.
The line that reads
$rndChooser = tep_db_query("select p.products_id, p.products_image... etc
has 2 "where"s
... TABLE_SPECIALS . " s on p.products_id = s.products_id where where p.products_id between " . $randomize1 . " AND " . $randomize2...etc
Just delete one of them as it isn't needed.
That's it. The download just contains this text.
Allows products to be more randomly selected and displayed using a modified single SQL query.
See it in action on my test / development site at www.icr-records.co.uk/oscommerce
non so l'inglese non capisco nulla che devo scrivere qui non so come mai non mi accetta aiutatemi... ma bo io scrivo qualcosa..
this is a complete package. there were a few lines of code missing from the original that prevented the heading from showing up, it was jsut a grey box. the heading is fixed, it is linked to the "New products for [month]" in the language file. you can fix that however you want.
see preview at http://store.rivalgraphix.com
direct comments/questions to original author, i do not know anything about this, just didn't like not having the header
Ryan
www.rivalgraphix.com
This contributions, puts random products in the index, and buy with a click ........