<block type="catalog/navigation" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml" />
<div class="vertical-nav-container box base-mini">
<div id="vertical-nav">
<div class="head">
<h4><?php echo $this->__('Categories') ?></h4>
</div>
<ul id="nav_vert">
<?php foreach ($this->getStoreCategories() as $_categoryNode): ?>
<?php $open = $this->isCategoryActive($_categoryNode); ?>
<?php $hasChildren = $_categoryNode->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_categoryNode); ?>"<?php if($open) { echo ' class="open"'; } ?><?php if($hasChildren) { echo ' class="potential"'; } ?> >
<?php if($hasChildren&&$open) { echo '- '; } elseif($hasChildren) { echo '+ '; }else{ echo ' '; }?><?php echo $_categoryNode->getName();?>
</a>
<?php if ($open && $hasChildren): ?>
<ul>
<?php foreach ($_categoryNode->getChildren() as $sonCategoryNode): ?>
<?php $subCat = Mage::getModel('catalog/category')->load($sonCategoryNode); ?>
<?php $open = $this->isCategoryActive($subCat); ?>
<?php $hasChildren = $subCat->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($subCat); ?>"<?php if($open) { echo ' class="subopen"'; } ?><?php if($hasChildren) { echo ' class="potential"'; } ?><?php if(!$hasChildren&&$open) { echo ' class="final"'; } ?> >
<?php if($hasChildren&&$open) { echo '- '; } elseif($hasChildren) { echo '+ '; }?><?php echo $subCat->getName(); ?>
</a>
<?php if ($open && $hasChildren): ?>
<ul>
<?php foreach ($sonCategoryNode->getChildren() as $grandsonCategoryNode): ?>
<?php $subsubCat = Mage::getModel('catalog/category')->load($grandsonCategoryNode); ?>
<?php $open = $this->isCategoryActive($subsubCat) ?>
<?php $hasChildren = $grandsonCategoryNode->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($subsubCat); ?>" <?php if($open) { echo ' class="final"'; } ?>>
<?php if($hasChildren) { echo '+ '; }?><?php echo $subsubCat->getName(); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach ?>
</ul>
</div>
</div>
<div class="vertical-nav-container box base-mini">
<div id="vertical-nav">
<div class="head">
<h4><?php echo $this->__('Categories') ?></h4>
</div>
<ul id="nav_vert">
<?php foreach ($this->getStoreCategories() as $_categoryNode): ?>
<?php $open = $this->isCategoryActive($_categoryNode); ?>
<?php $hasChildren = $_categoryNode->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_categoryNode); ?>"<?php if($open) { echo ' class="open"'; } ?><?php if($hasChildren) { echo ' class="potential"'; } ?> >
<?php if($hasChildren&&$open) { echo '- '; } elseif($hasChildren) { echo '+ '; }else{ echo ' '; }?><?php echo $_categoryNode->getName();?>
</a>
<?php if ($open && $hasChildren): ?>
<ul>
<?php foreach ($_categoryNode->getChildren() as $sonCategoryNode): ?>
<?php $subCat = Mage::getModel('catalog/category')->load($sonCategoryNode); ?>
<?php $open = $this->isCategoryActive($subCat); ?>
<?php $hasChildren = $subCat->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($subCat); ?>"<?php if($open) { echo ' class="subopen"'; } ?><?php if($hasChildren) { echo ' class="potential"'; } ?><?php if(!$hasChildren&&$open) { echo ' class="final"'; } ?> >
<?php if($hasChildren&&$open) { echo '- '; } elseif($hasChildren) { echo '+ '; }?><?php echo $subCat->getName(); ?>
</a>
<?php if ($open && $hasChildren): ?>
<ul>
<?php foreach ($sonCategoryNode->getChildren() as $grandsonCategoryNode): ?>
<?php $subsubCat = Mage::getModel('catalog/category')->load($grandsonCategoryNode); ?>
<?php $open = $this->isCategoryActive($subsubCat) ?>
<?php $hasChildren = $grandsonCategoryNode->hasChildren(); ?>
<li>
<a href="<?php echo $this->getCategoryUrl($subsubCat); ?>" <?php if($open) { echo ' class="final"'; } ?>>
<?php if($hasChildren) { echo '+ '; }?><?php echo $subsubCat->getName(); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach ?>
</ul>
</div>
</div>