Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


rootnl2k

Recommended Posts

Posted

Look for code (perhaps around line 158) in index.php that says something like

if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
 for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
 if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	 $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	 $listing_sql .= " order by pd.products_name";
	 break;
 }
 }
} else {

and change it to say something like

if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
 for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
 if ($column_list[$i] == 'PRODUCT_LIST_MODEL') {
	 $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	 $listing_sql .= " order by p.products_model, pd.products_name";
	 break;
 }
 }
} else {

Two lines changed. None added or removed. Note: I would guess that what you call part number is what osCommerce calls products_model, but it could be something else.

Always back up before making changes.

Archived

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

×
×
  • Create New...