{% extends 'ecom.html.twig' %} {% block content %} {{ form_start(form) }}

{{ 'Pay your order' | trans }}

{{ 'Products list' | trans }}

{% set sum = 0 %} {% set productTax = 0 %} {% for key, item in cartData['items'] %} {% set sum = sum + item['subTotal'] %} {% set productTax = productTax + item['productTax'] %} {% endfor %}
{{ 'Product' | trans }} {{ 'Quantity' | trans }} {{ 'Price' | trans }}
{% if item['addOn'] == false %}
{% if item['productThumbnail'] is not empty %} {% endif %}

{{ item['productName'] }} {{ item['size'] is not empty ? ' - ' ~ item['size'] : '' }}
{{ 'Sku' | trans }}: {{ item['productSku'] }}

{% else %}

{{ item['productName'] }} - {{ item['productSku'] }} {% if item['addOnInputAllLetterInputCapital'] %}
{{ item['addOnText'] | upper }} {% else %}
{{ item['addOnText'] }} {% endif %}

{% endif %}
{{ item['quantity'] }} {{ item['productPriceEcomIncTax'] }} {{ 'kr' | trans }}
{{ form_row(form.comment) }}
{{ cartData['quantity'] }} {{ sum | number_format(2, '.', ',') }} {{ 'kr' | trans }}
{{ 'Shipping fee' | trans }} 0 {{ 'kr' | trans }}
{{ 'Discount' | trans }} 0 {{ 'kr' | trans }}
{{ 'Tax' | trans }} {{ (productTax + channel.getShippingFeeEcomTax(tax_default)) | number_format(2, '.', ',') }} {{ 'kr' | trans }}
{{ 'Totalt' | trans }} {{ sum | number_format(2, '.', ',') }} {{ 'kr' | trans }}

{{ 'Shipping' | trans }}

{% if channel.ecomShippingText is empty %} {{ 'shipping text here' | trans }} {% else %} {{ channel.ecomShippingText | raw }} {% endif %}
{% for index, shippingType in shippingTypes %}
{% endfor %}

{{ 'Payment' | trans }}

{% for choice in form.paymentMethod %} {% if choice.vars.label == 'swish' %}
{{ form_widget(choice, { attr: { class: 'paymentMethod' } }) }} {{ form_label(choice, null, { label_attr: { class: 'form-check-label' } }) }}
{{ form_row(form.swishPhoneNr) }}
{% else %}
{{ form_widget(choice, { attr: { class: 'paymentMethod' } }) }} {{ form_label(choice, null, { label_attr: { class: 'form-check-label' } }) }}
{% endif %} {% endfor %}

{{ 'Delivery' | trans }}

{{ form_row(form.firstname) }}
{{ form_row(form.lastname) }}
{{ form_row(form.customerAddress) }}
{{ form_row(form.customerPostCode) }}
{{ form_row(form.customerCity) }}
{{ form_row(form.customerCountry) }}
{{ form_row(form.customerEmail) }}
{{ form_row(form.customerMobile) }}
{{ form_widget(form.acceptTerms) }} {% set link = path('ecom_wiki_page', {'channelEcomId': app.request.get('channelEcomId'), 'slug': 'anvandarvillkor'}) %}
{{ form_end(form) }} {% endblock %} {% block custom_javascripts %} {% endblock %}