Community Add-Ons

Maintainers: homewetbar
Add file to this package
Top » Features

Sort Products By Dropdown
for osCommerce Online Merchant v2.2

This contribution allows you to sort the products in a category by multiple methods, by best sellers, products name, and by price. The best sellers are updated daily by cron job and you can set the number of days back to look at sales to base your best sellers on.

The way sort by price and name is pretty straightforward, the way best sellers works is each order counts as one sale so if someone orders 50 of item (A) and item ( B ) is ordered 5 times but only 1 each time, item ( B ) will show 5 sales and item (A) will show only 1 so the one that was more popular with multiple people will be ranked higher -- item B. This can be changed by modifying the code in cron_update_bestsellers.php slightly if you wish to count by total number of items sold instead it is noted how to do so in the code.

Legend:  Download   Report
Expand All / Collapse All
v1.2.1 Full xcomm 18 Oct 2007  

All regards for this great contribution and easy to follow readme.txt belongs to homewetbar

This v1.2.1 (FULL VERSION):
1.) Is correcting the missing `order by` in the readme.txt here.
See: http://forums.oscommerce.com/index.php?showtopic=213587&st=20#
case 'PRODUCT_LIST_NAME':
$listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_30SALES':
$listing_sql .= " order by p.products_recent_sales desc, pd.products_name desc";
break;


2) Is additionally removing some spaces in file and directory name, which would making you mad on *nix systems otherwise.







v1.2 homewetbar 9 Aug 2007  
Fix next page problem marabay 26 Nov 2006  
Sort Products By Dropdown v1.1 homewetbar 2 Aug 2006  
product listing fix kit 11 Jul 2006  
Sort Products By Dropdown homewetbar 12 Jun 2006  
Sort Products By Dropdown homewetbar 12 Jun 2006  
Sort Products By Dropdown homewetbar 11 Jun 2006  
Sort Products By Dropdown homewetbar 11 Jun 2006