You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1511 lines
98 KiB
1511 lines
98 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
|
|
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />
|
|
|
|
<title><?php echo $this->_var['page_title']; ?></title>
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
|
|
<link rel="stylesheet" type="text/css" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/base.css" />
|
|
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />
|
|
<link rel="alternate" type="application/rss+xml" title="RSS|<?php echo $this->_var['page_title']; ?>" href="<?php echo $this->_var['feed_url']; ?>" />
|
|
<link rel="stylesheet" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/purebox.css">
|
|
<?php if ($this->_var['step'] == 'cart'): ?>
|
|
<link href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/area_stock.css" rel="stylesheet" type="text/css" />
|
|
<?php endif; ?>
|
|
|
|
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery-1.9.1.min.js,jquery.json.js,transport_jquery.js,common.js,shopping_flow.js')); ?>
|
|
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery-migrate-1.1.0.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/sc_common.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.SuperSlide.2.1.1.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/checkAll.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/scroll_city.js"></script>
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/notLogin.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<?php echo $this->fetch('library/page_header_flow.lbi'); ?>
|
|
<?php if ($this->_var['step'] == "cart"): ?>
|
|
<script type="text/javascript">
|
|
<?php $_from = $this->_var['lang']['password_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
|
|
foreach ($_from AS $this->_var['key'] => $this->_var['item']):
|
|
?>
|
|
var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</script>
|
|
<div id="container" class="cart">
|
|
<div class="ecscshop-filter-bar w1200">
|
|
<div class="ecscshop-title">
|
|
<i class="ecscshop-icon cart-icon"></i><h3 class="ml15">购物车( <em class="cart_check_num"></em> )</h3>
|
|
</div>
|
|
<div style="float:right; padding-left:20px;">
|
|
<?php echo $this->smarty_insert_scripts(array('files'=>'warehouse.js')); ?>
|
|
<div class="fl" style="padding-top:5px;">配送至:</div>
|
|
<div class="store-selector fl">
|
|
<div class="text-select" id="area_address">
|
|
<div class="area_tit">
|
|
<span><?php echo $this->_var['province_row']['region_name']; ?> <?php echo $this->_var['city_row']['region_name']; ?> <?php echo $this->_var['district_row']['region_name']; ?></span><i class="sc-icon-right"></i>
|
|
</div>
|
|
<div class="area_brand"></div>
|
|
<div class="flow_area_list_style" id="area_list">
|
|
<div class="select_area_style" id="select_area">
|
|
<div class="select_area_box">
|
|
<div class="select_tab" onclick="region.selectArea(this, 1);" value="<?php echo $this->_var['province_row']['region_id']; ?>" id="province_li"><?php echo $this->_var['province_row']['region_name']; ?><i class="sc-icon-right"></i></div>
|
|
<div class="select_tab" style="<?php if ($this->_var['district_row']['region_name'] == ''): ?>background:#fff;<?php endif; ?>" onclick="region.selectArea(this, 2);" value="<?php echo $this->_var['city_row']['region_id']; ?>" id="city_li"><?php echo $this->_var['city_row']['region_name']; ?><i class="sc-icon-right"></i></div>
|
|
<div class="select_tab curr" style="<?php if ($this->_var['district_row']['region_name'] == ''): ?>display:none;<?php endif; ?> <?php if ($this->_var['district_row']['region_name']): ?>background:#fff<?php endif; ?>" onclick="region.selectArea(this, 3);" value="<?php echo $this->_var['city_district']['region_id']; ?>" id="district_type"><?php echo $this->_var['district_row']['region_name']; ?><i class="sc-icon-right"></i></div>
|
|
</div>
|
|
</div>
|
|
<b onclick="region.closeRegion();" title="close" class="close_area_list"></b>
|
|
<div class="house_list_style" id="house_list" style="display:none;" >
|
|
<ul id="province_list">
|
|
|
|
<?php $_from = $this->_var['province_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'province_0_02107900_1689838842');$this->_foreach['noprovince'] = array('total' => count($_from), 'iteration' => 0);
|
|
if ($this->_foreach['noprovince']['total'] > 0):
|
|
foreach ($_from AS $this->_var['province_0_02107900_1689838842']):
|
|
$this->_foreach['noprovince']['iteration']++;
|
|
?>
|
|
<li>
|
|
<a v="<?php echo $this->_var['province_0_02107900_1689838842']['region_id']; ?>" title="<?php echo $this->_var['province_0_02107900_1689838842']['region_name']; ?>" onclick="region.getRegion(<?php echo $this->_var['province_0_02107900_1689838842']['region_id']; ?>, 2, city_list, this,<?php echo $this->_var['user_id']; ?>);" href="javascript:void(0);"><?php echo $this->_var['province_0_02107900_1689838842']['region_name']; ?></a>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
|
|
</ul>
|
|
</div>
|
|
<div style="<?php if ($this->_var['district_row']['region_name'] == ''): ?>display: block;<?php else: ?>display: none;<?php endif; ?>" class="house_list_style" id="city_list_id">
|
|
<ul id="city_list">
|
|
|
|
<?php $_from = $this->_var['city_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'city');$this->_foreach['nocity'] = array('total' => count($_from), 'iteration' => 0);
|
|
if ($this->_foreach['nocity']['total'] > 0):
|
|
foreach ($_from AS $this->_var['city']):
|
|
$this->_foreach['nocity']['iteration']++;
|
|
?>
|
|
<li>
|
|
<a v="<?php echo $this->_var['city']['region_id']; ?>" title="<?php echo $this->_var['city']['region_name']; ?>" onclick="region.getRegion(<?php echo $this->_var['city']['region_id']; ?>, 3, district_list, '<?php echo $this->_var['city']['region_name']; ?>',<?php echo $this->_var['user_id']; ?>);" href="javascript:void(0);"><?php echo $this->_var['city']['region_name']; ?></a>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
|
|
</ul>
|
|
</div>
|
|
<div style="<?php if ($this->_var['district_row']['region_name'] == ''): ?>display: none;<?php else: ?>display: block;<?php endif; ?>" class="house_list_style" id="district_list_id">
|
|
<ul id="district_list">
|
|
|
|
<?php $_from = $this->_var['district_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'district');$this->_foreach['nodistrict'] = array('total' => count($_from), 'iteration' => 0);
|
|
if ($this->_foreach['nodistrict']['total'] > 0):
|
|
foreach ($_from AS $this->_var['district']):
|
|
$this->_foreach['nodistrict']['iteration']++;
|
|
?>
|
|
<li>
|
|
<a v="<?php echo $this->_var['county']['region_id']; ?>" title="<?php echo $this->_var['district']['region_name']; ?>" onclick="region.changedDis(<?php echo $this->_var['district']['region_id']; ?>,<?php echo $this->_var['user_id']; ?>);" href="javascript:void(0);" id="district_<?php echo $this->_var['district']['region_id']; ?>"><?php echo $this->_var['district']['region_name']; ?></a>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
|
|
</ul>
|
|
</div>
|
|
<p class="mod_storage_state">商创商品暂时只支持配送至中国大陆地区</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" value="<?php echo $this->_var['province_row']['region_id']; ?>" id="province_id" name="province_region_id">
|
|
<input type="hidden" value="<?php echo $this->_var['city_row']['region_id']; ?>" id="city_id" name="city_region_id">
|
|
<input type="hidden" value="<?php if ($this->_var['district_row']['region_id']): ?><?php echo $this->_var['district_row']['region_id']; ?><?php else: ?>0<?php endif; ?>" id="district_id" name="district_region_id">
|
|
<input type="hidden" value="<?php echo $this->_var['flow_region']; ?>" id="region_id" name="region_id">
|
|
<input type="hidden" value="" id="good_id" name="good_id">
|
|
<input type="hidden" value="<?php echo $this->_var['user_id']; ?>" id="user_id" name="user_id">
|
|
<input type="hidden" value="<?php echo $this->_var['area_id']; ?>" id="area_id" name="area_id">
|
|
</div>
|
|
</div>
|
|
<?php if ($this->_var['goods_list']): ?>
|
|
<div class="cart-warp w1200">
|
|
<div id="ecsc-cart" class="cart-main">
|
|
<div class="cart-thead">
|
|
<div class="column t-checkbox cart-checkbox">
|
|
<input type="checkbox" id="cart-selectall" checked="checked" class="ui-checkbox checkboxshopAll" />
|
|
<label for="cart-selectall" class="cart-select-all">全选</label>
|
|
</div>
|
|
<div class="column t-goods">商品</div>
|
|
<div class="column t-attr">属性</div>
|
|
<div class="column t-price">单价(元)</div>
|
|
<div class="column t-quantity">数量</div>
|
|
<div class="column t-sum">小计(元)</div>
|
|
<div class="column t-action">操作</div>
|
|
</div>
|
|
<div id="cart-list">
|
|
<?php $_from = $this->_var['goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goodsRu');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goodsRu']):
|
|
?>
|
|
<div class="cart-item-list">
|
|
<div class="cart-tbody">
|
|
<div class="shop">
|
|
<div class="cart-checkbox">
|
|
<input type="checkbox" checked="checked" name="checkShop" class="ui-checkbox CheckBoxShop" id="shopid_<?php echo $this->_var['goodsRu']['ru_id']; ?>">
|
|
<label for="shopid_<?php echo $this->_var['goodsRu']['ru_id']; ?>"> </label>
|
|
</div>
|
|
<span class="shop-txt"><a href="<?php echo $this->_var['goodsRu']['url']; ?>" target="_blank" class="shop-name"><?php echo $this->_var['goodsRu']['ru_name']; ?></a></span>
|
|
</div>
|
|
<div class="item-list">
|
|
<?php $_from = $this->_var['goodsRu']['new_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'activity');if (count($_from)):
|
|
foreach ($_from AS $this->_var['key'] => $this->_var['activity']):
|
|
?>
|
|
|
|
<?php if ($this->_var['activity']['act_id'] > 0): ?>
|
|
<div class="item-body item_give" id="product_promo_<?php echo $this->_var['activity']['act_id']; ?>" data-actid="<?php echo $this->_var['activity']['act_id']; ?>">
|
|
<div class="item-full minus-item">
|
|
<div class="item-header">
|
|
<?php if ($this->_var['activity']['act_type'] == 0): ?>
|
|
<div class="f-txt">
|
|
<span class="full-icon"><?php echo $this->_var['activity']['act_type_txt']; ?><b></b></span>
|
|
<?php if ($this->_var['activity']['act_type_ext'] == 0): ?>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank">
|
|
<span>活动商品已购满<?php echo $this->_var['activity']['min_amount']; ?>元 ,可领取赠品<?php if ($this->_var['activity']['cart_favourable_gift_num'] > 0): ?>,已领取<?php echo $this->_var['activity']['cart_favourable_gift_num']; ?>件<?php endif; ?>>
|
|
</span>
|
|
</a>
|
|
<a class="trade-btn btn-1 ml10" href="javascript:void(0);" data-actid="<?php echo $this->_var['activity']['act_id']; ?>" id="select-gift-<?php echo $this->_var['activity']['act_id']; ?>">领取赠品</a>
|
|
|
|
<?php else: ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank"><span>活动商品购满<?php echo $this->_var['activity']['min_amount']; ?>元,即可领取赠品 > </span></a>
|
|
<a class="trade-btn btn-1 ml10" href="javascript:void(0);" data-actid="<?php echo $this->_var['activity']['act_id']; ?>" id="select-gift-<?php echo $this->_var['activity']['act_id']; ?>">查看赠品</a>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank"><span>活动商品已购满<?php echo $this->_var['activity']['min_amount']; ?>元 ,可领取赠品<?php echo $this->_var['activity']['act_type_ext']; ?>件 ,还可领取<?php echo $this->_var['activity']['left_gift_num']; ?>件 > </span></a>
|
|
<a class="trade-btn btn-1 ml10" href="javascript:void(0);" data-actid="<?php echo $this->_var['activity']['act_id']; ?>" id="select-gift-<?php echo $this->_var['activity']['act_id']; ?>">领取赠品</a>
|
|
<?php else: ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank"><span>活动商品购满<?php echo $this->_var['activity']['min_amount']; ?>元,即可领取赠品<?php echo $this->_var['activity']['act_type_ext']; ?>件 > </span></a>
|
|
<a class="trade-btn btn-1 ml10" href="javascript:void(0);" data-actid="<?php echo $this->_var['activity']['act_id']; ?>" id="select-gift-<?php echo $this->_var['activity']['act_id']; ?>">查看赠品</a>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank" class="ftx-05"> 去凑单 ></a>
|
|
<span class="full-txt"><?php echo $this->_var['goods']['act_name']; ?></span>
|
|
</div>
|
|
<div class="f-price"><span><?php echo $this->_var['activity']['cart_fav_amount']; ?></span></div>
|
|
|
|
<?php elseif ($this->_var['activity']['act_type'] == 1): ?>
|
|
<div class="f-txt">
|
|
<span class="full-icon"><?php echo $this->_var['activity']['act_type_txt']; ?><b></b></span>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<span>活动商品已购满<?php echo $this->_var['activity']['min_amount']; ?>元 (<span class="ftx-01">已减<?php echo $this->_var['activity']['act_type_ext_format']; ?>元</span>)</span>
|
|
<?php else: ?>
|
|
<span>活动商品购满<?php echo $this->_var['activity']['min_amount']; ?>元, 即可享受满减</span>
|
|
<?php endif; ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank" class="ftx-05"> 去凑单 ></a>
|
|
<span class="full-txt"><?php echo $this->_var['goods']['act_name']; ?></span>
|
|
</div>
|
|
<div class="f-price"><span><?php echo $this->_var['activity']['cart_fav_amount']; ?></span>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<span class="ftx-01">减:<?php echo $this->_var['activity']['act_type_ext_format']; ?>元</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php elseif ($this->_var['activity']['act_type'] == 2): ?>
|
|
<div class="f-txt">
|
|
<span class="full-icon"><?php echo $this->_var['activity']['act_type_txt']; ?><b></b></span>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<span>活动商品已购满<?php echo $this->_var['activity']['min_amount']; ?>元 (已享受<?php echo $this->_var['activity']['act_type_ext_format']; ?>折优惠)</span>
|
|
<?php else: ?>
|
|
<span>活动商品购满<?php echo $this->_var['activity']['min_amount']; ?>元, 即可享受折扣</span>
|
|
<?php endif; ?>
|
|
<a href="coudan.php?id=<?php echo $this->_var['activity']['act_id']; ?>" target="_blank" class="ftx-05"> 去凑单 ></a>
|
|
<span class="full-txt"><?php echo $this->_var['goods']['act_name']; ?></span>
|
|
</div>
|
|
<div class="f-price"><span><?php echo $this->_var['activity']['cart_fav_amount']; ?></span>
|
|
<?php if ($this->_var['activity']['available']): ?>
|
|
<span class="ftx-01">折扣:<?php echo $this->_var['activity']['act_type_ext_format']; ?>折</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php $_from = $this->_var['activity']['act_cart_gift']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<div class="item-item">
|
|
<div class="item-form">
|
|
<div class="cell p-checkbox hide">
|
|
<div class="cart-checkbox">
|
|
<input type="checkbox" name="checkItem" value="<?php echo $this->_var['goods']['rec_id']; ?>" id="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>" checked="checked" class="ui-checkbox">
|
|
<label for="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>"> </label>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-goods">
|
|
<div class="goods-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="80" height="80" /></a></div>
|
|
<div class="item-msg">
|
|
<div class="p-name">
|
|
<em class="s-ico">赠品</em>
|
|
<a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['goods_name']; ?></a>
|
|
</div>
|
|
<div class="p-extend">
|
|
<span class="promise"></span>
|
|
<span class="promise"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-attr">
|
|
<?php if ($this->_var['goods']['goods_attr']): ?><?php echo nl2br($this->_var['goods']['goods_attr']); ?><?php endif; ?>
|
|
<span class="btn-edit-sku">修改</span>
|
|
</div>
|
|
<div class="cell p-price">
|
|
<strong><?php echo $this->_var['goods']['goods_price']; ?></strong>
|
|
</div>
|
|
<div class="cell p-quantity">
|
|
<?php if ($this->_var['goods']['goods_id'] > 0 && $this->_var['goods']['is_gift'] == 0 && $this->_var['goods']['parent_id'] == 0 && $this->_var['goods']['extension_code'] != 'package_buy'): ?>
|
|
<div class="quantity-form">
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, -1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>),<?php echo $this->_var['activity']['act_id']; ?>" class="decrement">-</a>
|
|
<input autocomplete="off" type="text" name="goods_number[<?php echo $this->_var['goods']['rec_id']; ?>]" id="goods_number_<?php echo $this->_var['goods']['rec_id']; ?>" value="<?php echo $this->_var['goods']['goods_number']; ?>" class="itxt" onchange="change_goods_number(<?php echo $this->_var['goods']['rec_id']; ?>,this.value, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>, '', <?php echo $this->_var['activity']['act_id']; ?>)" style="text-align:center"/>
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, 1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>, <?php echo $this->_var['activity']['act_id']; ?>)" class="increment">+</a>
|
|
</div>
|
|
<div class="quantity-txt">
|
|
<?php if ($this->_var['goods']['attr_number']): ?>
|
|
有货
|
|
<?php else: ?>
|
|
<font style="color:#e4393c">无货</font>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="quantity-form">
|
|
<input class="itxt noeidx" id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>" readonly="readonly" value="<?php echo $this->_var['goods']['goods_number']; ?>" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="cell p-sum">
|
|
<strong id="goods_subtotal_<?php echo $this->_var['goods']['rec_id']; ?>">
|
|
<font id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>_subtotal"><?php echo $this->_var['goods']['subtotal']; ?></font>
|
|
<?php if ($this->_var['goods']['dis_amount'] > 0): ?>
|
|
<font style="color:#F60">(优惠:<?php echo $this->_var['goods']['discount_amount']; ?>)</font>
|
|
<?php endif; ?>
|
|
</strong>
|
|
</div>
|
|
<div class="cell p-ops">
|
|
<a id="remove_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-remove" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_remove" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="删除">删除</a>
|
|
<a id="store_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-store" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_collect" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="关注">移到我的收藏</a>
|
|
</div>
|
|
</div>
|
|
<div class="item-extra"></div>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
|
|
<?php $_from = $this->_var['activity']['act_goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<div class="item-item">
|
|
<div class="item-form">
|
|
<div class="cell p-checkbox">
|
|
<div class="cart-checkbox">
|
|
<input type="checkbox" name="checkItem" value="<?php echo $this->_var['goods']['rec_id']; ?>" id="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>" checked="checked" class="ui-checkbox">
|
|
<label for="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>"> </label>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-goods">
|
|
<div class="goods-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="80" height="80" /></a></div>
|
|
<div class="item-msg">
|
|
<div class="p-name">
|
|
<a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['goods_name']; ?></a>
|
|
</div>
|
|
<div class="p-extend">
|
|
<span class="promise"></span>
|
|
<span class="promise"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-attr">
|
|
<?php if ($this->_var['goods']['goods_attr']): ?><?php echo nl2br($this->_var['goods']['goods_attr']); ?><?php endif; ?>
|
|
<span class="btn-edit-sku">修改</span>
|
|
</div>
|
|
<div class="cell p-price">
|
|
<strong><?php echo $this->_var['goods']['goods_price']; ?></strong>
|
|
</div>
|
|
<div class="cell p-quantity">
|
|
<?php if ($this->_var['goods']['goods_id'] > 0 && $this->_var['goods']['is_gift'] == 0 && $this->_var['goods']['parent_id'] == 0 && $this->_var['goods']['extension_code'] != 'package_buy'): ?>
|
|
<div class="quantity-form">
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, -1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>, <?php echo $this->_var['activity']['act_id']; ?>)" class="decrement">-</a>
|
|
<input autocomplete="off" type="text" name="goods_number[<?php echo $this->_var['goods']['rec_id']; ?>]" id="goods_number_<?php echo $this->_var['goods']['rec_id']; ?>" value="<?php echo $this->_var['goods']['goods_number']; ?>" class="itxt" onchange="change_goods_number(<?php echo $this->_var['goods']['rec_id']; ?>,this.value, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>, '', <?php echo $this->_var['activity']['act_id']; ?>)" style="text-align:center"/>
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, 1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>, <?php echo $this->_var['activity']['act_id']; ?>)" class="increment">+</a>
|
|
</div>
|
|
<div class="quantity-txt">
|
|
<?php if ($this->_var['goods']['attr_number']): ?>
|
|
有货
|
|
<?php else: ?>
|
|
<font style="color:#e4393c">无货</font>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<font style="color:#666; font-size:12px;" id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>"><?php echo $this->_var['goods']['goods_number']; ?></font>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="cell p-sum">
|
|
<strong id="goods_subtotal_<?php echo $this->_var['goods']['rec_id']; ?>">
|
|
<font id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>_subtotal"><?php echo $this->_var['goods']['subtotal']; ?></font>
|
|
<?php if ($this->_var['goods']['dis_amount'] > 0): ?>
|
|
<font style="color:#F60">(优惠:<?php echo $this->_var['goods']['discount_amount']; ?>)</font>
|
|
<?php endif; ?>
|
|
</strong>
|
|
</div>
|
|
<div class="cell p-ops">
|
|
<a id="remove_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-remove" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_remove" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="删除">删除</a>
|
|
<a id="store_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-store" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_collect" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="关注">移到我的收藏</a>
|
|
</div>
|
|
</div>
|
|
<div class="item-extra"></div>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
|
|
<?php if ($this->_var['activity']['act_gift_list']): ?>
|
|
<div class="gift-box" id="gift_box_list<?php echo $this->_var['activity']['act_id']; ?>" style="display:none;">
|
|
<?php echo $this->fetch('library/cart_gift_box.lbi'); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?php $_from = $this->_var['activity']['act_goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<div class="item-body item_single" id="product_<?php echo $this->_var['goods']['goods_id']; ?>">
|
|
<div class="item-full minus-item">
|
|
<div class="item-item">
|
|
<div class="item-form">
|
|
<div class="cell p-checkbox">
|
|
<div class="cart-checkbox">
|
|
<input type="checkbox" name="checkItem" value="<?php echo $this->_var['goods']['rec_id']; ?>" id="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>" checked="checked" class="ui-checkbox">
|
|
<label for="checkItem_<?php echo $this->_var['goods']['rec_id']; ?>"> </label>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-goods">
|
|
<div class="goods-item">
|
|
<?php if ($this->_var['goods']['goods_id'] > 0 && $this->_var['goods']['extension_code'] != 'package_buy'): ?>
|
|
<div class="p-img">
|
|
<a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="80" height="80" /></a>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="item-msg">
|
|
<div class="p-name">
|
|
<?php if ($this->_var['goods']['goods_id'] > 0 && $this->_var['goods']['extension_code'] == 'package_buy'): ?>
|
|
<a href="javascript:void(0);" onclick="setSuitShow(<?php echo $this->_var['goods']['goods_id']; ?>)"><?php echo $this->_var['goods']['goods_name']; ?></a>
|
|
<span style="color:#FF0000">(<?php echo $this->_var['lang']['remark_package']; ?>)</span>
|
|
|
|
<div id="suit_<?php echo $this->_var['goods']['goods_id']; ?>" class="package_goods">
|
|
<?php $_from = $this->_var['goods']['package_goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'package_goods_list');$this->_foreach['nopackage'] = array('total' => count($_from), 'iteration' => 0);
|
|
if ($this->_foreach['nopackage']['total'] > 0):
|
|
foreach ($_from AS $this->_var['package_goods_list']):
|
|
$this->_foreach['nopackage']['iteration']++;
|
|
?>
|
|
<?php if (! ($this->_foreach['nopackage']['iteration'] <= 1)): ?>
|
|
<a href="goods.php?id=<?php echo $this->_var['package_goods_list']['goods_id']; ?>" target="_blank" class="f6">
|
|
<img src="<?php echo $this->_var['package_goods_list']['goods_thumb']; ?>" width="40" height="40" />
|
|
</a>
|
|
<?php endif; ?>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
<a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['goods_name']; ?></a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cell p-attr">
|
|
<?php if ($this->_var['goods']['goods_attr']): ?><?php echo nl2br($this->_var['goods']['goods_attr']); ?><?php endif; ?>
|
|
<span class="btn-edit-sku">修改</span>
|
|
</div>
|
|
<div class="cell p-price">
|
|
<strong><?php echo $this->_var['goods']['goods_price']; ?></strong>
|
|
</div>
|
|
<div class="cell p-quantity">
|
|
<?php if ($this->_var['goods']['goods_id'] > 0 && $this->_var['goods']['is_gift'] == 0 && $this->_var['goods']['parent_id'] == 0 && $this->_var['goods']['extension_code'] != 'package_buy'): ?>
|
|
<div class="quantity-form">
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, -1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>)" class="decrement">-</a>
|
|
<input autocomplete="off" type="text" name="goods_number[<?php echo $this->_var['goods']['rec_id']; ?>]" id="goods_number_<?php echo $this->_var['goods']['rec_id']; ?>" value="<?php echo $this->_var['goods']['goods_number']; ?>" class="itxt" onchange="change_goods_number(<?php echo $this->_var['goods']['rec_id']; ?>,this.value, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>)" style="text-align:center"/>
|
|
<a href="javascript:void(0)" onclick="changenum(<?php echo $this->_var['goods']['rec_id']; ?>, 1, <?php echo $this->_var['goods']['warehouse_id']; ?>, <?php echo $this->_var['goods']['area_id']; ?>)" class="increment">+</a>
|
|
</div>
|
|
<div class="quantity-txt">
|
|
<?php if ($this->_var['goods']['attr_number']): ?>
|
|
有货
|
|
<?php else: ?>
|
|
<font style="color:#e4393c">无货</font>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php else: ?>
|
|
<font style="color:#666; font-size:12px;" id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>"><?php echo $this->_var['goods']['goods_number']; ?></font>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="cell p-sum">
|
|
<strong id="goods_subtotal_<?php echo $this->_var['goods']['rec_id']; ?>">
|
|
<font id="<?php echo $this->_var['goods']['group_id']; ?>_<?php echo $this->_var['goods']['rec_id']; ?>_subtotal"><?php echo $this->_var['goods']['subtotal']; ?></font>
|
|
<?php if ($this->_var['goods']['dis_amount'] > 0): ?>
|
|
<font style="color:#F60">(优惠:<?php echo $this->_var['goods']['discount_amount']; ?>)</font>
|
|
<?php endif; ?>
|
|
</strong>
|
|
</div>
|
|
<div class="cell p-ops">
|
|
<a id="remove_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-remove" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_remove" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="删除">删除</a>
|
|
<a id="store_<?php echo $this->_var['goods']['rec_id']; ?>" class="cart-store" href="javascript:void(0);" data-dialog="dialog" data-divid="cart_collect" data-removeurl="flow.php?step=drop_to_collect&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-collecturl="flow.php?step=drop_goods&id=<?php echo $this->_var['goods']['rec_id']; ?>" data-recid="<?php echo $this->_var['goods']['rec_id']; ?>" data-title="关注">移到我的收藏</a>
|
|
</div>
|
|
</div>
|
|
<div class="item-extra"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
<?php endif; ?>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
<script type="text/javascript">
|
|
// 添加赠品到购物车
|
|
function add_gift_cart(act_id)
|
|
{
|
|
var arr ="";
|
|
var gift = $("#product_promo_"+act_id);
|
|
gift.find(".cart-gift-checkbox input").each(function(){
|
|
if($(this).prop("checked")==true){
|
|
var val = $(this).val();
|
|
arr += val+',';
|
|
}
|
|
});
|
|
|
|
select_gift = arr.substring(0,arr.length-1);
|
|
Ajax.call('flow.php?step=add_favourable', 'act_id=' + act_id + '&select_gift=' + select_gift, add_gift_cart_response, 'POST', 'JSON');
|
|
}
|
|
function add_gift_cart_response(result)
|
|
{
|
|
if (result.error)
|
|
{
|
|
alert(result.message);
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
var cart_favourable_box = document.getElementById('product_promo_'+result.act_id);
|
|
if (cart_favourable_box)
|
|
{
|
|
$("#product_promo_" + result.act_id).parent().parent('.cart-tbody').addClass('all-select');
|
|
cart_favourable_box.innerHTML = result.content;
|
|
}
|
|
}
|
|
|
|
// 更新价格
|
|
var cart_check_num = get_checkItem_num();
|
|
var all_cart_value = get_cart_value();
|
|
sfAll(all_cart_value, cart_check_num);
|
|
}
|
|
|
|
//获取购物车已选商品数量
|
|
function get_checkItem_num(){
|
|
|
|
var num = 0;
|
|
|
|
$("input[name='checkItem']").each(function(index, element) {
|
|
if($(element).is(":checked")){
|
|
var selectNum = Number($(this).parents('.item-form').find(".itxt").val());
|
|
num += selectNum;
|
|
}
|
|
});
|
|
|
|
return num;
|
|
}
|
|
|
|
//获取购物车已选ID
|
|
function get_cart_value(){
|
|
var cart_value = '';
|
|
$("input[name='checkItem']").each(function(index, element) {
|
|
if($(element).is(':checked')){
|
|
cart_value += $(element).val() + ",";
|
|
}
|
|
});
|
|
|
|
cart_value = cart_value.substring(0,cart_value.length-1)
|
|
|
|
return cart_value;
|
|
}
|
|
//判断是否全选了
|
|
function sfAll(all_cart_value, cart_check_num){
|
|
var orderLength = $("#cart-list .item-item input[type='checkbox']:checked").length;
|
|
var orderCheckbox = $("#cart-list .item-item input[type='checkbox']");
|
|
var checkboxshop = $(".checkboxshopAll");
|
|
var cartValue = $("input[name='cart_value']");
|
|
|
|
if( orderLength == orderCheckbox.length){
|
|
checkboxshop.prop("checked",true);
|
|
checkboxshop.parent().addClass("cart-checkbox-checked");
|
|
}else{
|
|
checkboxshop.prop("checked",false);
|
|
checkboxshop.parent().removeClass("cart-checkbox-checked");
|
|
}
|
|
|
|
$('.cart_check_num').html(cart_check_num);
|
|
cartValue.val(all_cart_value);
|
|
|
|
//获取选择的购物车ID的商品信息
|
|
change_cart_goods_number(all_cart_value);
|
|
}
|
|
function change_cart_goods_number(rec_id, favourable_id, recid)
|
|
{
|
|
var ajax_where = '';
|
|
if(typeof(favourable_id) != 'undefined'){
|
|
ajax_where = '&favourable_id=' + favourable_id+'&recid=' + recid;
|
|
}
|
|
|
|
Ajax.call('flow.php?step=ajax_cart_goods_amount', 'rec_id=' + rec_id + ajax_where, change_cart_goods_response, 'POST','JSON');
|
|
}
|
|
function change_cart_goods_response(result)
|
|
{
|
|
$('#cart_goods_amount').html(result.goods_amount); //商品总金额
|
|
$('#save_total_amount').html(result.save_total_amount); //优惠节省总金额
|
|
$('.cart_check_num').html(result.subtotal_number); //商品总数
|
|
|
|
if(result.act_id > 0 && result.is_gift == 1){
|
|
$("#product_promo_"+result.act_id).html(result.favourable_box_content);
|
|
$("#checkItem_" + result.recid).prop("checked",false);
|
|
$(".item-full").removeClass("minus-item");
|
|
$("#checkItem_" + result.recid).parent().removeClass("cart-checkbox-checked");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$(function(){
|
|
//购物车换购效果
|
|
$(".trade-btn").live('click',function(){
|
|
var itemFull = $(this).parents(".item-full");
|
|
var winWidth = ($(window).width()-1200)/2;
|
|
var winHeight = itemFull.offset().top-30;
|
|
var left = $(this).offset().left-winWidth;
|
|
var top = $(this).offset().top-winHeight;
|
|
|
|
itemFull.find(".gift-box").show();
|
|
itemFull.find(".gift-box").css({"left":left,"top":top});
|
|
itemFull.css("z-index","100");
|
|
|
|
var favourable_id = $(this).data("actid");
|
|
Ajax.call('flow.php?step=show_gift_div', 'favourable_id=' + favourable_id, show_gift_div_response, 'POST', 'JSON');
|
|
});
|
|
|
|
$(".gift-box .close").live('click',function(){
|
|
var itemFull = $(this).parents(".item-full");
|
|
$(this).parents(".gift-box").hide();
|
|
itemFull.css("z-index","initial");
|
|
});
|
|
|
|
function show_gift_div_response(result)
|
|
{
|
|
var giftInfo = document.getElementById('gift_box_list'+result.act_id);
|
|
if (giftInfo)
|
|
{
|
|
giftInfo.innerHTML = result.content;
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="cart-floatbar">
|
|
<div class="cart-toolbar">
|
|
<div class="toolbar-wrap">
|
|
<div class="options-box">
|
|
<div class="select-all">
|
|
<div class="cart-checkbox">
|
|
<input type="checkbox" checked="checked" id="toggle-checkboxes_down" class="ui-checkbox checkboxshopAll" />
|
|
<label for="toggle-checkboxes_down">全选</label>
|
|
</div>
|
|
</div>
|
|
<div class="operation">
|
|
<a href="javascript:void(0);" class="cart-remove-batch" data-dialog="remove_collect_dialog" data-divid="cart-remove-batch" data-removeurl="ajax_dialog.php?act=delete_cart_goods" data-collecturl="ajax_dialog.php?act=drop_to_collect" data-title="删除">删除选中的商品</a>
|
|
<a href="javascript:void(0);" class="cart-follow-batch" data-dialog="remove_collect_dialog" data-divid="cart-collect-batch" data-removeurl="ajax_dialog.php?act=delete_cart_goods" data-collecturl="ajax_dialog.php?act=drop_to_collect" data-title="关注">移到我的收藏</a>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<div class="comm-right">
|
|
<div class="btn-area">
|
|
<form name="formCart" method="post" action="flow.php" onsubmit="return get_toCart();">
|
|
<input name="goPay" type="submit" class="submit-btn" value="去结算" <?php if (! $this->_var['user_id']): ?> id="go_pay" data-url="flow.php"<?php endif; ?>/>
|
|
<input name="step" value="checkout" type="hidden" />
|
|
<input name="cart_value" id="cart_value" value="" type="hidden" />
|
|
</form>
|
|
</div>
|
|
<div class="price-sum" id="total_desc">
|
|
<span class="txt">总价(不含运费):</span>
|
|
<span class="price sumPrice"><em id="cart_goods_amount"></em></span>
|
|
</div>
|
|
<div class="reduce-sum">
|
|
<span class="txt">已节省:</span>
|
|
<span class="price totalRePrice" id="save_total_amount"></span>
|
|
</div>
|
|
<div class="amount-sum">
|
|
已选择<em class="cart_check_num"></em>件商品
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$("*[data-dialog='remove_collect_dialog']").click(function(){
|
|
|
|
var remove_url = $(this).data('removeurl');
|
|
var collect_url = $(this).data('collecturl');
|
|
var divId = $(this).data('divid');
|
|
var title = $(this).data('title');
|
|
var url;
|
|
|
|
var cart_value = $('#cart_value').val();
|
|
|
|
var ok_title = "确定";
|
|
var cl_title = "取消";
|
|
|
|
if(divId == 'cart-remove-batch'){
|
|
var content = $('#delete_cart_goods').html();
|
|
url = remove_url;
|
|
}else if(divId == 'cart-collect-batch'){
|
|
var content = $('#cart_collect_batch').html();
|
|
url = collect_url;
|
|
}
|
|
|
|
pb({
|
|
id:divId,
|
|
title:title,
|
|
width:450,
|
|
height:50,
|
|
ok_title:ok_title, //按钮名称
|
|
cl_title:cl_title, //按钮名称
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:true,
|
|
onOk:function(){
|
|
Ajax.call(url, 'cart_value=' + cart_value, function(data){
|
|
location.href = "flow.php";
|
|
}, 'POST','JSON');
|
|
}
|
|
});
|
|
|
|
$('#' + divId + ' .ftx-04').css({'padding': '11px 0px 0px 10px'});
|
|
$('#' + divId + ' .tip-box').css({
|
|
'width': '330px',
|
|
'height': '50px',
|
|
'padding': '0px 0px 10px 0px'
|
|
});
|
|
$('#' + divId + ' .item-fore').css({
|
|
'margin': '0px 0px 0px 47px'
|
|
});
|
|
|
|
$('#' + divId + ' .pb-bd').css({
|
|
'padding-left': '65px'
|
|
});
|
|
|
|
$('#' + divId + ' .pb-ft .pb-ok').addClass('color_df3134');
|
|
});
|
|
});
|
|
</script>
|
|
<?php else: ?>
|
|
<div class="w1200">
|
|
<div class="cart-empty">
|
|
<div class="message">
|
|
<ul>
|
|
<li class="txt">购物车内暂时没有商品,登录后将显示您之前加入的商品</li>
|
|
<li>
|
|
<?php if (! $this->_var['user_id']): ?><a href="javascript:void(0);" id="go_pay" data-url="flow.php" class="btn-1 mr10">登录</a><?php endif; ?>
|
|
<a href="./index.php" class="ftx-05">去购物></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div id="c-tabs" class="w1200">
|
|
<div class="tab-nav">
|
|
<ul>
|
|
<li class="on">最近浏览</li>
|
|
<li>猜你喜欢</li>
|
|
<li>掌柜推荐</li>
|
|
</ul>
|
|
</div>
|
|
<div class="tab-con">
|
|
<div class="tab-con-time" id="tab-time1">
|
|
<div class="p-list">
|
|
<div class="p-list-cont<?php if ($this->_var['historyGoods_count'] < 5): ?> bRightNone<?php endif; ?>">
|
|
<ul class="ui-switchable-panel-main">
|
|
<?php $_from = $this->_var['history_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<li>
|
|
<div class="p-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="169" height="169" /></a></div>
|
|
<div class="p-price">
|
|
<?php if ($this->_var['goods']['promote_price']): ?>
|
|
<?php echo $this->_var['goods']['promote_price']; ?>
|
|
<?php else: ?>
|
|
<?php echo $this->_var['goods']['shop_price']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="p-name overflow"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['short_name']; ?></a></div>
|
|
<div class="p-seller"><a href="<?php echo $this->_var['goods']['shopUrl']; ?>" target="_blank" class="ftx-05"><?php echo $this->_var['goods']['shop_name']; ?></a></div>
|
|
<div class="p-num">销量:<?php echo $this->_var['goods']['sales_volume']; ?></div>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
<span class="pageState"></span>
|
|
<a href="javascript:void(0);" class="tab-prev"></a>
|
|
<a href="javascript:void(0);" class="tab-next"></a>
|
|
</div>
|
|
</div>
|
|
<div class="tab-con-time" id="tab-time2" style="display:none;">
|
|
<div class="p-list">
|
|
<div class="p-list-cont<?php if ($this->_var['guessGoods_count'] < 5): ?> bRightNone<?php endif; ?>">
|
|
<ul class="ui-switchable-panel-main">
|
|
<?php $_from = $this->_var['guess_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<li>
|
|
<div class="p-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="169" height="169" /></a></div>
|
|
<div class="p-price"><?php echo $this->_var['goods']['shop_price']; ?></div>
|
|
<div class="p-name"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['short_name']; ?></a></div>
|
|
<div class="p-seller"><a href="<?php echo $this->_var['goods']['shopUrl']; ?>" target="_blank" class="ftx-05"><?php echo $this->_var['goods']['shop_name']; ?></a></div>
|
|
<div class="p-num">销量:<?php echo $this->_var['goods']['sales_volume']; ?></div>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
<span class="pageState"></span>
|
|
<a href="javascript:void(0);" class="tab-prev"></a>
|
|
<a href="javascript:void(0);" class="tab-next"></a>
|
|
</div>
|
|
</div>
|
|
<div class="tab-con-time" id="tab-time3" style="display:none;">
|
|
<div class="p-list">
|
|
<div class="p-list-cont<?php if ($this->_var['bestGoods_count'] < 5): ?> bRightNone<?php endif; ?>">
|
|
<ul class="ui-switchable-panel-main">
|
|
<?php $_from = $this->_var['best_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<li>
|
|
<div class="p-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['thumb']; ?>" width="169" height="169" /></a></div>
|
|
<div class="p-price">
|
|
<?php if ($this->_var['goods']['promote_price']): ?>
|
|
<?php echo $this->_var['goods']['promote_price']; ?>
|
|
<?php else: ?>
|
|
<?php echo $this->_var['goods']['shop_price']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="p-name"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['short_name']; ?></a></div>
|
|
<div class="p-seller"><a href="<?php echo $this->_var['goods']['shopUrl']; ?>" target="_blank" class="ftx-05"><?php echo $this->_var['goods']['shop_name']; ?></a></div>
|
|
<div class="p-num">销量:<?php echo $this->_var['goods']['sales_volume']; ?></div>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
<span class="pageState"></span>
|
|
<a href="javascript:void(0);" class="tab-prev"></a>
|
|
<a href="javascript:void(0);" class="tab-next"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function changenum(rec_id, diff, warehouse_id, area_id, favourable_id)
|
|
{
|
|
var cValue = $('#cart_value')
|
|
var goods_number =Number($('#goods_number_' + rec_id).val()) + Number(diff);
|
|
if(goods_number < 1)
|
|
{
|
|
alert("购买数量不能少于1件");
|
|
}
|
|
else
|
|
{
|
|
change_goods_number(rec_id,goods_number, warehouse_id, area_id, cValue, favourable_id);
|
|
}
|
|
}
|
|
function change_goods_number(rec_id, goods_number, warehouse_id, area_id, cValue, favourable_id)
|
|
{
|
|
if(cValue != '' || cValue == 'undefined'){
|
|
var cValue = $('#cart_value').val();
|
|
}
|
|
|
|
Ajax.call('flow.php?step=ajax_update_cart', 'rec_id=' + rec_id +'&goods_number=' + goods_number +'&cValue=' + cValue +'&warehouse_id=' + warehouse_id +'&area_id=' + area_id +'&favourable_id=' + favourable_id, change_goods_number_response, 'POST','JSON');
|
|
}
|
|
function change_goods_number_response(result)
|
|
{
|
|
var rec_id = result.rec_id;
|
|
if (result.error == 0)
|
|
{
|
|
$('#goods_number_' +rec_id).val(result.goods_number);//更新数量
|
|
$('#goods_subtotal_' +rec_id).html(result.goods_subtotal);//更新小计
|
|
if (result.goods_number <= 0)
|
|
{// 数量为零则隐藏所在行
|
|
$('#tr_goods_' +rec_id).style.display = 'none';
|
|
$('#tr_goods_' +rec_id).innerHTML = '';
|
|
}
|
|
$('#total_desc').html(result.flow_info);//更新合计
|
|
if ($('ECS_CARTINFO'))
|
|
{//更新购物车数量
|
|
$('#ECS_CARTINFO').html(result.cart_info);
|
|
}
|
|
|
|
if(result.group.length > 0){
|
|
for(var i=0; i<result.group.length; i++){
|
|
$("#" + result.group[i].rec_group).html(result.group[i].rec_group_number);//配件商品数量
|
|
$("#" + result.group[i].rec_group_talId).html(result.group[i].rec_group_subtotal);//配件商品金额
|
|
}
|
|
}
|
|
|
|
$("#goods_price_" + rec_id).html(result.goods_price);
|
|
$('#save_total_amount').html(result.save_total_amount); //优惠节省总金额
|
|
$('.cart_check_num').html(result.subtotal_number); //商品总数
|
|
|
|
// 如果是优惠活动内的商品,更新优惠活动局部 qin
|
|
if (result.act_id)
|
|
{
|
|
// alert("product_promo_"+result.act_id);
|
|
$("#product_promo_"+result.act_id).html(result.favourable_box_content);
|
|
}
|
|
}
|
|
else if (result.message != '')
|
|
{
|
|
$('#goods_number_' +rec_id).val(result.cart_Num);//更新数量
|
|
|
|
var add_cart_divId = 'flow_add_cart';
|
|
var content = '<div id="flow_add_cart">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">' + result.message + '</h3>' +
|
|
'</div>' +
|
|
'</div>';
|
|
pb({
|
|
id:add_cart_divId,
|
|
title:'标题',
|
|
width:455,
|
|
height:88,
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:false
|
|
});
|
|
|
|
$('#' + add_cart_divId + ' .tip-box h3').css({
|
|
'line-height' : '20px',
|
|
'padding-top' : '5px',
|
|
'font-size' : '14px'
|
|
});
|
|
|
|
$('#' + add_cart_divId + ' .item-fore').css({
|
|
'height' : '88px'
|
|
});
|
|
}
|
|
}
|
|
|
|
//zhuo start
|
|
function get_toCart(){
|
|
|
|
var num = 0;
|
|
|
|
$("input[name='checkItem']").each(function(index, element) {
|
|
if($(element).is(":checked")){
|
|
num ++;
|
|
}
|
|
});
|
|
|
|
if(num == 0){
|
|
var add_cart_divId = 'flow_add_cart';
|
|
var content = '<div id="flow_add_cart">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">请选择最少一个商品购买</h3>' +
|
|
'</div>' +
|
|
'</div>' +
|
|
'</div>';
|
|
pb({
|
|
id:add_cart_divId,
|
|
title:'标题',
|
|
width:455,
|
|
height:58,
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:false
|
|
});
|
|
return false;
|
|
}
|
|
}
|
|
//zhuo end
|
|
</script>
|
|
<?php if ($_SESSION['user_id'] > 0): ?>
|
|
<script type="text/javascript" charset="utf-8">
|
|
function collect_to_flow(goodsId)
|
|
{
|
|
var goods = new Object();
|
|
var spec_arr = new Array();
|
|
var fittings_arr = new Array();
|
|
var number = 1;
|
|
var quick = 0;
|
|
|
|
goods.spec = spec_arr;
|
|
goods.goods_id = goodsId;
|
|
goods.number = number;
|
|
goods.parent = 0;
|
|
Ajax.call('flow.php?step=add_to_cart', 'goods=' + $.toJSON(goods), collect_to_flow_response, 'POST', 'JSON');
|
|
}
|
|
function collect_to_flow_response(result)
|
|
{
|
|
if (result.error > 0)
|
|
{
|
|
// 如果需要缺货登记,跳转
|
|
if (result.error == 2)
|
|
{
|
|
if (confirm(result.message))
|
|
{
|
|
location.href = 'user.php?act=add_booking&id=' + result.goods_id;
|
|
}
|
|
}
|
|
else if (result.error == 6)
|
|
{
|
|
openSpeDiv(result.message, result.goods_id);
|
|
}
|
|
else
|
|
{
|
|
alert(result.message);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
location.href = 'flow.php';
|
|
}
|
|
}
|
|
</script>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['step'] == "checkout"): ?>
|
|
|
|
<?php echo $this->smarty_insert_scripts(array('files'=>'region.js,utils.js')); ?>
|
|
<script type="text/javascript">
|
|
var flow_no_payment = "<?php echo $this->_var['lang']['flow_no_payment']; ?>";
|
|
var flow_no_shipping = "<?php echo $this->_var['lang']['flow_no_shipping']; ?>";
|
|
</script>
|
|
|
|
<link rel="stylesheet" href="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/take_their.css">
|
|
|
|
<div class="checkout" id="container">
|
|
<div class="ecscshop-filter-bar w1200">
|
|
<div class="ecscshop-title"><i class="ecscshop-icon orderInfo-icon"></i><h3>填写并核对订单信息</h3></div>
|
|
<div class="stepflex">
|
|
<dl class="doing done">
|
|
<dt class="s-num">1</dt>
|
|
<dd class="s-text">我的购物车<s></s></dd>
|
|
</dl>
|
|
<dl class="doing">
|
|
<dt class="s-num">2</dt>
|
|
<dd class="s-text">填写核对订单信息<s></s></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="s-num">3</dt>
|
|
<dd class="s-text">成功提交订单</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="checkout-warp w1200">
|
|
<div class="checkout-steps">
|
|
<div class="step-complete" id="consignee_list" name="consignee-list">
|
|
<div class="step-tit">
|
|
<h3>收货人信息</h3>
|
|
<?php if ($this->_var['user_address']): ?>
|
|
<div class="extra-r"><a href="#none" class="ftx-05 dialog_checkout" data-dialog="dialog_checkout" data-divid="new_address" data-id="0" data-url="flow.php?step=edit_Consignee" class="ftx-05 setdefault-consignee" data-width="670" data-height="338" data-title="新增收货人地址">新增收货人地址</a></div>
|
|
<?php else: ?>
|
|
<div class="extra-r"><a href="#none" class="dialog_checkout"> </a></div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="step-cont" id="consignee_new" <?php if (! $this->_var['user_address']): ?>style=" overflow:inherit;"<?php endif; ?>>
|
|
<?php if ($this->_var['user_address']): ?>
|
|
<div id="consignee-addr" class="consignee-addr">
|
|
<div class="consignee-cont">
|
|
<ul class="ui-switchable-panel-main">
|
|
<?php $_from = $this->_var['user_address']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'address');if (count($_from)):
|
|
foreach ($_from AS $this->_var['address']):
|
|
?>
|
|
<li <?php if ($this->_var['consignee']['address_id'] == $this->_var['address']['address_id']): ?>class="item-selected"<?php endif; ?> data-addressid="<?php echo $this->_var['address']['address_id']; ?>">
|
|
<input type="radio" <?php if ($this->_var['consignee']['address_id'] == $this->_var['address']['address_id']): ?>checked="checked"<?php endif; ?> class="ui-radio" name="consignee_radio" value="<?php echo $this->_var['address']['address_id']; ?>" id="radio_<?php echo $this->_var['address']['address_id']; ?>" class="hookbox" />
|
|
<label class="ui-radio-label">
|
|
<div class="name"><?php echo $this->_var['address']['consignee']; ?></div>
|
|
<div class="tel"><?php echo $this->_var['address']['mobile']; ?></div>
|
|
<div class="address"> <?php echo $this->_var['address']['region']; ?> <?php echo $this->_var['address']['address']; ?></div>
|
|
</label>
|
|
<div class="op-btns">
|
|
<?php if ($this->_var['user_id'] > 0): ?>
|
|
<a href="javascript:void(0);" class="ftx-05 del-consignee" data-dialog="dialog_checkout" data-divid="edit_address" data-id="<?php echo $this->_var['address']['address_id']; ?>" data-url="flow.php?step=edit_Consignee" class="ftx-05 edit-consignee" data-width="670" data-height="338" data-title="编辑收货人信息">编辑</a>
|
|
<a href="javascript:void(0);" class="ftx-05 del-consignee" data-dialog="dialog_checkout" data-divid="del_address" data-id="<?php echo $this->_var['address']['address_id']; ?>" data-url="flow.php?step=delete_Consignee" class="ftx-05 del-consignee" data-width="450" data-height="50" data-title="删除收货人信息">删除</a>
|
|
<?php else: ?>
|
|
<a href="javascript:void(0);" class="ftx-05 del-consignee" data-dialog="dialog_checkout" data-divid="direct_shopping" data-url="flow.php?step=consignee&direct_shopping=1" class="ftx-05 del-consignee" data-title="编辑收货人信息">编辑</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?php echo $this->fetch('library/consignee_new.lbi'); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<form action="flow.php" method="post" name="doneTheForm" class="validator" id="theForm" onsubmit="return checkOrderForm(this)">
|
|
<div class="checkout-steps">
|
|
<?php if ($this->_var['is_exchange_goods'] != 1 || $this->_var['total']['real_goods_count'] != 0): ?>
|
|
<div class="step-complete">
|
|
<div class="step-tit">
|
|
<h3><?php echo $this->_var['lang']['payment_method']; ?></h3>
|
|
</div>
|
|
<div class="step-cont">
|
|
<div class="payment-list radio-list">
|
|
<ul class="ul-payment-list">
|
|
<?php $_from = $this->_var['payment_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'payment');if (count($_from)):
|
|
foreach ($_from AS $this->_var['payment']):
|
|
?>
|
|
<li onclick="selectPayment(<?php echo $this->_var['payment']['pay_id']; ?>)" <?php if ($this->_var['order']['pay_id'] == $this->_var['payment']['pay_id']): ?>class="item-selected <?php if ($this->_var['cod_disabled'] && $this->_var['payment']['is_cod'] == 1): ?>hide<?php endif; ?>"<?php else: ?>class="<?php if ($this->_var['cod_disabled'] && $this->_var['payment']['is_cod'] == 1): ?>hide<?php endif; ?>"<?php endif; ?>>
|
|
<div class="payment-item">
|
|
<input type="radio" <?php if ($this->_var['order']['pay_id'] == $this->_var['payment']['pay_id']): ?>checked<?php endif; ?> isCod="<?php echo $this->_var['payment']['is_cod']; ?>" name="payment" class="ui-radio" value="<?php echo $this->_var['payment']['pay_id']; ?>" />
|
|
<?php echo $this->_var['payment']['pay_name']; ?>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<input name = "payment" type="radio" value = "-1" checked="checked" style="display:none"/>
|
|
<?php endif; ?>
|
|
|
|
<div class="step-complete" id="goods_inventory">
|
|
<?php echo $this->fetch('library/flow_cart_goods.lbi'); ?>
|
|
</div>
|
|
|
|
|
|
<?php if ($_SESSION['flow_type'] != 5): ?>
|
|
<div class="step-complete">
|
|
<div class="step-tit">
|
|
<h3>其他信息</h3>
|
|
</div>
|
|
<div class="step-cont">
|
|
<?php if ($this->_var['allow_use_surplus']): ?>
|
|
<div class="qt_item">
|
|
<div class="item_label"><?php echo $this->_var['lang']['use_surplus']; ?>:</div>
|
|
<div class="item_value">
|
|
<input type="text" class="qt_text" name="surplus" id="ECS_SURPLUS" size="10" value="<?php echo empty($this->_var['order']['surplus']) ? '0' : $this->_var['order']['surplus']; ?>" onblur="changeSurplus(this.value)" <?php if ($this->_var['disable_surplus']): ?>disabled="disabled"<?php endif; ?> />
|
|
<?php echo $this->_var['lang']['your_surplus']; ?> <?php echo empty($this->_var['your_surplus']) ? '0' : $this->_var['your_surplus']; ?> <span id="ECS_SURPLUS_NOTICE"></span>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['allow_use_integral']): ?>
|
|
<div class="qt_item">
|
|
<div class="item_label"><?php echo $this->_var['lang']['use_integral']; ?>:</div>
|
|
<div class="item_value">
|
|
<input type="text" class="qt_text" name="integral" id="ECS_INTEGRAL" onblur="changeIntegral(this.value)" value="<?php echo empty($this->_var['order']['integral']) ? '0' : $this->_var['order']['integral']; ?>" size="10"/>
|
|
<?php echo $this->_var['lang']['can_use_integral']; ?>:<?php echo empty($this->_var['your_integral']) ? '0' : $this->_var['your_integral']; ?> <?php echo $this->_var['points_name']; ?>,<?php echo $this->_var['lang']['noworder_can_integral']; ?><?php echo $this->_var['order_max_integral']; ?> <?php echo $this->_var['points_name']; ?>. <span id="ECS_INTEGRAL_NOTICE"></span>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['how_oos_list']): ?>
|
|
<div class="qt_item">
|
|
<div class="item_label"><?php echo $this->_var['lang']['booking_process']; ?>:</div>
|
|
<div class="item_value">
|
|
<?php $_from = $this->_var['how_oos_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('how_oos_id', 'how_oos_name');if (count($_from)):
|
|
foreach ($_from AS $this->_var['how_oos_id'] => $this->_var['how_oos_name']):
|
|
?>
|
|
<div class="label">
|
|
<label><input name="how_oos" type="radio" value="<?php echo $this->_var['how_oos_id']; ?>" <?php if ($this->_var['order']['how_oos'] == $this->_var['how_oos_id']): ?>checked<?php endif; ?> onclick="changeOOS(this)" /><?php echo $this->_var['how_oos_name']; ?></label>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['allow_use_bonus']): ?>
|
|
<div class="qt_item">
|
|
<div class="item_label"><?php echo $this->_var['lang']['use_bonus']; ?>:</div>
|
|
<div class="item_value">
|
|
<span><?php echo $this->_var['lang']['select_bonus']; ?></span>
|
|
<select name="bonus" onchange="changeBonus(this.value)" id="ECS_BONUS" style="border:1px solid #ccc;">
|
|
<option value="0" <?php if ($this->_var['order']['bonus_id'] == 0): ?>selected<?php endif; ?>><?php echo $this->_var['lang']['please_select']; ?></option>
|
|
<?php $_from = $this->_var['bonus_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'bonus');if (count($_from)):
|
|
foreach ($_from AS $this->_var['bonus']):
|
|
?>
|
|
<option value="<?php echo $this->_var['bonus']['bonus_id']; ?>" <?php if ($this->_var['order']['bonus_id'] == $this->_var['bonus']['bonus_id']): ?>selected<?php endif; ?>><?php echo $this->_var['bonus']['type_name']; ?>[<?php echo $this->_var['bonus']['bonus_money_formated']; ?>]</option>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</select>
|
|
|
|
<span><?php echo $this->_var['lang']['input_bonus_no']; ?></span>
|
|
<input name="bonus_sn" type="text" class="qt_text2 order_bonus_sn" size="15" value="<?php echo $this->_var['order']['bonus_sn']; ?>" />
|
|
<input name="validate_bonus" type="button" id="bnt_bonus_sn" value="<?php echo $this->_var['lang']['validate_bonus']; ?>" onclick="validateBonus($('.order_bonus_sn').val())" />
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['inv_content']): ?>
|
|
<div class="step-complete" id="inv_content">
|
|
<div class="step-tit">
|
|
<h3>发票信息</h3>
|
|
</div>
|
|
<div class="step-cont">
|
|
<h3 class="invoice-title">普通发票(纸质)</h3>
|
|
<h3 class="invoice-title inv_payee">个人</h3>
|
|
<h3 class="invoice-title inv_content"><?php echo $this->_var['inv_content']; ?></h3>
|
|
<h3 class="invoice-title"><a href="javascript:void(0);" class="ftx-05" data-dialog="editInvoice_dialog" data-divid="edit_invoice" data-id="0" data-url="ajax_dialog.php?act=edit_invoice" data-title="发票信息">修改</a></h3>
|
|
</div>
|
|
<input type="hidden" name="inv_payee" value="个人">
|
|
<input type="hidden" name="inv_content" value="<?php echo $this->_var['inv_content']; ?>">
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php echo $this->fetch('library/order_total.lbi'); ?>
|
|
<input type="hidden" name="user_id" value="<?php echo $this->_var['user_id']; ?>" />
|
|
<input type="hidden" name="done_cart_value" value="<?php echo $this->_var['cart_value']; ?>" />
|
|
<input type="hidden" name="step" value="done" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['step'] == "done"): ?>
|
|
<div id="container">
|
|
<div class="ecscshop-bg">
|
|
<div class="ecscshop-filter-bar w1200">
|
|
<div class="ecscshop-title"><i class="ecscshop-icon single-icon"></i><h3>下单成功</h3></div>
|
|
<div class="stepflex">
|
|
<dl class="doing done">
|
|
<dt class="s-num">1</dt>
|
|
<dd class="s-text">我的购物车<s></s></dd>
|
|
</dl>
|
|
<dl class="doing done">
|
|
<dt class="s-num">2</dt>
|
|
<dd class="s-text">填写核对订单信息<s></s></dd>
|
|
</dl>
|
|
<dl class="doing">
|
|
<dt class="s-num">3</dt>
|
|
<dd class="s-text">成功提交订单</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="checkout-warp w1200">
|
|
<div class="single-title">
|
|
<h3><i class="icon"></i>恭喜您,订单提交成功</h3>
|
|
</div>
|
|
<?php if ($this->_var['child_order'] > 1): ?>
|
|
<div class="single-content">
|
|
<span class="txt">亲爱的用户由于商家原因,此订单将分为 <em><?php echo $this->_var['child_order']; ?></em> 个不同的子订单配送:</span>
|
|
<div class="single-list">
|
|
<?php $_from = $this->_var['child_order_info']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'order');if (count($_from)):
|
|
foreach ($_from AS $this->_var['order']):
|
|
?>
|
|
<div class="list-item">
|
|
<div class="order-number"><span class="tit">订单编号:</span><strong><?php echo $this->_var['order']['order_sn']; ?></strong></div>
|
|
<div class="order-total"><span class="tit">应付总金额:</span><strong><?php echo $this->_var['order']['amount_formated']; ?></strong></div>
|
|
<div class="order-freight"><span class="tit">配送方式:</span><strong><?php echo $this->_var['order']['shipping_name']; ?></strong></div>
|
|
<div class="order-freight"><span class="tit">运费:</span><strong><?php echo $this->_var['order']['shipping_fee_formated']; ?></strong></div>
|
|
<a href="flow.php?step=pdf&order=<?php echo $this->_var['order']['order_id']; ?>" target="_blank" class="ftx-05">保存订单并打印</a>
|
|
</div>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</div>
|
|
<div class="ts"><?php echo $this->_var['lang']['select_payment']; ?>:<em><?php echo $this->_var['order']['pay_name']; ?></em>。<?php echo $this->_var['lang']['order_amount']; ?>:<em class="price"><?php echo $this->_var['total']['amount_formated']; ?>元</em></div>
|
|
<?php if ($this->_var['order']['pay_name'] == '银行汇款/转帐'): ?>
|
|
<div class="ts" style="color:#666"><?php echo $this->_var['order']['pay_desc']; ?></div>
|
|
<?php endif; ?>
|
|
<div class="single-btn">
|
|
<?php if ($this->_var['pay_online']): ?>
|
|
|
|
<?php echo $this->_var['pay_online']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="single-content">
|
|
<span class="txt">感谢您在本店购物!您的订单已提交,请记住您的订单号:</span>
|
|
<div class="single-list">
|
|
<div class="list-item">
|
|
<div class="order-number"><span class="tit">订单编号:</span><strong><?php echo $this->_var['order']['order_sn']; ?></strong></div>
|
|
<div class="order-total"><span class="tit">应付总金额:</span><strong><?php echo $this->_var['order']['order_amount']; ?>元</strong></div>
|
|
<div class="order-freight"><span class="tit">运费:</span><strong><?php echo $this->_var['order']['shipping_fee']; ?>元</strong></div>
|
|
<a href="flow.php?step=pdf&order=<?php echo $this->_var['order']['order_id']; ?>" target="_blank" class="ftx-05">保存订单并打印</a>
|
|
</div>
|
|
</div>
|
|
<div class="ts"><?php if ($this->_var['order']['shipping_name']): ?><?php echo $this->_var['lang']['select_shipping']; ?>: <em><?php echo $this->_var['order']['shipping_name']; ?></em>,<?php endif; ?><?php echo $this->_var['lang']['select_payment']; ?>:<em><?php echo $this->_var['order']['pay_name']; ?></em>。<?php echo $this->_var['lang']['order_amount']; ?>:<em class="price"><?php echo $this->_var['order']['order_amount']; ?>元</em></div>
|
|
<?php if ($this->_var['order']['pay_name'] == '银行汇款/转帐'): ?>
|
|
<div class="ts" style="color:#666"><?php echo $this->_var['order']['pay_desc']; ?></div>
|
|
<?php endif; ?>
|
|
<div class="single-btn">
|
|
<?php if ($this->_var['pay_online']): ?>
|
|
|
|
<?php echo $this->_var['pay_online']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if ($this->_var['goods_buy_list']): ?>
|
|
<div id="c-mlym" class="w1200">
|
|
<div class="tab-nav">
|
|
<div class="ec-title">买了又买</div>
|
|
</div>
|
|
<div class="tab-con">
|
|
<div class="tab-con-time" id="tab-time1">
|
|
<div class="p-list">
|
|
<div class="p-list-cont">
|
|
<ul class="ui-switchable-panel-main">
|
|
<?php $_from = $this->_var['goods_buy_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
|
|
foreach ($_from AS $this->_var['goods']):
|
|
?>
|
|
<li>
|
|
<div class="p-item">
|
|
<div class="p-img"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><img src="<?php echo $this->_var['goods']['goods_thumb']; ?>" width="155" height="155" /></a></div>
|
|
<div class="p-price">
|
|
<?php if ($this->_var['goods']['promote_price'] == ''): ?>
|
|
<?php echo $this->_var['goods']['shop_price']; ?>
|
|
<?php else: ?>
|
|
<?php echo $this->_var['goods']['promote_price']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="p-name"><a href="<?php echo $this->_var['goods']['url']; ?>" target="_blank"><?php echo $this->_var['goods']['goods_name']; ?></a></div>
|
|
<div class="p-seller"><a href="<?php echo $this->_var['goods']['store_url']; ?>" target="_blank" class="ftx-05"><?php echo $this->_var['goods']['shop_name']; ?></a></div>
|
|
<div class="p-num">销量:<?php echo $this->_var['goods']['sales_volume']; ?></div>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
</ul>
|
|
</div>
|
|
<span class="pageState"></span>
|
|
<a href="javascript:void(0);" class="tab-prev"></a>
|
|
<a href="javascript:void(0);" class="tab-next"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php echo $this->fetch('library/cart_html.lbi'); ?>
|
|
|
|
<?php echo $this->fetch('library/page_footer_flow.lbi'); ?>
|
|
|
|
<script type="text/javascript">
|
|
var process_request = "<?php echo $this->_var['lang']['process_request']; ?>";
|
|
<?php $_from = $this->_var['lang']['passport_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
|
|
foreach ($_from AS $this->_var['key'] => $this->_var['item']):
|
|
?>
|
|
var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
|
|
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
|
|
var username_exist = "<?php echo $this->_var['lang']['username_exist']; ?>";
|
|
var compare_no_goods = "<?php echo $this->_var['lang']['compare_no_goods']; ?>";
|
|
var btn_buy = "<?php echo $this->_var['lang']['btn_buy']; ?>";
|
|
var is_cancel = "<?php echo $this->_var['lang']['is_cancel']; ?>";
|
|
var select_spe = "<?php echo $this->_var['lang']['select_spe']; ?>";
|
|
</script>
|
|
|
|
<script type="text/javascript" src="themes/<?php echo $GLOBALS['_CFG']['template']; ?>/js/jquery.purebox.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
$('.shop_search2').hide();
|
|
$('.shop_search1').click(function(ev){
|
|
var e=ev || window.event;
|
|
e.stopPropagation();
|
|
$('.shop_search2').show();
|
|
});
|
|
|
|
$('.shop_search2').find('li').each(function(index, element){
|
|
$(element).click(function(){
|
|
var html_1 = $(this).html();
|
|
var attr_1 = $(this).attr('rev');
|
|
$('.shop_search1').find('li').html(html_1);
|
|
$('.shop_search2').hide();
|
|
|
|
if(index == 0){
|
|
$(this).html($(this).next().html());
|
|
$(this).next().html(html_1);
|
|
|
|
var nextAttr = $(this).next().attr("rev");
|
|
$(this).attr({rev : "" +nextAttr+ ""});
|
|
$(this).next().attr({rev : "" +attr_1+ ""});
|
|
}else if(index == 1){
|
|
$(this).html($(this).prev().html());
|
|
$(this).prev().html(html_1);
|
|
|
|
var prevAttr = $(this).prev().attr("rev");
|
|
$(this).attr({rev : "" +prevAttr+ ""});
|
|
$(this).prev().attr({rev : "" +attr_1+ ""});
|
|
}
|
|
|
|
$("input[name='store_search_cmt']").val(attr_1);
|
|
});
|
|
});
|
|
|
|
$(document).click(function(){
|
|
$('.shop_search2').hide();
|
|
});
|
|
});
|
|
|
|
//最近浏览、猜你喜欢、掌柜推荐tab切换
|
|
$("#c-tabs").slide({titCell:".tab-nav li",mainCell:".tab-con",pageStateCell:""});
|
|
$("#tab-time1").slide({mainCell:".p-list-cont ul",effect:"left",pnLoop:false,autoPlay:false,autoPage:true,scroll:1,vis:6,prevCell:".tab-prev",nextCell:".tab-next",pageStateCell:".pageState"});
|
|
$("#tab-time2").slide({mainCell:".p-list-cont ul",effect:"left",pnLoop:false,autoPlay:false,autoPage:true,scroll:1,vis:6,prevCell:".tab-prev",nextCell:".tab-next",pageStateCell:".pageState"});
|
|
$("#tab-time3").slide({mainCell:".p-list-cont ul",effect:"left",pnLoop:false,autoPlay:false,autoPage:true,scroll:1,vis:6,prevCell:".tab-prev",nextCell:".tab-next",pageStateCell:".pageState"});
|
|
|
|
//购物车弹出框效果
|
|
$("*[data-dialog='dialog']").live('click',function(){
|
|
var ok_title,cl_title;
|
|
var remove_url = $(this).data('removeurl'); //删除连接地址
|
|
var collect_url = $(this).data('collecturl'); //关注地址
|
|
var title = $(this).data('title');
|
|
var width = 455;
|
|
var height = 58;
|
|
var divId = $(this).data('divid');
|
|
|
|
if(divId == 'cart_remove'){
|
|
ok_title = "删除";
|
|
cl_title = "移到我的收藏";
|
|
var content = $("#dialog_remove").html();
|
|
}else if(divId == 'cart_collect'){
|
|
ok_title = "确定";
|
|
cl_title = "取消";
|
|
var content = $("#dialog_collect").html();
|
|
}
|
|
|
|
pb({
|
|
id:divId,
|
|
title:title,
|
|
width:width,
|
|
height:height,
|
|
ok_title:ok_title, //按钮名称
|
|
cl_title:cl_title, //按钮名称
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:true,
|
|
onOk:function(){
|
|
if(divId == 'cart_remove'){
|
|
location.href = remove_url;
|
|
}else if(divId == 'cart_collect'){
|
|
location.href = collect_url;
|
|
}
|
|
},
|
|
onCancel:function(){
|
|
if(divId == 'cart_remove'){
|
|
location.href = collect_url;
|
|
}
|
|
}
|
|
});
|
|
|
|
if(divId == 'cart_remove'){
|
|
$('.pb-cl').addClass('color_df3134');
|
|
}else if(divId == 'cart_collect'){
|
|
$('.pb-ok').addClass('color_df3134');
|
|
}
|
|
});
|
|
|
|
//购物车和结算页面 结算按钮悬浮显示start
|
|
function cartScroll(){
|
|
var winHeight = $(window).height();
|
|
var toolbar = $(".cart-toolbar");
|
|
var toolbarTop = toolbar.offset().top;
|
|
$(window).resize(function(){
|
|
winHeight = $(window).height();
|
|
});
|
|
|
|
if(toolbarTop>winHeight){
|
|
toolbar.addClass("fixed-bottom");
|
|
}
|
|
$(window).scroll(function(){
|
|
var scrollTop = $(document).scrollTop();
|
|
if(scrollTop+winHeight>toolbarTop){
|
|
toolbar.removeClass("fixed-bottom");
|
|
}else{
|
|
toolbar.addClass("fixed-bottom");
|
|
}
|
|
});
|
|
}
|
|
function checkScroll(){
|
|
var winHeight = $(window).height();
|
|
var checkout = $(".checkout-buttons");
|
|
var checkoutTop = checkout.offset().top;
|
|
$(window).resize(function(){
|
|
winHeight = $(window).height();
|
|
});
|
|
|
|
if(checkoutTop>winHeight){
|
|
checkout.addClass("ui-ceilinglamp-current");
|
|
}
|
|
$(window).scroll(function(){
|
|
var scrollTop = $(document).scrollTop();
|
|
if(scrollTop+winHeight>checkoutTop){
|
|
checkout.removeClass("ui-ceilinglamp-current");
|
|
}else{
|
|
checkout.addClass("ui-ceilinglamp-current");
|
|
}
|
|
});
|
|
}
|
|
//购物车和结算页面 结算按钮悬浮显示end
|
|
<?php if ($this->_var['step'] == "cart"): ?>
|
|
cartScroll();
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->_var['step'] == "checkout"): ?>
|
|
checkScroll();
|
|
$(".no_goods").live("click", function(){
|
|
var rec_number = $("input[name='rec_number_str']").val();
|
|
var url = $(this).data('url');
|
|
|
|
if(rec_number != ''){
|
|
url = url + "&rec_number=" + rec_number;
|
|
}
|
|
|
|
Ajax.call(url,'',noGoods, 'POST', 'JSON');
|
|
function noGoods(result){
|
|
pb({
|
|
id:'noGoods',
|
|
title:'很抱歉,无货啦',
|
|
width:670,
|
|
ok_title:'继续', //按钮名称
|
|
cl_title:'返回购物车', //按钮名称
|
|
content:result.content, //调取内容
|
|
drag:false,
|
|
foot:true,
|
|
onOk:function(){
|
|
$("form[name='stockFormCart']").submit();
|
|
},
|
|
onCancel:function(){
|
|
location.href = "flow.php";
|
|
}
|
|
});
|
|
$('.pb-ok').addClass('color_df3134');
|
|
}
|
|
});
|
|
<?php endif; ?>
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|