Reputation: 57
I can access my metafield information like so:
{% assign mf = product.metafields.Specs %}
{% unless mf == empty %}
{% for mf in product.metafields.Specs %}
{{ mf.first }}: {{ mf.last }} <br />
{% endfor %}
{% endunless %}
But that doesn't get me anything but the key:value. How do I get the other information? I have tried:
{% assign mf = product.metafields.Specs %}
{% unless mf == empty %}
{% for mf in product.metafields.Specs %}
{{ mf.key }}: {{ mf.value }} : {{ mf.description }} <br />
{% endfor %}
{% endunless %}
But that just gives me a list of ":" with none of the text. What am I doing wrong there?
Upvotes: 2
Views: 1640
Reputation: 808
How about using this:
{% assign mf = product.metafields.Specs %}
{% unless mf == empty %}
{% for f in product.metafields.Specs %}
{{ f.first }}: {{ f.last }} : {{ mf[f.first].description }} <br />
{% endfor %}
{% endunless %}
Upvotes: 0