aimeos / ai-client-html

Aimeos e-commerce HTML client components
https://aimeos.org
GNU Lesser General Public License v3.0
154 stars 58 forks source link

Filter logic #176

Closed Ameeko closed 2 years ago

Ameeko commented 2 years ago

Hi! Something goes wrong with the logic of the filter. This product is available in 2 colors (Beige and Blue): image If I filter to Beige, the Blue color in the filter remains active. image I don't understand the logic in this. Why does the color Blue remain active? If I click on the Blue after the Beige, I get zero hits. If I click on the Black after the Beige, I get zero hits. I understand these are two separate products, and the filter uses an AND connection, but that's misleading, isn't it?

aimeos commented 2 years ago

Showing "Blue" as available is correct because for the selection product, "Beige" and "Blue" variants are available but there shouldn't be zero products when clicking on "Blue" too.

The alternative would be to apply an OR condition so it's "Beige" or "Blue" using "color" in this setting: https://aimeos.org/docs/2021.x/config/client-html/catalog-filter/#types-option

aimeos commented 2 years ago

Filtering for multiple attributes of the same type has been fixed now. The fix is available in dev-master, 2022.04.x-dev and 2021.10.x-dev and will be part of the next release.