Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Default ordering by "model" in product listings...


Micke

Recommended Posts

Hi All!

Found the solution myself to:

Hi All!

I would like to have all products listed ascending by model number by default in product listings.

Where do you change that?

// Micke

Find and replace:
if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by pd.products_name";

in index.php (and in advanced_search_result.php if you want to) to:

if ($column_list[$i] == 'PRODUCT_LIST_MODEL') {
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by p.products_model";

...or whatever property you want the default sort by..

// Micke

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...