SHARE
TWEET

Untitled

a guest Feb 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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"}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top