How to Call Category's Subcategory in Particular Category. Create CMS Block in Magento. Here call your brand.phtml file. Like Below Code.
php
<?php
{{block type="catalog/product" template="catalog/product/brand.phtml"}}
After this call this block in Category.
And Put Below Code in brand.phtml file.
getCurrentCategory();
$categories = $category->getCollection()
->addAttributeToSelect(array('name', 'thumbnail'))
->addAttributeToFilter('is_active', 1)
->addIdFilter($category->getChildren())
?>
<a href="getUrl() ?>"><img class="lazyload" decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-orig-src="getThumbnail() ?>" width="2
{{block type="catalog/product" template="catalog/product/brand.phtml"}}
After this call this block in Category.
And Put Below Code in brand.phtml file.
getCurrentCategory();
$categories = $category->getCollection()
->addAttributeToSelect(array('name', 'thumbnail'))
->addAttributeToFilter('is_active', 1)
->addIdFilter($category->getChildren())
?>
{{block type="catalog/product" template="catalog/product/brand.phtml"}}
After this call this block in Category.
And Put Below Code in brand.phtml file.
getCurrentCategory();
$categories = $category->getCollection()
->addAttributeToSelect(array('name', 'thumbnail'))
->addAttributeToFilter('is_active', 1)
->addIdFilter($category->getChildren())
?>
" height="2
{{block type="catalog/product" template="catalog/product/brand.phtml"}}
After this call this block in Category.
And Put Below Code in brand.phtml file.
getCurrentCategory();
$categories = $category->getCollection()
->addAttributeToSelect(array('name', 'thumbnail'))
->addAttributeToFilter('is_active', 1)
->addIdFilter($category->getChildren())
?>
{{block type="catalog/product" template="catalog/product/brand.phtml"}}
After this call this block in Category.
And Put Below Code in brand.phtml file.
getCurrentCategory();
$categories = $category->getCollection()
->addAttributeToSelect(array('name', 'thumbnail'))
->addAttributeToFilter('is_active', 1)
->addIdFilter($category->getChildren())
?>
" alt="htmlEscape($category->getName()) ?>" />
?>
getName() ?>
After this you see your Category's Subcategories name and image Display in your category.Share this playbook
