aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/templates/payments/cart_detail.html
blob: ba8c43e043d927c5c74facaa20b123f16857b58d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% extends "base.html" %}
{% load static %}

{% block content %}
<div class="container my-5">
    <h1 class="mb-4">Shopping Cart</h1>
    {% if cart_items %}
    <table class="table">
        <thead>
            <tr>
                <th>Product</th>
                <th>Price</th>
                <th>Quantity</th>
                <th>Total</th>
            </tr>
        </thead>
        <tbody>
            {% for item in cart_items %}
            <tr>
                <td>{{ item.product.name }}</td>
                <td>${{ item.product.price }}</td>
                <td>{{ item.quantity }}</td>
                <td>${{ item.total }}</td>
            </tr>
            {% endfor %}
        </tbody>
        <tfoot>
            <tr>
                <th colspan="3" class="text-end">Total:</th>
                <th>${{ cart_total }}</th>
            </tr>
        </tfoot>
    </table>
    <div class="d-flex justify-content-end">
        <a href="{% url 'checkout' %}" class="btn btn-primary">Checkout</a>
    </div>
    {% else %}
    <p>Your cart is empty.</p>
    {% endif %}
</div>
{% endblock %}