<div class="shop-basket">

    <form method="post" action={"/shop/basket/"|ezurl}>

    <h1>{"Basket"|i18n("design/base/shop")}</h1>

    {section show=$removed_items}
    <div class="warning">
        <h2>{"The following items were removed from your basket, because the products were changed"|i18n("design/base/shop",,)}</h2>
        <ul>
        {section name=RemovedItem loop=$removed_items}
            <li> <a href={concat("/content/view/full/",$RemovedItem:item.contentobject.main_node_id,"/")|ezurl}>{$RemovedItem:item.contentobject.name}</a></li>
        {/section}
        </ul>
    </div>
    {/section}

    {section show=$error}
    <div class="error">
    {section show=$error|eq(1)}
    <h2>{"Attempted to add object without price to basket."|i18n("design/base/shop",,)}</h2>
    {/section}
    </div>
    {/section}

    {section show=$error}
    <div class="error">
    {section show=eq($error, "aborted")}
    <h2>{"Your payment was aborted."|i18n("design/base/shop",,)}</h2>
    {/section}
    </div>
    {/section}


    {section show=$basket.items}

    <div class="content-basket">
    <table cellspacing="0">
    <tr>
	    <th>
        {"Quantity"|i18n("design/base/shop")}
        </th>
        <th>
        {"VAT"|i18n("design/base/shop")}
        </th>
        <th>
    	{"Price"|i18n("design/base/shop")}
        </th>
        <th>
	    {"Discount"|i18n("design/base/shop")}
        </th>
        <th>
     	{"Total Price"|i18n("design/base/shop")}
        </th>
        <th>
       {* <input type="image" src={"t1/t1-bin.gif"|ezimage} name="RemoveProductItemButton" value="{'Remove'|i18n('design/base/shop')}" /> &nbsp; *}
        <input type="image" class="shop-basketbin" src={"1x1.gif"|ezimage} name="RemoveProductItemButton" value="{'Remove'|i18n('design/base/shop')}" />
        </th>
    </tr>
    {section var=product_item loop=$basket.items sequence=array(bglight,bgdark)}
    <tr>
        <td class="{$product_item.sequence} product-name" colspan="6">
        <a href={concat("/content/view/full/",$product_item.node_id,"/")|ezurl}>{$product_item.object_name}</a>
        </td>
    </tr>
    <tr>
        <td class="{$product_item.sequence} product-details">
            <input type="hidden" name="ProductItemIDList[]" value="{$product_item.id}" />
            <input type="text" name="ProductItemCountList[]" value="{$product_item.item_count}" size="5" />
    	</td>
	    <td class="{$product_item.sequence} product-details">
        {$product_item.vat_value} %
    	</td>
        <td class="{$product_item.sequence} product-details">
        {$product_item.price_inc_vat|l10n(currency)}
    	</td>
	    <td class="{$product_item.sequence} product-details">
        {$product_item.discount_percent}%
        </td>
	    <td class="{$product_item.sequence} product-details product-price">
        {$product_item.total_price_inc_vat|l10n(currency)}
	    </td>
     	<td class="{$product_item.sequence} product-details">
	    <input type="checkbox" name="RemoveProductItemDeleteList[]" value="{$product_item.item.id}" />
    	</td>
     </tr>
     {section show=$product_item.item.item_object.option_list}
     <tr>
         <td class="{$product_item.sequence}" colspan='4'>
         {"Selected options"|i18n("design/base/shop")}<br/>

         <table class="shop-option_list">
         {section var=option_item loop=$product_item.item_object.option_list}
         <tr>
             <td class="shop-option_name">{$option_item.name|wash}</td>
             <td class="shop-option_value">{$option_item.value}</td>
             <td class="shop-option_price">{section show=$option_item.price|ne( 0 )}{$option_item.price|l10n( currency )}{/section}</td>
         </tr>
         {/section}
         </table>
         </td>
     </tr>
     {/section}
     {/section}
     <tr>
         <td class="product-subtotal" colspan='5'>
         {"Subtotal Inc. VAT"|i18n("design/base/shop")}:
         <strong>{$basket.total_inc_vat|l10n(currency)}</strong>
         </td>
         <td class="product-subtotal">
         &nbsp;
         </td>

     </tr>
     </table>
      </div>

     <div class="buttonblock">
         <input class="shopbutton" type="submit" name="CheckoutButton" value="{'Checkout'|i18n('design/base/shop')}" /> &nbsp;
     </div>

     <div class="buttonblock">
         <input class="shopbutton" type="submit" name="ContinueShoppingButton" value="{'Continue shopping'|i18n('design/base/shop')}" />
         <input class="shopbutton" type="submit" name="StoreChangesButton" value="{'Store quantities'|i18n('design/base/shop')}" />
     </div>

    {section-else}

    <div class="feedback">
        <h2>{"You have no products in your basket"|i18n("design/base/shop")}</h2>
    </div>

    {/section}

    </form>
</div>
