Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Category and Subcategory functionality

Category and Subcategory functionality

Locked

Views: 1,303

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
17 Mar 2007, 4:10 AM
#1
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Category and Subcategory functionality

I want to know if it is possible to disable a super category if it has subcategories.

What I mean is this:
If a high category "Cat 1" has products then this is fine.
If the second high category "Cat 2" has subcatgegories then I want to ensure that "Cat 2" is not selectable via the categories.

I have the CSS flyout menus installed.

The problem is that category page when you can see others see: http://jeffdavidcasting.com/catalog/index.php?main_page=index&cPath=3

I want to be able to customize these pages if I can to either not be there, or to have much more information.

Is this enough information
Thank you in advance.

17 Mar 2007, 4:59 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Category and Subcategory functionality

If I understand your post correctly, I think you're asking how to make the menu only grow 2 levels deep, and ignore lower levels?

To do that, edit /includes/classes/categories_ul_generator.php
around line 24 you see:```
class zen_categories_ul_generator {
var $root_category_id = 0,
[B] $max_level = 5,[/B]

Change $max_level value to 2 instead of 5.
17 Mar 2007, 5:04 AM
#3
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Category and Subcategory functionality

No, no I am sorry.

Using that example use the navigation as follows:

I do not want "Wedding Bands" to be functional but its subcategories to be "Fixed center" and "removable Center" to be.

Does this make sense?

17 Mar 2007, 9:07 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Category and Subcategory functionality

You'd have to alter the same file mentioned earlier, but hunt through the code and tell it not to render a usable URL in the HREF for categories which have child records. Will require some PHP skills and a good understanding of parent-child logic as implemented in Zen Cart categories.

20 Mar 2007, 5:07 AM
#5
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Category and Subcategory functionality

Thank you. I wanted to know and if I pursue this I will let you know.