
How to Call Categorys Subcategory in Particular Category. Create CMS Block in Magento. Here call your brand.phtml file. Like Below Code.
{{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 src=”getThumbnail() ?>” width=”200″ height=”200″ alt=”htmlEscape($category->getName()) ?>” />
getName() ?>
- <a href=”getUrl() ?>”><img src=”getThumbnail() ?>” width=”200″ height=”200″ alt=”htmlEscape($category->getName()) ?>” />
After this you see your Categorys Subcategories name and image Display in your category.
About Author:
Kalpesh Chavada
Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.
