BrotUser Posted March 7, 2006 Posted March 7, 2006 hi folks i've got a big prob over here: my product aren't sorted at all. they should be sorted by name/alphabetically but somehow it doesn't work. i just wanted to ask here before i install some contribution which might mess up everything way more than it is right now. here's a screenshot (click to enlarge) thx for help
Guest Posted March 7, 2006 Posted March 7, 2006 they're sorted by date first then by name if you want to sort them only by name just remove the p.products_date_added DESC, from catalog\products_new.php file
BrotUser Posted March 8, 2006 Author Posted March 8, 2006 works :) thx and how to do that in category view?
Guest Posted March 8, 2006 Posted March 8, 2006 the categories have a sort order you could assign, but if you definitely want to sort by name only its the catalog\index.php you will see this order by sort_order, cd.categories_name change it to this order by cd.categories_name
BrotUser Posted March 8, 2006 Author Posted March 8, 2006 i's sorry for beeing unprecise what i wanted is the items to order by name in catergory view ;) not the categories themselves :P (that's at least what it does in my case) do you have another idea? thx in advance!
BrotUser Posted March 8, 2006 Author Posted March 8, 2006 i think the problem must be somewhere around here 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; } } } else { ... when i open a category sort is set to 2a by default ... if i set it to 1a everything's fine how to set the default to 1a?
BrotUser Posted March 8, 2006 Author Posted March 8, 2006 i made a new screeshot with reactived headings to show u whats actually wrong as u see the products should be sorted by product name but they are not. if i set the sort var to 1a it works as it should
BrotUser Posted March 8, 2006 Author Posted March 8, 2006 ok i finally figured out whats the prob ;) i just had to add if (!isset($HTTP_GET_VARS['sort'])) { $HTTP_GET_VARS['sort'] = '2a'; } right in front of the code i posted allready big thx again you helped me alot
Recommended Posts
Archived
This topic is now archived and is closed to further replies.