Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $categoryHelper = $this->helper('MagentoCatalogHelperCategory');
- $maincount++;
- foreach($categoryHelper->getStoreCategories() as $category):
- ?>
- <li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a></li>
- <?php endforeach; ?><li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a>
- <?php
- if($childrenCategories = $this->getChildCategories($category)):
- ?>
- <div class="sub-category-section">
- <div class="sub-category">
- <div class="sub-category-inner">
- <ul class="level1">
- <?php $subcount = 1;?>
- <?php foreach($childrenCategories as $categoryChild) :
- $subChild = $this->getChildCategories($categoryChild);
- ?>
- <li><a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?></a>
- <?php if($subChild = $this->getChildCategories($categoryChild)):?>
- <ul class="level2">
- <?php $subsubcount=1; ?>
- <?php foreach($subChild as $_categoryGrandchild) : ?>
- <li>
- <a href="<?php echo $categoryHelper->getCategoryUrl($_categoryGrandchild) ?>"><?php echo $_categoryGrandchild->getName() ?></a>
- </li>
- <?php
- $subsubcount++;
- if($subsubcount > 5){break;}
- ?>
- <?php endforeach; ?>
- <?php
- if($subChild->count() > 5){?>
- <li><a href="<?php echo $_categoryChildModel->getUrl()?>" class="view-more"> <?php $this->__('View All'); ?></a> </li>
- <?php } ?>
- </ul>
- <?php endif; ?>
- <?php if($subcount%2==0){echo "</li></ul></div><div class='sub-category-inner'><ul class='level1'>"; }?>
- <?php $subcount++; if($subcount > 3){break;}?>
- <?php endforeach;?>
- <?php endif; ?>
- </li>
- <?php $maincount++; endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement