1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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:
    1. <?php if (!Mage::registry('current_category')) return ?>
    2. <?php $_categories = $this->getCurrentChildCategories() ?>
    3. <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
    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