5

多くの人が同じ質問をしているのを見つけた場合の利益のために。サムネイル画像を表示するには。

アイテムのセットアップ:

<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 }
]
});
4

1 に答える 1

1

私は専門家ではありませんが、それが私がそれを機能させた方法です。それが誰かを助けることを願っています。誰かがより良い方法/説明を持っているなら、私に知らせてください。

于 2012-09-03T20:30:59.197 に答える