mirror of
https://github.com/vercel/commerce.git
synced 2025-07-07 05:11:22 +00:00
Updated commerce readme
This commit is contained in:
parent
d832d4afc2
commit
0ebb922795
@ -50,11 +50,6 @@ COMMERCE_PROVIDER=shopify
|
|||||||
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=xxxxxxx.myshopify.com
|
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=xxxxxxx.myshopify.com
|
||||||
```
|
```
|
||||||
Add your provider to the list of supported providers in `framework/commerce/with-config.js`:
|
|
||||||
|
|
||||||
```
|
|
||||||
const PROVIDERS = ['bigcommerce', 'shopify', 'your-provider']
|
|
||||||
```
|
|
||||||
|
|
||||||
And check that the `tsconfig.json` resolves to the chosen provider:
|
And check that the `tsconfig.json` resolves to the chosen provider:
|
||||||
|
|
||||||
|
@ -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.
|
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
|
## 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:
|
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user