Skip to content

Instantly share code, notes, and snippets.

@carbone
Last active Feb 12, 2021
Embed
What would you like to do?
<div class="variant-custom-fields-wrapper">
{% for variant in product.variants %}
<div class="variant-custom-fields" data-variant-id="{{ variant.id }}"><br />
<div class="variant__title"><strong>{{ variant.title }}</strong></div>
<div class="variant__cf">
{% for info in shop.metafields.custom_fields["variant_fields"] %}
{% if variant.metafields.custom_fields[info.key] !=blank %}
<div>
<strong>{{ info.label }}:</strong> {{ variant.metafields.custom_fields[info.key] }}
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endfor %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment