|
Yeah, as the title says. I have created a custom “category” navigation for every page. I made it for a Magento version before 1.1 and it worked perfectly.
Now that I have upgraded to 1.1.6, it doesn’t seem to show anymore. I honestly do not know what is wrong.
This is my vert_nav.phtml file. I am using a javascript accordion, but this is certainly not the problem as even if the JS wasn’t working - the categories should still be showing.
<h6><?php echo $this->__('Categories') ?></h6> <div id="Accordion1" class="Accordion"> <?php foreach ($this->getStoreCategories() as $_category): ?> <?php $open = $this->isCategoryActive($_category); ?> <?php $potential = $_category->hasChildren(); ?> <div class="AccordionPanel"><div class="AccordionPanelTab"><?php echo $_category->getName();?></div> <div class="AccordionPanelContent"> <ul> <?php foreach ($_category->getChildren() as $subcategory): ?> <?php $subCat = Mage::getModel('catalog/category')->load($subcategory); ?> <?php $open = $this->isCategoryActive($subCat); ?> <?php $potential = $subCat->hasChildren(); ?> <li><a href="<?php echo $this->getCategoryUrl($subCat); ?>"<?php if($open) { echo ' class="subopen"'; } ?><?php if($potential) { echo ' class="potential"'; } ?><?php if(!$potential&&$open) { echo ' class="final"'; } ?> ><?php if($potential&&$open) { echo 'v '; } elseif($potential) { echo '> '; }?><?php echo $subCat->getName(); ?></a></li> <?php foreach ($subcategory->getChildren() as $subsubcategory): ?> <?php $subsubCat = Mage::getModel('catalog/category')->load($subsubcategory); ?> <?php $open = $this->isCategoryActive($subsubCat) ?> <li><a href="<?php echo $this->getCategoryUrl($subsubCat); ?>" <?php if($open) { echo ' class="final"'; } ?>><?php echo $subsubCat->getName(); ?></a></li> <?php endforeach; ?> <?php endforeach; ?> </ul> </div> </div> <?php endforeach ?> </div> <script type="text/javascript"> <!-- var Accordion1 = new Spry.Widget.Accordion("Accordion1"); //--> </script> <div style="clear: both;"></div> <br />
And this is what I have on catalog.xml
<reference name="right.menu"> <block type="catalog/navigation" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml" /> </reference>
I am guessing some of the syntax has changed, but I don’t know how to fix it.
Thanks in advance.
|