Forums / Setting Up Categories, Products, Attributes / Hide 3rd Level Sub Category Tiers and Below

Hide 3rd Level Sub Category Tiers and Below

Locked

Views: 1,159

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
14 Feb 2009, 7:19 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Hide 3rd Level Sub Category Tiers and Below

Hi,

I've did this before but can't remember how! It's really annoying as I've been trying to do it again for hours!

I have my categories set as always expanded. However, I don't want it to display the 3rd tier of sub categories.

How do I limit the level of sub categories to display?

15 Feb 2009, 9:40 AM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Hide 3rd Level Sub Category Tiers and Below

Found the solution:

Find this in /includes/templates/your_template/sideboxes/tpl_categories.php:

if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {

Replace with:

if (substr_count($box_categories_array[$i]['path'],'_') > 1 or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {