All things Shopify and commerce
Hello everyone, I’ve declared a product metafield as a list of values; how can I retrieve those values using code? Thank you!!
Solved! Go to the solution
This is an accepted solution.
{% assign related_products = product.metafields.custom.custom_product_related %}
{% for related_product in related_products.value %}
<div class="card">
<h3>{{ related_product.title }}</h3>
</div>
{% endfor %}
I didn't make sure the code is correct. But it is like this.
This is an accepted solution.
{% assign related_products = product.metafields.custom.custom_product_related %}
{% for related_product in related_products.value %}
<div class="card">
<h3>{{ related_product.title }}</h3>
</div>
{% endfor %}
I didn't make sure the code is correct. But it is like this.
Thank you so much !!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025