Community Add-Ons
Custom sort order field for products in admin/categories.php
for osCommerce Online Merchant v2.2
This modification adds a textbox next to the status radio buttons in categories.php which allows you to enter a default sort order for your products (see screenshot.jpg).
The customer is still able to resort products in the product listing if they want but this mod provides a means of ensuring that your premium products are shown at the top of the listing.
To set the sort order, simply enter the number directly into the textbox.
It is easy to implement with only one column added to the products table and 8 chunks of code to copy/paste.
Also included in the miniimages.txt file is a simple mod (4 copy/pastes) to add a tiny image (your existing image scaled down, see screenshot.jpg) next to each product in categories.php
To implement this mod(s), either follow the instructions in this text file (and miniimages.txt for the image mod) or use a text compare tool such as 'beyond compare' to compare your files with those included in this zip.
Legend:
Download
Report
Sorry forgot to mention,
This contribution does not work on the latest OSC release 2.2RC 2a.
Only works on older oscommerce versions! Unless later someone can upgrade this coding:
Comment by stooni:
Line 214
from:--------------
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_SORT_ORDER':
$listing_sql .= " p.products_sort_order , pd.products_name " . ($sort_order == 'a' ? 'asc' : '');
break;
to-----------------
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_SORT_ORDER':
$listing_sql .= " order by p.products_sort_order , pd.products_name " . ($sort_order == 'a' ? 'asc' : '');
break;
