如果我发现有很多人问同样的问题,那是为了利益。获取要显示的缩略图。
物品设置:
<div class="simpleCart_shelfItem">
<img src="images/buttons.png" alt="Sample Product" class="item_thumb" thumb="images/buttonsthumb.png">
<h2 class="item_name"> Awesome T-shirt </h2>
<p> <input type="text" value="1" class="item_Quantity"><br>
<span class="item_price">$35.99</span><br>
<a class="item_add" href="javascript:;"> Add to Cart </a></p>
</div>
注意:图像具有类 item_thumb 和属性 thumb,其中值是缩略图图像的 url。
购物车设置:
simpleCart({
cartColumns: [
{ view: "image" , attr: "thumb", label: false },
{ attr: "name" , label: "Name" } ,
{ attr: "price" , label: "Price", view: 'currency' } ,
{ view: "decrement" , label: false , text: "-" } ,
{ attr: "quantity" , label: "Qty" } ,
{ view: "increment" , label: false , text: "+" } ,
{ attr: "total" , label: "SubTotal", view: 'currency' } ,
{ view: "remove" , text: "Remove" , label: false }
]
});