Paradisebg Posted January 18, 2007 Share Posted January 18, 2007 I want in index.php and advanced_search_result.php products sort by Price not by name. I Replace this above line $listing_sql .= " order by pd.products_name"; With this line $listing_sql .= " order by final_price"; But this work only on firs page when I click on second page products sort by name. Link to comment Share on other sites More sharing options...
Paradisebg Posted January 19, 2007 Author Share Posted January 19, 2007 PLEASE HELP ME Link to comment Share on other sites More sharing options...
wheeloftime Posted January 19, 2007 Share Posted January 19, 2007 PLEASE HELP ME Did you change both occurences in index.php and advanced_search_result.php ? If not it doesn't work. Link to comment Share on other sites More sharing options...
jeffers Posted January 19, 2007 Share Posted January 19, 2007 I want in index.php and advanced_search_result.php products sort by Price not by name.I Replace this above line $listing_sql .= " order by pd.products_name"; With this line $listing_sql .= " order by final_price"; But this work only on firs page when I click on second page products sort by name. try changing the line above $listing_sql .= " order by pd.products_name"; from $HTTP_GET_VARS['sort'] = $i+1 . 'a'; to $HTTP_GET_VARS['sort'] = $i . 'a'; Link to comment Share on other sites More sharing options...
Paradisebg Posted January 20, 2007 Author Share Posted January 20, 2007 try changing the line above $listing_sql .= " order by pd.products_name"; from $HTTP_GET_VARS['sort'] = $i+1 . 'a'; to $HTTP_GET_VARS['sort'] = $i . 'a'; 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 . 'a'; $listing_sql .= " order by final_price"; break; not work only in first page products sort by price on second sort by name Link to comment Share on other sites More sharing options...
Paradisebg Posted January 26, 2007 Author Share Posted January 26, 2007 PLEASE HELP ME Link to comment Share on other sites More sharing options...
Paradisebg Posted January 29, 2007 Author Share Posted January 29, 2007 $HTTP_GET_VARS['sort'] = $i+3 . 'a'; $listing_sql .= " order by final_price"; Work Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.