-
Notifications
You must be signed in to change notification settings - Fork 219
Make Active Filters work with PHP templates #6138
Comments
Look like we're missing a use-case when we need the filter arguments injected to the URL for blocks. For example, a page contains the All Products block with some filter blocks. If I set some filters and want to share the filtered results with my friends, it's impossible to do that now. We're making the filter blocks work with PHP templates, we use URL as the bridge between those two. The URL can solve the issue I mentioned above: for products blocks, we can just update the URL without reloading the page. For PHP templates, we update the URL and reload the page as we do now. For now, we're handling two cases separately based on the |
@dinhtungdu Mmmm, good point. It can be a good time for refactoring the codebase around the filters that it seems a little bit tricky, at least for me. @Aljullu what do you think? |
The #6252 is my take for this PR with our current direction used in other PRs. But I still think we should handle the URL change for both cases. |
I'm working on #6137 with the current direction. The problem is that the current direction is easier to implement, but we will lose everything when we will blockify the template. Maybe we could work on a refactor when we will blockify the template |
Blocked by #6135, #6136 or #6137.
Currently, it's not possible to use the Active Filters block with PHP templates. That's because that block is designed to only work with the All Products block.
This issue is about updating it, so it can work with the Shop catalog template.
Take into account currently there isn’t a widget equivalent, so it might require some changes in WC core in order to get this block working with PHP templates. (That's why the estimate of this issue is higher than the one from similar issues)
To reproduce
Expected behavior
The products in the product grid should update based on the removed filters.
The text was updated successfully, but these errors were encountered: