-
Notifications
You must be signed in to change notification settings - Fork 219
Update Filter Products by Price block to work with PHP templates #6146
Conversation
Size Change: +1.59 kB (0%) Total Size: 874 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really minor thing (comment removal, the other is just a suggestion). Approving as to not block you when you fix it :)
Thanks for addressing my feedback so thoroughly!
Script Dependencies ReportThe
This comment was automatically generated by the |
Script Dependencies ReportThe
This comment was automatically generated by the |
Script Dependencies ReportThe
This comment was automatically generated by the |
Failing tests seem unrelated (checkout) and are a result of this PR being merged supposedly #6126 so going to go ahead and merge this. |
* Update Filter Products by Price block to work with PHP templates * Reformat param formatting * Add check for PHP template * window guards and comments for context * Add comment to page reload * Addressed code review feedback * Fix setMinPriceQuery and setMaxPriceQuery values * Remove unnecessary snake_case comment and update newUrl to assign to window.location.href. * package-lock.json update Co-authored-by: tjcafferkey <[email protected]>
@tjcafferkey Not sure if this is happening on your end, but the price filter doesn't work for me. The min/max prices in the URL are wrong after changing the price slider: Note: I'm using latest |
What are your currency settings, @dinhtungdu? You can find them in WooCommerce > Settings. It might be worth opening an issue and adding it to the #6134 epic. |
@Aljullu You're right. I'm setting |
Fixes #6135
Fixes #6139
Filter Products by Price block will only work with the PHP rendered
Classic Template
block if the filters are applied to the URL and the page is re-rendered. This behaviour happens with the Classic Themes such as Storefront.Changes introduced:
asset_data_registry
to pass data to the frontend when the PHP template is being used. This will let the JS components know how to behave when interacting with them as opposed to the All Products block.Manual Testing
Changelog