I'm trying to figure out how to add css classes to the cart table that SimpleCartJS generates. (The cart layout I'm using is this: http://bootsnipp.com/snippets/featured/shopping-cart-bs-3 but it doesn't really matter)
============
input
This is my js configuration:
simpleCart({
checkout: {
type: "PayPal",
email: "you@yours.com"
},
cartStyle: "table",
cartColumns: [
/* Picture (same for every product right now) */
{ view: function( item, column) {
return "<a class=\"thumbnail pull-left\" href=\"#\"> "
+"<img class=\"media-object\" src=\"http://icons.iconarchive.com/icons/custom-icon-design/flatastic-2/72/product-icon.png\" "
+"style=\"width: 72px; height: 72px;\"> </a>";
}, label: false },
/* Name */
{ attr: "name", label: "Product" },
/* Quantity */
{ attr: "quantity" , label: "Qty" } ,
/* Price */
{ attr: "price" , label: "Price", view: 'currency' } ,
/* Remove */
{ view: "remove" , text: "Remove" , label: false }
]
});
and my HTML:
<div class="simpleCart_items"></div>
============
output
Basically the output is a generic table.
============
How do I:
Turn
<table>
into<table class="table table-hover">
?Add these rows under the simpleCart_items?
I'd like these to be rows under all the items:
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h5>Subtotal</h5></td>
<td><div class="simpleCart_total"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h5>Estimated shipping</h5></td>
<td><div class="simpleCart_shipping"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><h3>Total</h3></td>
<td><div class="simpleCart_grandTotal"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><a href="javascript:;" class="simpleCart_checkout">Checkout</a></td>
</tr>
so it'd end up looking something like:
Any help?