Close

Not Show Specific Filters?

leen3o
10 years ago
#7529 Quote
Avatar
  • 9
On a category, I have one filter list that is really long (Made from the product attributes) and not appropriate for the user to see/filter on.

I just want to be able to not show that one filter but keep them rest. I'm sure this is a standard feature/common question but I cannot see where I would set this??
iliyan.tanev
10 years ago
#7535 Quote
Avatar
  • 347
Hi LEEN3O,

We don't support this but I would suggest using css to hide the filter. Every filter option has data-option-id attribute so you could use this to select the filter option you want to hide.

It would look like something like this:

a[data-option-id=14] {
      display: none;
}

Hope this helps!

Regards
Regards,
Iliyan Tanev
Nop-Templates Dev Team
leen3o
10 years ago
#7899 Quote
Avatar
  • 9
Thanks for replying. But this is not really ideal. We need the ability to hide an entire group? Or as the user adds more options we have to keep updating the the style sheet! Really not ideal. Especially if there are 100's of options...?

Problem is you add no kind of identifier around the "attributeFilterPanel7Spikes" container. So there is no way of hiding an individual panel/block? Any ideas? This is actually quite a big problem for a couple of stores we look after...
Boyko
10 years ago
#7901 Quote
Avatar
  • 1570
leen3o wrote:
Thanks for replying. But this is not really ideal. We need the ability to hide an entire group? Or as the user adds more options we have to keep updating the the style sheet! Really not ideal. Especially if there are 100's of options...?

Problem is you add no kind of identifier around the "attributeFilterPanel7Spikes" container. So there is no way of hiding an individual panel/block? Any ideas? This is actually quite a big problem for a couple of stores we look after...


Hi leen3o,

You can easily add a class to the container i.e you can use the attribute name.
Open this file:
Plugins\SevenSpikes.Nop.Plugins.AjaxFilters\Views\AttributeFilter7Spikes\AttributeFilter.cshtml

Find this line below:

<div class="block filter-block attributeFilterPanel7Spikes">


Replace it with this line:

<div class="block filter-block attributeFilterPanel7Spikes @attributeFilterGroup.Name">


This way each attribute filter panel will have the name of the attribute as a class. Then you can choose which attribute to hide.
Alternatively instead of hiding it you can set max-height and have a scrollbar as explained here.

Hope this helps!
Regards,
Nop-Templates.com Team