juanmanuel Posted August 5, 2004 Posted August 5, 2004 Hi! I have a shop with alot of products (aprox 4000) but I need that when someone browse the products by category or manufacturer show the highest prices first. Plase let me know how to set up this. Thank you.
AJRYAN Posted August 5, 2004 Posted August 5, 2004 Look for something like this in your index.php file: case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; Change to : case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_price"; break;[/code] This should work for you unless I missed something. Art
AJRYAN Posted August 5, 2004 Posted August 5, 2004 Please disregard the previous post. I think this is more like what you are looking for: Find something like this in your index.php file: 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.products_model"; break; Change to: 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.products_price"; break;
juanmanuel Posted August 9, 2004 Author Posted August 9, 2004 HI1 Thank you for your help but I could find this code in the index.php
Recommended Posts
Archived
This topic is now archived and is closed to further replies.