evanelement Posted May 25, 2011 Share Posted May 25, 2011 Hello, i am having a hard time trying to correctly sort products in the catalog. It appears that the products are sorted by title. The titles of all my products have numbers at the beginning. How can i get them to be sorted from lowest number to highest on every page? Here is a link to my site wiyanewsletter.com/wiyanewsletterecom/catalog/ Thanks Link to comment Share on other sites More sharing options...
♥toyicebear Posted May 26, 2011 Share Posted May 26, 2011 You can edit index.php and includes/modules/new_products.php and change the sort in those 2 files. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
evanelement Posted May 26, 2011 Author Share Posted May 26, 2011 You can edit index.php and includes/modules/new_products.php and change the sort in those 2 files. Thanks, Do you happen to know which parts of those files to change? Link to comment Share on other sites More sharing options...
evanelement Posted May 26, 2011 Author Share Posted May 26, 2011 i see this in the index.php $listing_sql .= " order by pd.products_name"; can i change it to? case'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; what do i do with this code? Link to comment Share on other sites More sharing options...
evanelement Posted May 26, 2011 Author Share Posted May 26, 2011 Another site told me to do 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; //Replace this above line $listing_sql .= " order by pd.products_name"; //With this line $listing_sql .= " order by final_price"; I did that, but nothing changed. Why didn't it change? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.