Shopify is a leading commerce platform for businesses of all sizes. It allows you to set up an online store to sell your products.
With Marketplace, you can easily install the Shopify application and use it within your stack to refer to products from Shopify in your entries.
This step-by-step guide explains how to install and configure Shopify within your stack.
The steps to be performed are as follows:
- Get your Storefront API access token from Shopify
- Install and Configure Shopify in Contentstack Marketplace
- Use Shopify within your Stack
Get your Storefront API access token from Shopify
To get your credentials from Shopify, follow the steps given below:
- Login to your Shopify account.
- On the Admin portal page, click on Apps from the left navigation menu.
- Then, navigate to the bottom of the Apps page and click on the Develop app for your store link.
- On the App Development page. click on Create an app. Mention your App name and select the App developer of your app, then click on the Create app button.
- On the next screen, navigate to the Configuration section and Configure the Storefront API integration for your app.
- Now, select access scopes for your Storefront API and Save your configuration.
- Finally, click on the Install app button, confirm your installation and proceed to get the Storefront API access token.
The Storefront API access token is required to connect your store with Contentstack so make a note of this access token to be used in the next step.
Install and Configure Shopify 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 Shopify app and click on Install App.
- In the popup window, select the stack for which you want to install the Shopify app and click on Install.
- Enter the Domain and Storefront API access token on the resulting Configuration page and click on Save.
- Click on Open Stack to start using the Shopify application.
Use Shopify within your Stack
To use the Shopify 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 Shopify and click on Proceed.
- After adding the app, click on either Save or Save and Close to save your changes.
- To use the Shopify app, create an entry for this content type, and you will see this Shopify custom field on your entry page as shown below:
- Click on Add Collection, to select collections from your Shopify account and add them to your entry.
- The collections you select are referenced within your entry. You can add more collections by clicking on Add Collection. Finally, Save your entry.