I have created a custom sub category page, in which I'm calling all the sub-categories, now i want to show product of each sub-categories in the same page how can I do that.
This is what I do to get my sub-categories
1 - Create a custom block "sub-category-listing"
2 - Then I have created a subcategorylist.phtml page
<div class="category-products sub-cat">
<ul class="products-grid" style="margin-left:0px;margin-right:0px;">
<?php
$_categories=$this->getCurrentChildCategories();
if($_categories->count()):
$categorycount = 0;
foreach ($_categories as $_category):
if($_category->getIsActive()):
$cur_category=Mage::getModel('catalog/category')->load($_category-
>getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
$catName = $this->getCurrentCategory()->getName();
?>
<li class="item <?=$class?>">
<h2><a href="<?php echo $_category->getURL() ?>" title="<?php echo
$this->htmlEscape($_category->getName()) ?>"><?php echo $this-
>htmlEscape($_category->getName()) ?></a></h2>
</li>
<?php
endif;
if($categorycount == 100000){
$categorycount = 0;
echo "</ul>\n\n<ul class=\"products-grid\">";
}
else{
$categorycount++;
}
endforeach;
endif;
?>
</ul>
</div>