[[!cart.contents]]
Available Since: V1.0.0
The snippet shows the contents of the shopping cart, it's designed to be placed uncached on shop pages to give an overview of the items currently in the cart.
Parameter |
Description |
detailed |
Flags if a detailed view of the cart contents should be shown, `1`, or if a simple total price and number of items should be shown, `0`, defaults to `0`. |
wrapperTpl |
The wrapper chunk for detailed cart views. |
itemTpl |
The per item chunk for the detailed cart views. |
buttonTpl |
The formatting of the view cart button for detailed cart views. |
simpleTpl |
Optional template for formatting the simple cart. |
cartPage |
Optional ID of the view cart page, if given a link to it is generated. |
Default wrapperTpl Chunk
<ul class="cartcontents">[[+items]]<li class="totalItems">[[+totalItems]]</li><li class="subtotal">[[+subTotal]]</li>[[+viewCart]][[+checkout]]</ul>
Placeholder |
Description |
items |
The cart item lines, formatted by itemTpl. |
totalItems |
The total number of items currently in the cart. |
subTotal |
The subtotal of the items in the cart. |
viewCart |
The button/link to view the full cart. |
checkout |
The button/link to move to the checkout. |
Default itemTpl Chunk
<li>[[if &subject=`[[+uri]]` &operator=`!empty` &then=`<a href="[[+uri]]">[[+title]]</a>` &else=`[[+title]]`]]<div class="description">[[+description]]</div><div class="qtyprice">[[+qtyPrice]]</div></li>
Placeholder |
Description |
uri |
The address of the page holding the product. |
title |
The product name. |
qtyPrice |
The quantity and price of the cart. |
Default buttonTplChunk
<li class="[[+class]]"><a href="[[+uri]]" rel="nofollow">[[+label]]</a></li>
Placeholder |
Description |
class |
viewCart or viewCheckout depending on which button/link is being drawn. |
uri |
The address to send the shopper to. |
label |
The label for the button/link. |
simpleTpl
Not present by default.
Placeholder |
Description |
items |
Count of the items in the cart. |
link |
Address of the view cart page. |
total |
The total value of the cart contents. |