{%- assign selected_variant = product.selected_or_first_available_variant -%} {%- assign color_label = 'color,colour,couleur,cor,colore,farbe,색,色,カラー,färg,farve,szín,barva' | split: ',' -%} {%- unless product.has_only_default_variant -%} {%- comment -%} The variant data is outputted as a JSON, which allows the theme to emit an event with the data when the variant changes. This must not be removed. {%- endcomment -%} {%- for option in product.options_with_values -%} {%- assign downcase_option = option.name | downcase -%} {%- capture option_name -%}option{{ option.position }}{%- endcapture -%} {%- assign option_selector_type = block.settings.selector_mode -%} {%- assign variant_image_options = block.settings.variant_image_options | replace: ', ', ',' | downcase | split: ',' -%} {%- assign swatch_count = option.values | map: 'swatch' | compact | size -%} {%- if swatch_count > 0 and block.settings.color_mode == 'swatch' %} {%- assign option_selector_type = 'swatch' -%} {%- endif -%} {% if swatch_count == 0 and color_label contains downcase_option and block.settings.color_mode != 'none' %} {%- assign option_selector_type = 'swatch' -%} {%- endif -%} {%- if variant_image_options contains downcase_option -%} {%- assign option_selector_type = 'variant' -%} {%- endif -%}
{%- case option_selector_type -%} {%- when 'swatch' -%} {{ option.name }}: {{ option.selected_value }}
{%- assign color_swatch_config = settings.color_swatch_config | newline_to_br | split: '
' -%} {%- for value in option.values -%} {%- assign downcased_value = value | downcase -%} {%- capture color_id -%}{{ product_form_id }}-{{ option_name }}-{{ forloop.index }}{%- endcapture -%}
{%- if value.product_url != blank -%} {%- if value == option.selected_value -%} {%- endif -%} {{ value }} {%- render 'icon', icon: 'cross-sold-out' -%} {%- else -%} {%- endif -%}
{%- endfor -%}
{%- when 'variant' -%} {{ option.name }}: {{ option.selected_value }}
{%- for value in option.values -%} {%- capture variant_swatch_id -%}{{ product_form_id }}-{{ option_name }}-{{ forloop.index }}{%- endcapture -%} {%- liquid assign image = value.variant.featured_media assign option_name = 'option' | append: option.position if value.variant.featured_media == blank for variant in product.variants if variant[option_name] == value assign image = variant.featured_media break endif endfor endif assign image = image | default: product.featured_media -%}
{%- if value.product_url != blank -%} {%- if value == option.selected_value -%} {%- endif -%}
{{- image | image_url: width: image.width | image_tag: loading: 'lazy', sizes: '120px', widths: '120,240' -}}
{% render 'icon', icon: 'cross-sold-out' %}
{%- else -%} {%- endif -%}
{%- endfor -%}
{%- when 'block' -%} {{ option.name }}: {{ option.selected_value }}
{%- for value in option.values -%} {%- capture block_swatch_id -%}{{ product_form_id }}-{{ option_name }}-{{ forloop.index }}{%- endcapture -%}
{%- if value.product_url != blank -%} {%- if value == option.selected_value -%} {%- endif -%} {{ value }} {%- else -%} {%- endif -%}
{%- endfor -%}
{%- when 'dropdown' -%} {%- capture dropdown_id -%}{{ product_form_id }}-{{ option_name }}-{{ forloop.index }}{%- endcapture -%}
{%- render 'icon', icon: 'arrow-bottom' -%}
{%- endcase -%}
{%- endfor -%}
{%- else -%} {%- endunless -%}
{%- if product.selected_or_first_available_variant != nil -%}
{{ 'product.form.price' | t }}:
{%- if selected_variant.compare_at_price > selected_variant.price -%} {{ 'product.general.sale_price' | t }} {%- if settings.currency_code_enabled -%} {{- selected_variant.price | money_with_currency -}} {%- else -%} {{- selected_variant.price | money -}} {%- endif -%} {{ 'product.general.regular_price' | t }} {%- if settings.currency_code_enabled -%} {{- selected_variant.compare_at_price | money_with_currency -}} {%- else -%} {{- selected_variant.compare_at_price | money -}} {%- endif -%} {%- else -%} {{ 'product.general.sale_price' | t }} {%- if settings.currency_code_enabled -%} {{- selected_variant.price | money_with_currency -}} {%- else -%} {{- selected_variant.price | money -}} {%- endif -%} {%- endif -%}
{%- assign variant_to_use = selected_variant | default: product.selected_or_first_available_variant -%} {%- if variant_to_use.unit_price -%}
{{- variant_to_use.unit_price | unit_price_with_measurement: variant_to_use.unit_price_measurement -}}
{%- endif -%} {{- form | payment_terms -}} {%- if block.settings.show_taxes_included -%} {%- if cart.taxes_included or shop.shipping_policy.body != blank -%}

{%- if cart.taxes_included -%} {{ 'product.general.include_taxes' | t }} {%- endif -%} {%- if shop.shipping_policy.body != blank -%} {{ 'product.general.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}

{%- endif -%} {%- endif -%}
{%- endif -%} {%- if block.settings.show_inventory_quantity and product.template_suffix != 'pre-order' and product.selected_or_first_available_variant != nil -%}
{{ 'product.form.inventory' | t }}:
{%- if selected_variant.inventory_management -%} {%- if selected_variant.available -%} {%- if selected_variant.inventory_quantity <= 0 and selected_variant.requires_shipping -%} {%- if selected_variant.incoming -%} {%- capture next_incoming_date -%}{{ selected_variant.next_incoming_date | date: format: 'date' }}{%- endcapture -%} {{ 'product.form.incoming_stock' | t: next_incoming_date: next_incoming_date }} {%- else -%} {{ 'product.form.oversell_stock' | t }} {%- endif -%} {%- elsif block.settings.low_inventory_threshold > 0 -%} {%- if selected_variant.inventory_quantity <= block.settings.low_inventory_threshold -%} {{ 'product.form.low_stock_with_quantity_count' | t: count: selected_variant.inventory_quantity }} {%- else -%} {{ 'product.form.in_stock_with_quantity_count' | t: count: selected_variant.inventory_quantity }} {%- endif -%} {%- else -%} {{ 'product.form.in_stock' | t }} {%- endif -%} {%- else -%} {%- if selected_variant.incoming -%} {%- capture next_incoming_date -%}{{ selected_variant.next_incoming_date | date: format: 'date' }}{%- endcapture -%} {{ 'product.form.incoming_stock' | t: next_incoming_date: next_incoming_date }} {%- else -%} {{ 'product.form.sold_out' | t }} {%- endif -%} {%- endif -%} {%- else -%} {{ 'product.form.in_stock' | t }} {%- endif -%} {%- for tag in product.tags -%} {%- if tag contains '__stock:' -%} {%- assign stock_countdown_max = tag | split: '__stock:' | last | times: 1.0 -%} {%- break -%} {%- endif -%} {%- endfor -%} {%- comment -%} Historically the theme used a tag based approach instead of a setting. We keep this for compatibility, but then fallback to the setting, which allows a simpler setup {%- endcomment -%} {%- assign stock_countdown_max = stock_countdown_max | default: block.settings.progress_bar_max_value | times: 1.0 -%}
{%- endif -%} {%- if product.template_suffix != 'contact' -%} {%- if block.settings.show_quantity_selector -%}
{%- assign variant = product.selected_or_first_available_variant -%}
{%- liquid assign variant = product.selected_or_first_available_variant assign quantity_rules = '' if variant.quantity_rule.min > 1 assign rule = 'product.quantity.minimum_of' | t: min: variant.quantity_rule.min assign quantity_rules = quantity_rules | append: ' / ' | append: rule endif if variant.quantity_rule.max != nil assign rule = 'product.quantity.maximum_of' | t: max: variant.quantity_rule.max assign quantity_rules = quantity_rules | append: ' / ' | append: rule endif if variant.quantity_rule.increment > 1 assign rule = 'product.quantity.increment_of' | t: step: variant.quantity_rule.increment assign quantity_rules = quantity_rules | append: ' / ' | append: rule endif -%} {%- if quantity_rules != blank -%}

{{ quantity_rules | remove_first: ' / ' | capitalize }}

{%- endif -%}
{%- else -%} {%- endif -%} {%- endif -%}