{% load i18n %}
{% load lfs_tags %}
<table class="lfs-default">
    <tr>
        <th colspan="2">
            {% trans 'Product' %}
        </th>
        <th class="number">
            {% trans 'Quantity' %}
        </th>
        <th class="number">
            {% trans 'Price' %}
        </th>
        <th class="number">
            {% trans 'Included VAT' %}
        </th>
        <th class="number last">
            {% trans 'Total' %}
        </th>
    </tr>
    {% for cart_item in cart_items %}
        <tr>
            <td class="image">
                <img src="{{ cart_item.product.get_image.url_60x60 }}"
                     alt="{{ cart_item.product.get_name }}"/>
            </td>
            <td>
                {{ cart_item.product.get_name }}
                {% for property in cart_item.product.get_variant_properties %}
                    <div>
                        {{ property.title }}: {{ property.value }} {{ property.unit|safe }}
                    </div>
                {% endfor %}

                {% for property in cart_item.product.get_displayed_properties %}
                    <div>
                        {{ property.title }}: {{ property.value }} {{ property.unit|safe }}
                    </div>
                {% endfor %}

                {% if cart_item.product.is_configurable_product %}
                    {% for property in cart_item.get_properties %}
                        <div>
                            {{ property.title }}: {{ property.value }} {{ property.unit|safe }}
                            {% if property.display_price %}
                                ({{ property.price|currency }})
                            {% endif %}
                        </div>
                    {% endfor %}
                {% endif %}

            </td>
            <td class="number">
                {{ cart_item.amount|quantity }} {{ cart_item.product.unit }}

                {% if cart_item.product.active_packing_unit %}
                    <span class="packing-unit">
                        ({{ cart_item|packages }} {{ cart_item.product.packing_unit_unit }})
                    </span>
                {% endif %}

            </td>
            <td class="number">
                {{ cart_item.product.get_price|currency }}
                {% if cart_item.product.price_unit %}
                    / {{ cart_item.product.price_unit }}
                {% endif %}
            </td>
            <td class="number">
                ({{ cart_item.get_tax|currency }})
            </td>
            <td class="number last">
                {{ cart_item.get_price|currency }}
            </td>
        </tr>
    {% endfor %}
    <tr class="total">
        <td colspan="3"></td>
        <td colspan="3" class="number total">
            {% trans 'Total' %}: {{ total|currency }}
        </td>
    </tr>
</table>
