Guest guyroberts Posted June 19, 2006 Share Posted June 19, 2006 For some reason, one of my sub categories isn't in alphabetical order: http://www.aerialearth.com/whsmith/index.p...viewCat&catId=6 I can't understand it as all of my others are!!?? Anyone else had the same this - It's driving me mad!! Quote Link to comment Share on other sites More sharing options...
convict Posted June 19, 2006 Share Posted June 19, 2006 Do you use the cat sorting by name? Default CubeCart code doesnt show the categories by name in Shop by category box. You have to use SQL condition ORDER BY cat_name. includes/boxes/category.inc.php SEARCH FOR $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); REPLACE WITH $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 ORDER BY cat_name"); Quote Link to comment Share on other sites More sharing options...
Guest guyroberts Posted June 20, 2006 Share Posted June 20, 2006 That's brilliant! Thanks! Quote Link to comment Share on other sites More sharing options...
Guest guyroberts Posted June 20, 2006 Share Posted June 20, 2006 I've just tried that code but it doesn;t seem to have any effect. I've attaced the php file. Stumped again categories.inc.php Quote Link to comment Share on other sites More sharing options...
convict Posted June 20, 2006 Share Posted June 20, 2006 I've just tried that code but it doesn;t seem to have any effect. I've attaced the php file. Stumped again categories.inc.phpThe code is right, post the URL please (if you would like contact me via PM). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.