Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Category Sorting Problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-25-2003, 11:34 AM
 
bloomis bloomis is offline
 

Member
  
Join Date: Jan 2003
Posts: 19
 

Default Category Sorting Problem

I would think that if I set up 10 categories and assign them all the position of "1" then they would automatically sort alphabetically. It doesn't seem to work. Please tell me there is a way to fix this. I don't want to have to tell my client she will have to manually figure out how to sort alphabetically.

Thanks!
Reply With Quote
  #2  
Old 02-07-2003, 12:17 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

This is possible:

You will need to edit includes/categories.php and look for the line that is:
Code:
$categories_data = func_query("select $sql_tbl[categories].*, 0 as product_count from $sql_tbl[categories] ".($current_area=="C"?"where $sql_tbl[categories].avail='Y' $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "order_by" : "category"));
to be:
Code:
$categories_data = func_query("select $sql_tbl[categories].*, 0 as product_count from $sql_tbl[categories] ".($current_area=="C"?"where $sql_tbl[categories].avail='Y' $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "category" : "category"));

This will effectively disable the order by column and make it order by category name.
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 AM.

   

 
X-Cart forums © 2001-2020