{% comment %}
POS Cafe - Order Email Notifications v1.1
{% endcomment %}
{% assign delivery_method_types = delivery_agreements | map: 'delivery_method_type' | uniq %}
{% if delivery_method_types.size > 1 %}
{% assign has_split_cart = true %}
{% else %}
{% assign has_split_cart = false %}
{% endif %}
{% comment %} POS Cafe: Detect cafe items, collect prep areas, extract order attributes {% endcomment %}
{% assign poscafe_label = "POS Cafe" %}
{% assign modifier_label = "Modifier" %}
{% assign has_poscafe = false %}
{% assign pc_unique_prep_areas = "" %}
{% assign pc_hidden_keys = "Item Type,Prep Area,Channel,Order Type,Name,Notes,Cafe Discount,item_type,prep_area" | split: "," %}
{% assign pc_order_type = "" %}
{% assign pc_delivery_date = "" %}
{% assign pc_delivery_time = "" %}
{% assign pc_timing_choice = "" %}
{% assign pc_time_12h = "" %}
{% for attr in attributes %}
{% if attr.first == "Order Type" %}{% assign pc_order_type = attr.last %}{% endif %}
{% if attr.first == "delivery_date" %}{% assign pc_delivery_date = attr.last %}{% endif %}
{% if attr.first == "delivery_time" %}{% assign pc_delivery_time = attr.last %}{% endif %}
{% if attr.first == "timing_choice" %}{% assign pc_timing_choice = attr.last %}{% endif %}
{% endfor %}
{% if pc_delivery_time != blank %}
{% assign pc_time_parts = pc_delivery_time | split: ":" %}
{% assign pc_hour = pc_time_parts[0] | plus: 0 %}
{% assign pc_minute = pc_time_parts[1] %}
{% if pc_hour >= 12 %}
{% assign pc_ampm = "PM" %}
{% if pc_hour > 12 %}{% assign pc_hour_12 = pc_hour | minus: 12 %}{% else %}{% assign pc_hour_12 = pc_hour %}{% endif %}
{% else %}
{% assign pc_ampm = "AM" %}
{% if pc_hour == 0 %}{% assign pc_hour_12 = 12 %}{% else %}{% assign pc_hour_12 = pc_hour %}{% endif %}
{% endif %}
{% assign pc_time_12h = pc_hour_12 | append: ":" | append: pc_minute | append: " " | append: pc_ampm %}
{% endif %}
{% for line in line_items %}
{% assign pc_item_type = line.properties["Item Type"] %}
{% if pc_item_type == poscafe_label %}
{% assign has_poscafe = true %}
{% assign pc_prep = line.properties["Prep Area"] %}
{% if pc_prep != blank %}
{% unless pc_unique_prep_areas contains pc_prep %}
{% if pc_unique_prep_areas == "" %}
{% assign pc_unique_prep_areas = pc_prep %}
{% else %}
{% assign pc_unique_prep_areas = pc_unique_prep_areas | append: "|||" | append: pc_prep %}
{% endif %}
{% endunless %}
{% endif %}
{% endif %}
{% endfor %}
{% assign pc_prep_areas_array = pc_unique_prep_areas | split: "|||" | sort %}
{% if fulfillment_aborted %}
|
Order was not fulfilled automatically
High risk of fraud detected. Before fulfilling this order or capturing payment, please review the Risk Analysis and determine if this order is fraudulent.
|
{% endif %}
{% if has_high_risks? %}
|
High risk of fraud detected
Before fulfilling this order or capturing payment, please review the Risk Analysis and determine if this order is fraudulent.
|
{% endif %}
{% assign current_date = date | date: "%b %d" %}
{% assign current_time = date | date: "%l:%M %P" %}
{% if customer.name %}
{{ customer.name }} placed order {{ name }} on {{ current_date }} at {{ current_time | strip }}.
{% else %}
Someone placed order {{ name }} on {{ current_date }} at {{ current_time | strip }}.
{% endif %}
{% comment %} POS Cafe: Order info banner (Order Type, Pickup Date/Time, Location, Delivery) {% endcomment %}
{% if has_poscafe and pc_order_type != blank %}
Order Type: {{ pc_order_type }}
{% if pc_timing_choice == "later" %}
{% if pc_delivery_date != blank %}
Pickup Date: {{ pc_delivery_date | date: "%B %d, %Y" }}
{% endif %}
{% if pc_time_12h != blank %}
Pickup Time: {{ pc_time_12h }}
{% endif %}
{% endif %}
{% if shipping_methods.first %}
Delivery Method: {{ shipping_methods.first.title }}
{% endif %}
{% if location %}
Location: {{ location.name }}
{% endif %}
|
{% endif %}
|
|
|
Order summary
{% if has_split_cart %}
{% for line in subtotal_line_items %}
{% unless line.delivery_agreement %}
{% if line.groups.size == 0 %}
{% assign legacy_separator = true %}
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}
{% comment %} POS Cafe: Skip modifier line items {% endcomment %}
{% assign pc_line_type = line.properties["Item Type"] %}
{% unless pc_line_type == modifier_label %}
{% assign is_parent = false %}
{% assign is_nested_line_parent = line.nested_line_parent? %}
{% if line.bundle_parent? or line.nested_line_parent? %}
{% assign is_parent = true %}
{% endif %}
{% if is_nested_line_parent %}
{% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
{% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
{% endif %}
{% if false and is_parent %}
{% if line.image %}
{% else %}
{% endif %}
|
{% else %}
{% if line.image %}
{% else %}
{% endif %}
|
{% endif %}
{% if is_nested_line_parent %}
|
|
{% endif %}
|
{% if line.presentment_title %}
{% assign line_title = line.presentment_title %}
{% elsif line.title %}
{% assign line_title = line.title %}
{% else %}
{% assign line_title = line.product.title %}
{% endif %}
{% if line.quantity < line.quantity %}
{% capture line_display %}
{{ line.quantity }} of {{ line.quantity }}
{% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
{{ line_title }} × {{ line_display }}
{% if pc_line_type != poscafe_label %}
{% if line.variant.title != 'Default Title' and is_parent == false %}
{{ line.variant.title }}
{% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
{{ line.variant.title }}
{% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
{{ line.variant.title }}
{% endif %}
{% endif %}
{% comment %} POS Cafe: Show prep area label and modifier properties (value only) {% endcomment %}
{% if pc_line_type == poscafe_label %}
{% assign pc_line_prep = line.properties["Prep Area"] %}
{% if pc_line_prep != blank %}
Prep area: {{ pc_line_prep }}
{% endif %}
{% for p in line.properties %}
{% assign pc_prop_key = p.first | strip %}
{% assign pc_first_char = pc_prop_key | slice: 0 %}
{% unless pc_first_char == "_" or pc_hidden_keys contains pc_prop_key %}
{% if p.last != blank and p.last != "Default Title" %}
{{ p.last }}
{% endif %}
{% endunless %}
{% endfor %}
{% endif %}
{% if false %}
{% for child_line in line.bundle_components %}
{% if true %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_display }} × {{ item_title }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% else %}
{% for group in line.groups %}
{% if group.deliverable? %}
For: {{ group.display_title }}
{% else %}
Part of: {{ group.display_title }}
{% endif %}
{% endfor %}
{% endif %}
{% if line.selling_plan_allocation %}
{{ line.selling_plan_allocation.selling_plan.name }}
{% endif %}
{% if line.refunded_quantity > 0 %}
Refunded
{% endif %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if false and is_parent %}
{% else %}
|
{% endif %}
{% if line.original_line_price != line.final_line_price %}
{{ line.original_line_price | money }}
{% endif %}
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% if line.unit_price_measurement %}
{{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
{% endif %}
{% else %}
Free
{% endif %}
|
{% if line.nested_line_parent? %}
{% for child_line in line.nested_lines %}
{% if false %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_title }} × {{ item_display }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% endif %}
|
{% endunless %}{% comment %} POS Cafe: end modifier skip {% endcomment %}
{% endunless %}
{% endif %}
{% endunless %}
{% endfor %}
{% for line_item_group in line_item_groups %}
{% comment %} POS Cafe: Skip line_item_groups that belong to POS Cafe {% endcomment %}
{% assign pc_is_poscafe_group = false %}
{% for component in line_item_group.components %}
{% if component.properties["Item Type"] == poscafe_label or component.properties["Item Type"] == modifier_label %}
{% assign pc_is_poscafe_group = true %}
{% break %}
{% endif %}
{% endfor %}
{% unless pc_is_poscafe_group %}
{% unless line_item_group.components.first.delivery_agreement %}
{% assign legacy_separator = true %}
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}
{% if line_item_group.deliverable? == false %}
{% assign line_item_group_class = "order-list__item__cell" %}
{% for component in line_item_group.components %}
{% assign final_line_price = final_line_price | plus: component.final_line_price %}
{% assign original_line_price = original_line_price | plus: component.original_line_price %}
{% for da in component.discount_allocations %}
{% if da.discount_application.target_selection != 'all' %}
{% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
{% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if line_item_group.deliverable? %}
{% assign parent_line_item = line_item_group.parent_sales_line_item %}
{% assign final_line_price = parent_line_item.final_line_price %}
{% assign original_line_price = parent_line_item.original_line_price %}
{% assign line_item_group_class = "order-list__parent_item__cell" %}
{% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}
{% assign discount_keys = discount_keys_str | split: "," | uniq %}
{% if parent_line_item and parent_line_item.image %}
{% elsif line_item_group.image %}
{% else %}
{% endif %}
|
{% if line_item_group.deliverable? == true %}
|
|
{% endif %}
|
{{ line_item_group.display_title }} × {{ line_item_group.quantity }}
{% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
{{ line_item_group.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if parent_line_item.discount_allocations %}
{% for discount_allocation in parent_line_item.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% for discount_key in discount_keys %}
{% assign discount_amount = 0 %}
{% for component in line_item_group.components %}
{% for da in component.discount_allocations %}
{% assign key = da.discount_application.title | append: da.discount_application.type %}
{% if da.discount_application.target_selection != 'all' and key == discount_key %}
{% assign discount_amount = discount_amount | plus: da.amount %}
{% assign discount_title = da.discount_application.title %}
{% endif %}
{% endfor %}
{% endfor %}
{{ discount_title | upcase }}
(-{{ discount_amount | money }})
{% endfor %}
{% endif %}
|
{% if original_line_price != final_line_price %}
{{ original_line_price | money }}
{% endif %}
{% if final_line_price > 0 %}
{{ final_line_price | money }}
{% else %}
{{ 'notifications.views.mailers.notifications.discount_free' | t }}
{% endif %}
|
{% if line_item_group.deliverable? == false %}
{% for component in line_item_group.components %}
{% if true %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
{% endfor %}
{% endif %}
|
{% if line_item_group.deliverable? %}
|
{% for component in line_item_group.components %}
|
{% if false %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
|
{% endfor %}
{% endif %}
{% endunless %}
{% endunless %}{% comment %} POS Cafe: end line_item_group skip {% endcomment %}
{% endfor %}
{% if legacy_separator %}
{% endif %}
{% for delivery_agreement in delivery_agreements %}
{% if delivery_agreement.line_items != blank %}
{% if delivery_agreements.size > 1 %}
{{ delivery_agreement.delivery_method_name }} items
{% endif %}
{% for line in delivery_agreement.non_parent_line_items %}
{% if line.groups.size == 0 %}
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}
{% comment %} POS Cafe: Skip modifier line items {% endcomment %}
{% assign pc_line_type = line.properties["Item Type"] %}
{% unless pc_line_type == modifier_label %}
{% assign is_parent = false %}
{% assign is_nested_line_parent = line.nested_line_parent? %}
{% if line.bundle_parent? or line.nested_line_parent? %}
{% assign is_parent = true %}
{% endif %}
{% if is_nested_line_parent %}
{% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
{% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
{% endif %}
{% if false and is_parent %}
{% if line.image %}
{% else %}
{% endif %}
|
{% else %}
{% if line.image %}
{% else %}
{% endif %}
|
{% endif %}
{% if is_nested_line_parent %}
|
|
{% endif %}
|
{% if line.presentment_title %}
{% assign line_title = line.presentment_title %}
{% elsif line.title %}
{% assign line_title = line.title %}
{% else %}
{% assign line_title = line.product.title %}
{% endif %}
{% if line.quantity < line.quantity %}
{% capture line_display %}
{{ line.quantity }} of {{ line.quantity }}
{% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
{{ line_title }} × {{ line_display }}
{% if pc_line_type != poscafe_label %}
{% if line.variant.title != 'Default Title' and is_parent == false %}
{{ line.variant.title }}
{% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
{{ line.variant.title }}
{% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
{{ line.variant.title }}
{% endif %}
{% endif %}
{% comment %} POS Cafe: Show prep area label and modifier properties (value only) {% endcomment %}
{% if pc_line_type == poscafe_label %}
{% assign pc_line_prep = line.properties["Prep Area"] %}
{% if pc_line_prep != blank %}
Prep area: {{ pc_line_prep }}
{% endif %}
{% for p in line.properties %}
{% assign pc_prop_key = p.first | strip %}
{% assign pc_first_char = pc_prop_key | slice: 0 %}
{% unless pc_first_char == "_" or pc_hidden_keys contains pc_prop_key %}
{% if p.last != blank and p.last != "Default Title" %}
{{ p.last }}
{% endif %}
{% endunless %}
{% endfor %}
{% endif %}
{% if false %}
{% for child_line in line.bundle_components %}
{% if true %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_display }} × {{ item_title }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% else %}
{% for group in line.groups %}
{% if group.deliverable? %}
For: {{ group.display_title }}
{% else %}
Part of: {{ group.display_title }}
{% endif %}
{% endfor %}
{% endif %}
{% if line.selling_plan_allocation %}
{{ line.selling_plan_allocation.selling_plan.name }}
{% endif %}
{% if line.refunded_quantity > 0 %}
Refunded
{% endif %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if false and is_parent %}
{% else %}
|
{% endif %}
{% if line.original_line_price != line.final_line_price %}
{{ line.original_line_price | money }}
{% endif %}
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% if line.unit_price_measurement %}
{{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
{% endif %}
{% else %}
Free
{% endif %}
|
{% if line.nested_line_parent? %}
{% for child_line in line.nested_lines %}
{% if false %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_title }} × {{ item_display }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% endif %}
|
{% endunless %}{% comment %} POS Cafe: end modifier skip {% endcomment %}
{% endunless %}
{% endif %}
{% endfor %}
{% for line_item_group in delivery_agreement.line_item_groups %}
{% comment %} POS Cafe: Skip line_item_groups that belong to POS Cafe {% endcomment %}
{% assign pc_is_poscafe_group = false %}
{% for component in line_item_group.components %}
{% if component.properties["Item Type"] == poscafe_label or component.properties["Item Type"] == modifier_label %}
{% assign pc_is_poscafe_group = true %}
{% break %}
{% endif %}
{% endfor %}
{% unless pc_is_poscafe_group %}
{% if line_item_group.deliverable? == false %}
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}
{% if line_item_group.deliverable? == false %}
{% assign line_item_group_class = "order-list__item__cell" %}
{% for component in line_item_group.components %}
{% assign final_line_price = final_line_price | plus: component.final_line_price %}
{% assign original_line_price = original_line_price | plus: component.original_line_price %}
{% for da in component.discount_allocations %}
{% if da.discount_application.target_selection != 'all' %}
{% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
{% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if line_item_group.deliverable? %}
{% assign parent_line_item = line_item_group.parent_sales_line_item %}
{% assign final_line_price = parent_line_item.final_line_price %}
{% assign original_line_price = parent_line_item.original_line_price %}
{% assign line_item_group_class = "order-list__parent_item__cell" %}
{% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}
{% assign discount_keys = discount_keys_str | split: "," | uniq %}
{% if parent_line_item and parent_line_item.image %}
{% elsif line_item_group.image %}
{% else %}
{% endif %}
|
{% if line_item_group.deliverable? == true %}
|
|
{% endif %}
|
{{ line_item_group.display_title }} × {{ line_item_group.quantity }}
{% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
{{ line_item_group.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if parent_line_item.discount_allocations %}
{% for discount_allocation in parent_line_item.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% for discount_key in discount_keys %}
{% assign discount_amount = 0 %}
{% for component in line_item_group.components %}
{% for da in component.discount_allocations %}
{% assign key = da.discount_application.title | append: da.discount_application.type %}
{% if da.discount_application.target_selection != 'all' and key == discount_key %}
{% assign discount_amount = discount_amount | plus: da.amount %}
{% assign discount_title = da.discount_application.title %}
{% endif %}
{% endfor %}
{% endfor %}
{{ discount_title | upcase }}
(-{{ discount_amount | money }})
{% endfor %}
{% endif %}
|
{% if original_line_price != final_line_price %}
{{ original_line_price | money }}
{% endif %}
{% if final_line_price > 0 %}
{{ final_line_price | money }}
{% else %}
{{ 'notifications.views.mailers.notifications.discount_free' | t }}
{% endif %}
|
{% if line_item_group.deliverable? == false %}
{% for component in line_item_group.components %}
{% if true %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
{% endfor %}
{% endif %}
|
{% if line_item_group.deliverable? %}
|
{% for component in line_item_group.components %}
|
{% if false %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
|
{% endfor %}
{% endif %}
{% else %}
{% if delivery_agreement == line_item_group.parent_sales_line_item.delivery_agreement %}
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}
{% if line_item_group.deliverable? == false %}
{% assign line_item_group_class = "order-list__item__cell" %}
{% for component in line_item_group.components %}
{% assign final_line_price = final_line_price | plus: component.final_line_price %}
{% assign original_line_price = original_line_price | plus: component.original_line_price %}
{% for da in component.discount_allocations %}
{% if da.discount_application.target_selection != 'all' %}
{% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
{% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if line_item_group.deliverable? %}
{% assign parent_line_item = line_item_group.parent_sales_line_item %}
{% assign final_line_price = parent_line_item.final_line_price %}
{% assign original_line_price = parent_line_item.original_line_price %}
{% assign line_item_group_class = "order-list__parent_item__cell" %}
{% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}
{% assign discount_keys = discount_keys_str | split: "," | uniq %}
{% if parent_line_item and parent_line_item.image %}
{% elsif line_item_group.image %}
{% else %}
{% endif %}
|
{% if line_item_group.deliverable? == true %}
|
|
{% endif %}
|
{{ line_item_group.display_title }} × {{ line_item_group.quantity }}
{% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
{{ line_item_group.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if parent_line_item.discount_allocations %}
{% for discount_allocation in parent_line_item.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% for discount_key in discount_keys %}
{% assign discount_amount = 0 %}
{% for component in line_item_group.components %}
{% for da in component.discount_allocations %}
{% assign key = da.discount_application.title | append: da.discount_application.type %}
{% if da.discount_application.target_selection != 'all' and key == discount_key %}
{% assign discount_amount = discount_amount | plus: da.amount %}
{% assign discount_title = da.discount_application.title %}
{% endif %}
{% endfor %}
{% endfor %}
{{ discount_title | upcase }}
(-{{ discount_amount | money }})
{% endfor %}
{% endif %}
|
{% if original_line_price != final_line_price %}
{{ original_line_price | money }}
{% endif %}
{% if final_line_price > 0 %}
{{ final_line_price | money }}
{% else %}
{{ 'notifications.views.mailers.notifications.discount_free' | t }}
{% endif %}
|
{% if line_item_group.deliverable? == false %}
{% for component in line_item_group.components %}
{% if true %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
{% endfor %}
{% endif %}
|
{% if line_item_group.deliverable? %}
|
{% for component in line_item_group.components %}
|
{% if false %}
{% assign order_list_item_class = "order-list__bundle-item" %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
|
{% endfor %}
{% endif %}
{% else %}
{% for component in line_item_group.components %}
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless component.nested_line_child? %}
{% assign is_parent = false %}
{% assign is_nested_line_parent = component.nested_line_parent? %}
{% if component.bundle_parent? or component.nested_line_parent? %}
{% assign is_parent = true %}
{% endif %}
{% if is_nested_line_parent %}
{% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
{% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
{% endif %}
{% if false and is_parent %}
{% if component.image %}
{% else %}
{% endif %}
|
{% else %}
{% if component.image %}
{% else %}
{% endif %}
|
{% endif %}
{% if is_nested_line_parent %}
|
|
{% endif %}
|
{% if component.presentment_title %}
{% assign line_title = component.presentment_title %}
{% elsif component.title %}
{% assign line_title = component.title %}
{% else %}
{% assign line_title = component.product.title %}
{% endif %}
{% if line.quantity < component.quantity %}
{% capture line_display %}
{{ line.quantity }} of {{ component.quantity }}
{% endcapture %}
{% else %}
{% assign line_display = component.quantity %}
{% endif %}
{{ line_title }} × {{ line_display }}
{% if component.variant.title != 'Default Title' and is_parent == false %}
{{ component.variant.title }}
{% elsif component.variant.title != 'Default Title' and component.nested_line_parent? %}
{{ component.variant.title }}
{% elsif component.variant.title != 'Default Title' and component.bundle_parent? and false == false %}
{{ component.variant.title }}
{% endif %}
{% if false %}
{% for child_line in component.bundle_components %}
{% if true %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if false %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_display }} × {{ item_title }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% else %}
{% for group in component.groups %}
{% if group.deliverable? %}
For: {{ group.display_title }}
{% else %}
Part of: {{ group.display_title }}
{% endif %}
{% endfor %}
{% endif %}
{% if component.selling_plan_allocation %}
{{ component.selling_plan_allocation.selling_plan.name }}
{% endif %}
{% if component.refunded_quantity > 0 %}
Refunded
{% endif %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if false and is_parent %}
{% else %}
|
{% endif %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% if component.unit_price_measurement %}
{{- component.unit_price | unit_price_with_measurement: component.unit_price_measurement -}}
{% endif %}
{% else %}
Free
{% endif %}
|
{% if component.nested_line_parent? %}
{% for child_line in component.nested_lines %}
{% if false %}
{% assign css_class = 'order-list__bundle-item' %}
{% assign css_image_class = 'order-list__image-cell' %}
{% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
{% assign css_class = 'order-list__deliverable-item_abandoned' %}
{% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
{% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
{% if forloop.last %}
{% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
{% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
{% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
{% endif %}
{% endif %}
|
|
|
|
|
{% if child_line.image %}
{% else %}
{% endif %}
|
{% if child_line.product.title %}
{% assign item_title = child_line.product.title %}
{% else %}
{% assign item_title = child_line.title %}
{% endif %}
{% assign item_display = child_line.quantity %}
{{ item_title }} × {{ item_display }}
{% if child_line.variant.title != 'Default Title'%}
{{ child_line.variant.title }}
{% endif %}
{% if child_line.selling_plan_allocation %}
{{ child_line.selling_plan_allocation.selling_plan.name }}
{% endif %}
|
|
{% endfor %}
{% endif %}
|
{% endunless %}
{% endfor %}
{% endif %}
{% endif %}
{% endunless %}{% comment %} POS Cafe: end line_item_group skip {% endcomment %}
{% endfor %}
{% unless forloop.last %}
{% endunless %}
{% endif %}
{% endfor %}
{% else %}
{% comment %} ===== POS Cafe: Non-POS Cafe items rendered with original formatting ===== {% endcomment %}
{% for line in non_parent_line_items %}
{% assign pc_line_type = line.properties["Item Type"] %}
{% if pc_line_type != poscafe_label and pc_line_type != modifier_label %}
{% if line.groups.size == 0 %}
{% assign expand_bundles = false %}
{% if expand_bundles and line.bundle_parent? %}
|
{% else %}
|
{% endif %}
{% if line.image %}
{% else %}
{% endif %}
|
{% if line.quantity < line.quantity %}
{% capture line_display %}
{{ line.quantity }} of {{ line.quantity }}
{% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
{% if line.product.title == blank %}
{{ line.title }}
{% else %}
{{ line.product.title }}
{% endif %}
{% if line.quantity %}
{% if line.original_line_price != line.final_line_price %}
{{ line.original_price | money }}
{% endif %}
{{ line.final_price | money }} × {{ line.quantity }}
{% endif %}
{% if expand_bundles %}
{% for component in line.bundle_components %}
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% assign component_display = component.quantity %}
{{ component_title }} × {{ component_display }}
{% if component.variant.title != 'Default Title'%}
{{ component.variant.title }}
{% endif %}
|
|
{% endfor %}
{% else %}
{% for group in line.groups %}
{% if group.deliverable? %}
For: {{ group.display_title }}
{% else %}
Part of: {{ group.display_title }}
{% endif %}
{% endfor %}
{% endif %}
{% if line.variant.title != 'Default Title' and line.bundle_parent? == false %}
{{ line.variant.title }}
{% if line.sku != blank %}
•
{% endif %}
{% elsif line.variant.title != 'Default Title' and line.bundle_parent? and expand_bundles == false %}
{{ line.variant.title }}
{% if line.sku != blank %}
•
{% endif %}
{% endif %}
{% if line.sku != blank %}
SKU: {{ line.sku }}
{% endif %}
{% if line.selling_plan_allocation != nil %}
{{ line.selling_plan_allocation.selling_plan.name }}
{% endif %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if expand_bundles and line.bundle_parent? %}
{% else %}
|
{% endif %}
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% if line.unit_price_measurement %}
{{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
{% endif %}
{% else %}
Free
{% endif %}
|
|
{% endif %}
{% endif %}
{% endfor %}
{% comment %} ===== POS Cafe: Render cafe items grouped by prep area ===== {% endcomment %}
{% if has_poscafe %}
{% comment %} POS Cafe items without a prep area {% endcomment %}
{% for line in non_parent_line_items %}
{% assign pc_line_type = line.properties["Item Type"] %}
{% if pc_line_type == poscafe_label %}
{% assign pc_line_prep = line.properties["Prep Area"] %}
{% if pc_line_prep == blank %}
{% if line.image %}
{% else %}
{% endif %}
|
{% if line.product.title == blank %}{{ line.title }}{% else %}{{ line.product.title }}{% endif %}
{% if line.quantity %}
{% if line.original_line_price != line.final_line_price %}
{{ line.original_price | money }}
{% endif %}
{{ line.final_price | money }} × {{ line.quantity }}
{% endif %}
{% for p in line.properties %}
{% assign pc_prop_key = p.first | strip %}
{% assign pc_first_char = pc_prop_key | slice: 0 %}
{% unless pc_first_char == "_" or pc_hidden_keys contains pc_prop_key %}
{% if p.last != blank and p.last != "Default Title" %}
{{ p.last }}
{% endif %}
{% endunless %}
{% endfor %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }} (-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% else %}
Free
{% endif %}
|
|
{% endif %}
{% endif %}
{% endfor %}
{% comment %} POS Cafe items grouped by prep area {% endcomment %}
{% for area in pc_prep_areas_array %}
|
Prep area: {{ area }}
|
{% for line in non_parent_line_items %}
{% assign pc_line_type = line.properties["Item Type"] %}
{% if pc_line_type == poscafe_label %}
{% assign pc_line_prep = line.properties["Prep Area"] %}
{% if pc_line_prep == area %}
{% if line.image %}
{% else %}
{% endif %}
|
{% if line.product.title == blank %}{{ line.title }}{% else %}{{ line.product.title }}{% endif %}
{% if line.quantity %}
{% if line.original_line_price != line.final_line_price %}
{{ line.original_price | money }}
{% endif %}
{{ line.final_price | money }} × {{ line.quantity }}
{% endif %}
{% for p in line.properties %}
{% assign pc_prop_key = p.first | strip %}
{% assign pc_first_char = pc_prop_key | slice: 0 %}
{% unless pc_first_char == "_" or pc_hidden_keys contains pc_prop_key %}
{% if p.last != blank and p.last != "Default Title" %}
{{ p.last }}
{% endif %}
{% endunless %}
{% endfor %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }} (-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
|
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% else %}
Free
{% endif %}
|
|
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% for line_item_group in line_item_groups %}
{% comment %} POS Cafe: Skip line_item_groups that belong to POS Cafe (already rendered above) {% endcomment %}
{% assign pc_is_poscafe_group = false %}
{% for component in line_item_group.components %}
{% if component.properties["Item Type"] == poscafe_label or component.properties["Item Type"] == modifier_label %}
{% assign pc_is_poscafe_group = true %}
{% break %}
{% endif %}
{% endfor %}
{% unless pc_is_poscafe_group %}
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}
{% if line_item_group.deliverable? == false %}
{% for component in line_item_group.components %}
{% assign final_line_price = final_line_price | plus: component.final_line_price %}
{% assign original_line_price = original_line_price | plus: component.original_line_price %}
{% for da in component.discount_allocations %}
{% if da.discount_application.target_selection != 'all' %}
{% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
{% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if line_item_group.deliverable? %}
{% assign parent_line_item = line_item_group.parent_sales_line_item %}
{% assign final_line_price = parent_line_item.final_line_price %}
{% assign original_line_price = parent_line_item.original_line_price %}
{% assign line_item_group_class = "order-list__parent_item__cell" %}
{% else %}
{% assign line_item_group_class = "order-list__item__cell" %}
{% endif %}
{% assign discount_keys = discount_keys_str | split: "," | uniq %}
{% if line_item_group.image %}
{% else %}
{% endif %}
|
{{ line_item_group.title }} × {{ line_item_group.quantity }}
{% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
{{ line_item_group.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if parent_line_item.discount_allocations %}
{% for discount_allocation in parent_line_item.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% for discount_key in discount_keys %}
{% assign discount_amount = 0 %}
{% for component in line_item_group.components %}
{% for da in component.discount_allocations %}
{% assign key = da.discount_application.title | append: da.discount_application.type %}
{% if da.discount_application.target_selection != 'all' and key == discount_key %}
{% assign discount_amount = discount_amount | plus: da.amount %}
{% assign discount_title = da.discount_application.title %}
{% endif %}
{% endfor %}
{% endfor %}
{{ discount_title | upcase }}
(-{{ discount_amount | money }})
{% endfor %}
{% endif %}
|
{% if original_line_price != final_line_price %}
{{ original_line_price | money }}
{% endif %}
{% if final_line_price > 0 %}
{{ final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% if line_item_group.deliverable? == false %}
{% for component in line_item_group.components %}
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
{% endfor %}
{% endif %}
|
|
{% if line_item_group.deliverable? %}
{% for component in line_item_group.components %}
|
|
|
{% if component.image %}
{% else %}
{% endif %}
|
{% if component.product.title %}
{% assign component_title = component.product.title %}
{% else %}
{% assign component_title = component.title %}
{% endif %}
{% if line_item_group.deliverable? %}
{{ component_title }} × {{ component.quantity }}
{% else %}
{{ component.quantity }} × {{ component_title }}
{% endif %}
{% if component.variant.title != 'Default Title' %}
{{ component.variant.title }}
{% endif %}
{% if line_item_group.deliverable? %}
{% if component.discount_allocations %}
{% for discount_allocation in component.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
|
{% if line_item_group.deliverable? %}
{% if component.original_line_price != component.final_line_price %}
{{ component.original_line_price | money }}
{% endif %}
{% if component.final_line_price > 0 %}
{{ component.final_line_price | money }}
{% else %}
Free
{% endif %}
|
{% endif %}
|
{% endfor %}
{% endif %}
{% endunless %}{% comment %} POS Cafe: end line_item_group skip {% endcomment %}
{% endfor %}
{% endif %}
{% assign order_discount_count = 0 %}
{% assign total_order_discounts = 0 %}
{% assign has_shipping_discount = false %}
{% assign epsilon = 0.00001 %}
{% for discount_application in discount_applications %}
{% if discount_application.target_selection == 'all' and discount_application.target_type == 'line_item' %}
{% assign order_discount_count = order_discount_count | plus: 1 %}
{% assign total_order_discount_amount = total_order_discounts | plus: discount_application.total_allocated_amount %}
{% endif %}
{% if discount_application.target_type == 'shipping_line' %}
{% assign has_shipping_discount = true %}
{% assign shipping_discount_title = discount_application.title %}
{% assign discount_value_price = discount_application.total_allocated_amount %}
{% assign shipping_amount_minus_discount_value_price = shipping_price | minus: discount_value_price %}
{% assign shipping_amount_minus_discount_value_price_abs = shipping_amount_minus_discount_value_price | abs %}
{% assign discount_application_value_type = discount_application.value_type | strip %}
{% if shipping_amount_minus_discount_value_price_abs < epsilon or discount_application_value_type == 'percentage' and discount_application.value == 100 %}
{% assign free_shipping = true %}
{% else %}
{% assign discounted_shipping_price = shipping_amount_minus_discount_value_price %}
{% endif %}
{% endif %}
{% endfor %}
|
{% if titleBold %}
Subtotal
{% else %}
Subtotal
{% endif %}
|
{% if valueBold %}
{{ subtotal_price | plus: total_order_discount_amount | money }}
{% else %}
{{ subtotal_price | plus: total_order_discount_amount | money }}
{% endif %}
|
{% if order_discount_count > 0 %}
{% if order_discount_count == 1 %}
|
Order discount
|
-{{ total_order_discount_amount | money }}
|
{% endif %}
{% if order_discount_count > 1 %}
|
Order discounts
|
-{{ total_order_discount_amount | money }}
|
{% endif %}
{% for discount_application in discount_applications %}
{% if discount_application.target_selection == 'all' and discount_application.target_type != 'shipping_line' %}
|
{{ discount_application.title }} (-{{ discount_application.total_allocated_amount | money }})
|
{% endif %}
{% endfor %}
{% endif %}
{% unless retail_delivery_only %}
{% if delivery_method == 'pick-up' %}
|
{% if titleBold %}
Pickup
{% else %}
Pickup
{% endif %}
|
{% if valueBold %}
{{ shipping_price | money }}
{% else %}
{{ shipping_price | money }}
{% endif %}
|
{% else %}
{% if has_shipping_discount %}
{% if free_shipping %}
|
{% if titleBold %}
Shipping
{% else %}
Shipping
{% endif %}
{% if shipping_method.title.size > 0 %}({{ shipping_method.title }}){% endif %}
|
{% if shipping_price != 0 %}{{ shipping_price | money}}{% endif %}
{% if valueBold %}
Free
{% else %}
Free
{% endif %}
|
{% else %}
|
{% if titleBold %}
Shipping
{% else %}
Shipping
{% endif %}
{% if shipping_method.title.size > 0 %}({{ shipping_method.title }}){% endif %}
|
{{ shipping_price | money }}
{% if valueBold %}
{{ discounted_shipping_price | money }}
{% else %}
{{ discounted_shipping_price | money }}
{% endif %}
|
{% endif %}
|
{{ shipping_discount_title }}
{% if discount_value_price != 0 %}
(-{{ discount_value_price | money }})
{% endif %}
|
{% else %}
|
{% if titleBold %}
Shipping
{% else %}
Shipping
{% endif %}
{% if shipping_method.title.size > 0 %}({{ shipping_method.title }}){% endif %}
|
{% if valueBold %}
{{ shipping_price | money }}
{% else %}
{{ shipping_price | money }}
{% endif %}
|
{% endif %}
{% endif %}
{% endunless %}
{% if total_duties %}
|
{% if titleBold %}
Duties
{% else %}
Duties
{% endif %}
|
{% if valueBold %}
{{ total_duties | money }}
{% else %}
{{ total_duties | money }}
{% endif %}
|
{% endif %}
{% for tax_line in tax_lines %}
|
{% if titleBold %}
Tax
{% else %}
Tax
{% endif %}
{% if tax_line.title.size > 0 %}({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%){% endif %}
|
{% if valueBold %}
{{ tax_line.price | money }}
{% else %}
{{ tax_line.price | money }}
{% endif %}
|
{% endfor %}
|
{% if titleBold %}
Total
{% else %}
Total
{% endif %}
|
{% if valueBold %}
{{ total_price | money_with_currency }}
{% else %}
{{ total_price | money_with_currency }}
{% endif %}
|
|
|
|
{% if order.transactions.size > 0 %}
Payment processing method
{{ order.transactions | map: "gateway_display_name" | uniq | join: ", " }}
|
{% endif %}
{% if payment_terms %}
Payment terms
{{ payment_terms.translated_name }}
|
{% endif %}
{% if requires_shipping and shipping_address %}
{% if shipping_methods.first %}
Delivery method
{% for shipping_method in shipping_methods %}
{{ shipping_method.title }}
{% endfor %}
|
{% endif %}
Shipping address
{{ shipping_address.name }}
{% if shipping_address.company %}
{{ shipping_address.company }}
{% endif %}
{{ shipping_address.street }}
{{ shipping_address.city }},
{{ shipping_address.province }}
{{ shipping_address.zip }}
{{ shipping_address.country }}
{{ shipping_address.phone }}
|
{% if po_number %}
PO number
#{{ po_number }}
|
{% endif %}
{% endif %}
|
|
|
|
|