generoi / sage-woocommerce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cart and Checkout Blocks boilerplate

SergiArias opened this issue · comments

Hi!

This is a feature request.

As this package is the best to adapt roots sage to Woocommerce, I am thinking a good improvement in alignment with roots philosophy would be to have boilerplates for both the cart and the checkout gutenberg blocks.

I was taking a look at the blocks from Woocommerce by Automattic but I don't see how to customize them or make new ones based on them. I tried to understand the code, but it has so many files and classes that without a proper tutorial aimed at developers is almost impossible.

But I believe roots (and laravel) community shines by making complex things understandable.

Right now the cart works by using a shortcode, but I suspect this will be substituted by this hard to understand and modify blocks, which would greatly benefit by this request of easy to modify and improve blocks in this package.

What do you devs think about it?

commented

Hey,

I do agree such examples would be good but I wont me adapting it to this repo so maybe better to discuss it on roots discourse. I'd like this repo to be kept simple and only provide blade support really.

(personally I like building cart and checkout flows with https://cocart.xyz/. This way you can pick whatever frontend framework you like, dequeue all woocommerce assets and not let their frontend get in your way.)

Correct, unfortunately (for me) it's outside of the scope of this package. In fact, it's not even a roots thing. It's just a matter to understand wc_cart, wc_checkout, wc_session and apply all the conditions to create our own blocks and our own cart experience.
Thanks for the suggestion!