clarocque Posted January 31, 2004 Share Posted January 31, 2004 I have been looking through threads (with no luck yet - I will go back) but I am looking for a wat to show the products in a specific order when they display. I thought I had it went I added a field to the products table and told the index.php page to sort by that nuber (default). And then I came to a page that used the split page and when I click on the NEXT button it defaults back to sorting by Name. This what i did on the index.php page 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 p.sort"; //PRODUCT LISTING// ? ?// changed to sort by number old: order: ?$listing_sql .= " order by pd.products_name"; ? ? ? ? ?break; ? ? ? ?} Anyone have any ideas? Or is there a simple contribution for this? osC Contributions I have published. Note: Some I only provided minor changes, updates or additions! Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 http://www.oscommerce.com/community/contri...ons,911/page,18 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.