Help Center
How to Filter Products Based on Variations

How to Filter Products Based on Variations

This tutorial explains how to filter WooCommerce variable products with the help of the JetSmartFilters plugin for WordPress.

Before you start, check the tutorial requirements:

  • Elementor (Free version)

  • WooCommerce plugin installed and activated with variable products

    If you haven’t done it yet, check out this tutorial

  • JetSmartFilters plugin installed and activated

Things to know

For this case, we use the Zolden dynamic template.

Adjust the JetSmartFilters Settings

Go to WordPress Dashboard > Crocoblock > JetPlugins Settings > JetSmartFilters > Compatibility and unroll the WooCommerce tab.

To filter by variations, enable the Hide Out-of-Stock Variations in Filter Results toggle.

hide out-of-stock variations in filter results

Also, you can check the General Settings tab to adjust the filter providers. Activate only the required toggles to improve the website’s speed.

adjusting jetsmartfilters providers

Create a Filter

Head to WordPress Dashboard > Smart Filters > Add New tab. 

Enter the Filter Name and select the Filter Type (for this case, “Select,” “Radio,” “Visual,” and “Checkboxes list filters are available).

Set the “TaxonomiesData Source and select the attribute name of the needed variation as the Taxonomy (“Product color” in our case).

filter creation for product variations

Adjust other filter settings if needed and hit the “Update” button.

Place the Filter on a Page

Open a page or template where you want to place a filter in the Elementor editor.

In our case, we add two columns to the editing page.

In the first column, we drag-n-drop the filter widget that corresponds to the filter type (Checkboxes Filter in this case).

Select the recently created filter and set the provider in the This filter for dropdown menu (“JetWooBuilder Products List” as an example).

Other settings can be customized as required.

checkboxes filter settings in elementor

You can also open the Indexer Options tab to enable the products counter for each variation. Be aware that the indexer works only on the front end.

jetsmartfilters indexer options for variable products

In the second column, place a widget with the filtered products (Products List as an example).

Customize it and click the “Publish” button.

products list widget with filter

Check the Results

Open the page on the front end and check how the filter works. For example, we tick the “Blue” and “Red” options, and the Products List shows the products with the corresponding variations.

variable products with filter on the front end

That’s all. Now you know how to filter WooCommerce products by their variations with the help of the JetSmartFilters plugin for WordPress.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.