Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Category Navigation not showing up. 
 
Zimmer
Jr. Member
 
Total Posts:  18
Joined:  2008-06-13
 

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($openecho ' class="subopen"'} ?><?php if($potentialecho ' class="potential"'} ?><?php if(!$potential&&$openecho ' class="final"'} ?> ><?php if($potential&&$openecho 'v 'elseif($potentialecho '> '}?><?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($openecho ' 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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Syndia
Member
 
Total Posts:  38
Joined:  2008-04-01
Netherlands, The
 

In version 1.1.6 they have changed the category backend, check the method in Mage_Catalog_Block_Navigation drawItem() with your code, maybe you find something there what is changed.

I checked fast but couldn’t find something wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zimmer
Jr. Member
 
Total Posts:  18
Joined:  2008-06-13
 

Yeah, I can’t find anything wrong. Help? :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

@Zimmer

How do you call the vertical menu on Homepage?

<reference name="left">
<
block type="catalog/navigation" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml"/>
</
reference>

It doesn´t work for me :-(

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top