From 50c4f558db47c1cc6e2f8612d003b7c5bd5e2cda Mon Sep 17 00:00:00 2001 From: Jakub Neander Date: Thu, 22 Jul 2021 17:29:24 +0200 Subject: [PATCH 1/4] specify the minimal required Saleor version (#418) --- framework/saleor/README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/framework/saleor/README.md b/framework/saleor/README.md index 1684ff6bc..590fb0275 100644 --- a/framework/saleor/README.md +++ b/framework/saleor/README.md @@ -1,19 +1,15 @@ ## Saleor Provider -**Demo:** TBD +**Demo:** https://saleor.vercel.store/ -Before getting starter, a [Saleor](https://saleor.io/) account and store is required before using the provider. +You need a [Saleor](https://saleor.io/) instance, either in the cloud or self-hosted. -Next, copy the `.env.template` file in this directory to `.env.local` in the main directory (which will be ignored by Git): +This provider requires Saleor **3.x** or higher. + +Copy the `.env.template` file in this directory to `.env.local` in the main directory (which will be ignored by Git): ```bash cp framework/saleor/.env.template .env.local ``` Then, set the environment variables in `.env.local` to match the ones from your store. - -## Contribute - -Our commitment to Open Source can be found [here](https://vercel.com/oss). - -If you find an issue with the provider or want a new feature, feel free to open a PR or [create a new issue](https://github.com/vercel/commerce/issues). From 177914186e610512058380c855eeff1daac5f717 Mon Sep 17 00:00:00 2001 From: MitchStarkTekton <61703668+MitchStarkTekton@users.noreply.github.com> Date: Wed, 28 Jul 2021 20:30:55 -0400 Subject: [PATCH 2/4] convert category to number before checking for int (#422) --- framework/bigcommerce/product/use-search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/bigcommerce/product/use-search.tsx b/framework/bigcommerce/product/use-search.tsx index bea01753b..cd6c34612 100644 --- a/framework/bigcommerce/product/use-search.tsx +++ b/framework/bigcommerce/product/use-search.tsx @@ -22,7 +22,7 @@ export const handler: SWRHook = { const url = new URL(options.url!, 'http://a') if (search) url.searchParams.set('search', search) - if (Number.isInteger(categoryId)) + if (Number.isInteger(Number(categoryId))) url.searchParams.set('categoryId', String(categoryId)) if (Number.isInteger(brandId)) url.searchParams.set('brandId', String(brandId)) From 4b164d20a3122004b762c3fc1221f294f629a7c0 Mon Sep 17 00:00:00 2001 From: Jakub Neander Date: Thu, 29 Jul 2021 02:31:35 +0200 Subject: [PATCH 3/4] provide more details for Saleor in its README (#419) --- framework/saleor/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/saleor/README.md b/framework/saleor/README.md index 590fb0275..00af272b0 100644 --- a/framework/saleor/README.md +++ b/framework/saleor/README.md @@ -12,4 +12,11 @@ Copy the `.env.template` file in this directory to `.env.local` in the main dire cp framework/saleor/.env.template .env.local ``` -Then, set the environment variables in `.env.local` to match the ones from your store. +Then, set the environment following variables in your `.env.local`. Both, `NEXT_PUBLIC_SALEOR_API_URL` and `COMMERCE_IMAGE_HOST` must point to your own Saleor instance. + +``` +COMMERCE_PROVIDER=saleor +NEXT_PUBLIC_SALEOR_API_URL=https://vercel.saleor.cloud/graphql/ +NEXT_PUBLIC_SALEOR_CHANNEL=default-channel +COMMERCE_IMAGE_HOST=vercel.saleor.cloud +``` From ff715c4ccbf62e5d439de4acf85ebabe52708310 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Thu, 29 Jul 2021 02:32:42 +0200 Subject: [PATCH 4/4] Add note in Vendure readme on correct server config for sessions (#417) --- framework/vendure/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/vendure/README.md b/framework/vendure/README.md index c1bcd7b5b..7f1dccb3f 100644 --- a/framework/vendure/README.md +++ b/framework/vendure/README.md @@ -13,6 +13,8 @@ UI hooks and data fetching methods built from the ground up for e-commerce appli ``` 3. With the Vendure server running, start this project using `yarn dev` or `npm run dev`. +**Note:** The Vendure server needs to be configured to use the "cookie" tokenMethod rather than "bearer" to work with this provider. For more information see the [Managing Sessions docs](https://www.vendure.io/docs/storefront/managing-sessions/). + ## Known Limitations 1. Vendure does not ship with built-in wishlist functionality.