Skip to content

Commit

Permalink
Update README.md to include information on how to add a custom provid…
Browse files Browse the repository at this point in the history
…er (vercel#250)

* Update README.md

* Updated commerce readme

Co-authored-by: Luis Alvarez D <[email protected]>
  • Loading branch information
SaidiAli and lfades authored Aug 28, 2021
1 parent 0e7e7b7 commit 24dd291
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ For example: Turning `cart` off will disable Cart capabilities.

> NOTE: The selected provider should support the feature that you are toggling. (This means that you can't turn wishlist on if the provider doesn't support this functionality out the box)
- Open `commerce.config.json`
- Open `commerce.config.json`
- You'll see a config file like this:
```json
{
Expand Down
6 changes: 6 additions & 0 deletions framework/commerce/new-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ The app imports from the provider directly instead of the core commerce folder (

The provider folder should only depend on `framework/commerce` and dependencies in the main `package.json`. In the future we'll move the `framework` folder to a package that can be shared easily for multiple apps.

## Updating the list of known providers

Open [./config.js](./config.js) and add the provider name to the list in `PROVIDERS`.

Then, open [/.env.template](/.env.template) and add the provider name in the first line.

## Adding the provider hooks

Using BigCommerce as an example. The first thing to do is export a `CommerceProvider` component that includes a `provider` object with all the handlers that can be used for hooks:
Expand Down

0 comments on commit 24dd291

Please sign in to comment.