<div class="table-responsive shopping-cart-table">
    {{ form_start(form, {}) }}
        {{ form_errors(form) }}

        <table class="table table-bordered" {{ coreshop_test_html_attribute('cart-items') }}>
            <thead>
            <tr>
                <td class="text-center">
                    {{ 'coreshop.ui.image'|trans }}
                </td>
                <td class="text-center">
                    {{ 'coreshop.ui.product_details'|trans }}
                </td>
                <td class="text-center">
                    {{ 'coreshop.ui.quantity'|trans }}
                </td>
                <td class="text-center">
                    {{ 'coreshop.ui.price'|trans }}
                </td>
                <td class="text-center">
                    {{ 'coreshop.ui.total'|trans }}
                </td>
                <td></td>
            </tr>
            </thead>
            <tbody>
            {% for item in cart.items %}
                {% include '@CoreShopFrontend/Cart/Summary/_item.html.twig' with {'item': item, 'form': form.items[loop.index0]} %}
            {% endfor %}
            <tr>
                <td colspan="6" class="text-right">
                    {% include '@CoreShopFrontend/Cart/Summary/_update.html.twig' %}
                </td>
            </tr>

            {% include '@CoreShopFrontend/Cart/Summary/_rules.html.twig' %}

            </tbody>
            <tfoot>
            {% include '@CoreShopFrontend/Cart/Summary/_summary.html.twig' %}
            </tfoot>
        </table>

        {{ form_row(form._token) }}
    {{ form_end(form, {'render_rest': false}) }}

</div>

{% if cart.shipping(false) is null and is_granted('CORESHOP_CART_CALCULATE_SHIPMENT') %}
    {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\CartController:shipmentCalculationAction')) }}
{% endif %}
