Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Product Query [3]: [Filters] When multiple filter conditions are selected, only the topmost is applied in the Product Query Block #7608

Closed
Tracked by #42616
sunyatasattva opened this issue Nov 8, 2022 · 4 comments
Assignees
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.

Comments

@sunyatasattva
Copy link
Contributor

Warning
In order to reproduce this bug, #7382 is required

Describe the bug

When selecting multiple conditions in a filter paired with a Product Query block inside an FSE template, only the topmost filter is applied.

To reproduce

Steps to reproduce the behavior with WooCommerce default sample data:

  1. Add a “Filter by Attribute” block and a “Product Query” block set to “Inherit query from template” inside the “Product Catalog” template.
  2. Filter by “Blue” and “Yellow”.
  3. Notice that only blue products are shown, not yellow.

Expected behavior

Adding multiple filters should behave as in OR condition and show all products that match any of the conditions.

Screenshots

Screenshot 2022-11-08 at 02 09 38

Additional context

Apparently, this works correctly inside a normal post/page without inheriting the query from the template.

@sunyatasattva sunyatasattva added type: bug The issue/PR concerns a confirmed bug. block-type: product-query Issues related to/affecting all product-query variations. labels Nov 8, 2022
@gigitux gigitux self-assigned this Nov 8, 2022
@sunyatasattva sunyatasattva changed the title When multiple filter conditions are selected, only the topmost is applied in the Product Query Block Product Query [3]: [Filters] When multiple filter conditions are selected, only the topmost is applied in the Product Query Block Nov 9, 2022
@imanish003
Copy link
Contributor

I just checked, and it appears that this issue is no longer reproducible. I believe the issue was fixed while working on other tasks.
@kmanijak, would you mind trying to reproduce it as well? If you're unable to reproduce it then I think we can close this issue. 🙂

@gigitux
Copy link
Contributor

gigitux commented Apr 18, 2023

This issue is replicable only with the custom implementation of the "inherit query from template" setting.

image

@imanish003
Copy link
Contributor

imanish003 commented Apr 19, 2023

Hi @gigitux, Thanks for the clarification 🙏 I'll be closing this issue for the time being. Should we decide to implement a custom "inherit query from template" feature in the future, we can always reopen it. Related issues can be found under Epic woocommerce/woocommerce#42616. 🔍👀
Internal discussion: p1681812585287949-slack-C02UBB1EPEF

image

@kmanijak
Copy link
Contributor

@kmanijak, would you mind trying to reproduce it as well? If you're unable to reproduce it then I think we can close this issue. 🙂

For visibility - I wasn't able to follow the steps to reproduce, due to the issue encountered. But I'm glad there's decision anyway 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

4 participants