Skip to main content

Remove Category option from Layered Navigation options list in magnto

This is about how to remove the category from the layered navgation

Please open 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>

Comments

Popular posts from this blog

Fixing a Compiler Error in Magento

Fortunately the compiler is quite easy to manually disable. This will resolve the compiler issue and allow you to access your Magento Admin so that you can re-compile before enabling the compiler again. Access your Magento website using FTP and open the file /includes/config.php . You should see the following code: ------------------------------------------------------------------------------------------------------- define ( 'COMPILER_INCLUDE_PATH' , dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . 'src' ) ; define ( 'COMPILER_COLLECT_PATH' , dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . 'stat' ) ; ------------------------------------------------------------------------------ This code tells Magento where to look for the compiled files. To disable the compiler, simply comment out these lines (add a '#' character to the start of each line). The result should look like the following: ------------------------------------------------...

Magento - Ajax add to cart and quantity box in list.phtml

 To add quantity box with increment + and - and also using ajax add to cart, you should first take the quantity increment box with CSS styling and also need to include a dynamic form (multiple forms per product) as shown in the below code : <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">   <?php $i=0; foreach ($_productCollection as $_product): ?>   <?php if ($i++%$_columnCount==0): ?>   <?php endif ?>   <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">     <form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId()?>"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>       <script type="text/javascript">   ...