chowpay Posted May 4, 2006 Posted May 4, 2006 Hi , Currently the oScom sites I?ve been working on have automatically been sorting the product listing alphabetically. Is there a way to sort it by model number (lowest first highest last?).. which php file do I need to edit to make this change? Not sure how to do this? Thanks to for looking and if you can help even bigger thanks!
jasonabc Posted May 4, 2006 Posted May 4, 2006 try this: http://www.oscommerce.com/community/contributions,617 Version 1.1c added a model number into the product listing. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
chowpay Posted May 4, 2006 Author Posted May 4, 2006 try this: http://www.oscommerce.com/community/contributions,617 Version 1.1c added a model number into the product listing. Thanks, but it seems like the customer has to click to choose to sort.. I kind of want the shop to default display by model number rather than by alphabetical product name. I'll check this out though.. You wouldnt happen to know which php file intiates the product listing sort? or what I would need to change on that code to make it sort by model number? Thanks!
chowpay Posted May 5, 2006 Author Posted May 5, 2006 Thanks, but it seems like the customer has to click to choose to sort.. I kind of want the shop to default display by model number rather than by alphabetical product name. I'll check this out though.. You wouldnt happen to know which php file intiates the product listing sort? or what I would need to change on that code to make it sort by model number? Thanks! bumpidy bump bumb...
Guest Posted May 5, 2006 Posted May 5, 2006 you change the catalog\index.php from this if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[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 { to this: if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[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"; break; } } } else {
Recommended Posts
Archived
This topic is now archived and is closed to further replies.