{{ 'summary'|translate }}
{{ 'price_total'|translate }}:
{{ cart.totalPrice|money }}
{{ 'tax'|translate }}:
{{ cart.totalTax|money }}

{% set firstCarrierPrice = null %} {% set carrierPrice = null %} {% if carriers %} {% set firstCarrierPrice = carriers|first.price %} {% endif %}
{{ 'delivery'|translate }}:
{% if cart.carrierPrice %} {{ cart.carrierPrice|money }} {% set carrierPrice = cart.carrierPrice %} {% elseif firstCarrierPrice %} {{ firstCarrierPrice|money }} {% set carrierPrice = firstCarrierPrice %} {% else %} {{ 'free'|translate }} {% endif %}
{% if payments %} {% set firstPaymentPrice = payments|first.price %} {% else %} {% set firstPaymentPrice = 0 %} {% endif %}
{{ 'payment'|translate }}:
{% if cart.paymentPrice %} {{ cart.paymentPrice|money }} {% set paymentPrice = cart.carrierPrice %} {% elseif firstPaymentPrice %} {{ firstPaymentPrice|money }} {% set paymentPrice = firstPaymentPrice %} {% else %} {{ 'free'|translate }} {% endif %}

{{ 'sum'|translate }}:
{% set totalPriceWithTax = cart.totalPriceWithTax %} {% if carrierPrice %} {% set totalPriceWithTax = cart.totalPriceWithTax + carrierPrice %} {% endif %} {% if paymentPrice %} {% set totalPriceWithTax = cart.totalPriceWithTax + paymentPrice %} {% endif %} {{ totalPriceWithTax|money }}

{% if not cart.cartItems|length %} {{ component('alert', {type: 'info', message: 'title_cart_empty'}) }} {% else %}
{{ 'title_cart_items'|translate }}
{% for cartItem in cart.cartItems %} {% set product = products[cartItem.productId] %}
{{ cartItem.quantity }} {% if product.mainImage %} {{ products[cartItem.productId].cache(shop.currentLocale).name }} {% else %} {{ component('dummy_image', {'width': 540, 'height': 540}) }} {% endif %}
{% if product is defined %} {{ cartItem.productNameWithVariant }} {% else %} {{ cartItem.productNameWithVariant }} {% endif %}
{{ 'total'|translate }}: {{ cartItem.totalPrice|money }}
{% endfor %} {% endif %}

{% if cart.deliveryAddress %}
{{ 'title_delivery_address'|translate }}

{{ cart.deliveryAddress.fullName }},
{{ cart.deliveryAddress.street }}
{{ cart.deliveryAddress.postalCode }} {{ cart.deliveryAddress.city }}

{% endif %} {% if cart.billingAddress %}
{{ 'title_billing_address'|translate }}

{{ cart.billingAddress.companyName }},
{{ cart.billingAddress.street }}
{{ cart.billingAddress.postalCode }} {{ cart.billingAddress.city }}

{% endif %}
{{ 'button_back_purchase'|translate }} {{ 'button_back_to_shop'|translate }}