購物車組件(完整)
2022-11-27 加入收藏
<!--購物車組件start--> {eyou:sppurchase id='field' currentstyle='btn-danger'} <!--價格標簽--> <div class="ey-price"><span>¥{$field.users_price}</span></div> <!--商品參數(shù)--> {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} <!--商品數(shù)量選擇--> <div class="ey-number"> <label>數(shù)量</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> <!--庫存數(shù)量,后臺可控制是否顯示--> <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-->
組件樣式修改路徑:public/static/common/css/shopcart.css,記得先備份。