<thead>
<tr>
    <th id="image">&nbsp;</th>
    <th id="description">{$trad.strDescription}</th>
    <th id="qty">{$trad.qty}</th>
    <th id="price">{$trad.strPrice}</th>
    <th id="total" {if $Order->step >= 3}colspan="2"{/if}>{$trad.strTotal}</th>
    {if $Order->step < 3}
        <th id="action">&nbsp;</th>
    {/if}
</thead>
<tbody>
{foreach from=$Order->getCart() item=ligne key=k}
    <tr>
        <td id="image">{$ligne.image}</td>
        <td id="description">{$ligne.title}&nbsp;{if $ligne.hand ==  2}<br/><em class="order">({$trad.secondhand}
                )</em>{/if}
            {if $ligne.price != $ligne.standardPrice}<br/><em class="order">{$ligne.promoTag}</em>{/if}
            <p class="order">ref: {$ligne.reference}</p></td>
        <td id="qty" align="center">
            {if $Order->step < 3}
                <table>
                    <tr>
                        <td>{$ligne.quantity}</td>
                        <td>

                            <form id='add' class="order" method='post'>
                                <input type="hidden" name="action" value="add"/>
                                <input type="hidden" name="product" value="{$ligne.reference}"/>
                                <input type="hidden" name="choice" value="{$ligne.hand}"/>
                                <input type="hidden" name="order_id" value="{$Order->getOrderId()}"/>
                                <input type="hidden" name="order" value="1"/>
                                <input type="submit" class="order" id="increase" value="+"/>
                            </form>
                            <form id='add' class="order" method='post'>
                                <input type="hidden" name="action" value="update"/>
                                <input type="hidden" name="product" value="{$ligne.reference}"/>
                                <input type="hidden" name="choice" value="{$ligne.hand}"/>
                                <input type="hidden" name="qty" value="{$ligne.quantity - 1}"/>
                                <input type="hidden" name="order_id" value="{$Order->getOrderId()}"/>
                                <input type="hidden" name="order" value="1"/>
                                <input type="submit" class="order" id="decrease" value="-"/>
                            </form>
                        </td>
                    </tr>
                </table>
            {else}
                {$ligne.quantity}
            {/if}

        </td>
        <td id="price">{if $ligne.price != $ligne.standardPrice}<span
                    id="stdPrice">{$Site->format_currency($ligne.standardPrice)}</span>
                <br/>
            {/if}
            {$Site->format_currency($ligne.price)}
        </td>
        <td id="total" {if $Order->step >= 3}colspan="2"
            {/if}>{$Site->format_currency($ligne.amount)}</td>
        {if $Order->step < 3}
            <td id="action">
                <form id='del' method='post'>
                    <input type="hidden" name="action" value="update"/>
                    <input type="hidden" name="product" value="{$ligne.reference}"/>
                    <input type="hidden" name="choice" value="{$ligne.hand}"/>
                    <input type="hidden" name="qty" value="0"/>
                    <input type="hidden" name="order_id" value="{$Order->getOrderId()}"/>
                    <input type="hidden" name="order" value="1"/>
                    <button class="order " id="delete"
                            type="submit"><i class="fa-trash"></i></button>
                </form>
            </td>
        {/if}
    </tr>
{/foreach}
</tbody>
<tfoot>
<tr>
    <td></td>
    <td id="description"></td>
    <td style="text-align:center;">{$Order->getCount()}</td>
    <td style="text-align:right;">{$trad.strSubTotal}</td>
    <td style="text-align:right;">{$Order->getSubTotal(true)}</td>
    {if $Order->step < 3}
        <td></td>
    {/if}
    {if isset( $distributor_cart ) }
        <td></td>
    {/if}
</tr>
{foreach from=$Order->getDiscount()  item=discount }
    <!-- Discount -->
    <tr>
        <td colspan="4" class="noborder nobold" style="text-align: right;">{$discount.label}</td>
        <td style="text-align:right;" class="noborder nobold">{$discount.amount}</td>
    </tr>
    <!-- end Discount -->
{/foreach}


{foreach from=$Order->getBeforeTaxes(true)  item=bt }
    <!-- Before taxes -->
    <tr>
        <td colspan="4" class="noborder nobold" style="text-align: right;">{$bt.label}</td>
        <td style="text-align:right;" class="noborder nobold">{$bt.amount}</td>
    </tr>
    <!-- end before taxes -->
{/foreach}
