<?php
$_categoryModel = new Mage_Catalog_Model_Category();
$_subCategoryList = $_categoryModel->load(3)->getChildrenCategories();
foreach ($_subCategoryList as $category)
{
$cat=$_categoryModel->load($category->getId());
?>
<li><div><img src="<?php echo Mage::getBaseUrl('media').'catalog/category/'.$cat->getImage()?>"/><a href="#"><?php echo $cat->getName()?></a></div></li>
<?php
print_r($category);
}
?>
This blog is all about magento , php javescript ,mysql codes. In this i am trying to post the posts which i really feel to have these codes always with me and i am trying to publish most challenging codes which we need to use in daily development. I personally sometime needs to spent most of times to get the idea about these codes on net,thats why i thought to put all these codes on one place and i am trying to keep this work going on and in simple way which can help the communty
Wednesday, 12 November 2014
Magento subcategory from a particular category
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment