Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. <?php
  2. $categoryHelper = $this->helper('MagentoCatalogHelperCategory');
  3. $maincount++;
  4. foreach($categoryHelper->getStoreCategories() as $category):
  5. ?>
  6. <li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a></li>
  7. <?php endforeach; ?><li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a>
  8. <?php
  9. if($childrenCategories = $this->getChildCategories($category)):
  10. ?>
  11. <div class="sub-category-section">
  12. <div class="sub-category">
  13. <div class="sub-category-inner">
  14. <ul class="level1">
  15. <?php $subcount = 1;?>
  16. <?php foreach($childrenCategories as $categoryChild) :
  17. $subChild = $this->getChildCategories($categoryChild);
  18. ?>
  19. <li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a>
  20. <?php if($subChild = $this->getChildCategories($categoryChild)):?>
  21. <ul class="level2">
  22. <?php $subsubcount=1; ?>
  23. <?php foreach($subChild as $_categoryGrandchild) : ?>
  24. <li>
  25. <a href="<?php echo $categoryHelper->getCategoryUrl($_categoryGrandchild) ?>"><?php echo $_categoryGrandchild->getName() ?></a>
  26. </li>
  27. <?php
  28. $subsubcount++;
  29. if($subsubcount > 5){break;}
  30.  
  31. ?>
  32. <?php endforeach; ?>
  33.  
  34. <?php
  35. if($subChild->count() > 5){?>
  36. <li><a href="<?php echo $_categoryChildModel->getUrl()?>" class="view-more"> <?php $this->__('View All'); ?></a> </li>
  37. <?php } ?>
  38. </ul>
  39. <?php endif; ?>
  40. <?php if($subcount%2==0){echo "</li></ul></div><div class='sub-category-inner'><ul class='level1'>"; }?>
  41. <?php $subcount++; if($subcount > 3){break;}?>
  42. <?php endforeach;?>
  43. <?php endif; ?>
  44. </li>
  45. <?php $maincount++; endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement