Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Is it possible to have 2 Category boxes?

Is it possible to have 2 Category boxes?

Locked

Views: 18,542

Results 1 to 20 of 66
This thread is locked. New replies are disabled.
25 Aug 2006, 7:13 PM
#1
chrisj avatar

chrisj

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

25 Aug 2006, 10:52 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,603
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

With the same or different categories?

26 Aug 2006, 2:50 AM
#3
chrisj avatar

chrisj

Zen Follower

Join Date:
Aug 2006
Posts:
104
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

different categories

27 Aug 2006, 7:08 AM
#4
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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?

27 Aug 2006, 6:22 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Is it possible to have 2 Category boxes?

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 ...

28 Aug 2006, 9:55 AM
#6
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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.

30 Aug 2006, 5:37 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Is it possible to have 2 Category boxes?

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

31 Aug 2006, 6:17 AM
#8
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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:

31 Aug 2006, 2:40 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Is it possible to have 2 Category boxes?

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 ...

31 Aug 2006, 5:20 PM
#10
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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:

31 Aug 2006, 5:48 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Is it possible to have 2 Category boxes?

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 ...

31 Aug 2006, 6:22 PM
#12
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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:

7 Apr 2007, 9:02 PM
#13
enchantedlingerie avatar

enchantedlingerie

Zen Follower

Join Date:
Nov 2005
Posts:
101
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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

11 Dec 2007, 6:40 PM
#14
marcps avatar

marcps

Zen Follower

Join Date:
Feb 2005
Posts:
92
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

Ajeh:

Providing you set all of the Categories to both:
Document General
Product General

They 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

24 Jan 2008, 11:43 PM
#15
jfuller avatar

jfuller

New Zenner

Join Date:
Aug 2005
Location:
Miramar, FL
Posts:
33
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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?

25 Jan 2008, 12:44 AM
#16
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,603
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

Yes, use a different product type for each one.

4 Mar 2008, 7:35 PM
#17
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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?

4 Mar 2008, 8:14 PM
#18
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

Do you put each "category box" under 1 parent category? If so you can use Simple Category module.

4 Mar 2008, 8:15 PM
#19
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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?

4 Mar 2008, 9:01 PM
#20
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

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.