How to configure Magento / Magento 2 Filters with Layered Navigation?
If you want to better your shopping process, apply the filterable attributes for your store navigation. For this, you’ll need to set up the basic layered navigation in your Magento 1/Magento 2 store.
Being configured properly, Magento filter search results can faster the way users go from your Home page to the Checkout.
Below, we’ll describe how to configure the basic layered navigation and filterable attributes in Magento 1 and Magento 2.
Set up Magento 1 Layered Navigation with Filterable Attributes
So, let’s start.
Step 1: Configure Filterable Attributes and Anchor Categories
Set up Magento filterable attribute properties, as well as the anchor categories that are required for your layered navigation.
Choose to configure as many filterable attributes as you need and don’t forget to set the category as an anchor in the display settings.
To make it correctly, follow the link to the official devdocs.
Step 2: Set up the basic Layered Navigation in your Magento
- In the Admin Panel, navigate to System Configuration and choose Catalog on the left side of the Catalog panel;
- Expand the Layered Navigation menu:
and do the next settings:
(a) Set Display Product Count to Yes to show the number of products found for each of the filterable attributes.
(b) Choose Automatic (equalize price ranges) for Price Navigation Calculation.
Once the settings are done, click Save Config.
Then go to your store frontend to check if all the configurations have been implemented correctly and are displayed in the Magento filter search results. For this, switch to a category page and move the mouse cursor over the category in the top navigation menu. If set up well, you will see a selection of filterable attributes.
Magento filters not showing [how to fix it?]
If you saw no filterable attributes there’s a chance that attributes properties were set up incorrectly or the category display settings haven’t been changed to anchor.
So, go to Catalog>Attributes>Manage Attributes and open a needed attribute in the Edit mode. Check whether the Use In Layered Navigation setting (the Frontend Properties section) has been set to either Filterable (with results) or Filterable (no results). If it’s okay, check if the Use In Search Results Layered Navigation is set to Yes.
If the attributes properties and categories are set up right but filters won’t show on the frontend, check whether the layered navigation is enabled and set up properly (see the description above).
How to remove magento category filter from Layered Navigation?
To avoid duplicate category pages, you may need to remove a filter from Layered Navigation. To remove only one category filter, go to your themes catalog.xml file and find catalog_category_layered.
Add the next lines:
To the code here:
<label>Catalog Category (Anchor)</label>
<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml">
Once it’s done, flush your cache.
If you want to expand your basic navigation functionality, try out our Improved Layered Navigation for Magento 1. This module allows equipping your store with customizable filters, sliders, ‘from-to’ widgets. Advance your website position in SERP with the progressive SEO settings and optimize your Magento store for mobiles. (Shop by brand & AJAX navigation are included!):
Set up Magento 2 Layered Navigation with Filterable Attributes
If you migrated to Magento 2 or just started your business on the platform, below are the navigation settings for you.
Step 1: Devise the Attribute Properties
- Log in to the Admin Panel and navigate to Stores>Attributes>Product. On the Product Attributes grid, find a needed attribute and open it in the Edit mode;
- Set Storefront Properties to Filterable (with results) or Filterable (no results) to be further used in layered navigation:
- Set Use in Search Results Layered Navigation to Yes to enable the filterable attributes in search results.
Complete the same settings for other attributes you want to include in Magento 2 basic layered navigation.
Step 3: Enable the basic Layered Navigation in your Magento 2
- Logged in to the Admin Panel, go to Store>Configuration and choose Catalog in the Catalog menu;
- Expand the Layered Navigation menu and make the next settings:
(a) Set Display Product Count to Yes to show the number of products found for each filterable attribute.
(b) Set Price Navigation Step Calculation to Automatic (equalize price ranges).
- Tap Save Config.
To verify the settings were made correctly, go to your Magento 2 frontend and move the mouse over the category in the top navigation menu. Being configured correctly, you, as well as users, will see a selection of filterable attributes.
In case Magento 2 filters are not showing for some reason, check all the settings you made before. If you need to remove category filter from the basic layered navigation in Magento 2, see the settings above.
Seeking to expand the basic layered navigation functionality? Check our Magento 2 Improved Layered Navigation. Apply custom product, price, search filters and handy widgets. Adjust Magento 2 filter search results to your needs. Devise SEO-friendly brand pages with unique URLs for search result pages. Advance filtering search with AJAX and optimize your store for mobile devices: