Choosing several Magento 2 filter values: how do you tell OR from AND in Layered Navigation?

2 min read

Eight gold and blue tiles on a gold surface. A smaller frame encloses four tiles.

Selecting another color can broaden a result set. Adding a size can narrow it. To tell OR from AND, compare the actual SKUs after each step, including when result counts look similar.

Check several values within one filter

In Layered Navigation Suite 0.1.29, Multiple allows several choices for one attribute. Blue OR red means that either color qualifies. Another attribute narrows that group, so size S adds an AND condition. Single allows one value. Filter settings documentation

Set up eight test products

Use one category in a test store view. Each SKU has one color and one size. Before filtering, check that every product appears in the list and the color filter uses Multiple. Layered Navigation Suite documentation

Product data in the sample
SKUColorSize
T01BlueS
T02RedS
T03BlueM
T04RedM
T05GreenS
T06GreenM
T07BlueL
T08RedL

Compare the sets after each selection

Select blue, add red, and then choose size S. A hypothetical blue AND red condition would return an empty set here because each product has one color.

Expected SKUs after each step
Active selectionMatching SKUs
No filtersT01, T02, T03, T04, T05, T06, T07, T08
BlueT01, T03, T07
Blue OR redT01, T02, T03, T04, T07, T08
(Blue OR red) AND size ST01, T02
Red AND size S after removing blueT02

If the list differs, check the filter mode for this view and the values saved on the missing SKUs. Confirm the selected options in the active filters and repeat after reloading the same page.

Kowal Layered Navigation Suite for Magento 2 · Test catalog filters

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)