Patronbutiken Posted March 13, 2018 Share Posted March 13, 2018 Hello Im trying to add subcategories but with no luck, I started to create catergory #1 Toners, ans saved it. so far so god, but when i tried to add a new category "Brother" and try to set #1 toners as the parent category i dont show up in the dropdownlist, any ideas why? Thankfull for all help, im stucked Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 14, 2018 Share Posted March 14, 2018 Welcome Patronbutiken! Glad to see you made it to the forums. This is a strange one. In admin, Categories, there is a category with the name "#1 Toners" in the list? As an experiment, edit that category and change its name from #1 Toners to just Toner. Save. Then, try adding the Brother category and see if Toners shows in the drop-down. (I want to eliminate #1 as a possible troublemaker.) Well, I just tried having a category named #1 Toners and it all works for me. So, maybe we need to see if your hosting provider has some very aggressive database query caching installed on your server. Quote Link to comment Share on other sites More sharing options...
Patronbutiken Posted March 14, 2018 Author Share Posted March 14, 2018 Thanks, i just wrote #1 as "number one category" the main category is called Toner, and i saved it then try to create the cat, Brother and set Toner as parent cat. but it never shows up in dropdown, so there is som problems i think Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 14, 2018 Share Posted March 14, 2018 Do you have skills editing HTML code? If so, using a programmer's text editor, open the admin template categories.index.php: Near line 81, verify that these lines of code exist: <div><label for="parent">{$LANG.settings.category_parent}</label><span><select name="cat[cat_parent_id]" id="parent" class="textbox"> {foreach from=$SELECT_CATEGORIES item=category} <option value="{$category.id}"{$category.selected}>{$category.display}</option> {/foreach} Then, at the very bottom of the file, add: {debug} When you request the admin page Categories, the browser will want to popup a window. Let it. Then Add a new category. In the popup, in the left section, scroll to $SELECT_CATEGORIES. In the right section, is there any value shown? There should be an array. Quote Link to comment Share on other sites More sharing options...
Patronbutiken Posted March 14, 2018 Author Share Posted March 14, 2018 ok, thanks, i will try this later today, its 02.00 here in sweden now so its time to get some sleep, thanks for now, i get back to you with the result Regards Peter Quote Link to comment Share on other sites More sharing options...
Patronbutiken Posted March 14, 2018 Author Share Posted March 14, 2018 I have tried it now, but ther is no $SELECT_CATEGORIES the only thats i near that is: $category Origin: "file:templates/categories.index.php" Value Array (22) cat_id => "6" cat_name => "Toners" cat_desc => "<p>kassetter</p>\r\n" cat_parent_id => "0" cat_image => "0" per_ship => "0.00" item_ship => "0.00" item_int_ship => "0.00" per_int_ship => "0.00" hide => "0" seo_meta_title => "" seo_meta_description => "" seo_meta_keywords => "" priority => "1" status => "1" Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 14, 2018 Share Posted March 14, 2018 This screen grab is when viewing the main Categories list. Choose a category to edit. When viewing the Category Details screen (?_g=categories&node=index&action=edit&cat_id=1), look again for $SELECT_CATEGORIES. Quote Link to comment Share on other sites More sharing options...
Patronbutiken Posted March 14, 2018 Author Share Posted March 14, 2018 ok I ran in to more problems so i reinstalled the whole thing, and now it works, i can add subcategories så there must have been som fileerror i Think. But there is something strange still, the subcategories dont show up in the admin panel categories, only the topcat. But on the website i look ok Thanks anyway for your tips, like the debug command. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 14, 2018 Share Posted March 14, 2018 In CubeCart's main Categories list, if any category has children, the name of the category will be a link. Click on the category name and the link will get a new page showing that category's children. Quote Link to comment Share on other sites More sharing options...
Patronbutiken Posted March 14, 2018 Author Share Posted March 14, 2018 And now its working... strange but im quite happy with that :-) 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.