Web Analytics

Fill the form & Get Installation Support

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

 

Fill the below form if you have any Magento programming need.





    Recent Articles

    Author Info

    Author Image

    Magento Certified Developer

    Hire J. Lakum

    Get a Free Quote





      /* second popup */

      Connect With Us