Guest Posted August 30, 2006 Share Posted August 30, 2006 In Shop by Category, lets say I have the following... Apples Oranges Bananas Peaches Peanuts Now, a year after I have those, I want to add Corn. I am under the impression that when I add Corn, it will be at the top of the Categories? I dont want that to happen, I may want it between Peaches and Peanuts, or etween Oranges and Bananas. Because, (if) thats how it works, it would seem to me that users of Cube would have some trepidation about adding Categories because they'd have to delete all pre-existing Catefories and re-add them in the order they want, along with all the pricing, colors, sizes, whatever. Is that how it works, please? Quote Link to comment Share on other sites More sharing options...
convict Posted August 30, 2006 Share Posted August 30, 2006 Would you like to have top categories always ordered by name? There is a simple hack: includes/boxes/categories.inc.php SEARCH FOR WHERE cat_father_id = 0 REPLACE WITH WHERE cat_father_id = 0 ORDER BY cat_name ASC Quote Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2006 Share Posted August 30, 2006 Would you like to have top categories always ordered by name? There is a simple hack: includes/boxes/categories.inc.php SEARCH FOR WHERE cat_father_id = 0 REPLACE WITH WHERE cat_father_id = 0 ORDER BY cat_name ASC Thx. Being the n00b that I obviously am, I'm not sure I understand,"Would you like to have top categories always ordered by name?" What I'd like, in the case of my original scenario is to be able to put Corn anywhere I desire, way after I've already put my products in the other Categories without having to redo all of them, each time I want to add a category and its products. Quote Link to comment Share on other sites More sharing options...
convict Posted August 30, 2006 Share Posted August 30, 2006 Would you like to have top categories always ordered by name? There is a simple hack: includes/boxes/categories.inc.php SEARCH FOR WHERE cat_father_id = 0 REPLACE WITH WHERE cat_father_id = 0 ORDER BY cat_name ASC Thx. Being the n00b that I obviously am, I'm not sure I understand,"Would you like to have top categories always ordered by name?" What I'd like, in the case of my original scenario is to be able to put Corn anywhere I desire, way after I've already put my products in the other Categories without having to redo all of them, each time I want to add a category and its products. This is NOT standard CubeCart feature. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2006 Share Posted August 31, 2006 You'd have to manually code your categories in /skins/yourskin/styleTemplates/boxes/categories.tpl. I do this on several of my stores so I can have multiple methods of shopping. Just replace the auto generating code with... <div class="boxTitleLeft">{LANG_CATEGORY_TITLE}</div> <div class="boxContentLeft"> <ul> <li class="bullet"><a href="index.php?act=viewCat&catId=1" class="txtDefault">Cat name 1</a></li> <li class="bullet"><a href="index.php?act=viewCat&catId=2" class="txtDefault">Cat name 2</a></li> </ul> </div> Cubecart assigns the catid depending on when you add it, but you can put them manually in any order you want. You do not need to re-enter everything though. The database will just pull all the "corn" items in whenever it is clicked. The link to the category has nothing to do with the category and it's data itself. Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted August 31, 2006 Share Posted August 31, 2006 Nice job Mysty */* Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2006 Share Posted August 31, 2006 Nice job Mysty heheh Thanks Hardest part is answering things so that more than me can understand the answers! lol Helps when it's something I have done and I admit, I've made a LOT of changes in my stores - just don't always remember HOW I did them! If I did, I'd actually publish some mods! Quote Link to comment Share on other sites More sharing options...
Guest ksshane Posted September 3, 2006 Share Posted September 3, 2006 Hey Convict. Just FYI that was the code I was looking for. Works perfectly... TY Quote Link to comment Share on other sites More sharing options...
convict Posted September 3, 2006 Share Posted September 3, 2006 Hey Convict. Just FYI that was the code I was looking for. Works perfectly... TYWelcome m8 ;) Quote Link to comment Share on other sites More sharing options...
Guest christianchoice Posted September 23, 2006 Share Posted September 23, 2006 You'd have to manually code your categories in /skins/yourskin/styleTemplates/boxes/categories.tpl. I do this on several of my stores so I can have multiple methods of shopping. Just replace the auto generating code with... <div class="boxTitleLeft">{LANG_CATEGORY_TITLE}</div> <div class="boxContentLeft"> <ul> <li class="bullet"><a href="index.php?act=viewCat&catId=1" class="txtDefault">Cat name 1</a></li> <li class="bullet"><a href="index.php?act=viewCat&catId=2" class="txtDefault">Cat name 2</a></li> </ul> </div> Cubecart assigns the catid depending on when you add it, but you can put them manually in any order you want. You do not need to re-enter everything though. The database will just pull all the "corn" items in whenever it is clicked. The link to the category has nothing to do with the category and it's data itself. may i see an example of one those stores? & What code do you replace in the categories.inc.php file? 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.