larsbachs Posted November 23, 2011 Share Posted November 23, 2011 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. Link to comment Share on other sites More sharing options...
diondp Posted December 2, 2011 Share Posted December 2, 2011 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} 1 Link to comment Share on other sites More sharing options...
diondp Posted December 2, 2011 Share Posted December 2, 2011 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 More sharing options...
larsbachs Posted December 4, 2011 Author Share Posted December 4, 2011 #diondp Det ser super ud. Der går lige et stykke tid før jeg kan teste dit forslag, men jeg skal forsøge at smide en kommentar om resultatet. Tak for at tage dig tid til at hjælpe:) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now