I really need some help here and I’m hoping one of the Magento team folks are paying attention to the forums.
I have a store setup with three levels of categories. On each level, I want the left hand navbar to only display the current category and its children - nothing else.
Here’s how my menu structure is set up:
Browse by Brand -
Browse by Category -
In my code for the left menu, I do the following:
$_curr_category = $this->getCurrentCategory();
<h2>Browse <?php echo($_curr_category->getName()); ?></h2>
<?php //$_categories=$this->getCurrentChildCategories() ?>
<?php //$_categories=$this->getChildCategories($_curr_category->getId()); ?>
<?php $_categories=$this->getCurrentChildCategories(); ?>
//Do a foreach and loop over the categories...
When I go to, say, “Default Category -> Browse by Brand -> Vans” $_curr_category->getName() is returning “Browse by Category” and $_cur_category->getCurrentChildCategories() is returning all of the items under “Browse by Category”. It *should* be returning “Vans” for $_curr_category->getName(); and should, at this point, be returning an empty array for the getCurrentChildCategories() call. So why is this not working? How do I fix this? Am I doing it wrong?