Cart items
Tag pair used for displaying the items in your cart.
Variables
title
- The title of your product’s entry.
url
- URL of the product’s entry.
quantity
- How many have been added to the cart.
price
- Price of the item with any price modifiers applied.
subtotal
- The line total. (price x quantity)
entry
- This gives you access to any of the product entry’s fields. You could access a field named
sku
by usingentry.sku
item_option
- If the product in the cart has a product modifier applied, this will return the name of it.
item_option_modifier
- If the product in the cart has a product modifier applied, this will return the price modifier dollar value.
product_price
- This will return the base price of the product.
count
- The iteration of the product in the cart.
index
- Same as
count
. zero_index
- The zero-based index/count.
first
- Returns true if it is the first item.
last
- Returns true if it is the last item.
total_results
- Total items in the cart.
Example
{{ bison:cart_items }}
{{ if no_results }}
<p>Your cart is empty!</p>
{{ else }}
{{ if first }}
<ul>
{{ endif }}
<li>{{ quantity }} x {{ title }} at {{ price }}/each = {{ subtotal }}</li>
{{ if last }}
</ul>
{{ endif }}
{{ endif }}
{{ /bison:cart_items }}
Problem with this page? Edit it on Github.