Themes built on the Twig templating engine are now deprecated and require migration to Vitrin to ensure continued support and compatibility with Zid.
/cartcart_page| Variable | Type |
|---|---|
cart | Cart |
store | Store |
session | Session |
| Property | Description |
|---|---|
cart.products | Cart items |
cart.products_count | Item count |
cart.totals | Total lines |
cart.coupon | Applied coupon |
cart.gift_card_details | Gift card info |
cart.free_shipping_rule | Free shipping rule |
{% extends "layout.jinja" %}
{% block main_content %}
{% if cart.products_count > 0 %}
<h1>{{ _("Cart") }}</h1>
{% include 'vitrin:cart/products_list.jinja' %}
<div class="totals">
{% for total in cart.totals %}
<div>{{ total.title }}: {{ total.value_string }}</div>
{% endfor %}
</div>
{% if session.is_guest %}
<a href="/auth/login?redirect_to=/checkout">{{ _("Complete Order") }}</a>
{% else %}
<a href="/checkout">{{ _("Complete Order") }}</a>
{% endif %}
{% else %}
<p>{{ _("Cart is empty") }}</p>
<a href="/">{{ _("Continue shopping") }}</a>
{% endif %}
{% endblock %}