Contributions

Features (Category Index)
Search: 

Sort Products By Dropdown

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.

Expand All / Collapse All

v1.2.1 Full 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 9 Aug 2007
Fix next page problem 26 Nov 2006
Sort Products By Dropdown v1.1 2 Aug 2006
product listing fix 11 Jul 2006
Sort Products By Dropdown 12 Jun 2006
Sort Products By Dropdown 12 Jun 2006
Sort Products By Dropdown 11 Jun 2006
Sort Products By Dropdown 11 Jun 2006

Note: Contributions are used at own risk.