Skip to content

simpleCart(js) v2 to v3 migration (CSS class changes...)

bkeating edited this page Feb 24, 2012 · 1 revision

v2 uses a slightly different markup and css class names than v3. At least in my own recent experience. This page offers a "this to that" legend to help make upgrading a bit easier(?)

.itemContainer-> .itemRow
.itemName -> .item-name
.itemTotal -> .item-total
.itemdecrement -> .item-decrement
.itemincrement -> .item-increment

There are likely more, but I left them unused in my project, so I don't have a diff to compare.

Also, when using anchor tags with onclick, the syntax has also slightly changed:

Old: <a href="javascript:;" onclick="simpleCart.add( 'name=FooBar' , 'price=10' , 'quantity=1' );">Add to Cart</a>
New: <a href="javascript:;" onclick="simpleCart.add({name:'FooBar', price:10, quantity=1});">Add to Cart</a>

Clone this wiki locally