{% unless cart.items.size == 0 %} {% assign tran_checkout = 'general.buttons.checkout' | t %} {% assign tran_update = 'general.buttons.update_cart' | t %}

{{'cart.page.title' | t}}

{% if settings.cartTimer %}
{{'cart.page.expires'|t}} 00:00
{% endif %}
{% if settings.ajaxType == "disabled" %} {% render 'button__submit', text: tran_update, name: 'update', type: 'secondary', class: 'button--cart__update' %} {% endif %} {% render 'button__submit', text: tran_checkout, name: 'checkout' %}
{% assign totalAmount = 0 %} {% for item in cart.items %} {% assign product = item.variant %}
{% render 'image', src: item, alt: item.title | escape , size: 'medium' %}
{{ item.product.title }} {% unless item.product.has_only_default_variant %}{{ item.variant.title }}{% endunless %}
{%- if item.original_line_price != item.line_price -%}{{ item.original_line_price | money | strip_html }}{%- endif -%} {{- item.line_price | money | strip_html -}} {% if product.compare_at_price > 0 %} {{product.compare_at_price | times: item.quantity | money | strip_html}} {% endif %} {%- for discount in item.discounts -%}{{- discount.title -}}{%- endfor -%}
{% render 'get-icon', icon: 'trash' %}
{{ item.price | money | strip_html }} {% if product.compare_at_price > 0 %} {{product.compare_at_price | money | strip_html}} {% endif %}
{%- if item.original_line_price != item.line_price -%}{{ item.original_line_price | money| strip_html }}{%- endif -%} {{- item.line_price | money | strip_html -}} {% assign totalOriginal = 0 %} {% if product.compare_at_price > 0 %} {% assign totalOriginal = product.compare_at_price | times: item.quantity %} {{product.compare_at_price | times: item.quantity | money | strip_html }} {% assign totalAmount = totalAmount | plus: totalOriginal %} {% else %} {% assign totalAmount = totalAmount | plus: item.line_price %} {% endif %} {%- for discount in item.discounts -%}{{- discount.title -}}{%- endfor -%}
{% render 'get-icon', icon: 'trash' %}
{% endfor %} {% if settings.shopCurrency == 'convert' %}
{{ 'cart.page.currency_notice' | t | replace: '%curr_symbol%', cart.currency.symbol | replace: '%curr_code%', cart.currency.iso_code }}
{% endif %}
{{'cart.page.additional_notes' | t}}
{% if totalAmount > cart.total_price and section.settings.discount != 'none' %} {{'cart.page.total' | t}}: {{ totalAmount | money | strip_html }} {{'cart.page.discount' | t}}: {% if section.settings.discount == 'money' %} -{{totalAmount | minus: cart.total_price | money | strip_html }} {% else %} {{ cart.total_price | minus: totalAmount | times: 100 | divided_by: totalAmount }}% {% endif %} {% endif %} {{'cart.page.grand_total' | t}}: {{ cart.total_price | money | strip_html }} {% render 'button__submit', text: tran_checkout, name: 'checkout', class: 'button--full-width' %}
{% else %}

{{'cart.page.empty_title'|t}}

{{'cart.page.empty_text'|t}}

{% if section.settings.featured != blank %}

{{'cart.page.empty_suggestion'|t}}

{% assign coll = collections[section.settings.featured] %} {% for item in coll.products limit: 4 %}
{% render 'product-card-default', product: item, dsize: '3' %}
{% endfor %}
{% endif %}
{% assign btext = 'cart.page.empty_button' | t %} {% render 'button', type: 'primary', text: btext, url: routes.all_products_collection_url %}
{% endunless %} {% schema %} { "name": "Cart page", "class": "col-12 row max-width section--cart-page", "settings": [ { "type": "header", "content": "Help" }, { "type": "paragraph", "content": "[Click here to follow an interactive Tutorial](https://vimeo.com/58187608)" }, { "type": "radio", "label": "Show discount in", "options": [ {"value": "money", "label": "Money amount ($)"}, {"value": "percent", "label": "Percent (%)"}, {"value": "none", "label": "Don't show saved amount"} ], "default": "money", "id": "discount" }, { "type": "header", "content": "Featured products" }, { "type": "collection", "label": "Featured collection", "info": "This collection will be shown if there are no products in the cart", "id": "featured" } ], "blocks": [ { "type": "cartField", "name": "Text field", "settings": [ { "id": "required", "label": "This field is required", "type": "checkbox", "default": false }, { "id": "label", "label": "Label", "default": "Additional field", "type": "text" } ] } ] } {% endschema %}