Gathering Metafields

1 0 1



I was wondering what is the best method to gather metafields from products in bulk? It seems to be that the only  way is to use a product ID then gather it's metafields. I'm wondering if there's a way to perhaps provide multiple IDs or to gather a group of products with their metafields.


Any help would be appreciated, thank you!

Replies 2 (2)

Shopify Partner
5938 1429 1759

HI @ruffgenius 


Have you tried using a collection to group the products instead? Then you can use the code below as reference to call the metafield. Used the collection handle "my-collection" in this example.


{% for product in collections['my-collection'].products %}
{{ product.metafields.my_fields.instructions }}
{% endfor %}


Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 



Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Shopify Partner
6338 578 1343

@ruffgenius wrote:

I was wondering what is the best method to gather metafields from products in bulk?

Collections are the best way if just trying to spit product info out in a theme.

Otherwise use the bulk editor in the admin if just needing to view the data.


Make sure this isn't an XY problem ,what are trying to do.

What do you mean by "gather". What happens after they are gathered.

What is the actual goal.







Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to