Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change product order


darton520

Recommended Posts

Around about line 193 in catalog/index.php change:

 

 ? ? ?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;

 

to:

 

 ? ? ?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 p.products_model";
? ? ? ? ?break;

 

Matti

Link to comment
Share on other sites

The products_name is held in the products_description table (pd), while the products model is in the products(p) table in the database - the prefix is used in the SQL statement to refer to the table

 

Matti

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...