-
Notifications
You must be signed in to change notification settings - Fork 221
Conversation
@budzanowski Hello. I have not made any changes to the |
We understand the desire to have the ability to customize certain aspects of the block's look and behavior. We, unfortunately, can't accommodate the change request you have made in this PR. I will present the rationale for that and I will also try to point to some things that you can do to achieve some of the desired functionality. We have a roadmap that involves refactoring how our existing blocks work. This new approach will note support PHP-based filtering. It will have other ways for developers to provide additional customization/flexibility to the blocks. We don't know yet how we will support our existing blocks in the future. The previously mentioned refactor may bring a lot of changes that we can't yet foresee. With the uncertainty around how things will work, we don’t want to commit additional filters until we are certain we can support those implementation patterns in the long term. It will take some time until we will be able to commit to definite solutions. In the meantime, we have other higher priority things capturing our attention. For now, we do have to reject PRs adding PHP filters to the existing blocks. This does not mean that nothing can be done to accommodate your requirements. For example, the out-of-stock items filtering had a bug that was recently fixed in #3859. You should be able to set the desired behavior using settings:
Not everything is possible thought. Especially the markup filtering. More information on why that is can be found here: I hope that this gives you a way forward. We are sorry if not everything is possible yet. As I have mentioned we are working on it. I will be closing this PR soon. |
Thanks @budzanowski I got your point out that subsequent changes may not allow the use of new filters. But all the filters you mentioned apply to all parts of the shop. I do not want to use these filters in the shop. For example, I want out of stock products to be displayed in the shop, but when I use the product block on my blog site, I have to remove them from the query. I want to show products related to the subject of the article in my blog and showing out of stock products is not a good idea. At the moment, apparently the purpose of Woocommerce blocks is to use them independently to build complete pages, but I want to use them somewhere other than the default Woocommerce pages and in Gutenberg, and I need to have different properties of the default modes. In fact, I want to have a different behavior towards the shop, product page, etc. in the blocks. In the current situation, I have to design blocks that do exactly the same thing as the default Woocommerce blocks and just need more freedom of action. |
I understand you completely. For now, shipping your own copy of the blocks with the things you want to add seems to be the easiest way to achieve the desired effect - but that may not be a long-term solution because as I have mentioned the block code will change. We just can't commit to certain features at this moment. Maybe in the end we will end up with some filters, but now we don't know things will pan out. |
Closing this for now. We can revisit this in the future when we will have more clarity on how things will work. |
We have many limitations in product grid products. For example, I want to change the on sales badge or not show the out of stock products that are active in the woocommerce catalog and search in the blocks.
Why?
Because I want to use blocks in my blog. Of course, using out of stock products within the blog will not have a conversion rate.
Because of these limitations, I have to develop my own blocks.
With a few lines of code added to the block the developer can control these sections.
https://woocommercecommunity.slack.com/archives/C1K9K3UD9/p1613708878464300
I added the following filters to the block: