{{ function ("wc_print_notices") }}
{% do action('woocommerce_before_cart') %}

<form class="woocommerce-cart-form" action="{{ function ("esc_url", function (" wc_get_cart_url"))}}" method="post">
    {% do action('woocommerce_before_cart_table') %}
    <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
        <thead>
            <tr>
                <th class="product-remove">&nbsp;</th>
                <th class="product-thumbnail">&nbsp;</th>
                <th class="product-name">{{function ('_e', 'Product', 'woocommerce' )}}</th>
                <th class="product-price">{{function ('_e', 'Price', 'woocommerce' )}} </th>
                <th class="product-quantity">{{function ('_e', 'Quantity', 'woocommerce' )}}</th>
                <th class="product-subtotal">{{function ('_e','Total', 'woocommerce' )}}</th>
            </tr>
        </thead>
        <tbody>
            {% do action('woocommerce_before_cart_contents') %}

            {% for cart_item_key, cart_item in cart.get_cart %}
                {% set _product   = cart_item.data | apply_filters( 'woocommerce_cart_item_product', cart_item.data, cart_item, cart_item_key )%}
                {% set product_id = cart_item.product_id | apply_filters( 'woocommerce_cart_item_product_id', cart_item.product_id, cart_item, cart_item_key ) %}

                {% if _product and _product.exists and  cart_item.quantity > 0 and true | apply_filters( 'woocommerce_cart_item_visible', true, cart_item, cart_item_key ) %}
                    {% set product_permalink = _product.is_visible ? _product.get_permalink( cart_item ) : '' %}
                    {% set product_permalink = product_permalink | apply_filters( 'woocommerce_cart_item_permalink', product_permalink, cart_item, cart_item_key) %}
                    <tr class="woocommerce-cart-form__cart-item {{ function ("esc_attr", "cart_item" |  apply_filters( 'woocommerce_cart_item_class', 'cart_item', cart_item, cart_item_key ) )}}">
                        <td class="product-remove">

                            {% set cart_item_remove_link = '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>' | format(
                           function("esc_url", function("wc_get_cart_remove_url",cart_item_key)),
                           __( 'Remove this item', 'woocommerce' ),
                           function("esc_attr", product_id),
                           function("esc_attr", _product.get_sku)
                           )
                            %}

                            {{ cart_item_remove_link | apply_filters("woocommerce_cart_item_remove_link", cart_item_remove_link, cart_item_key) | safe }}

                        </td>
                        <td class="product-thumbnail">
                            {% set thumbnail = _product.get_image | apply_filters( 'woocommerce_cart_item_thumbnail', _product.get_image, cart_item, cart_item_key ) %}
                            {% if product_permalink is empty  %}				
                                {{thumbnail | safe}}
                            {% else %}	
                                {{'<a href="%s">%s</a>'| format( function("esc_url", product_permalink ), thumbnail) | safe}}
                            {% endif %}					

                        </td>
                        <td class="product-name" data-title="{{ _e( 'Product', 'woocommerce' )}}">

                            {%    if ( product_permalink is empty ) %}
                                {{ _product.get_name | apply_filters( 'woocommerce_cart_item_name', _product.get_name, cart_item, cart_item_key ) | safe }}
                                {{ '&nbsp;' }}
                            {% else %}
                                {% set cart_item_name = '<a href="%s">%s</a>' | format(function("esc_url", product_permalink), _product.get_name )%}
                                {{ cart_item_name | apply_filters( 'woocommerce_cart_item_name', cart_item_name, cart_item, cart_item_key ) | safe }}

                            {% endif %}

                            {# Meta data #}
                            {{ function("wc_get_formatted_cart_item_data",cart_item )}}


                            {# Backorder notification #}
                            {%  if ( _product.backorders_require_notification and _product.is_on_backorder( cart_item.quantity ) ) %}
                                {{'<p class="backorder_notification">'~ function("esc_html__", "Available on backorder", "woocommerce") ~'</p>' | safe}}
                            {% endif %}

                        </td>
                        <td class="product-price" data-title="{{ _e( 'Price', 'woocommerce' )}}">
                            {{ cart.get_product_price( _product ) |  apply_filters( 'woocommerce_cart_item_price', cart.get_product_price( _product ), cart_item, cart_item_key ) | safe }}				
                        </td>
                        <td class="product-quantity" data-title="{{ _e( 'Quantity', 'woocommerce' )}}">
                            {% if (_product.is_sold_individually) %}				
                                {% set product_quantity = '1 <input type="hidden" name="cart[%s][qty]" value="1" />' | format(cart_item_key) %}				
                            {% else %}
                                {% set product_quantity = function("woocommerce_quantity_input", {
                                                   'input_name': 'cart['~cart_item_key~'][qty]',
                                                   'input_value' : cart_item.quantity,
                                                   'max_value'  : _product.get_max_purchase_quantity,
                                                   'min_value'  : '0'
                                                   }, _product, false)
                                %}
                                {{ product_quantity | apply_filters( 'woocommerce_cart_item_quantity', product_quantity, cart_item_key, cart_item ) | safe}}
                            {% endif %}
                        </td>
                        <td class="product-subtotal" data-title="{{ _e( 'Total', 'woocommerce' ) }}">

                            {{ cart.get_product_subtotal( _product, cart_item.quantity )| apply_filters( 'woocommerce_cart_item_subtotal', cart.get_product_subtotal( _product, cart_item.quantity ), cart_item, cart_item_key ) | safe }}

                        </td>
                    </tr>
                {% endif %}

            {% endfor %}

            {% do action('woocommerce_cart_contents') %}

            <tr>
                <td colspan="6" class="actions">
                    {% if ( function("wc_coupons_enabled") ) %}
                        <div class="coupon">
                            <label for="coupon_code">{{ _e( 'Coupon:', 'woocommerce' ) | e('html_attr')}}</label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="{{ _e( 'Coupon code', 'woocommerce' )| e('html_attr') }}" /> <input type="submit" class="button" name="apply_coupon" value="{{ _e( 'Apply coupon', 'woocommerce' )| e('html_attr') }}" />
                            {% do action('woocommerce_cart_coupon') %}
                        </div>
                    {% endif %}

                    <input type="submit" class="button" name="update_cart" value="{{ _e( 'Update cart', 'woocommerce' )| e('html_attr')}}" />
                    {% do action('woocommerce_cart_actions') %}
                    {{ function("wp_nonce_field", "woocommerce-cart") | safe }}
                </td>
            </tr>
            {% do action('woocommerce_after_cart_contents') %}
        </tbody>
    </table>
    {% do action('woocommerce_after_cart_table') %}

</form>

<div class="cart-collaterals">

    {#
     * woocommerce_cart_collaterals hook.
     *
     * @hooked woocommerce_cross_sell_display
     * @hooked woocommerce_cart_totals - 10
     *
    #}
    {% do action('woocommerce_cart_collaterals') %}


</div>
{% do action('woocommerce_after_cart') %}
