Magento :: Categories and Subcategories

Please anyone can help me how to design category and subcategory listing as below

PS:: Magento default design is when you click a category it will list all products in that category straight. What I really want to do is , it should list all the subcategories first in the page like the above sample site and then list all relevent products of that subcategories

I will greatly appreciate if some one can help me.

2 thoughts on “Magento :: Categories and Subcategories”

  1. Sub Categories within Categories – This is sample, you should customize

    1.- Create a page called subcategory.phtml in the app/design/frontend/base/default/template/catalog/navigation folder and add following code piece :

    <?php $_categories = $this->getCurrentChildCategories(); ?>
    <?php foreach ($_categories as $_category): ?>
    <?php if($_category->getIsActive()): ?>
    <a href="<?php echo $_category->getURL() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>"><?php echo $this->htmlEscape($_category->getName()) ?></a>
    <?php endif; ?>
    <?php endforeach; ?>

    2.- Create a static block called “MySubcategory” and put the following code into content :

    {{block type="catalog/navigation"  template="catalog/navigation/subcategory.phtml"}} 

    3.- Now go to category which you would like to use to show sub categories and ensure that category not set as an “anchor“. In the display option tab, set it to show as “Static Block Only” and choose the block “MySubcategory

Leave a Reply

Your email address will not be published. Required fields are marked *