0.0.6 • Published 2 years ago

@sogody/sanity-shopify-am v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Sanity Shopify Asset Management

This plugin seamlessly integrates Shopify asset management in Sanity which allows uploading assets to Shopify CDN straight from Sanity Studio. We styled the Shopify file input react component to match default user experience.

Installation

In your Sanity project folder:

sanity install @sogody/sanity-shopify-am

This will add the Sogody Custom Sanity-Shopify Input File plugin as a input type.

Configuration

After installing the plugin through npm, \<name-of-plugin>.json file will be added to the Sanity Studio’s config directory. You must add your Shopify credentials to the \<name-of-plugin>.json which will be used by the plugin.

    {
        "ADMIN_API_URL": <yourAdminApiUrl>,
        "SHOPIFY_ACCESS_TOKEN": <yourShopifyAccessToken>
    }

How to configure?

To get configuration keys, fill out the following:

  1. Create a Shopify Private App, go to Apps > Develop Apps > Create an app.
  2. From your Shopify Private App Admin API section get:
    • API key and add it to ADMIN_API_URL
    • Password and add it to SHOPIFY_ACCESS_TOKEN
  3. Make sure that @sogody/sanity-shopify-am is present in sanity.json.

Usage

Make a schema type that uses the plugin's type shopifyURL. You can add the Shopify input field on your schema as below.

    {
        name: 'shopifyURL',
        title: 'Shopify Input File',
        type: 'shopifyURL',
    }

Install Extension

Install the Sanity Shopify AM chrome extension.