{{ 'component-price.css' | asset_url | stylesheet_tag }} {{ 'quick-order-list.css' | asset_url | stylesheet_tag }} {{ 'quantity-popover.css' | asset_url | stylesheet_tag }} {%- style -%} .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; } @media screen and (min-width: 750px) { .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top }}px; padding-bottom: {{ section.settings.padding_bottom }}px; } } {%- endstyle -%} {% comment %} TODO: enable theme-check once `line_items_for` is accepted as valid filter {% endcomment %} {% # theme-check-disable %} {%- assign items_in_cart = cart | line_items_for: product | sum: 'quantity' -%} {% # theme-check-enable %}
{%- if product.has_only_default_variant -%} {%- render 'quick-order-list-row', item: product, image: product.featured_media, sku: product.selected_or_first_available_variant.sku, variant: product.selected_or_first_available_variant -%} {%- else -%} {%- for variant in product.variants -%} {%- render 'quick-order-list-row', item: variant, image: variant.image, sku: variant.sku, variant: variant -%} {%- endfor -%} {%- endif -%}
{{ 'sections.cart.title' | t }}
{%- if product.has_only_default_variant -%} {{ 'sections.quick_order_list.product' | t }} {%- else -%} {{ 'sections.quick_order_list.variant' | t }} {%- endif -%} {%- if product.has_only_default_variant -%} {{ 'sections.quick_order_list.product_total' | t }} {%- else -%} {{ 'sections.quick_order_list.variant_total' | t }} {%- endif -%} {{ 'products.product.quantity.label' | t }} {{ 'sections.cart.headings.price' | t }} {%- if product.has_only_default_variant -%} {{ 'sections.quick_order_list.product_total' | t }} {%- else -%} {{ 'sections.quick_order_list.variant_total' | t }} {%- endif -%}

{%- if product.has_only_default_variant or product.variants.size == 1 -%} {% comment %} Populated by JS {% endcomment %} {%- else -%}
{{- 'sections.quick_order_list.view_cart' | t -}}
{%- render 'loading-spinner' -%}
{% comment %} Populated by JS {% endcomment %}
{{ items_in_cart }}

{{ 'sections.quick_order_list.total_items' | t }}

{% comment %} TODO: enable theme-check once `line_items_for` is accepted as valid filter {% endcomment %} {% # theme-check-disable %} {{ cart | line_items_for: product | sum: 'original_line_price' | money }} {% # theme-check-enable %}

{{ 'sections.quick_order_list.product_total' | t }}

{%- if cart.taxes_included and shop.shipping_policy.body != blank -%} {{ 'sections.cart.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- elsif cart.taxes_included -%} {{ 'sections.cart.taxes_included_but_shipping_at_checkout' | t }} {%- elsif shop.shipping_policy.body != blank -%} {{ 'sections.cart.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }} {%- else -%} {{ 'sections.cart.taxes_and_shipping_at_checkout' | t }} {%- endif -%}
{{- 'sections.quick_order_list.view_cart' | t -}}
{%- render 'loading-spinner' -%}
{% comment %} Populated by JS {% endcomment %}
{%- endif -%}
{% schema %} { "name": "t:sections.quick-order-list.name", "limit": 1, "enabled_on": { "templates": ["product"] }, "settings": [ { "type": "checkbox", "id": "show_image", "default": false, "label": "t:sections.quick-order-list.settings.show_image.label" }, { "type": "checkbox", "id": "show_sku", "default": false, "label": "t:sections.quick-order-list.settings.show_sku.label" }, { "type": "color_scheme", "id": "color_scheme", "label": "t:sections.all.colors.label", "default": "scheme-1" }, { "type": "header", "content": "t:sections.all.padding.section_padding_heading" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "t:sections.all.padding.padding_top", "default": 36 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "t:sections.all.padding.padding_bottom", "default": 36 } ], "presets": [ { "name": "t:sections.quick-order-list.presets.name" } ] } {% endschema %}