Skip to content

Instantly share code, notes, and snippets.

@basilkhan05
Last active February 2, 2022 16:35
Embed
What would you like to do?
Liquid template to add bundle details to products in Shopify (Simple Bundles)
{% assign current_variant = product.selected_or_first_available_variant %}
{% assign bundled_variants = current_variant.metafields.simple_bundles.bundled_variants.value %}
{% unless bundled_variants == blank %}
<div class="product__description rte">
<p>This bundle includes:</p>
<ul>
{% for bundled_variant in bundled_variants %}
<li>
{{ bundled_variant.quantity_in_bundle }} x
{{ bundled_variant.product_title }}
{% unless bundled_variant.variant_title == 'Default Title' %}
({{ bundled_variant.variant_title }})
{% endunless %}
</li>
{% endfor %}
</ul>
</div>
{% endunless %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment