SimpleCart js thumbnail images undefined

In the interest, if many of the people I have found are asking the same question. To display thumbnails.

Item Setting:

<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>

Note. The image has an item_thumb element and an attribute in which the value is the URL for the thumbnail.

Trash setting:

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 }
]
});
+5
source share
1 answer

I am not an expert, but here's how I earned it. Hope helps someone. If anyone has a better method / explanation, please let me know.

+1
source

All Articles