Commit 84d150eb by 朱继来

添加购物车判断

parent 2b9b8b05
......@@ -267,13 +267,17 @@
var str = '';
for (var i = 0; i < len; i++) {
if (goods_type == 1) {
str = '<td>$<span>'+data.ladder_price[i]['price_us']+'</span></td>';
}
if (i == 0) {
html += '<tr><td><span class="goods-min-num">'+data.ladder_price[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+data.ladder_price[i]['price_cn']+'</span></td>'+str+'</tr>';
if (goods_type == 1) {
str = '<td>$<span class="goods-min-price-us">'+data.ladder_price[i]['price_us']+'</span></td>';
}
html += '<tr><td><span class="goods-min-num">'+data.ladder_price[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+data.ladder_price[i]['price_cn']+'</span></td>'+str+'</tr>';
} else {
if (goods_type == 1) {
str = '<td>$<span>'+data.ladder_price[i]['price_us']+'</span></td>';
}
html += '<tr><td><span>'+data.ladder_price[i]['purchases']+'</span></td><td>¥<span>'+data.ladder_price[i]['price_cn']+'</span></td>'+str+'</tr>';
}
}
......@@ -308,6 +312,21 @@
layer.msg('请选择交货地');
return false;
}
var goods_min_price = $(this).parents('.sku-info').find('.goods-min-price').text();
var goods_min_price_us = $(this).parents('.sku-info').find('.goods-min-price-us').text();
if (delivery_place == 1) {
if (goods_min_price == 0) {
layer.msg('添加商品失败');
return false;
}
} else if (delivery_place == 2) {
if (goods_min_price_us == 0) {
layer.msg('添加商品失败');
return false;
}
}
}
}
......
......@@ -229,9 +229,9 @@
<label class="radio-inline">
<input type="radio" name="delivery_place" value="1"> 大陆
</label>
<label class="radio-inline">
<!-- <label class="radio-inline">
<input type="radio" name="delivery_place" value="2"> 香港
</label>
</label> -->
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment