{% comment %} Variant List Row Accepts: - item: {Object} Variant or Product object - sku: {String} Sku of Product or Variant (optional) - image: {Object} Product or Variant image (optional) Usage: {% render 'quick-order-list-row' variant: variant %} {% endcomment %} {% # theme-check-disable %} {% assign cart_qty = cart | item_count_for_variant: variant.id %} {% # theme-check-enable %} {%- if section.settings.show_image -%}
{% if image %} {%- assign img_height = 43 | divided_by: image.aspect_ratio | ceil -%} {{ image | image_url: width: 86 | image_tag: loading: 'lazy', fetchpriority: 'low', decoding: 'async', class: 'variant-item__image', width: 43, height: img_height, widths: '86', alt: image.alt | escape }} {% endif %}
{%- endif -%}
{{ item.title | escape }} {%- if section.settings.show_sku -%} {{ sku | escape }} {%- endif -%}
{{ item.title | escape }} {%- if section.settings.show_sku -%} {{ sku | escape }} {%- endif -%}
{%- assign item_price = item.price | money -%} {%- if item.compare_at_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.compare_at_price | money }}
{{ 'products.product.price.sale_price' | t }}
{%- if variant.quantity_price_breaks.size > 0 -%} {%- liquid assign volume_pricing_array = variant.quantity_price_breaks | sort: 'quantity' | reverse -%}
{%- if cart_qty < volume_pricing_array.last.minimum_quantity -%} {%- assign variant_price = variant.price | money -%} {{- 'sections.quick_order_list.each' | t: money: variant_price -}} {%- else -%} {%- for price_break in volume_pricing_array -%} {%- if cart_qty >= price_break.minimum_quantity -%} {%- assign price_break_price = price_break.price | money -%} {{- 'sections.quick_order_list.each' | t: money: price_break_price -}} {%- break -%} {%- endif -%} {%- endfor -%} {%- endif -%}
{%- else -%} {{- 'sections.quick_order_list.each' | t: money: item_price -}} {%- endif -%}
{%- else -%} {%- if variant.quantity_price_breaks.size > 0 -%} {%- liquid assign volume_pricing_array = variant.quantity_price_breaks | sort: 'quantity' | reverse -%}
{%- if cart_qty < volume_pricing_array.last.minimum_quantity -%} {%- assign variant_price = variant.price | money -%} {{- 'sections.quick_order_list.each' | t: money: variant_price -}} {%- else -%} {%- for price_break in volume_pricing_array -%} {%- if cart_qty >= price_break.minimum_quantity -%} {%- assign price_break_price = price_break.price | money -%} {{- 'sections.quick_order_list.each' | t: money: price_break_price -}} {%- break -%} {%- endif -%} {%- endfor -%} {%- endif -%}
{%- else -%} {{- 'sections.quick_order_list.each' | t: money: item_price -}} {%- endif -%} {%- endif -%} {%- if item.available and item.unit_price_measurement -%}
{{ 'products.product.price.unit_price' | t }} {{ item.unit_price | money }}  {{ 'accessibility.unit_price_separator' | t }}  {%- if item.unit_price_measurement.reference_value != 1 -%} {{- item.unit_price_measurement.reference_value -}} {%- endif -%} {{ item.unit_price_measurement.reference_unit }}
{%- endif -%} {%- render 'loading-spinner' -%} {% comment %} TODO: enable theme-check once `line_items_for` is accepted as valid filter {% endcomment %} {% # theme-check-disable %} {{ cart | line_items_for: item | sum: 'original_line_price' | money }} {% # theme-check-enable %} {%- liquid assign check_against_inventory = true if variant.inventory_management != 'shopify' or variant.inventory_policy == 'continue' assign check_against_inventory = false endif if variant.quantity_rule.min > variant.inventory_quantity and check_against_inventory assign quantity_rule_soldout = true endif assign has_qty_rules = false if variant.quantity_rule.increment > 1 or variant.quantity_rule.min > 1 or variant.quantity_rule.max != null assign has_qty_rules = true endif assign has_vol_pricing = false if variant.quantity_price_breaks.size > 0 assign has_vol_pricing = true endif assign is_available = false assign has_popover = false unless variant.available == false or quantity_rule_soldout assign is_available = true endunless if has_qty_rules or has_vol_pricing assign has_popover = true endif -%}
{%- if has_qty_rules or has_vol_pricing -%} {%- endif -%} {%- if variant.available == false or quantity_rule_soldout -%} {{ 'products.product.sold_out' | t }} {%- else -%} {% comment %} TODO: Remove theme check {% endcomment %} {% # theme-check-disable %} {% assign cart_qty = cart | item_count_for_variant: variant.id %} {% # theme-check-enable %} {% render 'quantity-input', variant: variant %} {%- endif -%}
{%- if cart_qty > 0 -%} {% render 'icon-remove' %} {%- endif -%}
{%- if has_popover -%} {%- endif -%} {%- if has_vol_pricing or has_qty_rules -%} {%- endif -%}
{%- assign item_price = item.price | money -%} {%- if item.compare_at_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.compare_at_price | money }}
{{ 'products.product.price.sale_price' | t }}
{%- if variant.quantity_price_breaks.size > 0 -%} {%- liquid assign volume_pricing_array = variant.quantity_price_breaks | sort: 'quantity' | reverse -%}
{%- if cart_qty < volume_pricing_array.last.minimum_quantity -%} {%- assign variant_price = variant.price | money -%} {{- 'sections.quick_order_list.each' | t: money: variant_price -}} {%- else -%} {%- for price_break in volume_pricing_array -%} {%- if cart_qty >= price_break.minimum_quantity -%} {%- assign price_break_price = price_break.price | money -%} {{- 'sections.quick_order_list.each' | t: money: price_break_price -}} {%- break -%} {%- endif -%} {%- endfor -%} {%- endif -%}
{%- else -%} {{- 'sections.quick_order_list.each' | t: money: item_price -}} {%- endif -%}
{%- else -%} {%- if variant.quantity_price_breaks.size > 0 -%} {%- liquid assign volume_pricing_array = variant.quantity_price_breaks | sort: 'quantity' | reverse -%}
{%- if cart_qty < volume_pricing_array.last.minimum_quantity -%} {%- assign variant_price = variant.price | money -%} {{- 'sections.quick_order_list.each' | t: money: variant_price -}} {%- else -%} {%- for price_break in volume_pricing_array -%} {%- if cart_qty >= price_break.minimum_quantity -%} {%- assign price_break_price = price_break.price | money -%} {{- 'sections.quick_order_list.each' | t: money: price_break_price -}} {%- break -%} {%- endif -%} {%- endfor -%} {%- endif -%}
{%- else -%} {{- 'sections.quick_order_list.each' | t: money: item_price -}} {%- endif -%} {%- endif -%} {%- if item.available and item.unit_price_measurement -%}
{{ 'products.product.price.unit_price' | t }} {{ item.unit_price | money }}  {{ 'accessibility.unit_price_separator' | t }}  {%- if item.unit_price_measurement.reference_value != 1 -%} {{- item.unit_price_measurement.reference_value -}} {%- endif -%} {{ item.unit_price_measurement.reference_unit }}
{%- endif -%} {%- render 'loading-spinner' -%} {% comment %} TODO: enable theme-check once `line_items_for` is accepted as valid filter {% endcomment %} {% # theme-check-disable %} {{ cart | line_items_for: item | sum: 'original_line_price' | money }} {% # theme-check-enable %} {%- if product.quantity_price_breaks_configured? -%} {%- endif -%}