Build with Sanity MCP in Replit. Prizes up for grabs! Submit by June 14

Snipcart Best Sellers

Studio v2
This plugin only works with an older version of Sanity Studio (v2), which is deprecated.

A dashboard widget for viewing top sellers from Snipcart. This plugin is a part of the Steel headless commerce sudo framework.

By Jacob Størdahl

v2 install command (deprecated)

sanity install snipcart-bestsellers

sanity-plugin-snipcart-bestsellers 🔌

A dashboard widget for viewing top sellers from Snipcart. This plugin is a part of the Steel headless commerce tool kit.

Installation

Be sure to have dashboard installed in your studio by running...

sanity install @sanity/dashboard

Then install the widget...

sanity install snipcart-bestsellers

Configuration

The plugin can be configured by creating a file called dashboardConfig.js in the root of your studio. You'll then need to add the following object to the parts array in your projects sanity.json...

{ 
  "implements": "part:@sanity/dashboard/config", 
  "path": "./dashboardConfig.js" 
}

You'll then need to add some boilerplate to dashboardConfig.js along with options for the plugin...

export default {
  widgets: [
    {
      name: 'snipcart-bestsellers',
      options: 
      {
        apiKey: string, // SNIPCART SECRET API KEY
        limit: number, //DEFAULTS TO FIVE
      }
    }
  ]
}

Options

OptionTypeDescription
apiKeystringa secret api key from Snipcart. Check the docs.
limitnumberthe number of products to be returned

License

MIT © Jacob Størdahl See LICENSE