Metafield lists
Metafield lists allow you to store multiple values in a single metafield. Use metafield lists to show additional products that compliment the customer's selection, lists of ingredients, or for more powerful storefront filtering.
Metafield列表可用于以下公司ntent types:
- text fields
- numbers
- color
- url
- weight
- volume
- dimension
- rating
- date
- date and time
You can create a metafield list for the following reference types:
- products
- variants
- files
- pages
- collections
- metaobjects
- mixed reference
Use cases
Metafield列表允许你存储和显示通知ation unique to your business. Use metafield lists to show additional products that compliment the customer's selection, lists of ingredients, or for more powerful storefront filtering. You can dynamically show 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 intext
orrich text
sections and blocks, whereas reference lists can be used in custom sections or a third-party theme that uses product list settings.
Metafield lists
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.
Click the metafield.
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.
ClickSave.
Reference metafield lists
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.
Click the reference metafield.
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.
Repeat to add multiple items.
ClickSave.
After you add values to your metafield list, you canconnect your metafields to your themeto display your custom information on your online store.