Skip to content

Instantly share code, notes, and snippets.

Last active February 12, 2021 21:37
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="{{ }}"><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 %}
<strong>{{ info.label }}:</strong> {{ variant.metafields.custom_fields[info.key] }}
{% endif %}
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment