1. 產(chǎn)品列表頁的顯示,可以將產(chǎn)品加入購物車。

2. 想在產(chǎn)品列表頁,點擊數(shù)這個部分,直接換成 “加入購物車”,實現(xiàn)從列表頁中直接加購物車。

3. 我把購物車組件的模板代碼,從view_product.htm中,移植到list_product.htm中,替換掉點擊數(shù)的代碼。但是不起作用,有沒有簡單的demo,或是開發(fā)文檔,可以實現(xiàn)在列表頁中,直接增加加入購物車按鈕。
<!--購物車組件start-->
{eyou:sppurchase id='field' currentstyle='btn-danger'}
<!-- 價格 標(biāo)簽開始 -->
<div class="ey-price"><span>¥{$field.users_price}</span> </div>
<!-- 價格 標(biāo)簽結(jié)束 -->
<!-- 規(guī)格 標(biāo)簽開始 -->
<div class="ey-spec">
{eyou:volist name="$field.ReturnData" id='field2'}
<div class="row m-t-15">
<label class="form-control-label 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 btn-default btn-selected {$field3.SpecClass}">{$field3.spec_value}</a>
{/eyou:volist}
</div>
</div>
{/eyou:volist}
</div>
<!-- 規(guī)格 標(biāo)簽結(jié)束 -->
<!-- 數(shù)量操作 標(biāo)簽開始 -->
<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ù)量操作 標(biāo)簽結(jié)束 -->
<!-- 庫存量 標(biāo)簽開始 -->
<span {$field.stock_show}>庫存量:{$field.stock_count} 件</span>
<!-- 庫存量 標(biāo)簽結(jié)束 -->
<!-- 購買按鈕 標(biāo)簽開始 -->
<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>
<!-- 購買按鈕 標(biāo)簽結(jié)束 -->
{$field.hidden}
{/eyou:sppurchase}
<!--購物車組件end-->
4.有沒有簡單的方法,實現(xiàn)一段代碼,將列表中的產(chǎn)品,旁邊直接增加購物車按鈕。
比如: <a class="ey-joinin" href="JavaScript:void(0);" {$field.ShopAddCart}>加入購物車</a>