Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mailchimp Open Commerce Provider #759

Closed
wants to merge 72 commits into from

Conversation

vannguyenn
Copy link

@vannguyenn vannguyenn commented May 19, 2022

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

Mailchimp Open Commerce Provider

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
NEXT_PUBLIC_OPENCOMMERCE_API_URL=http://api.open-commerce.io/graphql
NEXT_PUBLIC_OPENCOMMERCE_IMAGE_DOMAIN=api.open-commerce.io
  1. Run pnpm install and cd site && pnpm 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.

okbel and others added 30 commits April 26, 2022 16:45
* Kibo missing dependency
* return 404 for invalid page
* fix and simplify types for pages

Co-authored-by: Dominik Sipowicz <dom@vercel.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Co-authored-by: Stefan Horne <stefanhorne@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Created from https://vercel.com/new

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
* chore: add prettier vscode settings

* simplify

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
* new SFCC provider

* add search

* normalization + search

* categories as search results

* adress PR feedback

* Update README.md

* get all paths for SSG

* product variants and options

* Apply suggestions from code review

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* remove console log

* prettier

* clean console log

* ran prettier

* Updated readme

* remove static data and revert config changes

* set default site

Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
* chore: add prettier vscode settings

* simplify

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
* new SFCC provider

* add search

* normalization + search

* categories as search results

* adress PR feedback

* Update README.md

* get all paths for SSG

* product variants and options

* Apply suggestions from code review

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* remove console log

* prettier

* clean console log

* ran prettier

* Updated readme

* remove static data and revert config changes

* set default site

Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
@vannguyenn
Copy link
Author

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

@loan-laux
Copy link

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
Copy link

@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.

@cond0r
Copy link
Contributor

cond0r commented Apr 3, 2023

@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.

@loan-laux
Copy link

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

@MichaelRouly
Copy link

#759

@leerob
Copy link
Member

leerob commented Apr 18, 2023

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: #966

@leerob leerob closed this Apr 18, 2023
@vannguyenn vannguyenn changed the title [WIP] Add Mailchimp Open Commerce Provider Add Mailchimp Open Commerce Provider Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants