WooCommerce Proof of Concept

This is a demo and a bit of a summary as well of the current state of the proof-of-concept:

Feel free to share it :slight_smile:

5 Likes

WooCommerce has no ETA on the API shipping as stable…
And since we perhaps need to wait a long time before WooCommerce finish their own API. Perhaps even two years: https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/src/StoreApi

I think it’s smart to look at some alternatives…

You cannot wait two years or more on WooCommerce before implementing support for this… ECommerce is important for any framework! This should be prioritized and be implemented with the Frontity WordPress plugin.

I think it’s important for Frontity to add proper support for WooCommerce as soon as possible.

Have you looked into which of these that can be the best approach and that gives the most features?

or

2 Likes

Thanks a lot for the feedback :slightly_smiling_face: I agree that we have to keep in mind other alternatives to ease the WooCommerce integration, and the ones you shared look pretty interesting. Right now, it’s possible to build an ecommerce using WooCommerce and Frontity, but we would like to work on a package to make it easier, that is what the proof of concept was about.

As I said, you can still integrate WooCommerce yourself, just as you would do in a NextJS or Gatsby app, using whatever tools you prefer on top of Frontity and React.

Some members of the community have already tried WooCommerce in their Frontity projects, and some of them were able to integrate it using the CoCart plugin you suggest. Here you have some forum threads that might be useful → https://community.frontity.org/tag/woocommerce .

In addition, this is another good article on creating a React front end for WooCommerce that may help you with your project: https://www.joshuaiz.com/words/no-woocommerce-cart-api-no-problem.

If you try any of these alternatives, we would love to know your opinion :slightly_smiling_face:

3 Likes

This was made with Frontity and CoCart and it is quite impressive: https://www.texasmattressmakers.com/


There is another opportunity here: creating a commerce namespace.

Packages that would implement the commerce namespace should be interchangeable. After all, they all should do the same, they simply use different APIs to communicate with the backend.

The state and actions of that namespace would be things like:

  • state.commerce.cart
  • state.commerce.checkout
  • actions.commerce.addItemToCart()
  • actions.commerce.applyCoupon()

If there is someone willing to start working on a WooGraphQL or a CoCart package for Frontity, we could work with them on a standard @frontity/commerce namespace.

2 Likes

Hi Frontity. My name is Sébastien Dumont, creator of CoCart.

Happy to answer any questions or help collaborate on building any tools you need to help make CoCart work better with Frontity. I already have a JS library available

I’m still new to React so let me know if this enough or not.

I’m currently testing and fixing bugs in v3.0 of CoCart which will be out soon.

I look forward to helping the Frontity community any way I can.

4 Likes

That sounds awesome Sébastien! Thanks a lot for stopping by :slightly_smiling_face:

Yeah, I think so. It sounds like a cocart package for Frontity could be just a thin wrapper on top of that library to expose those actions and state in the Frontity store. Similar to what we did for the Store API proof of concept (this thread).

Awesome. Congratulations on CoCart by the way! :grinning_face_with_smiling_eyes:

3 Likes

CoCart v3 is currently in testing stages and your all welcome to try it. Once testing is complete and v3 is released, I will be focusing on finishing the checkout and customers dashboard ability.

Details about v3 of CoCart can be found here: CoCart v3 Preview - CoCart

I look forward to your feedback.

4 Likes

CoCart v3 is now released. :smiley:

4 Likes

Nice… looking forward to seeing this working with Frontity :smiley:

1 Like

Looks great! Congratulations :slightly_smiling_face:

1 Like

I realize this is not end of the world but just a FYI that the https://woocommerce.frontity.org/ site is showing SSL certificate expired. How did I even get to this url? After cloning the Proof of Concept on Github > running server on localhost > source defaults to https://woocommerce.frontity.org/

@simsev I’ve just checked and it works fine for me. What browser are you using?

The SSL works fine for me too :slightly_smiling_face:

How did I even get to this url?

You have a full explanation about the proof of concept and how to work with it in the Readme of this GitHub repo. I think it could be helpful :slightly_smiling_face:

1 Like

My apologies guys! Works now

Should be able to start working on a CoCart concept with Frontity soon but would like to know if the concept you created with WooCommerce API is a wrapper that can be applied to any theme or is it hard coded within a theme?

Just like to get a little feedback as I am still new to React.

Thank you.

2 Likes

Just released v3.1 beta 1 which introduces a setup wizard to help setup the headless environment and more. I’m hoping this release will help a little more for those who want to use Frontity with WooCommerce.

2 Likes

It’s just an additional package that exposes some state and actions, so they can be consumed by other packages or themes.

Does that answer your question? :slightly_smiling_face:

Yes thank you.

Hello!
I’ve been following the post and I’m really happy to see the lib is close :slight_smile:

I work on a marketplace and plan to use Frontity on our roadmap in the next 2 months. I hope I can help you.

3 Likes

I wonder if it will be possible to alter the endpoint (filter) to include the necessary fields to be able to use the products in Frontity
what do you think?