mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 07:26:59 +00:00
adress PR feedback
This commit is contained in:
parent
ba873dfa1b
commit
4cfd71614b
@ -1 +1,7 @@
|
|||||||
COMMERCE_PROVIDER=@vercel/commerce-sfcc
|
COMMERCE_PROVIDER=@vercel/commerce-sfcc
|
||||||
|
|
||||||
|
SFCC_CLIENT_ID=
|
||||||
|
SFCC_CLIENT_SECRET=
|
||||||
|
SFCC_ORG_ID=
|
||||||
|
SFCC_SHORT_CODE=
|
||||||
|
SFCC_SITE_ID=
|
@ -1,7 +1,38 @@
|
|||||||
# Next.js SalesForce Cloud Commerce Provider
|
# Next.js SalesForce Cloud Commerce Provider
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Copy the `.env.template` file in this directory (`/packages/sfcc`) to `/site/.env.local` in the main directory
|
||||||
|
2. `yarn` in root folder
|
||||||
|
3. `yarn dev` in root folder
|
||||||
|
|
||||||
|
|
||||||
refrences:
|
## Features:
|
||||||
- https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic
|
```json
|
||||||
- https://github.com/SalesforceCommerceCloud/commerce-sdk
|
{
|
||||||
|
"provider": "sfcc",
|
||||||
|
"features": {
|
||||||
|
"wishlist": false,
|
||||||
|
"cart": false,
|
||||||
|
"search": true,
|
||||||
|
"customerAuth": false,
|
||||||
|
"customCheckout": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Refrences:
|
||||||
|
- SDK: https://github.com/SalesforceCommerceCloud/commerce-sdk
|
||||||
|
- isomorphic SDK (currently not used atm): https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic
|
||||||
|
- PWA Kit storefront example: https://pwa-kit.mobify-storefront.com/
|
||||||
|
|
||||||
|
## Training Material and Documentation:
|
||||||
|
For a detailed introduction into commerce clouds feature set and data setup please refer to our Training Material and Documentation:
|
||||||
|
|
||||||
|
Salesforce Trailhead for B2C Commerce Cloud: https://trailhead.salesforce.com/en/content/learn/trails/cc-overview
|
||||||
|
Salesforce Trailhead for Development on B2C Commerce Cloud: https://trailhead.salesforce.com/en/content/learn/trails/develop-for-commerce-cloud
|
||||||
|
|
||||||
|
B2C Commerce Cloud Documentation:https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp
|
||||||
|
B2C Commerce Cloud Open Commerce API Doc: https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/OCAPI/current/usage/OpenCommerceAPI.html?cp=0_15
|
||||||
|
Developer Center for Commerce Cloud (Commerce APIs specifically): https://developer.salesforce.com/docs/commerce/commerce-api/overview
|
||||||
|
SLAS Org Admin Setup Guide: https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=slas-admin:Summary
|
@ -16,6 +16,11 @@ const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({
|
|||||||
searchTerm = categoryId as string
|
searchTerm = categoryId as string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set default for main category
|
||||||
|
if (!searchTerm) {
|
||||||
|
searchTerm = 'clothing'
|
||||||
|
}
|
||||||
|
|
||||||
const searchClient = await sdk.getSearchClient();
|
const searchClient = await sdk.getSearchClient();
|
||||||
// use SDK search API for initial products
|
// use SDK search API for initial products
|
||||||
const searchResults = await searchClient.productSearch({
|
const searchResults = await searchClient.productSearch({
|
||||||
|
@ -48,3 +48,9 @@ KIBO_API_HOST=
|
|||||||
|
|
||||||
NEXT_PUBLIC_COMMERCEJS_PUBLIC_KEY=
|
NEXT_PUBLIC_COMMERCEJS_PUBLIC_KEY=
|
||||||
NEXT_PUBLIC_COMMERCEJS_DEPLOYMENT_URL=
|
NEXT_PUBLIC_COMMERCEJS_DEPLOYMENT_URL=
|
||||||
|
|
||||||
|
SFCC_CLIENT_ID=
|
||||||
|
SFCC_CLIENT_SECRET=
|
||||||
|
SFCC_ORG_ID=
|
||||||
|
SFCC_SHORT_CODE=
|
||||||
|
SFCC_SITE_ID=
|
Loading…
x
Reference in New Issue
Block a user