Question

We have built an application using advanced search (with Multi select for all attributes) on Product listing page. The problem is that we are having all the attribute Values shown on all the categories, irrespective of whether that is applicable to particular category or not.

Any way where we can pull only applicable attribute values to be shown in advanced search options? Something like in layered navigation?

An example hierarchy is shown below.

CATEGORIES         ATTRIBUTES       VALUES USED

Category 1  --->   Manufacturer
                       |
                        ----------->  Sony
                       |
                        ----------->  Samsung
Category 2  --->   Manufacturer
                       |
                        ----------->  BMW
                       |
                        ----------->  Toyota

Now in Category 1 listing page, in advanced search, under Manufacturer, I can see all options: - Sony, Samsung, BMW and Toyota, where BMW and Toyota are not applicable at all.

I wish to have only relevant options.

Was it helpful?

Solution

We have found a solution. We have pulled in the query used in by Layered Navigation default to fetch relevant results and got the required filtered options by calling the same from Advanced search module.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top