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;
Hello,
Just want to point out that there is nothing wrong with the revised version by "Beer Monster" dated August 5 2005.
When you modify the files, you just have to be very careful, especially copy-paste. Use WinMerge to compare the coding will help tremendously to integrate the codings.
I originally had the same problem as the previous user (see below), but figured out I was the one screwed it up while copying incorrectly.
The BeerMoster's Total Revised Version works perfectly!! All credits go to the original creator Brian Sim, and special thanks to Beer Monster!!
** complete package attached again
Ignore the fix in previous file, while it solved the syntax error, it removed the sort. The actual problem is further along in the file change. See attached.
I discovered a punctuation error in one of the changes contained in the Totally Revised Version by Beer Monster some missing single quotation marks would not allow product listing on the 2nd page if you had more than the default 20 products. Correction is included in the attached file.
This is a complete package of "Sort Categories As Well", this zip fix a bug. After installing this it wasn't possible to save productsort any more. This package fix this.
!! Before you install this, install :
Totally Revised Version - Beer Monster 5.08.05
This contrib worked like a sharm, recommended if you want to sort your products and categories.
This addon gives you the same sorting functionality for your categories.
Will save you heaps of time if you like to sort your products and categories.
Brand new version of the custom product sort order contribution.
This version allows the sort order of products to be bulk updated rather than writing to the database for each product individually.
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). Simply click the sort-order button and the textbox(s) will be enabled. Enter the sort order value for each product and click save-sort.
The benefit of this contribution is that it allows you to sort your products all at once with one update to the database rather than one product at a time. I believe this makes it the easiest to use custom sort order for your shop.
For my installation, in categories.php, when clicking into the input box for sort order, the onclick event declared within the table row was making it rather difficult to actually change the sort order without jumping through hoops to do it. To fix this problem I had to make these three changes -
file admin/categories.php
FIND THIS(around line 847 for me):
echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . ''">' . "n";
REPLACE WITH THIS:
echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "n";
FIND THIS (around line 850 for me):
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . ''">' . "n";
REPLACE WITH THIS:
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "n";
FIND THIS (around line 857 for me):
<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td>
REPLACE WITH THIS:
<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . $products['products_name']; ?></a></td>
I make no claims that this is error free or won't have further implications, but it's working for me. Thanks for the great mod!
Bryan
A problem was found where the sorting only worked on the first results page but not on subsequent pages. This was fixed as follows:
Locate at about line 205 in catalog/index.php
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
and change to
case 'PRODUCT_LIST_NAME':
$listing_sql .= "p.products_sort_order, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
Files in the zip have been updated with this fix!
A problem was found where the sorting only worked on the first results page but not on subsequent pages. This was fixed as follows:
Locate at about line 205 in catalog/index.php
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
and change to
case 'PRODUCT_LIST_NAME':
$listing_sql .= "p.products_sort_order, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
Files in the zip have been updated with this fix!
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.