Close

Toggle Box for Specification Filter

JonNopper1
11 years ago
#2109 Quote
Avatar
  • 10
Hi there I was wondering if you could help with a design feature of the specification filter.
I would like to change the toggle box to default to the closed position instead of showing the 'all' option plus dropdown items.

Currently

> Specification
-->All
(--> option1)
(--> option2 )

I would like the default appearance to be

> Specification
IvanStoyanov
11 years ago
#2110 Quote
Avatar
  • Moderator
  • 269
JonNopper1 wrote:
Hi there I was wondering if you could help with a design feature of the specification filter.
I would like to change the toggle box to default to the closed position instead of showing the 'all' option plus dropdown items.

Currently

> Specification
-->All
(--> option1)
(--> option2 )

I would like the default appearance to be

> Specification


Hi JonNopper1,

To achieve this you need to go to /Plugins/SevenSpikes.Nop.AjaxFilters/Views/SpecificationFilter7Spikes/ and open the SpecificationFilter.cshtml view.
Go to line 69 and change the following code:
<a class="toggleControl">@specificationFilterGroup.Name</a>


to

<a class="toggleControl closed">@specificationFilterGroup.Name</a>


After that go to line 85 and change the following code:
<div class="filtersGroupPanel filtersDropDownPanel" data-optionsGroupId="@specificationFilterGroup.Id" style="z-index: @currentZIndex;">


to

<div class="filtersGroupPanel filtersDropDownPanel" data-optionsGroupId="@specificationFilterGroup.Id" style="z-index: @currentZIndex;" style="display: none;">


If you want to do this for the attributes or manufacturers, you need to do the same in the ManufacturerFilter.cshtml and AttributeFilter.cshtml.

Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
JonNopper1
11 years ago
#2111 Quote
Avatar
  • 10
Thankyou for a quick and accurate answer, that worked perfectly.