Skip to main content

Setting Up Metaobjects

Set up metaobjects for custom product swatches

  1. On the left sidebar in your Shopify Admin, click "Content" > "Metaobjects".
  2. Click "Add Definition" on the top left
  3. Give it a name of Swatch Item
  4. Add two fields. One being a single line text with the name of "Title", and leave the checkmark that says Use this field as display name. Second, add a field of type "file" and set it to a single image, with the name of "Image"
  5. Now click "Save" then "Add Entries". You can add entries in here, each one having a title and image that will display on the swatch.
  6. Back in your metaobjects main screen, add another definition.
  7. Give this one a name of "Swatch Group"
  8. You can add as many fields as you like, each field will be a new swatch group to use in the them editor. When adding the fields, give them a name for reference, (remember the name as you will use it in the theme editor) and set it as a list of entries of type "metaobject".
  9. Set the reference to the "Swatch Item" you created earlier.
  10. Click Save, and add an entry.
  11. When adding the entry, you can select from the swatch items you added earlier.

Once you have your groups set up, make sure everything is saved and head on over to adding the swatch group to your product page.