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
- Log in to your account at the commercetools Merchant Center and select your project.
- On the sidebar click Settings and select Developer settings.
- Click Create new API client.
- Give a suitable name and select the scopes as shown below from the view section and then click the Create API client button.
- 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:
- Log in to your Contentstack account.
- On the left-hand side primary navigation, you will find a new icon for Marketplace (as shown below). Click 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 Install App.
- In the popup window, select the stack for which you want to install the commercetools app and click 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 the Open Stack button 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 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 Proceed.
- After adding the app, click 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 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.