Hey! I’m looking for feedback & possible help for a project I’m working on. I’m trying to show variant metafield next to sizes. Here’s the code I’m working on at the moment:
{%- if product.type == 'Cyklar' -%}
Passar längd:
{{ variant.metafields.custom.langd.storleksguide_cyklar[0] }} - {{ variant.metafields.custom.langd.storleksguide_cyklar.value.last }}
cm
{% endif %}
Here’s my metafield
Name: storleksguide cyklar
Namespace and key: custom.langd
Single line text
List of values
Since its a list of values I use “[0]” to get the first value and “.last” to get the last value. Final text should be something like “Passar längd: 170-185 cm” where 170 and 185 is values from the variant metafield.
