commercetools is a leading digital commerce platform that allows you to create powerful, highly customized commerce experiences while building a profitable, sustainable brand.
With Marketplace, you can easily install the commercetools application and use it in your entry to refer to products or product categories from commercetools in your entries.
This step-by-step guide explains how to install and configure commercetools in your stack.
Steps for Execution
- Create a New commercetools API Client
- Install and Configure commercetools in Contentstack Marketplace
- Use commercetools within your Stack
Create a New commercetools API Client
- Login to your account at the commercetools Merchant Center and select your project.
- On the sidebar click on Settings and select Developer settings.
- Click on Create new API client.
- Give a suitable name and select the scopes as shown below from the view section and then click on the Create API client.
- Store the generated project key, client ID and client secret, since you will need them to configure the app in Contentstack.
Note: Refer the commercetools Composable Commerce Regions page to know the region of your commercetools account.
You can check the locale you use to specify the search locale in config field locales through Settings > Project Settings > Languages Section.
Install and Configure commercetools in Contentstack Marketplace
To install the application in Contentstack, follow the steps below:
- Login to your Contentstack account.
- On the left-hand side primary navigation, you will find a new icon for Marketplace (as shown below). Click on the icon to go to the Marketplace.
- Within the Marketplace, you will be able to see all the apps available, hover over the commercetools app and click on Install App.
- In the popup window, select the stack for which you want to install the commercetools app and click on Install.
- On the Configuration page, select the region, enter the project key, client ID, client secret, and default search locale that you got in step 1.
Click on Save.
- Click on Open Stack to start using the commercetools app.
Use commercetools within your Stack
To use the commercetools application within an entry of your stack, follow the steps given below:
- Go to your stack and click the “Content Models” icon on the left navigation panel, and click on the + New Content Type button.
- Create a content type by adding relevant details as displayed below:
- In the Content Type Builder page, add a Custom field in your content type by clicking on the “Insert a field” link represented by a + sign.
- Under Select Extension/App, select commercetools - Product Field or commercetools - Category Field for products and categories, respectively, and click on Proceed.
- After adding the app, click on either Save or Save and Close to save your changes.
- To use the commercetools app, create an entry for this content type, and you will see this commercetools custom field on your entry page as shown below:
- Click on Add Product(s) or Add Category(s), to select products or product categories from your commercetools account and add them to your entry.
- The products and categories you select are referenced within your entry. You can add more products and categories or simply save and publish your entry.