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

At wit’s end on Left / Vertical category menu
 
quantumm
Jr. Member
 
Total Posts:  10
Joined:  2008-09-04
 

Hi guys,

I feel fairly well-versed with Magento, having been using it since April.

But I am unable to get a left/vertical category menu going.  I’ve searched the forum far and wide and have come across several threads with attempts that don’t seem to have properly worked out for everyone (myself included).  I’ve tried implementing each method several times without success (hours and hours have gone by on three different days).

I have too many main categories for the horizontal navigation to make sense.

All I’d like to do is put a vertical category menu as the first item on the left column of the homepage.  The menu should be able to show subcategories and sub-subcategories just as it does wth the horizontal top navigation in the default package.

When a user clicks on a category, sub category, or sub-subcategory the layered navigation menu should appear as the first item of the left column (as it is currently), with the original category menu being placed just below that.

Should be too hard but I just cannot get this going.  I’m using Magento 1.1.6 with the blue skin.

I’d appreciate anyone’s help on this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hotsauzz
Jr. Member
 
Total Posts:  3
Joined:  2008-10-23
 

I’d REALLY love to know how to do this too!!!  Just started designing my store but the horizontal menu is not suited well for my number of categories.

On the left menu, I’d like the categories to be expanded, where subcategories are automatically shown without the user clicking or hovering over the parent category.  Any help from the experts here?

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  236
Joined:  2008-01-10
London
 

quantumm

Have you seen this page on the forum?

http://www.magentocommerce.com/boards/viewthread/720/P60/

Peter Hamilton’s code will do all that you want and is very easy to install

hotsauzz

Likewise but you will have to make a few changes to show (up to two levels) of sub-categories such as

<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 $_category): ?>
            <?php $open 
$this->isCategoryActive($_category); ?>
            <?php $potential 
$_category->hasChildren(); ?>
            
<li><a href="<?php echo $this->getCategoryUrl($_category); ?>"><?php echo $_category->getName();?></a>
                
<?php if ($potential): ?>
                
<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 echo $subCat->getName(); ?></a>
                        
<?php if ($potential): ?>
                        
<ul>
                            
<?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 echo $subsubCat->getName(); ?></a></li>
                            
<?php endforeach; ?>
                        
</ul>
                        
<?php endif; ?>
                    
</li>
                    
<?php endforeach; ?>
                
</ul>
                
<?php endif; ?>
            
</li>
            
<?php endforeach ?>
        
</ul>
    </
div>
</
div>

Hope this helps

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