购物车组件(完整)
2022-08-17 加入收藏
<!--购物车组件start--> {eyou:sppurchase id='field' currentstyle='btn-danger'} <!--价格标签--> <div class="ey-price"><span>¥{$field.users_price}</span></div> <!--商品参数--> {eyou:volist name="$field.ReturnData" id='field2'} <div class="row"> <label class="col-sm-7">{$field2.spec_name}</label> <div class="col-sm-10"> {eyou:volist name="$field2.spec_value" id='field3'} <a href="JavaScript:void(0);" {$field3.SpecData} class="btn {$field3.SpecClass}">{$field3.spec_value}</a> {/eyou:volist} </div> </div> {/eyou:volist} <!--商品数量选择--> <div class="ey-number"> <label>数量</label> <div class="btn-input"> <button class="layui-btn" {$field.ReduceQuantity}>-</button> <input type="text" class="layui-input {$field.UpdateQuantity}> <button class="layui-btn" {$field.IncreaseQuantity}>+</button> </div> </div> <!--库存数量,后台可控制是否显示--> <span {$field.stock_show}>库存量:{$field.stock_count} 件</span> <!--购买和加入购物车按钮--> <div class="ey-buyaction"> <a class="ey-joinin" href="JavaScript:void(0);" {$field.ShopAddCart}>加入购物车</a> <a class="ey-joinbuy" href="JavaScript:void(0);" {$field.BuyNow}>立即购买</a> </div> <!--别漏掉这个--> {$field.hidden} {/eyou:sppurchase} <!--购物车组件end-->