SimpleCart v2 Tutorials Small Cart View

If you'd like to create a small view of your cart, for example in the header of your site, you can use the scGetCart snippet with a few properties.

For example use this snippet call to show a simple summary without product information:


That provides the &tpl and &emptyTpl properties with different chunks to make sure it doesn't place the entire cart there.

By passing &viewProducts=0 it also doesn't load the product information. This makes it faster than a full cart view.

Example &tpl chunk: cartHeader

<div id="simplecart-small">
    You have [[]] products in your cart.<br>
    <a href="[[~{your cart page id here}]]">Click here</a> to view your cart.

Example &emptyTpl chunk: cartHeaderEmpty

<div id="simplecart-small">
    You don't have any products in your cart<br>
    Shop around and add some goods!

If you have to use &viewProducts property or not, the total placeholders are always available.