Displaying carts
Display the customer's cart and booking summary.
A Cart represents the customer's current booking. It contains the selected products, pricing, discounts, fees, deposits, and payment information.
Displaying cart totals
Use the Cart object to display pricing throughout your theme.
Apply the money filter when rendering monetary values.
Subtotal: {{ cart.subtotal | money }}
Discount: {{ cart.total_price_reduction | money }}
Booking fee: {{ cart.total_fee | money }}
Total: {{ cart.total | money }}
Pay a deposit of {{ cart.total_deposit | money }}
or the first instalment of {{ cart.first_instalment_amount | money }}.Displaying cart items
Each Cart Item represents a single booking within the cart.
A cart item contains information such as:
- Selected variant
- Quantity
- Departure date
- Guest count
- Modifier selections
For example:
{% for item in cart.items %}
{{ item.quantity }} × {{ item.variant_name }}
{% if item.adult_count %}
{{ item.adult_count }}
{% if item.adult_count == 1 %}
person
{% else %}
people
{% endif %}
{% endif %}
{% endfor %}If the same variant is added multiple times with different selections or booking details, each booking appears as a separate cart item.
Displaying modifier selections
Cart items can include modifier selections, such as room type, workshop choice, or arrival time.
These are available through the Modifier Selection objects on each cart item.
{% for item in cart.items %}
{{ item.quantity }} × {{ 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 }}
{% if selection.price != 0 %}
{{ selection.price | money }}
{% endif %}
{% endfor %}
{% endfor %}Proceeding to checkout
Customers can begin checkout by linking to:
/checkoutDeveloper considerations
When displaying a cart:
- Always format monetary values using the
moneyfilter. - Display modifier selections alongside the relevant cart item.
- Treat cart items with different selections as separate bookings.
- Use the cart totals provided by Easol rather than calculating totals manually.