Zen Follower
- Join Date:
- Aug 2006
- Posts:
- 104
- Plugin Contributions:
- 0
Is it possible to have 2 Category boxes?
Is it possible to have 2 Category sideboxes? One on the right side and one on the left? If so, how could I accomplish this?
Thanks
Views: 18,542
Zen Follower
Is it possible to have 2 Category sideboxes? One on the right side and one on the left? If so, how could I accomplish this?
Thanks
Obaa-san
With the same or different categories?
Zen Follower
different categories
New Zenner
2 Categories sideboxes with different categories is exactly what I need as well. Have searched and found several threads but no solutions. Any pointers anyone?
Oba-san
You could use a little tricky feature of coding here ...
If you are not using Document General Product Type ...
Make a Category and set the Category Restrictions to:
Document General
Product General
What this does is by having the Category marked as Restricted to Document General, that is a trigger to put that Category in the Document Sidebox ...
Marking it as Restricted to Product General allows normal Products to be added ...
Providing you set all of the Categories to both:
Document General
Product General
They will show in the Document Sidebox vs the Categories Sidebox ...
Now, you can use this Category Restriction to divide your Categories between 2 sideboxes ...
Note: Be careful that you set all Categories for the Document Sidebox to both Product Types or you will not see the Category/SubCategory in the Document Sidebox if it is missing the Restriction ...
NOTE: if you did not notice, the Restrictions for a Category appear when you Edit the Category ...
New Zenner
Ajeh:
Make a Category and set the Category Restrictions to:
Document General
Product General :thumbsup: That's a worker. Many thanks Linda. I have been experimenting with duplicating the category_tree class with different selects based on sort_order. It seems to work, but it's a dirty hack which can't be right :smile: I don't think we'll be using Documents and we only need 2 boxes, so this feels like a better way to go.
While we're on the subject - you couldn't point me in the direction of the hack for opening up the first layer of subcategories in the tree on load without having to click the category? Again, I found a few threads in the archives but with the forum crash earlier this year a lot of routes to the past seem to have been fractured.
Oba-san
In the Layout Settings ... there is a setting for:
Categories - Always Show on Main Page
Always Show Categories on Main Page
0= off
1= on
Default category can be set to Top Level or a Specific Top Level
This is used with the setting just below it for:
Main Page - Opens with Category
0= Top Level Categories
Or enter the Category ID#
Note: Sub Categories can also be used Example: 3_10
New Zenner
Profuse apologies Linda. A classic case of me failing to weed-out possible ambiguities before posting. I can't find a dunce's cap in the smilies so this will have to do :Flush:
Instead of > imac:
the hack for opening-up the first layer of subcategories in the tree on load without having to click the category what I meant to say was > the hack for opening up the first layer of subcategories as a tree or list in the sidebox on load without having to click the categoriesI know it's a question that strictly-speaking is off-topic on this thread, so it was a bit naughty of me to try to squeeze it in in the first place :smile:
More on-topic, re. adding Document-General and Product General types, I'm still a bit confused about the difference between the'Add include SubCategories' and 'Add without SubCategories' buttons. Am I right in assuming that "Add include..." will also force all subCategories, currently existing or subsequently created, below the current one to the chosen product type; but "Add without ..." won't. Or have I got the wrong end of the stick on that one too? :unsure:
Oba-san
That alters the currently existing sub categories to match the top level category ...
So once set, subsequent subcategories would be restricted as the restrictions of the parent prevent the child or subcategory from reaching beyond the parent restriction ...
However, the Parent Category holds a restriction but the new child or subcategory does not hold a restriction unless you set it ...
New Zenner
Ajeh:
However, the Parent Category holds a restriction but the new child or subcategory does not hold a restriction unless you set it ...
OK. I think I'm just starting to get it. I've been experimenting with this for a few days now. Sometimes it works and sometimes it doesn't, and I haven't so far been able to figure out why.
So, supposing I have 2 top level categories, Cat_1 and Cat_2. And below those sub-categories Cat_1.1, Cat_1.2 etc. And below those sub-sub-categories Cat _1.1.1, Cat_1.1.2 etc.
If I want to use your trick to move Cat_1.1 and all categories under it from the Categories box to the Documents box, then I edit Cat_1.1 to add Products-General and Documents_General, then I click 'Add include SubCategories' ... then the result should be that Cat_1.1 and all existing sub-sub-categories Cat_1.1.1, Cat_1.1.2 etc. will be moved to the Documents box, but the top level Cat_1 will stay in Categories. True?
If however I click 'Add without SubCategories' instead, then only the category I'm editing, Cat_1.1, will be moved. Cat_1.1.1, Cat_1.1.2 etc. are restricted by parent Cat_1.1 to Documents so won't show in Categories, but if I haven't either clicked 'Add include SubCategories' from Cat_1.1, or set Cat_1.1.1, Cat_1.1.2 etc. to Documents-General, then they themselves don't hold the document restiriction and therefore can't show in Documents either. True?
If I now add a new sub-sub category 1.1.x, it doesn't matter whether I've clicked 'Add include SubCategories' or 'Add without SubCategories', it won't show in Categories because it's restricted to Documents by Cat_1, and it won't show in documents until I edit it and add the Documents-General restriction. True?
If all the above are true, then it might jsut explain where all my Categories are dissappearing to. :blink:
Oba-san
You can always check the restrictions on a Category by hitting Edit ...
Providing 1 of the restrictions is Document General, the Category will be in the Document General sidebox ...
Providing you also add to the Restrictions Product General, you can then add normal products but utilize the Document General sidebox to split the Categories into 2 sideboxes ...
New Zenner
Ajeh:
You can always check the restrictions on a Category by hitting Edit ... Yep. Did that. I had some categories with Documents-General restriction that weren't showing in the Docs box, so I tried all permutations I could think of to see if I could find a common factor. At first it seemed to have something to do with the order I entered Products-General and Documents-General, then I got a couple of anomalies that threw me right off the trail, then I started adding the 'Add including..' and 'Add without...' buttons to the mix, then I got completely confused and finally decided to give up, get some sleep and post a question on the forum in the morning in the hope that some kind soul might help me out :smile:
Ajeh:
Providing 1 of the restrictions is Document General, the Category will be in the Document General sidebox ...Not always for me it would seem. But I never found out why. I've been trying to hack my way through an awful lot of different stuff lately so am bound to be making mistakes. It seems to be working now, so no worries. Many thanks for your help once again Linda. I owe you several. Speak again soon I hope. :thumbsup:
Zen Follower
ok after days of trying to get multiple sideboxes with different products on my site i can across this post. and it would work perfectly for me.
the problem is i need 4 sideboxes this one only works for 2 is there any way to get more then 2 from it can i clone this somehow?
it may not be possible but i figured i would give it a shot.
thanks
Zen Follower
Ajeh:
Providing you set all of the Categories to both:
Document General
Product GeneralThey will show in the Document Sidebox vs the Categories Sidebox ...
I have done this on https://www.balloons.co.uk/shop however they still appear in categories side box.
I am trying to replicate the category lists i have at https://www.balloons.co.uk on the front page.
Anyone see where i went wrong....
Party Games is set to
This Category has been restricted to these Product Types
Product - General
Document - General
Marc
New Zenner
I am wondering if it is possible to have more than 2 categories sideboxes. I would like about 5 (or more).
Can the categories box be duplicated, and possibly named something else, such as categories1, categories2, and so forth?
Obaa-san
Yes, use a different product type for each one.
Zen Follower
Ok, I found this and it I thought it worked for me. However, it did create a new category box, and I am changing some of my existing categories to:
Restrict to Product Type ->Product - General
AND
Restrict to Product Type ->Document - General
But instead of just moving the category, it is copying it to the new box, AND remaining in the old box.
Help?
Totally Zenned
Do you put each "category box" under 1 parent category? If so you can use Simple Category module.
Zen Follower
It doesn't seem to work if you try to edit a category that has existing product. Is that correct? if so, is there a workaround?
Zen Follower
I did a test and created a new category for scratch, and set it to documents general and products general. It is currenlty appearing in both side boxes. Am I missing something? Will they always appear in both boxes? if so, this doesn't help me.
Ajeh, can you help?
Thanks.
Tell staff why this post should be reviewed.