{% assign badges = productBadges | where: 'type', 'graphic' %}
{% for badge in badges %}
{% if product.tags contains badge.tag %}
{% if badge.icon contains '.' %}
{% else %}
{% endif %}
{% break %}
{% endif %}
{% endfor %}
{% assign badges = productBadges | where: 'type', 'icon' %}
{% for badge in badges %}
{% if product.tags contains badge.tag %}
{% if badge.icon contains '.' %}
{% else %}
{% endif %}
{% break %}
{% endif %}
{% endfor %}
{% assign badges = productBadges | where: 'type', 'option' %}
{% for badge in badges %}
{% assign show_badge = false %}
{% if product.tags contains badge.tag %}
{% assign show_badge = true %}
{% endif %}
{% for sibling in product.siblings %}
{% if sibling.tags contains badge.tag %}
{% assign show_badge = true %}
{% endif %}
{% endfor %}
{% if show_badge %}
{{ badge.label }}
{% endif %}
{% endfor %}
-
{% assign types = product.siblings | map: 'product_type' | uniq %}
{% for type in types %}
{% if type == blank %}{% continue %}{% endif %}
- {{ type | split : ' - ' | last }} {% endfor %} {% unless types contains product.type %}
- {{ product.type | split : ' - ' | last }} {% endunless %}
{%- assign swatch_styles = 'h-full w-full object-contain' -%}
{% assign limit = 4 %}
{% if product.siblings.size > 4 %}
{% assign limit = 3 %}
{% endif %}
{% for sibling in product.siblings limit:limit%}
{% endfor %}
{% if product.siblings.size > 4 %}
{% endif %}
{% if product.available == false %}
売り切れ
{% endif %}
+{{ product.siblings.size | minus: 4 }} More
{% endif %}
{% for badge in productBadges | where: 'type', 'text'%}
{% if product.tags contains badge.tag and badge.type != 'option' and badge.type != 'icon' and badge.type != 'graphic' %}
{{ badge.item }}
{% endif %}
{% endfor %}