Skip to content

Instantly share code, notes, and snippets.

@weotch
Last active June 3, 2016 22:29
Show Gist options
  • Save weotch/9e7dfdfb2ad744a36f6b to your computer and use it in GitHub Desktop.
Save weotch/9e7dfdfb2ad744a36f6b to your computer and use it in GitHub Desktop.
Managing Shopify content

Here is a summary of different options that Shopify offers for managing content inclduing managing externally.

The config/settings_schema.json file lives in your theme and lets you define fields that are editable in the Storefront editor. These values can be used in css and js as well as the liquid files.

You can create a number of different field types:

Lets your route paths on your shopify site to GET requests on a remote server. That server can return liquid code using all the Shopify helpers. The liquid could be generated by a script. Thus, you can build pages that are served within your Shopify site using external data. However, you can only use a small set of root paths:

Thus, this doesn't let you combine a home page or product page with external data.

You can store meta data on many types of records. Shopify does not provide a UI to edit these fields, it's only available via the API.

Shopify's docs recommend a couple different apps to do they either (1) are a chrome extensions that must be installed on the admin's computer (2) are hosted apps that give you a very clunky interface to touching metadata throughout the site. None I would recommend as a good experience for a client.

However, metafield data can be accessed through liquid templates to add all sorts of missing features. A block of HTML could be rendered externally and stored in a metafield and used to add some complicated UI to a page whose data is stored externally. For instance, maybe you have an Instagram feed that is compiled by an external server with a Shopify access token. It could write the HTML for the feed to a metafield on the homepage which is just straight rendered out by template tags. It could also be accessed through a global object

Here are some ways metafield management could be done better:

You can create iFramed apps that load within the admin dashboard. You can use a JS API to do things to interact with the Shopify admin chrome. This could be used to render an interface allowing the admin to edit metadata for a record, like a product. In essence, you could build your own, customized metafield editor.

Shop admin links

A Shopify app can register links at different detail pages in the Shopify dashboard. These would redirect to your app, passing along details of the page the admin was interacting with. This could be another avenue to generating targeted metafield UIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment