<!DOCTYPE HTML>
<html>
<head>
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" name="viewport">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>{$page_seo.title}--购物车</title>
<link rel="stylesheet" type="text/css" href="../Style/shop.css" /></head>
<script charset="utf-8" src="../Style/js/jquery.js" type="text/javascript"></script>
<script charset="utf-8" src="../Style/js/ecmall.js" type="text/javascript"></script>
<script charset="utf-8" src="../Style/js/touchslider.dev.js" type="text/javascript"></script>
<script type="text/javascript">
//<!CDATA[
var SITE_URL = __ROOT__;
var PRICE_FORMAT = '¥%s';

$(function(){
    var span = $("#child_nav");
    span.hover(function(){
        $("#float_layer:not(:animated)").show();
    }, function(){
        $("#float_layer").hide();
    });
});
//]]>
</script>
</head>

<body>
<include file="public:head" />
<script type="text/javascript" src="../Style/js/cart.js" charset="utf-8"></script>

<div id="content">
<?php if(count($_SESSION['cart'])==0){ ?>
    <div class="null_shopping">
          <div class="cart_pic"></div>
          <h4>您还没有宝贝，赶快去逛逛吧！</h4>
          <p>
              <a class="enter" href="{:U('Index/index')}">马上去逛逛</a>
          </p>
      </div>  
   <?php }else{  ?>   
   <h3 id="chose_all"><b class="ico">全选商品</b></h3>
    <ul class="cart_list">
    
     <volist name='item' id='vo'>
         <li id="cart_item_{$vo.id}">
              <p class="goods_info">
                  <span class="img"><a href="{:U('Item/index',array('id'=>$vo['id']))}" ><img src="{:attach(get_thumb($vo['img'], '_m'), 'item')}" height="80" width="80"></a></span>
                  <span class="tit">
                      <a href="{:U('Item/index',array('id'=>$vo['id']))}" >{$vo.name}</a><br>
                      <span>价格:</span><span class="price1">¥{$vo.price}</span><br>
                      <span>数量:</span>
                      <span>
                          <img src="../Style/images/subtract.gif" onClick="decrease_quantity({$vo.id});" alt="decrease" style="vertical-align: middle;width=:16px">
                           <input id="input_item_{$vo.id}" value="{$vo.num}" orig="1" changed="{$vo.num}" onKeyUp="change_quantity({$vo.id}, this);" class="text1 width3" type="text" style="height:20px;">
                          <img src="../Style/images/adding.gif" onClick="add_quantity({$vo.id});" alt="increase" style="vertical-align: middle;width=:16px">
                      </span><br>
                      <span>
                          <a class="del" href="javascript:;" onClick="drop_cart_item({$vo.id});"> <img src="../Style/images/del.png"  style="vertical-align: middle;height:20px;width=:20px"></a>
                      </span>
                  </span>
              </p>
              <p class="buy_info">
                  <span class="total">
                      <span>小计:</span>
                      <span class="price2" id="item{$vo.id}_subtotal">¥<?php echo sprintf("%01.2f",$vo['num']*$vo['price']); ?></span>
                  </span>
              </p>                        
          </li>
          </volist>
    </ul>
   
    <div class="buy_foot">
        <p class="goods_amount">
            <span>商品总价:</span>
            <strong class="fontsize1" id="cart_amount">¥{$sumPrice}</strong>
        </p>
        <p class="jiesuan_btn">
            <a href="{:U('Order/jiesuan')}" class="btn"><span>去结算</span><img src="../Style/images/jiesuan.png" width="50%"></a>
        </p>
    </div>
    <?php } ?>
</div>
<include file="public:footer" />

</body>
</html>