commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Add Mailchimp Open Commerce Provider

Open vannguyenn opened this issue 2 years ago • 2 comments

DEMO: https://commerce-nine-brown-79.vercel.app/

Mailchimp Open Commerce Provider

  • Docs: https://mailchimp.com/developer/open-commerce/
  • API endpoint: https://api.open-commerce.io/graphql

Open Commerce Provider

Preview: https://commerce-nine-brown-79.vercel.app/

We are using this admin interface for demo: https://admin.open-commerce.io/ Storefront API URL: https://api.open-commerce.io/graphql

Available Features

  • Cart
  • Search
  • Custom Checkout
  • Custom Navigation

Steps to get started:

  1. Duplicate site/.env.template and rename it to site/.env.local
  2. Setup env variables related to open commerce provider, something looks like this:
COMMERCE_PROVIDER=@vercel/commerce-opencommerce
OPENCOMMERCE_STOREFRONT_API_URL=https://api.open-commerce.io/graphql
OPENCOMMERCE_PRIMARY_SHOP_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPENCOMMERCE_IMAGE_DOMAIN=api.open-commerce.io

Note: We can query the primary shop ID from the graphql api playground

  1. Run yarn and yarn dev in the root folder

Troubleshoot

https://github.com/reactioncommerce/commerce#troubleshoot

For more information about the repository, check out the README file here: https://github.com/reactioncommerce/commerce

Custom Checkouts

The demo site use Example Payment Plugin for processing payments. To make the checkout flow works as expected, some prerequisite steps need to be handled:

  • Add and enable at least one flat-rate shipping option on the admin setting page. By default, we select the first shipping option to create the order
  • Enable the IOU Example payment method in the admin setting page
  • Fill in all the required fields in the Add Shipping Address step in the storefront
  • After processing checkout, check the orders page in the admin interface to confirm the order has been successfully created

We can also use Stripe as the default payment method by following steps:

  • Add and enable at least one flat-rate shipping option in the admin setting page. By default, we select the first shipping option to create the order
  • Enable the Stripe (SCA) payment method in the admin setting page
  • Add OPENCOMMERCE_STRIPE_PUBLIC_API_KEY env variable to the site/.env.local file
  • Add STRIPE_API_KEY env variable to the reaction API .env file with the private API key from Stripe
  • Modify the submit-checkout api endpoint to include additional steps for Stripe payment (eg: create/confirm payment intent, pass payment intent id to placeOrder request body,...).

Custom Navigation

By default NextJS only display two categories/tags of products in the navbar. This feature enables us to show the organized categories/tags as navigation in the admin to our storefront. Also, we can leverage this feature to show URLs that are not relative to the shop (eg: admin page, documentation page, ...). This feature is enabled by default, we can turn it off anytime by modifying the value in the commerce.config.json file.

vannguyenn avatar May 19 '22 03:05 vannguyenn

@vannguyenn is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 19 '22 03:05 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
commerce-bigcommerce ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-commercejs ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-kibocommerce ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-local ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-ordercloud ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-saleor ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-shopify ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-spree ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-swell ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)
commerce-vendure ❌ Failed (Inspect) Mar 10, 2023 at 3:57AM (UTC)

vercel[bot] avatar May 19 '22 03:05 vercel[bot]

@okbel I know this has been sitting here for a while, but would it be possible to review this connector?

loan-laux avatar Oct 06 '22 11:10 loan-laux

Is there anything we can do here to move this PR forward? It's been six months?

zenweasel avatar Oct 29 '22 12:10 zenweasel

Hey! This one is in our radar, but we've been working in some core data fetching updates. That's why we put a hold on merging new providers. It wasn't intentional, and apologies if it wasn't properly communicated.

We will take a look! If everything is up to date with the latest changes, then 🚀

okbel avatar Oct 31 '22 09:10 okbel

@cond0r can you take a look? Thank you!

okbel avatar Oct 31 '22 09:10 okbel

@cond0r can you take a look? Thank you!

Unfortunately, there are several changes that need to be made before this provider can be merged (see #836 and #831).

cond0r avatar Oct 31 '22 09:10 cond0r

Thanks, everyone for checking, I checked the changes and figured that it will take some time to update this PR. I will get back to you guys when the PR is ready for review.

vannguyenn avatar Nov 08 '22 05:11 vannguyenn

Deployment failed with the following error:

Creating the Deployment Timed Out.

vercel[bot] avatar Mar 09 '23 15:03 vercel[bot]

Hi @cond0r, this PR is updated with the latest changes, please help to review it when you have time. Thank you! c/c @zenweasel

vannguyenn avatar Mar 10 '23 04:03 vannguyenn

Really looking forward to having this merged. This will be huge for the Mailchimp Open Commerce community. Thanks @vannguyenn for working on this. 🙏🏻

loan-laux avatar Mar 23 '23 11:03 loan-laux

@cond0r is there any timeline for review on this PR? I don't mean to bug you, just curious as I'm excited for this provider to be merged.

loan-laux avatar Apr 03 '23 13:04 loan-laux

@cond0r is there any timeline for review on this PR? I don't mean to bug you, just curious as I'm excited for this provider to be merged.

Hi, @loan-laux I am no longer involved in Next.js commerce, so I cannot help here.

cond0r avatar Apr 03 '23 13:04 cond0r

My bad @cond0r, sorry for disturbing you then. @okbel @lfades, who should be assigned for review here?

loan-laux avatar Apr 03 '23 14:04 loan-laux

#759

MichaelRouly avatar Apr 04 '23 11:04 MichaelRouly

Hey there! Thank you for your contribution. We have decided to take Next.js Commerce in a new direction and will be closing out current PRs and issues due to this change. Please see this PR for more details: https://github.com/vercel/commerce/pull/966

leerob avatar Apr 18 '23 02:04 leerob