Zen Cart Logo
Forums / Basic Configuration / Category box list only top and 2nd level

Category box list only top and 2nd level

Locked

Views: 1,353

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
7 Dec 2007, 6:53 AM
#1
theng6987 avatar

theng6987

New Zenner

Join Date:
Sep 2007
Posts:
3
Plugin Contributions:
0

Category box list only top and 2nd level

Hi!

is there a way to restrict the Category Box to show only Top and 2nd level category?

which file should i modify?

thanks in advance.

7 Dec 2007, 7:25 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category box list only top and 2nd level

Do you want it to always show all top & first subcats? Or regular function except never show deeper than the current first subcat?

If the former, I would suggest to start with the Expanded Category List mod in Downloads, which will show all subcats all the time.

Then, in either case, you can modify /includes/templates/your_template/sideboxes/tpl_categories.php to filter out any lower level subcats.

The grouping categories, using subcategories or filter on attributes thread has discussion and thread links related to this, though your question is somewhat different. It will take a bit of experimentation to get it right, but I think the code to do this will be fairly simple.