datocms-plugin-shopify-instance-selector
v0.1.2
Published
Allows the user to select a Shopify instance (Product, Product Variant, Collection) and store the ID of that instance in a JSON field.
Readme
Shopify Instance Selector
A DatoCMS plugin that allows editors to search and select Shopify resources (products, variants, collections) directly within DatoCMS JSON fields.
This plugin is built using the DatoCMS Plugin SDK and wouldn't be possible without the Shopify Product DatoCMS Plugin as a reference.
Why This Exists
Managing e-commerce content across multiple platforms can be challenging. This plugin bridges the gap between DatoCMS and Shopify by:
- Enabling direct Shopify resource selection within DatoCMS
- Preventing manual copying and pasting of Shopify IDs
- Reducing errors through visual confirmation of selected items
Requirements
- DatoCMS project
- Shopify store
- Shopify Storefront API access token
- Shopify store URL
Installation
- Add the plugin to your DatoCMS project
- Configure the plugin with your Shopify credentials:
- Storefront URL (e.g.,
https://your-store.myshopify.com) - Storefront Access Token
- Storefront URL (e.g.,
Supported Models
The plugin supports the following Shopify resources:
- Products: Search and select Shopify products
- Product Variants: Search and select specific variants of products
- Collections: Search and select product collections
Further resource types may be added in the future and can be requested via the issue tracker.
Usage
- Create a JSON field in your DatoCMS model
- Set the field appearance to "Shopify Instance Selector"
- Configure the field to specify which type of Shopify resource it should handle
- Use the field in your content to search and select Shopify resources
Development
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildContributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For support, please:
- Check the existing issues
- Create a new issue with a detailed description
- Provide steps to reproduce any problems
About
Created and maintained by Rob Watkiss. For more information about DatoCMS plugins, visit the DatoCMS documentation.
