Friday, 6 July 2012

Remove Category option from Layered Navigation options list in magnto

 
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.
 
<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>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.