This app enables the selection of products (and product variants) from a Swell store on Short text or Short text, list fields.
- When variant selection is disabled, the selected product's ID is saved as the field value.
- When variant selection is enabled, the field value will be in the format
{productID}:{variantID}
.
- In your Contentful organization, create a new private app called 'Swell'.
- Enter
https://swell-contentful-picker.vercel.app
in the App URL field. - Under Locations, select App configuration screen, Entry field, and the Short text and/or Short text, list field types.
- Save the configuration and click Install to space
- Enter the Swell store ID and public key, and select which fields to use the product picker for.
- Click Save. The app is now ready to use.
This project was bootstrapped with Create Contentful App.
In the project directory, you can run:
Creates or updates your app definition in contentful, and runs the app in development mode. Open your app to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
To make your app look and feel like Contentful use the following libraries:
- Forma 36 – Contentful's design system
- Contentful Field Editors – Contentful's field editor React components
Read more and check out the video on how to use the CLI.
Create Contentful App uses Create React App. You can learn more in the Create React App documentation and how to further customize your app.