Showing Parent's Sub-Categories in Magento

Discussion in 'PHP' started by Borduhh, Jun 17, 2013.

  1. #1
    Hey All,

    So when on the product listing page in Magento, I click on a category, then they all disappear. Therefore I am trying to have the categories still be listed so users can easily avigate around my site.

    The current code is:
    <?php if (!Mage::registry('current_category')) return ?>
    <?php $_categories = $this->getCurrentChildCategories() ?>
    <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
    PHP:
    However every time I try to get the current category's parent using getParentCategory();, the entire product grid disappears. Any ideas on what I can do?
     
    Borduhh, Jun 17, 2013 IP