Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <div>
  2. <h3>
  3. <a href="">
  4. <?php
  5. $categoryId = 65;
  6. $_objectManager = MagentoFrameworkAppObjectManager::getInstance();
  7. $category = $_objectManager->create('MagentoCatalogModelCategory')
  8. ->load($categoryId);
  9. $childrenCategories = $category->getChildrenCategories();
  10. echo $category->getName();
  11. ?>
  12. </a>
  13. </h3>
  14. <ul>
  15. <?php foreach($childrenCategories as $childrenCategory) {
  16. echo "<li>" . "<a href=" . $childrenCategory->getUrl() . ">" . $childrenCategory->getName() . "</a>" . "</li>";}
  17. ?>
  18. </ul>
  19.  
  20. {{block class="VendorModuleBlockBlockName" category_id="49" template="Vendor_Module::storecategories.phtml"}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement