peterbat Posted February 16, 2007 Posted February 16, 2007 Morning/Afternoon/Evening All, Anyone know where I can change the default product listing order of product_listing.php so that it orders by model and not product name as default? Cheers, Peter
Guest Posted February 16, 2007 Posted February 16, 2007 by changing your catalog\index.php from this: if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } to this if ($column_list[$i] == 'PRODUCT_LIST_MODEL') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_model"; break; }
Bushmaster Posted February 17, 2007 Posted February 17, 2007 by changing your catalog\index.php from this: if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } to this if ($column_list[$i] == 'PRODUCT_LIST_MODEL') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_model"; break; } Woot saved me searching on how to do it by price. Made the mistake of not catching that d in the from this code and left it in for the to this.
powerforward Posted March 14, 2007 Posted March 14, 2007 Please note before changing the code, set the "Display Product Model" to "0." When I tried replacing the code I got error mssages. So I set the Display Product Model to 0 then replaced the code and then set Display Product Model to 3 and all worked fine. Tony Woot saved me searching on how to do it by price. Made the mistake of not catching that d in the from this code and left it in for the to this.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.