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

Filter Products by Attribute: filter button doesn't work with Active Filters for PHP templates #6282

Closed
dinhtungdu opened this issue Apr 19, 2022 · 0 comments · Fixed by #6287
Assignees
Labels
block: active filters Issues related to the Active Filters block. block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug.

Comments

@dinhtungdu
Copy link
Member

Describe the bug

When the filter button is enabled, after choosing an attribute and clicking the filter button, the page reloads as expected. The chosen attribute is selected in the Filter Products by Attribute block but does not appear in the Active Filters block.

To reproduce

Steps to reproduce the behavior:

  1. On a block theme, go to Edit Site > Product Catalog template.
  2. Add Active Filters and Filter Products by Attribute block to the template.
  3. Choose an attribute to filter, and make sure the filter button is toggled.
  4. Go to the shop page.
  5. Select an attribute from the block added in step 2.
  6. Click the filter button. See the page reload as expected.
  7. See the correct filtered results after page load.
  8. Don't see the selected filter in the Active Filters block.

Expected behavior

Filter Products by Attribute block should always work with Active Filters block.

Screenshots

Screen.Recording.2022-04-19.at.18.54.54.mov

Note: From the screenshot above, there are additional unexpected behaviors:

Right after clicking the filter button, the selected filter appears in the Active Filters block. In the Filter Products by Attribute, unchecked attribute options disappear, and the product count in the selected attribute changes to 0.

IMO, in the PHP template context, we should only update the filter URL. On slow server or network, this behavior can make customers confused.

@dinhtungdu dinhtungdu added type: bug The issue/PR concerns a confirmed bug. block: filter by attribute Issues related to the Filter by Attribute block. block: active filters Issues related to the Active Filters block. labels Apr 19, 2022
@nielslange nielslange added focus: FSE Work related to prepare WooCommerce for FSE. and removed focus: FSE Work related to prepare WooCommerce for FSE. labels Apr 20, 2022
@tjcafferkey tjcafferkey self-assigned this Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: active filters Issues related to the Active Filters block. block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
3 participants