Add a custom UI field to Contentful that allows users to search and select Shopify products.
git clone git@github.com:suhmantha1/contentful-ui-shopify.git
cd contentful-ui-shopify
npm installCreate a configuration file with your credentials for Contentful.
cp env.example .envOpen .env in a editor of your liking and add your Contentful space ID, and management token. Learn how to obtain a token.
Load environment variables
source .envAdd Shopify credentials in index.html. Replace REPLACE_shopifyUrl with your Shopify Url, which will be in the form https://demo.myshopify.com/api/graphql.
Then, replace REPLACE_shopifyToken with your Shopify token
npm run createCreate task will register the extension in your space on Contentful.
npm run updateUpdate task will upload the extension to your space on Contentful.
Shopify products are now available in your content model. Add a JSON Object field, and select Shopify Products in the appearance tab.

