Jump to content

Disable "Enabled filters:" in "Layered Navigation Block"


larsbachs

Recommended Posts

Hello there,

 

I have installed the Layered Navigation Block module and would like to disable the feature that shows the filter that the user has currently enabled. But unfortunately I can't seem to find where in the code to do the change.

 

I someone can help explain how I disable the Enabled Filters it will be greatly appreciated.

 

I have attached a picture where the area I want to disable is marked in red.

post-301127-0-40350700-1322086871_thumb.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Hej, for at fjerne aktive filtrer kan du fjerne / udkommentere nedenstående i blocklayered.tpl

 

{if isset($selected_filters) && $n_filters > 0}
   <div id="enabled_filters">
 <span class="layered_subtitle" style="float: none;">{l s='Enabled filters:' mod='blocklayered'}</span>
 <ul>
 {foreach from=$selected_filters key=filter_type item=filter_values}
  {foreach from=$filter_values item=filter_value name=f_values}
   {foreach from=$filters item=filter}
    {if $filter.type == $filter_type && isset($filter.values)}
	 {if isset($filter.slider) && $smarty.foreach.f_values.first}
	  <li>
	   - {$filter.name|escape:html:'UTF-8'}{l s=':'}
	   {$filter.values[0]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} -
	   {$filter.values[1]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'}
	  </li>
	 {else}
	  {foreach from=$filter.values key=id_value item=value}
	   {if $id_value == $filter_value}
	    <li>
		 <a href="#" rel="layered_{$filter.type_lite}_{$id_value}" title="{l s='Cancel' mod='blocklayered'}">x</a>
		 {$filter.name|escape:html:'UTF-8'}{l s=':'} {$value.name|escape:html:'UTF-8'}
	    </li>
	   {/if}
	  {/foreach}
	 {/if}
    {/if}
   {/foreach}
  {/foreach}
 {/foreach}
 </ul>
   </div>
   {/if}

  • Like 1
Link to comment
Share on other sites

som tillæg kan du evt. også fjerne condition (new / used) og på lager / ikke lager

 

dette sker ved at udkommentere følgende i blocklayered.php.:

 

bemærk dette er taget fra standard blocklayered modulet i PS 1.4.3

 

(udklippet fra min egen fil)

//remove condition /ny/brugt
  /*
  elseif ($filterBlock['type_lite'] == 'condition')
  {
$filterBlock['name'] = $this->l('Condition');
$filterBlock['values'] = array(
'new' => array('name' => $this->l('New'), 'nbr' => 0),
'used' => array('name' => $this->l('Used'), 'nbr' => 0),
'refurbished' => array('name' => $this->l('Refurbished'), 'nbr' => 0));
$productCond = $this->filterProducts($products, $selectedFilters, 'condition');
foreach ($filterBlock['values'] AS $conditionKey => &$condition)
{
 foreach ($productCond AS $product)
  if ($product['condition'] == $conditionKey)
   $condition['nbr']++;
 if (isset($selectedFilters['condition']) AND in_array($conditionKey, $selectedFilters['condition']))
  $condition['checked'] = true;
}
  }
  */

  //REMOVE PÅ LAGER / IKKE PÅ LAGER

  /*

  elseif ($filterBlock['type_lite'] == 'quantity')
  {
$filterBlock['name'] = $this->l('Availability');
$filterBlock['values'] = array(
'1' => array('name' => $this->l('In stock'), 'nbr' => 0),
'0' => array('name' => $this->l('Not available'), 'nbr' => 0));  
$productQuant = $this->filterProducts($products, $selectedFilters, 'quantity');

foreach ($filterBlock['values'] AS $quantKey => &$quantity)
{
 foreach ($productQuant AS $product)
  if ($product['quantity'] == $quantKey)
   $quantity['nbr']++;
 if (isset($selectedFilters['quantity']) AND in_array($quantKey, $selectedFilters['quantity']))
  $quantity['checked'] = true;
}
  }

  */

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...