Multi-Level Categories (category module)

  • Mtspinto
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago - 4 years 1 month ago #132735 by Mtspinto
Evening team. I have been able to create categories and sub categories with ease • multi•level.

But my module on the left doesn't show the 3rd level of sub•categories

so instead of

maincat (25)
•••• subcat A (5)
•••• subcat B (5)
•••• subcat C (10)
•••••••••• subcat C0 (3)
•••••••••• subcat C1 (2)
•••••••••• subcat C2 (2)
•••••••••• subcat C3 (3)
•••• subcat D (5)
maincat 2(8)
•••• subcat A (5).....

it displays as:

maincat 1(25)
•••• subcat A (5)
•••• subcat B (5)
•••• subcat C (10)
•••• subcat D (5)
maincat 2(8)
•••• subcat A (5).....

I looked at: mod_eshop_category/tmpl/default.php but cannot find where to add another "child category code" so I can see my third level. Please help me add it in

The css has already been changed in "custom.css" so I could see all the sub categories seeing that there isn't a lot
Code:
<?php if ($showChildren && $category•>childCategories) { ?> <ul> <?php foreach ($category•>childCategories as $childCategory) { if ($showNumberProducts) { $numberProducts = ' (' . EshopHelper::getNumCategoryProducts($childCategory•>id, true) . ')'; } else { $numberProducts = ''; } ?> <li> <?php $active = $childCategory•>id == $childCategoryId ? 'class="active"' : ''; ?> <a href="<?php echo JRoute::_(EshopRoute::getCategoryRoute($childCategory•>id)); ?>" <?php echo $active; ?>> • <?php echo $childCategory•>category_name . $numberProducts; ?></a> </li> <?php } ?> </ul> <?php } ?>
Last edit: 4 years 1 month ago by Mtspinto. Reason: lists formatted incorrectly

Please Log in or Create an account to join the conversation.

  • Mtspinto
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 4 weeks ago #132998 by Mtspinto
Replied by Mtspinto on topic Multi-Level Categories (category module)
Hi there.

Please help me add the code to show the 3rd level of sub-categories.

Please Log in or Create an account to join the conversation.

Moderators: Giang Dinh Truong