Metafield lists

Metafield lists allow you to store multiple values in a single metafield. Use metafield lists to display additional products that complement the customer's selection, lists of ingredients, or for more powerful storefront filtering.

followi Metafield列表是可用的ng content types:

  • text fields
  • numbers
  • color
  • url
  • weight
  • volume
  • dimension
  • rating
  • 日期
  • 日期and time

You can create a metafield list for the following reference types:

  • products
  • variants
  • files
  • pages
  • collections
  • metaobjects
  • mixed reference

Use cases

Metafield lists allow you store and display information unique to your business. Use metafield lists to display additional products that complement the customer's selection, lists of ingredients, or for more powerful storefront filtering. You can dynamically display richer content across your entire catalog, which helps your customers make better purchasing decisions on your store.

For example, a clothing boutique might want to allow customers to filter options by season. Instead of the search returning products with a single value of "Spring" or "Summer", multiple seasons can be added to a single product (for example, a sweater that's perfect for both Spring and Summer). When a customer searches for Spring clothing, the perfect sweater will be returned as a result because the product has both "Spring" and "Summer" as metafield values.

You can use metafield lists to list the ingredients in your products. For example, a bakery might want to display a full list of ingredients in a cake. You can list all the ingedients as single-line text fields, and then display them on your storefront in aTextorRich Textsection or block.

Metafield lists can also be used to augment customer data. Create a list of preset color choices ("rose", "navy", "magenta") for your customers, and store the results in the customer's profile. Use the data to wrap the customer's purchases in their favorite color of gift wrapping for a special touch.

To create a metafield list, start by creating a newcustom metafield definition. Set the content type, and then check theAccept list of valuesbox.

After you've set up the definition in your Shopify admin, go to the part of your store where you want to add a metafield value. Lists of non-reference fields can be used intextorrich textsections and blocks, whereas reference lists can be used in custom sections or a third-party theme that uses product list settings.

Metafield lists

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.
  2. Navigate to theMetafieldssection, where the applicable metafield definitions display in a list.

  3. In theMetafieldssection, click the metafield.

  4. Depending on how you configured your metafield definition, do one of the following:

    • Enter your content.
    • ClickSelect an option, and then select a preset option from the list.
    • Repeat to add multiple values.
  5. ClickSave.

Reference metafield lists

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.
  2. Navigate to theMetafieldssection, where the applicable metafield definitions display in a list.

  3. In theMetafieldssection, click the reference metafield.

  4. Depending on the reference type, you'll have a few different options.

    • For product references, clickSelect products.
    • For file references, clickSelect files.
    • For page references, clickSelect pages.
    • For variant references, clickSelect variants.
    • For collection references, clickSelect collections.
    • For metaobject and mixed references, clickSelect entries.
  5. Repeat to add multiple items.

  6. ClickSave.

After you add values to your metafield list, you canconnect your metafields to your themeto display your custom information on your online store.

Ready to start selling with Shopify?Try it free