Is there a way to display all the filter options even if there are no such products?

Is there a way to display all the filter options even if there are no such products?

Sometimes it is necessary to show all possible filters inside the navigation bar even if there are no product matching results. Default Magento allows showing all filter options, and to apply this logic the following setting should be set to Filterable (no results) in Stores → Product Attribute → select the attribute → Edit → Storefront Properties → Use in Layered Navigation.



On the frontend, filters with no results will be displayed in the layered navigation, but customers won't be able to pick them: 



Vise versa, if you'd like to hide filters that don't have matching products, you need to set the Use in Layered Navigation setting to Filterable (with results).


      • Related Articles

      • How to make product image change after choosing a configurable option on the product listing page?

        Configurable products are assembled from simple products, which represent variations of the same item. Each simple product can have its own image that differs it from other options. For example, you can upload images of different color variations of ...
      • Why doesn't the price filter include VAT?

        The default behavior of Magento's layered navigation is to filter products excluding taxes. This is a result of the inherent limitations within the default Magento logic, and it is not influenced by our Improved Layered Navigation extension. Magento ...
      • How to disable filter by category?

        Like the default Magento, the Improved Layered Navigation module allows disabling filtering by category. To do that, navigate to Magento Admin Panel → Stores → Configuration → Amasty Extensions → Improved Layered Navigation → "Category" Filter. ...
      • How to make a filter be expanded by default?

        The module allows setting the filters to be expanded or collapsed on different devices when the page is loaded. There are three available options: auto - usually, this is a collapsed state for the filter. With this option applied, expand behavior ...
      • How to show configurable options in product listing?

        If product options are not displayed on category pages, customers have to select them from the product page to add the items to the cart. To display configurable swatches on category pages, navigate to Stores → Attributes → Product → choose the ...