Skip to main content

Configuration

package:@deity/falcon-commercetools-module

Prerequisite

Before you get started you'll need a Commercetools store and have access to the admin panel.

Configuring Composer

Using our example project, demo-v3 you will have Commercetools support without having to do any custom development.

If you're using another demo, you can just install @deity/falcon-commercetools-module (add it to server/package.json) and enable it in configuration file (server/config/default.json) and assign to shop extension:

  "modules": {
...
"commercetools": {
"module": "@deity/falcon-commercetools-module",
"config": {
"region": "",
"projectKey": "",
"url": "",
"authUrl": "",
"clientId": "",
"secret": ""
}
}
},
"extensions": {
...
"shop": {
"package": "@deity/falcon-shop-extension",
"module": "commercetools"
}
...
}

Use your server/config/local.json (for local development) or your environment variables (for production setup) to the sensitive data where needed.

Replace values below with values applicable for your store.

  "modules": {
"commercetools": {
"config": {
"region": "australia-southeast1.gcp",
"projectKey": "sandbox-au",
"url": "https://api.australia-southeast1.gcp.commercetools.com",
"authUrl": "https://auth.australia-southeast1.gcp.commercetools.com",
"clientId": "XXXXXXXXXXXXXXXXXXXXXXXX",
"secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
}

Environment Variables

The following environment variables are mapped directly to the configuration option, so it's recommended to use these when setting up production deployment (and of course these can be used in development mode). To set these variables in deployed environments, you can make use of the dcloud env:var:set command in our CLI tool.

  • COMMERCETOOLS_REGION
  • COMMERCETOOLS_PROJECT_KEY
  • COMMERCETOOLS_URL
  • COMMERCETOOLS_AUTH_URL
  • COMMERCETOOLS_CLIENT_ID
  • COMMERCETOOLS_SECRET