cart-list.hbs 10.5 KB
{{#if isEmpty}}
    <div class="pay-wapper">
        <div class="shop-cart-empty">
            <i class="iconfont"></i>
            <p>购物车空空的哦,去看看心仪的商品吧~</p>
            <a href="{{listUrl}}">去购物</a>
        </div>
    </div>
{{^}}
    <!-- 购物车商品列表 -->
    <div class="pay-wapper" data-role="order-cart">
        <div class="cart-title">
            <p class="left" style="width:6%;">
                <i class="cart-item-check-title cart-item-check iconfont"></i>&nbsp;&nbsp;全选
            </p>
            <p style="width:35%">商品信息</p>
            <p style="width:14%">单价</p>
            <p style="width:15%;">数量</p>
            <p style="width:16%;">小计</p>
            <p class="right" style="width:11.8%;">操作</p>
        </div>

        {{#advanceCart}}
            <div class="mb20" data-role="advance">
                <!-- 预售商品   -->
                <div class="pre-sell pre-sell-title">
                    <i class="cart-item-check iconfont {{#isChecked}}cart-item-checked{{/isChecked}}" data-role="cart-item-check"></i>
                    <code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
                </div>

                {{#pools}}
                    {{#if goodsList}}
                        <div class="cart-table">
                            <ul class="table">
                                {{#goodsList}}
                                    {{> mix/cart/cart-item}}
                                {{/goodsList}}
                            </ul>
                        </div>
                    {{/if}}
                {{/pools}}

                {{#if offShelves}}
                    <div class="cart-table">
                        <ul class="table table-group">
                            {{#each offShelves}}
                                {{> mix/cart/cart-item}}
                            {{/each}}
                        </ul>
                    </div>
                {{/if}}

                {{#if soldOuts}}
                    <div class="cart-table">
                        <ul class="table table-group">
                            {{#each soldOuts}}
                                {{> mix/cart/cart-item}}
                            {{/each}}
                        </ul>
                    </div>
                {{/if}}

                {{!--{{#if promotionInfos}}
                    <!--<div class="gift-sell">-->
                        <!--{{#promotionInfos}}-->
                            <!--<p class="gift-sell-info"><code class="order-pay-mark">{{tag}}</code>{{promotionTitle}}-->
                                <!--&lt;!&ndash;<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>&ndash;&gt;-->
                            <!--</p>-->
                        <!--{{/promotionInfos}}-->
                    <!--</div>-->
                {{/if}}--}}
            </div>
        {{/advanceCart}}

        {{#ordinaryCart}}
            <div data-role="ordinary">
            <!-- 普通商品   -->
                <div class="pre-sell ord-sell-title">
                    <i class="cart-item-check iconfont {{#isChecked}}cart-item-checked{{/isChecked}}" data-role="cart-item-check"></i>
                    <code>普通商品</code> {{tips}}
                </div>

            {{#pools}}
                <div class="promotion-pool {{#unless @first}}mt20{{/unless}}" data-role="promotion-pool">
                    {{#if promotionInfos}}
                        <div class="gift-sell mt20">
                            {{#promotionInfos}}
                                {{>mix/cart/cart-promotion-info}}
                            {{/promotionInfos}}
                        </div>
                    {{/if}}

                    {{#if subs}}
                        <div class="cart-table">
                            {{#each subs}}
                                <ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
                                    {{#each goodsList}}
                                        {{> mix/cart/cart-item}}
                                    {{/each}}
                                </ul>
                            {{/each}}
                        </div>
                    {{/if}}
                    {{#if goodsList}}
                        <div class="cart-table">
                            <ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
                                {{#goodsList}}
                                    {{> mix/cart/cart-item}}
                                {{/goodsList}}
                            </ul>
                        </div>
                    {{/if}}
                </div>
            {{/pools}}

            <!-- 全场已选择的 加价购+赠品 -->
            {{#if goodsList}}
                <div class="cart-table mt20">
                    <ul class="table">
                        {{#each goodsList}}
                            {{> mix/cart/cart-item}}
                        {{/each}}
                    </ul>
                </div>
            {{/if}}

            <!--可选的加价购商品 -->
            <!--priceGifts-->
            <!--可选择的赠品-->
            <!--gifts-->

            {{#if hasGlobalBlock}}
                <div class="gift-sell mt20">
                    {{#giftsPromotionInfos}}
                        {{>mix/cart/cart-promotion-info}}
                    {{/giftsPromotionInfos}}
                    {{#priceGiftsPromotionInfos}}
                        {{>mix/cart/cart-promotion-info}}
                    {{/priceGiftsPromotionInfos}}

                    {{#promotionInfos}}
                        {{#and (eq promotionId 0) tag}}
                            <p class="gift-sell-info">{{#if tag}}<code class="order-pay-mark">{{tag}}</code>{{/if}}
                                {{promotionTitle}}
                                <!--<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>-->
                            </p>
                        {{/and}}
                    {{/promotionInfos}}
                </div>
            {{/if}}

            {{#if offShelves}}
                <div class="mt20">
                    <div class="cart-table">
                        <ul class="table">
                            {{#offShelves}}
                                {{> mix/cart/cart-item}}
                            {{/offShelves}}
                        </ul>
                    </div>
                </div>
            {{/if}}

            <!-- -->
            {{#if soldOuts}}
                <div class="mt20">
                    <div class="cart-table">
                        <ul class="table">
                            {{#soldOuts}}
                                {{> mix/cart/cart-item}}
                            {{/soldOuts}}
                        </ul>
                    </div>
                </div>
            {{/if}}
            </div>
        {{/ordinaryCart}}

        {{#stat}}
            <!-- 总价计算 -->
            <div class="cartnew-sum">
                {{#unless ../isEmpty}}
                    <div class="left">
                        <a href="javascript:void(0);" class="btn_h"
                           style="display:none;"><span>清空商品</span></a>
                        <i class="cart-item-check iconfont" id="cbSelAllGoods"></i>
                        <span class="check-all-sum">全选</span>
                        <a class="delAll delete-all-sel" href="javascript:void(0);">删除选中商品</a>
                        <a class="removeAll remove-all-2fav" href="javascript:void(0);">移入收藏夹</a>
                        <a class="emptyDisabled clean-all-disable"
                           href="javascript:void(0);">清空失效商品</a>
                    </div>
                {{/unless}}
                <div class="right">
                    <p>
                        {{#if gainYohoCoin}}
                            <a href="/help/?category_id=87" class="yoho-coin" target="_blank"></a>
                            共返有货币:{{gainYohoCoin}}&#12288;&#12288;{{/if}}
                        已选商品<strong class="ins">{{selectedGoodsCount}}</strong>&#12288;&#12288;
                        商品金额:<b>¥&nbsp;{{orderAmount}}</b>
                    </p>
                    {{#if discountAmount}}<p>活动优惠:<b>-&nbsp;¥&nbsp;{{discountAmount}}</b></p>{{/if}}
                    <!--<p>优惠码/优惠券:<b>¥&nbsp;8888.00</b></p>-->
                    <p class="sum">
                        应付金额(不含邮费):<strong><kbd>¥&nbsp;</kbd>{{lastOrderAmount}}</strong></p>
                </div>
            </div>
            <div class="cartnew-submit" id="pay-sum">
                <!--<span>添加礼品袋</span>-->
                <a href="javascript:void(0);"
                   id="Y_SubmitBtn"
                   class="btn-account"
                   {{#if mix}}data-mix="true"{{/if}}
                    {{#if ensureUrl}}data-ensureurl="{{ensureUrl}}"{{/if}}
                    {{#if noSelectGiftTip}}data-noSelectGiftTip="true"{{/if}}>去结算</a>
            </div>
        {{/stat}}

        {{> mix/cart/cart-pre-sell-tpl }}
    </div>
{{/if}}

{{#if deleteShop}}
    <div class="cart-del-goods">
        <div class="cart-del-goods-title">已删除商品,您可以重新购买或移入收藏:</div>
        <ul id="Y_delReselWrap">
            {{#each deleteShop}}
                <li data-sku="{{productSku}}"
                    data-promotionid="{{promotionId}}"
                    data-num="{{productNum}}">
                                        <span class="good-name" style="width: 392px;">
                                            <a href="{{link}}" target="_blank" title="{{productTitle}}">{{productTitle}}</a>
                                        </span>
                    <span class="good-price" style="width: 148px;">{{productPrice}}</span>
                    <span class="good-num" style="width: 128px;">{{productNum}}</span>
                                        <span class="good-operate" style="width: 260px;">
                                            <a href="javascript:void(0);" data-role="readd2cart">重新购买</a>
                                            <a href="javascript:void(0);" data-role="reFav">移入收藏</a>
                                        </span>
                </li>
            {{/each}}
        </ul>
    </div>
{{/if}}