cart-list-body.hbs 8.47 KB
{{# if preSalePros}}
    <div class="cart-pro-list pre-pros">
        <div class="title">
            <span class="main">预售商品</span>
            <span class="note">不同上市期的商品我们将为您先到先发</span>
        </div>
        <div class="pro-list">
            {{#each preSalePros}}
                <div class="pros-group">
                    {{# each this}}
                        <ul>
                            <li class="chk" data-product_info='{"goods_type": "advance", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
                                <label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
                                    <span class="iconfont checkbox not-checked">&#xe601;</span>
                                    <span class="iconfont checkbox checked">&#xe602;</span>
                                </label>
                                <input type="hidden" name="product_ids[]"/>
                            </li>
                            <li>
                                <a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">
                                    <img src="{{image goods_images 100 134}}" alt="{{product_name}}">
                                </a>
                            </li>
                            <li class="pro-info">
                               {{!--  <div class="brand-name">{{brand_name}}</div> --}}
                                <div class="pro-name"><a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">{{product_name}}</a></div>
                                <div class="size">
                                    {{#if size_name}}
                                        <span>尺寸: {{size_name}}</span>
                                    {{/if}}
                                </div>
                                {{#expect_arrival_time}}
                                    <div class="published-at">上市期: {{expect_arrival_time}}</div>
                                {{/expect_arrival_time}}
                            </li>
                            <li class="price-num">
                                <span class="price sale-price">¥ {{round sales_price 2}}</span>
                                {{> cart/stepper }}
                            </li>
                            <li class="total-price-action">
                                <span class="price item-total-price">¥ {{round (multiple sales_price buy_number) 2}}</span>
                                <div class="actions">
                                    <div class="remove-item action" data-product_id={{product_id}}><span class="iconfont">&#xe614;</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                    <div class="send-to-favorite action" data-product_id={{product_id}}>移入收藏夹</div>
                                </div>
                            </li>
                        </ul>
                    {{/each}}
                </div>
            {{/each}}
        </div>
    </div>
{{/ if}}

{{# if commonPros }}
    <div class="cart-pro-list cart-pros">
        <div class="title">
            <span class="main">普通商品</span>
        </div>
        <div class="pro-list">
            {{#each commonPros}}
                <div class="pros-group">
                    {{# each this}}
                        <ul>
                            <li class="chk" data-product_info='{"goods_type": "ordinary", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
                                <label class="toggle-chk-item {{#isEqual selected 'Y'}}chk-group{{/isEqual}}">
                                    <span class="iconfont checkbox not-checked">&#xe601;</span>
                                    <span class="iconfont checkbox checked">&#xe602;</span>
                                </label>
                                <input type="hidden" name="product_ids[]"/>
                            </li>
                            <li>
                                <a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">
                                    <img src="{{image goods_images 100 134}}" alt="{{product_name}}">
                                </a>
                            </li>
                            <li class="pro-info">
                                {{!-- <div class="brand-name">{{brandName}}</div> --}}
                                <div class="pro-name"><a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">{{product_name}}</a></div>
                                <div class="color-size editable" data-productId={{product_id}} id="edit_{{product_id}}" data-productSkn={{product_skn}}>
                                    {{#if color_name}}
                                        <span class="mr20">颜色: <span class="default-color">{{color_name}}</span></span>
                                    {{/if}}
                                    {{#if size_name}}
                                        <span>尺寸:  <span class="default-size">{{size_name}}</span></span>
                                    {{/if}}
                                    <span class="iconfont">&#xe63c;</span>
                                </div>
                            </li>
                            <li class="price-num">
                                <span class="price sale-price">¥ {{round sales_price 2}}</span>
                                {{> cart/stepper }}
                            </li>
                            <li class="total-price-action">
                                <span class="price item-total-price">¥ {{round (multiple sales_price buy_number) 2}}</span>
                                <div class="actions">
                                    <div class="remove-item action" data-product_id={{product_id}}><span class="iconfont">&#xe614;</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                    <div class="send-to-favorite action" data-product_id={{product_id}}>移入收藏夹</div>
                                </div>
                            </li>
                        </ul>
                    {{/each}}
                </div>
            {{/each}}
        </div>
    </div>
{{/ if}}

{{# if invalidPros}}
    <div class="cart-pro-list invalid-pros">
        <div class="pro-list">
            {{#each invalidPros}}
                <ul>
                    <li class="chk">
                        <span class="iconfont warning">&#xe625;</span>
                    </li>
                            <li>
                                <a href="javascript:void(0)">
                                    <img src="{{image goods_images 100 134}}" alt="{{product_name}}">
                                </a>
                            </li>
                            <li class="pro-info">
                                <div class="pro-name"><a href="javascript:void(0)">{{product_name}}</a></div>
                                <div>
                                    {{#if color_name}}
                                            <span class="mr20">颜色: {{color_name}}</span>
                                    {{/if}}
                                    {{#if size_name}}
                                        <span>尺寸: {{size_name}}</span>
                                    {{/if}}
                                </div>
                            </li>
                            <li class="price-num">
                                <span class="price sale-price">¥ {{round sales_price 2}}</span>
                                {{> cart/stepper }}
                            </li>
                            <li class="total-price-action">
                                <span class="price item-total-price">¥ {{round (multiple sales_price buy_number) 2}}</span>
                                <div class="actions">
                                    <div class="remove-item action" data-product_id={{product_id}}><span class="iconfont">&#xe614;</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                    <div class="send-to-favorite action" data-product_id={{product_id}}>移入收藏夹</div>
                                </div>
                            </li>
                </ul>
            {{/each}}
        </div>
    </div>
{{/ if}}