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

Page 1 of 3
Remove Category option from Layered Navigation options list
 
Jadalex
Jr. Member
 
Total Posts:  1
Joined:  2007-12-07
 

Hi everyone… I believe that my original post was not very clear or understandable to everyone that had read it so I have decided to edit my problem. I hope that this time it will be more understandable.
So I have spent weeks creating attributes for each of my categories and products for my store to be able to give to my customers as many help options as possible to show in the Layered Navigation. Each of my Product categories would show anywhere from 10-30 shopping options in the Layered Navigation window such as Manufacturer, Color, Price, Resolution, Screen Size etc. The top most option in the Layered Navigation is one listed as ‘CATEGORY’ which basically is showing the same identical listings options as my ‘Manufacturers’ attribute. I would like to know if there is anyway that this option can be removed. It is silly to have a ‘CATEGORY’ option and a ‘MANUFACTURER’ option as they both show the exact same list of options. It is also the top most option and cannot be moved to another position otherwise I would just throw to the bottom of the Layered Navigation list out of the way.
I am unable to find it in the Admin ‘Manage Attribute’s so I cannot remove it from there. If I go to Admin ‘Manage Categories’ and try to remove it from there it just removes the visibility of all products from the frontend from showing.
I have seen a few stores that have successfully removed this option from showing in their Layered Navigation so I guess it must be possible some how.

If anyone can help me I would really appreciate it. If anyone needs me to explain a little better then I would be happy to do so.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Armen
Member
 
Total Posts:  46
Joined:  2008-05-06
Los Angeles
 

I’m also interested in finding a way to remove the “shop by category” option in the layered nav box.

I’m forced to do this because:
1) We have too many categories to fit in the nav bar across the top.
2) I’m moving the categories to the left column using the VertNav extension.
3) We can’t move the layered nav to the right column because it breaks the sort by name functionality.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MassDigitalMedia
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2009-02-19
Leominster, MA
 

Has anyone resolved this? Price, Special Price, Cost, minimal price...all show the same thing. Also, I think $0.00 - $1000 is a pretty large spread. i’d like maybe 4 more smaller denominations under there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amjath
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-10-15
Cochin, Kerala, India
 

Hii

to disable the layered navigation(Shopping Options), go to Catalog -> Attributes -> Manage Attributes and select the attributes that appear in your layered navigation, and select “NO” from “Use In Layered Navigation” drop down.. the layered navigation automatically disappears when u do this to all the attributes that appear in layered navigation..

Regards
Amjath
Magento and Typo3 Developer
Excellone Technologies

 
Magento Community Magento Community
Magento Community
Magento Community
 
MassDigitalMedia
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2009-02-19
Leominster, MA
 

THANK YOU!

Exactly what I was looking for!

amjath - 06 March 2009 10:33 PM

Hii

to disable the layered navigation(Shopping Options), go to Catalog -> Attributes -> Manage Attributes and select the attributes that appear in your layered navigation, and select “NO” from “Use In Layered Navigation” drop down.. the layered navigation automatically disappears when u do this to all the attributes that appear in layered navigation..



Regards
Amjath
Magento and Typo3 Developer
Excellone Technologies

 
Magento Community Magento Community
Magento Community
Magento Community
 
MassDigitalMedia
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2009-02-19
Leominster, MA
 

I found them all but Minimal Price… Any clue how to remove that one?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zoooj
Member
 
Total Posts:  34
Joined:  2008-10-13
London, United Kingdom
 

Jadalex was looking for a way to remove Categories from the layered navigation. This doesn’t appear in Catalog > Attributes > Manage Attributes. I’m also looking for a way to get rid of this as I only need manufacturers displaying here. Anyone with any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zoooj
Member
 
Total Posts:  34
Joined:  2008-10-13
London, United Kingdom
 

Thanks, I was hoping it was something configurable that I’d missed. But this will do the trick. Next thing to try to work out is how to display all products in manufacturer sections ... wish me luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mat.Owens
Jr. Member
 
