Using Metafield on your store

Author: Anna Nguyen 4403 views
Using Metafields on your Shopify store with EComposer

If you add product-specific images or text directly onto a single EComposer Product template, that exact same content will appear on every product using the template—while creating a separate template for each product can quickly use up your plan’s page limit. Shopify Metafields solve this by letting you store custom details (such as images, extra descriptions, videos, or downloadable files) on each product while maintaining a single EComposer template. Before getting started, check out our Metafields element guide to see how metafields work in the editor, then follow the steps below to create a metafield definition in your store.

1. Create a Metafield Definition in Shopify

To start using metafields with EComposer, first define what type of custom data your products (or other store resources) will store in your Shopify admin.

Good to know: While the example below uses Products, you can follow these exact same steps for Collections, Pages, Blogs, Blog posts, or any other metafield resource supported in Shopify.

Step 1: In your Shopify admin, go to Settings > Metafields and metaobjects, then click Products under Metafield definitions.

Open Settings, select Metafields and metaobjects, and choose Products

Step 2: On the Product metafield definitions page, click Add definition in the top-right corner to create a new metafield.

Click Add definition on the Product metafield definitions page

Step 3: Enter a Name for your metafield (Shopify automatically generates the Namespace and key right below it, such as custom.ecomposer_custom_image), click Select type to pick the content type that matches your data—for example, Image (File) for images or Single line text for short text—and click Save.

Enter the metafield name, note the namespace and key, and select a content type

Note on Namespace and key: Keep your Namespace and key limited to letters and underscores (avoid using numbers) so the metafield works smoothly with EComposer. Once your definition is saved, explore the relevant guides below to display your specific metafield type on your EComposer template.

Leave a Comment

Enjoy a free 3-day trial. Then get your first month for $1. Try Now.