Shopify is a leading ecommerce platform for businesses of all sizes. It allows you to set up an online store to sell your products.
With the Contentstack Marketplace Shopify app, you can use and refer to the products from your Shopify account within your Contentstack entries.
Let's follow this step-by-step guide to install and configure Shopify within your stack.
To get your configuration details for Shopify, follow the steps given below:




Note: The Storefront API access token is required to connect your store with Contentstack. Make a note of this access token to be used in the next step.
Follow the steps to install the app in Contentstack.





Note: Please enter the URL without the http:// and https:// prefixes.
Alternatively, you can set a configuration as the default by clicking three dots on the top-right side of the configuration section and then selecting Set As Default.
Note: At least one store configuration should be selected as the default.
In the Confirm Deletion modal, add the configuration name and click Delete.
Similarly, you can add multiple configurations by following the steps discussed above.
If you select Custom Fields then the Shopify Keys drop-down appears. By default, the id and title keys are already selected inside the dropdown.If you want to create a new key, click the + New Key Field option.
In the Add Shopify Key Field modal, enter the Key Name or Path and click the Create button to create a new key.
Note: Please enter the URL without the http:// and https:// prefixes.

Additional Resource: For more information on UI locations, please refer to the Installed Apps guide.

To use the Shopify app within an entry of your stack, follow the steps given below:

This adds Shopify-Product Field in the custom field.
This adds Shopify-Collection Field in the custom field.
This adds Shopify-Deprecated in the custom field.

The key:value passed in the configuration object overrides the default app configuration settings.
In case you want to use a different Shopify account(s) for any custom field within the same stack, you need to specify the Shopify store name in the Config Parameter.
Configuration Object:
{
"config_label": ["Store 2"],
}
Adding locale based configuration::
To add a locale based configuration, add a locale parameter to the additional configuration object which specifies the locale value (for example: en-us) as the object key and the configuration object as the value to the locale.
localeConfiguration Object:
{
"config_label": ["Store 2"],
"locale": {
"en-us": {
"config_label": ["Store 1", "Store 3"]
},
"fr-fr": {
"config_label": []
}
}
}
Note: If any configuration value is not added, or if all the values are empty in the Config Parameter properties settings, the Shopify app uses the default configuration which was set up in step 2.
Note: In the new version of Shopify, you can select both products and collections in the same entry.
You can filter products based on your stores. By default, the store configured at the time of installation in step 2 is selected.
You can filter products based on your collections. Click the Select Collection drop-down and choose the collection to filter the products.
You can also search and filter products in the Shopify selector page.
Hover over the product on the Shopify selector page, and you can see the View in Shopify option to go directly to the Shopify platform.
The products you selected are referenced within your entry in the thumbnail view.
To view the products in list view, select the List view option from the dropdown.
The products you selected are referenced within your entry in a list.
Thumbnail View
List View
Note: You must save your entry to get the product details in the Sidebar Widget.
You can also search and view the product details.
You can filter collections based on your stores. By default, the store configured at the time of installation in step 2 is selected.
You can also search and filter collections in the Shopify selector page.
Hover over the collection on the Shopify selector page, and you can see the View in Shopify option to go directly to the Shopify platform.
The collections you selected are referenced within your entry.
To view the collections in list view, select the List view option from the dropdown.
The collections you selected are referenced within your entry in a list.
Thumbnail View
List View
