Hot answers tagged

1

You can try this code: <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $catId = 2; $subCategory = $objectManager->create('Magento\Catalog\Model\Category')->load($catId); $subCats = $subCategory->getChildrenCategories(); $_helper = $this->helper('Magento\Catalog\Helper\Output'); $hasSubcategories = count($subCats) &...


Only top voted, non community-wiki answers of a minimum length are eligible