free
web stats

Fill the form & Get Installation Support

We don't monkey around your business.

GET IN TOUCH WITH US NOW





captcha

Get layered navigation attributes list Magento 2

Get all the attributes which are used in layered navigation in category & search page.

You can get all the filterable attribute list from Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory class.

As a result, you will get that,

all those attributes which have been used in Layered Navigation status are Filterable (with results) or Filterable (no results).

So, you need to create __construct( ) function for define dependency of Class.

Now call a function in template file by iterating over a loop to fetch each attribute code,

You can get all the filterable attribute used for your store.

The Result