cart.hbs 15.5 KB
<div class="order-ensure-page shop-cart yoho-page clearfix">
    <div class="order-edit order-cart" id="cart-page">
        <div class="order-title cart-page-title order-ensure-title">
            <ul>
                <li class="first active">查看购物车</li>
                <li>填写订单</li>
                <li class="end">付款,完成购买</li>
            </ul>
        </div>
        {{#unless cart.isLogin}}
            <div class="cartnew-tips">
                <div class="tipsbox" id="tipsbox">
                    <a href="javascript:void(0);" class="btn_close" title="关闭"></a>
                    <strong>温馨提示:</strong>亲爱的顾客,您还没有 <a href="{{cart.loginUrl}}" class="a_eu">登录</a> 哦,所有商品价格、活动信息以登录后显示为准.
                </div>
            </div>
        {{^}}
            <div class="cartnew-tips">
                <div class="tipsbox" id="tipsbox">
                    <a href="javascript:void(0);" class="btn_close" title="关闭"></a>
                    <strong>温馨提示:</strong>1. 选购单中的商品不保留库存,请及时结算。 2. 商品的价格、相关活动信息及库存以订单提交时为准。
                </div>
            </div>
        {{/unless}}
        <div class="order-pay">
            {{#if cart.isEmpty}}
                <div class="pay-wapper">
                  <div class="shop-cart-empty">
                    <i class="iconfont"></i>
                    <p>购物车空空的哦,去看看心仪的商品吧~</p>
                    <a href="#">去购物</a>
                  </div>
                </div>
                <div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
                    <table>
                        {{# cart.deleteShop}}
                            <tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
                                <td style="width:40%; text-align: left;">成功删除<a class="title" href="{{link}}" target="_blank">{{productTitle}}</a></td>
                                <td style="width:10%;"><span class="productPrice">{{productPrice}}</span></td>
                                <td style="width:10%;"></td>
                                <td style="width:10%;">{{productNum}}</td>
                                <td style="width:10%;"></td>
                                <td style="width:20%; border-right: none; text-align: right;">
                                    <a href="javascript:void(0);"><span class="goBack">撤销本次删除</span></a>
                                </td>
                            </tr>
                        {{/ cart.deleteShop}}
                    </table>
                </div>
            {{^}}
                <!-- 购物车商品列表      -->
                {{#cart}}
                    <div class="pay-wapper">
                        <div class="cart-title">
                            <p class="left" style="width:6%;">
                              <i class="cart-item-check iconfont cart-item-checked"></i> 全选
                            </p>
                            <p style="width:40%">商品信息</p>
                            <p style="width:14%">单价</p>
                            <p style="width:13%;">数量</p>
                            <p style="width:16%;">小计(元)</p>
                            <p class="right" style="width:11%;">操作</p>
                        </div>

                        {{#advanceCart}}
                            <!-- 预售商品   -->
                            <div class="pre-sell">
                                <code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
                            </div>

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

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

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

                        {{#ordinaryCart}}
                            {{#pools}}
                                {{#if promotionInfos}}
                                    <div class="gift-sell mt40">
                                        {{#promotionInfos}}
                                            <div data-role="promotion-wrap" >
                                                <code class="{{#unless isReach}}order-pay-mark-white{{/unless}}">{{tag}}</code>{{promotionTitle}}
                                                <!--<a>去换购</a>-->
                                                {{#if isGift}}
                                                    {{#if isNotReach}}<a href="javascript:void(0);" data-role="gift-view-btn">查看赠品</a>{{/if}}
                                                    {{#if isSelected}}
                                                        <a href="javascript:void(0);" data-role="gift-resel-btn">重选赠品</a>
                                                    {{else}}
                                                        {{#if isReach}}<a href="javascript:void(0);" data-role="gift-sel-btn">领赠品</a>{{/if}}
                                                    {{/if}}
                                                {{/if}}
                                                {{#if isNotReach}}
                                                    <a class="btn-clear blue" target="_blank" href="{{promotionPageUrl}}" data-together-id="1" >去凑单&nbsp;></a>
                                                {{/if}}
                                                {{> cart-sel-gift-tpl }}
                                                {{!--<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>--}}
                                            </div>
                                        {{/promotionInfos}}
                                    </div>
                                {{/if}}

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

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

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

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

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

                            {{#if promotionInfos}}
                                <div class="gift-sell mt20">
                                    {{#promotionInfos}}
                                        <p><code>{{tag}}</code>{{promotionTitle}}<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a></p>
                                    {{/promotionInfos}}
                                </div>
                            {{/if}}
                        {{/ordinaryCart}}

                        {{#stat}}
                            <!-- 总价计算 -->
                            <div class="cartnew-sum">
                                {{#unless cart.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" {{#if cart.isCheckedAll}}checked="checked"{{/if}}></i>
                                        <span>全选</span>
                                        <a class="delAll" href="javascript:void(0);">删除选中商品</a>
                                        <a class="removeAll" href="javascript:void(0);">移入收藏夹</a>
                                        <a class="emptyDisabled" 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;{{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);" class="btn-account">去结算</a>
                            </div>
                        {{/stat}}
                    </div>
                {{/cart}}

                {{!--{{#cart.salesPromotion}}
                <div class="salesPromotion">
                    <p>
                        {{#if salesTitle}}
                            <b>{{salesTitle}}</b>
                        {{/if}}
                        {{salesMessage}}</p>
                    <span><i></i>已参与</span>
                </div>
                {{/cart.salesPromotion}} --}}
            {{/if}}
        </div>
    </div>

    {{#unless @root.pc.product.removeRecentView}}
      <div class="lazy-load-object">
        <textarea class="datalazyload" style="visibility: hidden;">
            <script>
                fetchRecommend();
            </script>
        </textarea>
      </div>

        {{#if cart.isEmpty}}

          <div class="bottom-tab bottom-tab-slide">
              <span class="bottom-title cur  {{#unless cart.deleteShop}}none{{/unless}}">凑单商品</span>
              <span class="bottom-title {{#unless cart.deleteShop}}cur{{/unless}}">为您优选</span>
              <span class="bottom-title">最近浏览</span>
              <span class="change">换一批
                <span class="iconfont change-icon">&#xe639;</span>
              </span>
          </div>

          <div class="individual-slide">
            <div class="individual-item individual-item-togetherGoods {{#unless cart.deleteShop}}none{{/unless}}">
              <input id="" type="hidden" value="">
              <div id="" class="goods clearfix">
                {{>individual-slide}}
              </div>
            </div>
            <div class="individual-item individual-item-recommendGoods {{#if cart.deleteShop}}none{{/if}}">
              <input id="" type="hidden" value="{{latestWalk}}">
              <div id="" class="goods clearfix">
                {{>individual-slide}}
              </div>
            </div>
            <div class="individual-item individual-item-latestWalk none">
              <input id="latest-walk-count" type="hidden" value="">
              <div id="latest-walk-goods" class="goods clearfix">
                {{>individual-slide}}
              </div>
            </div>
          </div>
          {{/if}}
    {{/unless}}

    <div class="loading"><span></span>请稍后...</div>
</div>


<script type="text/javascript">



    /*<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>*/
</script>

<!-- 商品详细信息窗口 -->

<script type="text/javascript">
(function (d) {
window.bd_cpro_rtid="P1fsPWc";
var s = d.createElement("script");s.type = "text/javascript";s.async = true;s.src = location.protocol + "//cpro.baidu.com/cpro/ui/rt.js";
var s0 = d.getElementsByTagName("script")[0];s0.parentNode.insertBefore(s, s0);
})(document);
</script>
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{event:"setAccount", account: 16184},
{event:"setCustomerId", id: "{{uid}}"},
{event:"setSiteType", type: "d"},
{event:"viewBasket", item: {{{cart.criteo}}} }
);
</script>
<!-- 聚效 -->
<script type="text/javascript">
var _mvq = window._mvq || [];
window._mvq = _mvq;
_mvq.push(['$setAccount', 'm-23428-1']);
_mvq.push(['$setGeneral', 'cartview', '', /*用户名*/ '', '{{uid}}']);
_mvq.push(['$logConversion']);
_mvq.push(['$addItem', '', /*商品id*/ '{{cart.ids}}', '', '']);
_mvq.push(['$logData']);
</script>