Total Posts:  3
Joined:  2008-10-22
 

This is what I did to remove the “Category” section from my layered navigation so I wouldnt have any repeat information with the attributes I wanted in the layered navigation.

go to app/design/frontend/default/default/template/catalog/layer and open up view.phtml for edit.

This is the code I have within the “dl” tags:

<dl id="narrow-by-list">
<?php $_filters $this->getFilters() ?>
<?php 
foreach ($_filters as $_filter): ?>
 <?php 
if($_filter->getItemsCount()): ?>
<?php 
if($_filter->getName() != "Category"){ ?>
<dt><?php echo $this->__($_filter->getName()) ?></dt>
<
dd>
<?php echo $_filter->getHtml() ?>
</dd>
<?php } endif; ?>
<?php 
endforeach; ?>
</dl>

All I did was add the if statement to allow everything in layered navigation except the group with the name of “Category.” I dont have Minimal Price in my nav but Im sure this would work for that too, just add it in the if statement.  My view.phtml file is attached.

File Attachments
view.phtml  (File Size: 3KB - Downloads: 1274)
 
Magento Community Magento Community
Magento Community
Magento Community
 
silverpenhouse
Member
 
Avatar
Total Posts:  72
Joined:  2008-02-16
Virginia
 

@Mat.Owens

Perfect Solution.

Thanks Much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
rtgr
Jr. Member
 
Total Posts:  12
Joined:  2008-11-19
 

Wouldn’t it be better to use

<?php if($_filter->getType() != "catalog/layer_filter_category"): ?>

because the name of the filter may change if you’re not on an english website?

 
Magento Community Magento Community
Magento Community
Magento Community
 
pidan
Jr. Member
 
Total Posts:  12
Joined:  2009-05-14
 

I did by overiding the getFilters Method in class Mage_Catalog_Block_Layer_View

Just comment out the catergory filter getter. I think this way it better than putting logic in your views.

public function getFilters()
    
{
        $filters 
= array();
        
//if ($categoryFilter = $this->_getCategoryFilter()) {
          //  $filters[] = $categoryFilter;
       // }

        
$filterableAttributes $this->_getFilterableAttributes();
        foreach (
$filterableAttributes as $attribute{
            $filters[] 
$this->getChild($attribute->getAttributeCode().'_filter');
        
}

        
return $filters;
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
andersbirkenstam
Jr. Member
 
Total Posts:  19
Joined:  2008-04-15
 

this is not working for me i have tried every soloution the last one disable my manufacturer i have added to shopping options and not categories :-(

any other ideas?

Warm regrads

 
Magento Community Magento Community
Magento Community
Magento Community
 
CQ Website Design
Sr. Member
 
Total Posts:  195
Joined:  2009-01-02
 

bump, none of the above seem to work on the latest version of Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Adjustware
Guru
 
Avatar
Total Posts:  654
Joined:  2009-05-11
 

Try this:
1) open app\code\core\Mage\Catalog\Block\Layer\View.php
2) find

$categryBlock $this->getLayout()->createBlock('catalog/layer_filter_category')
            ->
setLayer($this->getLayer())
            ->
init();

        
$this->setChild('layer_state'$stateBlock);
        
$this->setChild('category_filter'$categryBlock);

3) change with

$this->setChild('layer_state'$stateBlock);
 
Magento Community Magento Community
Magento Community
Magento Community
 
Nickyfashion
Sr. Member
 
Avatar
Total Posts:  116
Joined:  2009-08-19
Bangkok/Miami
 
Adjustware - 01 September 2009 11:02 AM

Try this:
1) open app\code\core\Mage\Catalog\Block\Layer\View.php
2) find

$categryBlock $this->getLayout()->createBlock('catalog/layer_filter_category')
            ->
setLayer($this->getLayer())
            ->
init();

        
$this->setChild('layer_state'$stateBlock);
        
$this->setChild('category_filter'$categryBlock);

3) change with
$this->setChild('layer_state'$stateBlock);

Thanks, that worked perfectly !

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3