Link Search Menu Expand Document

Displaying a customer’s cart

The Cart object

A Cart object represents the experience that a customer intends to book and the costs associated with the cart.

The prices can be formatted in the customer’s currency by applying the money filter to the price.

syntax
SUBTOTAL: {{ cart.subtotal | money }}

DISCOUNT: {{ cart.total_price_reduction | money }}
BOOKING FEE: {{ cart.total_fee | money }}

TOTAL: {{ cart.total | money }}

Pay with a deposit of {{ cart.total_deposit | money }} or with a first instalment of {{ cart.first_instalment_amount | money }}.

Cart line items

A cart item is a single line in a customer’s cart that records which variant of an experience was added, the associated quantity, dates, adult count and modifications.

If two of the same item are added to the cart, but have unique line item properties, then they’ll be split into separate line items.

A breakdown of the items in a customer’s cart can be displayed by looping through the items.

syntax
{% for item in cart.items %}
    {{ item.quantity }}x {{ item.variant_name }}
    {% if item.adult_count %}
        {{ item.adult_count }} {% if item.adult_count == 1 %}person{% else %}people{% endif %}
    {% endif %}
{% endfor %}

Creators may choose to provide customers with additional modification options, such as the choice of a twin room or double room, or an entry time slot. These may also incur an additional cost. These can be accessed via the Selections object on a cart item.

syntax
{% for item in cart.items %}
    {{ item.quantity }}x {{ item.variant_name }}
    {% if item.adult_count %}
        {{ item.adult_count }} {% if item.adult_count == 1 %}person{% else %}people{% endif %}
    {% endif %}
    {% for selection in item.selections %}
        {{ selection.modifier_name }}
        {{ selection.price | money }}
    {% endfor %}
{% endfor %}

Proceed to checkout

A Creator’s checkout can be found at /checkout.