commerce
commerce copied to clipboard
Provider: WooCommerce
ecommerce provider: https://woocommerce.com/ Assigned to: @mohammadou1
Hey @mohammadou1 / @okbel. I was wondering if you guys wanted some help with this ticket? Is there anything I could work on?
Hi @joedooley, I would be pleased if you took a look at the repo and saw what you can PR to it,
https://github.com/mohammadou1/commerce/tree/feature/woocommerce
in GraphQL perspective, its almost done and will pushed soon,
Hi @mohammadou1, Looks like your off to a solid start!
I'm comfortable working on whatever would be most helpful. With that said... it would take me a little while to wrap my head around the data layer to create the gql queries/mutations for the server calls to the WC api endpoints.
Is there something that's a little higher level that I could work on at this point in time? For example, begin working on the checkout flow? That way once the cart api is ready to go. We'll be able to test the entire flow from start to finish?
By checkout flow... I am referring to the cart page, checkout page, thank you page, etc...
Is there any direction/mockups/ideas for self hosted checkout flows? If this is being discussed somewhere, would you mind sharing a link?
@okbel @joedooley @mohammadou1 I’m looking at contributing to this project so we can migrate our large woocommerce site to NextJs.
On the graphql front, am I correct in thinking BigCommerce / Shopify offer graphql APIs which are consumed by the nextjs app whereas with woocommerce we need to develop our own resolvers (or find a plug-in)?
And the reason it’s preferred to adopt graphql rather than consume the standard woocommerce rest api is speed?
Has thought been given to the Cart API and user authentication?
Other headless woocommerce implementations I have researched used CoCart plugin because woocommerce cart API is not public.
Also what is the situation with user authentication? From what I’ve read it seems the core Wordpress REST API is limited. You’d need to have a plugin like https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api to be able to issue auth tokens.
@okbel @joedooley @mohammadou1 I’m looking at contributing to this project so we can migrate our large woocommerce site to NextJs.
On the graphql front, am I correct in thinking BigCommerce / Shopify offer graphql APIs which are consumed by the nextjs app whereas with woocommerce we need to develop our own resolvers (or find a plug-in)?
And the reason it’s preferred to adopt graphql rather than consume the standard woocommerce rest api is speed?
Has thought been given to the Cart API and user authentication?
Other headless woocommerce implementations I have researched used CoCart plugin because woocommerce cart API is not public.
Also what is the situation with user authentication? From what I’ve read it seems the core Wordpress REST API is limited. You’d need to have a plugin like https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api to be able to issue auth tokens.
Hello buddy, would appreciate if you do check my repo and contribute
Right now i stopped the progress in order to adapt to the changes next team made on agnostic branch
You have a valid point, but there is a highly usable free gql plugin that am using, which will be published alongside woocommerce implementation as zip folder
Why am using it?
Because it supports cart and easliy usable with auth
Why am avoid rest so far?
Many features are missing from it like cart, which will require the frontend to store the cart on client side
So far am avoiding that and am using the graphql plugin
https://github.com/wp-graphql/wp-graphql-woocommerce
What is done on my side so far is
Cart functionality, products functionality, pages, Stopped before going to checkout + login, register and user until i migrate the code
I will push the latest update tomorrow hopefully and if you wish then we can have a conv where we can work on supporting both options even though rest is limited while accepting it??
And still one of the biggest woocommerce limitations is multi languages which is another story for another night
And you're 100% right
Most implementation use CoCart for rest api cart implementation
But if I was gonna use it to support the cart only, then I need to take into consideration that some people will use other plugins and need to find a way to let them choose their cart functionality between default cart and cocart
@mohammadou1 I am interested in contributing to this provider, once you integrate the agnostic UI updates, I would like to see how I can help.
And you're 100% right
Most implementation use CoCart for rest api cart implementation
But if I was gonna use it to support the cart only, then I need to take into consideration that some people will use other plugins and need to find a way to let them choose their cart functionality between default cart and CoCart
Let me know what I can do to help. Happy to answer any questions regarding CoCart.
@mohammadou1 just wondering if there is any active development on this?
Hi @mohammadou1! I'm also interested in this. How's it going along? Is there anything we can do to help?
LMK if someone feels proficient enough with WooCommerce to add https://github.com/mohammadou1/commerce/tree/feature/woocommerce to this repo, as a provider. Thank you! 🙏
@okbel the documentation https://github.com/vercel/commerce/blob/master/framework/commerce/new-provider.md says that there's currently a refactor going on. Should we wait for an announcement or can we just mimic the structure in the current shopify and bigcommerce framework implementations?
Hello, yes there is a refactor going on right now
I will push the roadmap of it soon, my sincere apologise for slow progress
Feel free to dive in the repo and tag along
Will push the roadmap ASAP
@mohammadou1 just wondering if there is any active development on this?
Yes there is, even though its slow,
Looking forward for the new updates
@mohammadou1 any ideas why cant i run this locally - https://github.com/mohammadou1/commerce/tree/feature/woocommerce ? I get error "Error: The environment variable BIGCOMMERCE_STOREFRONT_API_URL is missing and it's required to access your store"
and even thought ".env.local" has only this attributes -
"GRAPHQL_STORE_URL= WOOCOMMERCE_API_URL= WOOCOMMERCE_CONSUMER_KEY= WOOCOMMERCE_CONSUMER_SECRET="
It seems it's configured for Bigcommerce and not WooCommerce. I think that error appears when you import Bigcommerce's config.
It seems it's configured for Bigcommerce and not WooCommerce. I think that error appears when you import Bigcommerce's config.
Weird because i tried even to add this conf into env.local: COMMERCE_PROVIDER=woocommerce , hoped that it will force to import right settings. Havent got any luck, still tries to import bigcommerce settings.
Yes the issue appears when u try to access pages that are not under /wocommerce folder, this is due to not removing big commerce from pages yet as it should migrate woocommerce instead,
@mohammadou1 I'm hesitant to contribute to the repo because the folder structure is so different from the other providers in vercel's repo. Is that part of the refactor you were talking about? Do you have an ETA for the roadmap?
@mohammadou1 I'm hesitant to contribute to the repo because the folder structure is so different from the other providers in vercel's repo. Is that part of the refactor you were talking about? Do you have an ETA for the roadmap?
Am really in a bad situation here, since woocommerce has really different structure than other providers, no cart, no multilanguage, graphql different approach, waiting for few changes to come from official next/commerce before I can do anything, this file structure was the old file structure followed by the providers, since they updated, woocommerce has been stuck, which needs to almost restart the provider,
if anyone is interested in diving in so we can start it as soon as the changes from next/commerce come up, please notify me
@mohammadou1 Which exact changes are you "waiting" for? Is it this issue?
@mohammadou1 Which exact changes are you "waiting" for? Is it this issue?
Technically, Waiting for normalization changes to support woocommerce lack of some data
Not in enforce multilnaguages Not to enforce api routes and just use gql
Currently contacted the team about them and they are making the changes Then i can start over with the latest version
As soon as they are done Will post it here, so that anyone can join in building this provider hopefully
Am sorry for so much delay
@mohammadou1 Which exact changes are you "waiting" for? Is it this issue?
Yes it's, the current structure doesn't support woocommerce, especially that the plan to support woocommerce is using GQL plugin built by the community
could finish the previous version (current one in github) but its no way near the updated next/commerce version and not unified at all
Updated the readme, my apologize because its too late and nothing happened yet, but the main goal of the providers I think is to have a unified solution for everyone regardless of the differences or weakness of specific ones
Hey, all you aware of WooCommerce Store API, an API that is meant to build headless WooCommerce stores
Seems promising, I'll give it a go when I'm more free. In case this does not work out (seems experimental still, idk how permanent resources need to be for a PR to be considered), what's the policy on packages @okbel? I think I saw shopify-buy in the dependencies but not used anywhere thoughout the project. Would we be allowed to use, for instance, something like this https://github.com/woocommerce/woocommerce-rest-api-js-lib? Or not?
Hey all. CoCart will be releasing an update soon that provides a more out of the box experience and was wondering if you would be interested in supporting CoCart since the WooCommerce API is still not public or open enough to supporting WooCommerce extensions or guest customers for frameworks?
Let let me know if you have any questions.
Thank you.
Sébastien Dumont - Creator of CoCart.
Hi all, I have made a project on it. You can check the live demo site from https://nextwoocom.vercel.app/