Hi,
I'm coming late to this discussion, but there's a pretty simple way to my mind... something similar to what I've done with a site that had special needs re displaying the categories. Simply modify a function/query in the \includes\classes\category_tree.php to select based on the top level category.
Here's an overview....
1. Set up an Adult Category that contains all the categories of adult clothing; set up one for Teens and one for Children.
2. Write down the Category ID # for each of them.
3. In \includes\classes\category_tree.php you need to duplicate the entire "function zen_category_tree" section, renaming the function... for instance, "function zen_adult_tree".
4. Find this section and add the text in red, replacing the # with your number from Step 2 above:
Code:
if ($product_type == 'all') { // added c.categories_id specific here bpeters
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.parent_id = 0
and c.categories_id = #
and c.categories_id = cd.categories_id
and cd.language_id='" . (int)$_SESSION['languages_id'] . "'
and c.categories_status= 1
order by sort_order, cd.categories_name";
} else
5. Duplicate the Categories Sidebox, title it Adult or whatever... change the function call to call the newly defined "tree" in \includes\modules\sideboxes\[your template]\categories.php as shown in red text:
Code:
// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
if ($check_categories->RecordCount() > 0) {
$box_categories_array = $main_category_tree->zen_adult_tree();
}
Of course changing adult to whatever you need for each box.
6. I don't know if you'll need to change anything if you're using the Site Map contrib or not, so you might want to check if that applies to your site.
7. Be aware that the categories may not be expanded in the sidebox to display the subcategories all the time, and the boxes would have one link to "Adult Clothing" and not show anything else until you click on the category link itself. I can't remember what the upshot of this was, because I made additional changes beyond this for that site to meet their specific needs. But that sticks in my mind for some reason.
** Be advised that the mod to the class file will be overwritten during an upgrade, so be sure to save a copy of that file elsewhere -- there is no override in that section. And modifying core code is not always best, but this works and is easy. "-)
I got this from digging around in the forum, found an old post by Ajeh I think that mentioned this method of doing something similar. Anyway, just an idea in case you don't get the other thing working.
Just my two cents!
Cheers,
Becky