Demostore Core uses the dc-integration-middleware project in order to interface with Commerce APIs which are:
- Products
- Categories
- User Groups
This project comes with an integration with a demo commerce platform. This is a REST configuration which mimics data from a commerce platform. For full details see here.
As this integration middleware supports multiple eCommerce vendors, you can easily tell your your demostore to work with any of the supported eCommerce Vendors.
See dc-integration-middleware directly for a list.
For any of the supported integrations, you will need follow the guidance to setup access from these vendors first and get your required credentials.
Details can be found in dc-demostore-integration for each of the supported commerce vendors.
There are 2 elements that you need to change to have your demostore work with a different supported eCommerce Vendor:
- Authoring - So that you can content manage product, category and user group experiences in the CMS.
- Front End - Rendering the right experiences from the commerce platform in the demostore front end
Note: Before changing an eCommerce vendor, it is advisable to use demostore-cli to 'clean' and re-import from latest otherwise you will have content using references not present in your commerce platform.
- In Amplience Dynamic Content, browse to the Development tab --> Extensions --> and select and open 'eCommerce Toolkit'.
- Click on the
Installation Parameters
tab and put in your configuration. - Save the extension.
This uses the same configuration as you have just put into the Installation Parameters
of your eCommerce Toolkit extension. In order to use as an environment variable the value must be on one line.
You can copy the eComm Toolkit extension params and run them through an online tool like this JSON To One Line as an example.
At the root of this project, in your .env.local
file copy this into the value for DEMOSTORE_CONFIG_ECOMM_JSON
.
You must keep the surrounding outer single quotes.
Example below where <PASTEHERE>
is the single line configuration you have copied
DEMOSTORE_CONFIG_ECOMM_JSON='<PASTEHERE>'
Feel free to also refer to sample-.env.local
Then restart your local development server by running npm run dev
- In Vercel, browse to your project and open
- Click on Settings
- Go to Environment Variables
- Edit the Environment Variable called
DEMOSTORE_CONFIG_ECOMM_JSON
- Paste the original one line value (ie, without surrounding single quotes)
- Redeploy your application