Making Product Collection the main block for product lists and collections #44776
kmanijak
started this conversation in
WooCommerce, Blocks, and Site Editing
Replies: 1 comment
-
Seems like a solid plan to me. The soft deprecation you mentioned (removing from the inserter) will be important to ensure no existing usage of the blocks are broken. Some other things I think should be considered:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
There are many ways of rendering lists or collections of products across various blocks in WooCommerce. We can split them into two buckets:
We put a lot of effort into making Product Collection (Beta) better than the other generic blocks and making it capable of covering all the cases offered by the specialized product list block. All of that with better, more modern UX and performance.
Intended change
We want to make a Product Collection a go-to block to list your products, which means the following steps:
What does it mean for you?
If a store already has existing product blocks in use, you may continue using those. However, when setting up a new product list, you will now see the Product Collection Block instead of the other product list blocks in the inserter.
Additionally, all of the collections will be available when inserting Product Collection block:
Extending the Product Collection Block
Product Collection is backward compatible with the Products (Beta) block in terms of extensibility. It offers the same level of extensibility as Products (Beta) block that is currently used as a default block in product archive templates. That means, however you extended the Products (Beta) blocks, you're able to achieve the same results with Product Collection (Beta) block.
Frontend Hooks support
There's a Compatibility Layer available on the frontend for archive templates to extend. Compatibility Layer applies the same filters to Product Collection block as to Products (Beta):
In addition to the above, Product Collection uses the same inner blocks to build a product template (e.g. Product Price or Product Title). Nothing changes in terms of the extensibility of those elements.
Plans
In addition to existing extensibility points, we're working on additional ones to allow 3rd Party Developers to create and register their own collections. Our goal is to enable you to prepare presets for Product Collection block that will predefine the product query and filters exposed to merchants in Editor.
Let's take the Top Rated collection as an example. It has the orderby attribute predefined and set to rating. In addition, there will be an option to define it as a hidden control, so the merchant cannot change it. However, they have a set of other Editor filters available to build on top of that. For example, they could apply category filter limiting the Top Rated collection to specific categories.
The next step would be allowing for creating and registering your own query filters that could be exposed in UI controls in Editor.
We're still working on it, but you can expect further communication once the first version is ready!
Your feedback
Let us know what you think about that change. We’re particularly interested in:
Your feedback is valuable as we continue to refine and expand the capabilities of the Product Collection block.
Beta Was this translation helpful? Give feedback.
All reactions