Guest scotty1234 Posted July 15, 2005 Share Posted July 15, 2005 Is there a way to organzie the category list on the nav so that it isnt alphabetical? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 16, 2005 Share Posted July 16, 2005 Scotty, this is a pretty easy fix. If you remove the sort, the subcategory items will display in the order entered into the database. On line 52 of /includes/content/viewCat.inc.php, simply remove the following from the end of the line: ." ORDER BY cat_name ASC" So the line should just be this: $query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = ".$db->mySQLSafe($_GET['catId']); Keep in mind, this is a hack! It will most likely be overwritten in an update. brooky could easily incorporate a switch into the admin panel and make the sorting conditional. Perhaps a suggestion for future releases? Quote Link to comment Share on other sites More sharing options...
Guest scotty1234 Posted July 16, 2005 Share Posted July 16, 2005 Thanks. I will give that a try. Once I remove that line how do I put the categories in the order I wish to? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 16, 2005 Share Posted July 16, 2005 Well, with that hack, the order would come from the order the categories were entered into the database. The only way to reorder would be either to reorganize the database manually* (do at your own risk) or remove the categories and enter them in the order you want them. Of course the inherent problem in that is what happens when you want to insert another category later. Ideally, there would be an additional field in the catagory database which would designate display order. Then the View Category section in the Admin Panel would need to be rewritten to accommodate that order and facilitate changing it. The viewCat.inc.php would also require some modifications but it would be minimal. It would mainly just display based on perhaps three options, unsorted/raw, alpha sorted or designated order. That choice would be made in the General Settings of the CP. * -- Be mindful that if you manually reorder the database, {dbprefix}_CubeCart_category, that you keep all the fields with each category, especially the cat_id and cat_father_id. If you mess that up in a populated store, it will rearrange all your categories unnecessarily. Quote Link to comment Share on other sites More sharing options...
Guest scotty1234 Posted July 17, 2005 Share Posted July 17, 2005 HMMM. Sounds like it might be smarter to live with it until they make an option to do otherwise. Thanks so much for your help and advice. Scott Quote Link to comment Share on other sites More sharing options...
Guest Posted July 17, 2005 Share Posted July 17, 2005 Hmmm....upon thinking about it, I could just make a separate script to rearrange the categories in the database. This would work outside of CC3 and only require the one line change. It will be the easiest way to work without requiring major reworkings of existing CC3 files. This also makes it update proof for the most part, since only one line of one file will need to be edited. Give me your thoughts on it and I'll see what I can do. Quote Link to comment Share on other sites More sharing options...
Guest ainor Posted July 17, 2005 Share Posted July 17, 2005 I'm in need of this too please make this separate script to rearrange the categories I pelive it will help every one here too Quote Link to comment Share on other sites More sharing options...
Guest Posted August 21, 2005 Share Posted August 21, 2005 Well, I drug my feet enough on this one. It's finally done! Check out the thread here: http://www.cubecart.com/site/forums/index....showtopic=10152 Quote Link to comment Share on other sites More sharing options...
Guest rosdi Posted September 14, 2005 Share Posted September 14, 2005 Hi, I'm new here. I tried to follow above steps but the categories are still not in alphabetical order. Please take a look at: http://www.replica2u.com/store Please do help me. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 14, 2005 Share Posted September 14, 2005 rosdi, the mod I have on my site will allow you to specify the order of all your categories and sub-categories. You can easily move any category up or down in the list. The people who are using it rave about it. Simply go to the link in my sig and it's available there. Quote Link to comment Share on other sites More sharing options...
Guest rosdi Posted September 15, 2005 Share Posted September 15, 2005 No thanks. I shifted back to CC2. :) Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted September 15, 2005 Share Posted September 15, 2005 No thanks. I shifted back to CC2. I confirm that Sir William mod does work, if by any chance you do decide to go back to V3. :huh: Quote Link to comment Share on other sites More sharing options...
Guest rosdi Posted September 24, 2005 Share Posted September 24, 2005 No thanks. I shifted back to CC2. I confirm that Sir William mod does work, if by any chance you do decide to go back to V3. No thanks. Already shifted to CC2. Quote Link to comment Share on other sites More sharing options...
kinetic Posted September 26, 2005 Share Posted September 26, 2005 Sir Bills Cat Sort Mod works a treat! Gives a Site owner that much more CONTROL over their site which is as it should be. I cant wait for the 2nd version of his cat sort mod.... Yall give it up for Sir William! Kinetic 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.