Child pages
  • Layered Navigation - Magento 2

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section

General Settings

Start with configuring the global extension settings.

The extension configuration parameters can be found under Stores > Settings > Configuration > AHEADWORKS EXTENSIONS > Layered Navigation.

The provided settings define the extension's behavior and the additional filters:

  • Enable AJAX - defines how the extension handles the category page when the filter is applied:
    • If set to 'Yes', the extension will only reload the product block;
    • If set to 'No', the extension will reload the whole category page;
  • Display "New" Filter - defines if the 'New' filter should be available for customers;
  • Display "On Sale" Filter - defines if the 'On Sale' filter should be available for customers;
  • Display "In Stock" Filter - defines if the 'In Stock' filter should be available for customers;
  • Disable "Show X Items" pop-over - defines if the popover with item count matching the currently selected attributes should be displayed;
  • Use price slider - defines if the price attribute should be available in the form of a slider;
  • Use from-to price inputs - defines if customers can specify the exact price range in the price filter;
  • Default filter state - determines the default state of all filters (expanded or collapsed);
  • Filter values display limit - determines the number of filter values to be shown above the 'Show X more' link (if applied);
  • Hide filters with no available values - defines if filters that do not have values for the currently generated product list should be hidden in the navigation menu;
  • Hide attribute values if they are not available - shows or hides the attribute values within one filter void for the current product selection.

SEO Settings

The 'SEO' optimization settings are aimed at improving store presence in search engines and to avoid destructive SEO issues.

The available parameters are:

  • SEO-friendly URL - defines how the applied filters affect the end-page URL;
  • Disable search engine indexing on catalog search pages - defines if the search engine indexation should be disabled on catalog search pages;
  • Use 301 Redirect for old URLs - if the catalog pages with filters have been indexed and then moved, this setting will create the 301 redirect to the old-page URL. The old-page URL is based on the 'SEO-friendly URL' setting value;
  • Page Meta Title Template - defines what information should be added to the catalog page's Meta Title after the attributes are selected in Layered Navigation;
Info

Available variables include:

{{var category.name}}

{{for filter in urls.getAllFilters()}}

{{var filter.name}}

{{var filter.value}}

 

  • Page Meta Description Template - defines what information should be added to the catalog page's Meta Description after the attributes are selected in Layered Navigation;
Info

Available variables include:

{{var category.metatitle}}

{{for filter in urls.getAllFilters()}}

{{var filter.name}}

{{var filter.value}}

{{var category.metadescription}}

  • Rewrite meta robots tag - when enabled, the parameter adds the 'NOINDEX' and 'NOFOLLOW' meta tags to the category pages if:
    • it is the second or the following page (pagination);
    • products are filtered by position, name, or price;
    • selected several options of the same filter;
    • product listing is different from default values - when the product listing value becomes a part of the URL.
  • Add canonical URLs - defines if the canonical URL's are added to the catalog search pages.

 

Note

The 'Use 301 redirect for old URLs' setting works as follows: if the indexed catalog page URL with filters applied doesn't correspond to the current value of the SEO-friendly URL setting but corresponds to other values, the indexed category URL will be redirected to the URL of the new format.

Managing Filters

Now let's explore how filters can be configured separately. For this purpose, open the 'Manage Filters' grid.

The grid can be found in Catalog > Layered Navigation by Aheadworks > Manage Filters.

The 'Manage Filters' grid contains six columns, including filter names, codes, types, their general status, status in search, and position. In the grid, you can sort filters by the above attribute and perform mass actions with the selected filters. This way, you can change the filter status and status in search or synchronize the selected filters.

Filter Editing

Edit Filter Page

The 'Edit Filter' page contains the two sections: 'General Settings' and 'Categories'.

  • The 'Filter Title' option changes the name of a particular product attribute and the layered navigation filter, accordingly;
  • The 'Use in Layered Navigation and 'Use in Search Layered Navigation' parameters enable the filter for a particular navigation area;
  • Position - determines the filter's position in the navigation panel;
  • Default filter state - specifies the state of a particular filter by default;
  • The 'Sort by' option determines the sorting order of attribute values within the filter: manually or automatically in the alphabetical order ('A-Z' or 'Z-A');
  • Category list style - the option is available for the 'Category' filter only. It determines the navigation panel's appearance and behavior. If the 'Default (multiselect)' option is enabled, the 'Category' filter looks much like the other filters. It displays categories, subcategories, and checkboxes. Customers are able to select one or several of them. The 'Single path' option displays the whole category tree so that customers can directly proceed to the only destination within the catalog;
  • Select categories where to display the filter - the option makes a particular filter available: a) everywhere where applicable, b) only in the categories of the lowest level, c) exclude specific categories to be available for the filter.
Note

The filter becomes available only if at least one of the 'Use in Layered Navigation and 'Use in Search Layered Navigation' options is available.

 


 

Uninstalling Layered Navigation

Section
Column
width50%

Manual Removal

Panel
borderStylesolid
borderWidth2px

1. Disable the module by executing the following commands:

No Format
php bin/magento module:disable Aheadworks_Layerednav
php bin/magento setup:upgrade
Panel
borderStylesolid
borderWidth2px

2. Remove the extension files from the following folder:

No Format
app/code/Aheadworks/Layerednav
Column
width50%

Automatic Removal (via Composer)

Panel
borderStylesolid
borderWidth2px

1. Disable the module by executing the following commands:

No Format
php bin/magento module:uninstall Aheadworks_Layerednav

UI Button
titleProduct Page
colororange
urlhttps://ecommerce.aheadworks.com/magento-2-extensions/layered-navigation/

Need Customization?

Magento 2 Custom Development Services by Aheadworks

...