Close

display none/block manufacturers filter box

inahmias
10 years ago
#3930 Quote
Avatar
  • 4
hello, we've just bought the Alfresco theme, and it comes with Nop ajax filters.
for our needs we should enable/disable (display none/block) the manufacturers filter box according to the state of one specific specification, let's say, if in this specific specification one or more options have been checked then we should display the manufacturers filter box, and if all the options went uncheckd again we should display:none , afcourse initially the manufacturers filter box shouldn't be displayed..

any ideas on how to implement this functionality?
thanks.
Boyko
10 years ago
#3934 Quote
Avatar
  • Moderator
  • 1570
inahmias wrote:
hello, we've just bought the Alfresco theme, and it comes with Nop ajax filters.
for our needs we should enable/disable (display none/block) the manufacturers filter box according to the state of one specific specification, let's say, if in this specific specification one or more options have been checked then we should display the manufacturers filter box, and if all the options went uncheckd again we should display:none , afcourse initially the manufacturers filter box shouldn't be displayed..

any ideas on how to implement this functionality?
thanks.


Hi,

There is no other way to do this without writing some custom javascript.
There is an event that you can hook to and add your custom javascript logic there.
Please refer to this post for sample code how to know when a filtration is complete and add your logic there.

Hope this helps!
Regards,
Nop-Templates.com Team
lnetdev5
10 years ago
#3973 Quote
Avatar
  • 5
I and on behalf INAHMIAS
would like to thank you very much BOYKO for that excellent tip,
it did the work.

now the manufacturers filter div disappear when all the specific specification options went unchecked as we wanted, but afcourse if the user already checked some of the options in the manufacturers filter div it will remain checked in the background and we'll still have filtered by manufacturer results.
when we disable (diplay: none) the manufacturer div we want to simulate a click on the "clearFilterOptions" <a> button, but trying to do so with click() on the <a> element or by cutting the "manFilters=" from the query string corrupted the whole ajax filters and we get stuck with endless loading animation.

Any tip for that issue and how to achieve our goal?
thanks.