commerce
commerce copied to clipboard
disable ratings and reviews if a provider is BC
Currently reviews and ratings are hard-coded and we want to disable it for the BC stores.
I'm not sure what the best way is to detect the current provider. I've tried several ways and this one is working well.
To make it work you need to add NEXT_PUBLIC_IS_BC=true to your .env.local file and run yarn build again.
This is another way I've tried but it didn't work. The value was always undefined and I found that you have to prefix the variable with NEXT_PUBLIC_ in order to expose a variable to the browser. (https://nextjs.org/docs/basic-features/environment-variables). I guess that's why it didn't work.

@powerwlsl is attempting to deploy a commit to the Vercel Solutions Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| commerce-bigcommerce | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-commerce | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-commercejs | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-kibocommerce | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-local | ✅ Ready (Inspect) | Visit Preview | Aug 10, 2022 at 0:18AM (UTC) |
| commerce-ordercloud | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-pbt01 | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-saleor | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-sfcc | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-shopify | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-site | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-spree | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-swell | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) | |
| commerce-vendure | ❌ Failed (Inspect) | Aug 10, 2022 at 0:18AM (UTC) |