PDA

View Full Version : Change default listing order



suntech
10-18-2012, 01:30 PM
Hello,
I am looking for a way to change the default listing order so it will go by the Ref/Model field. There is a great looking mod for it here osCommerce Community Add-Ons (http://addons.oscommerce.com/info/8311) but its for os commerce and the code cant be found in OSC Max.
Any help would be great!

pgmarshall
10-18-2012, 10:33 PM
If you want to sort your products by model as the default simply change the SORT BY in catalog/index.php

Change Line 337 from: $listing_sql .= " order by " . $new_products_sort . "pd.products_name";

to: $listing_sql .= " order by " . $new_products_sort . "p.products_model";

Haven't tested but it should work just fine.

If you want to enforce this when the change sort order function is used then you will need to switch these in the case statement around line 347.

Regards.