35 lines
913 B
HTML
35 lines
913 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h1>Cart</h1>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Product Name</th>
|
|
<th scope="col">Price</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for product in cart.products.all %}
|
|
<tr>
|
|
<th scope="row">{{ forloop.counter }}</th>
|
|
<td><a href="{{ product.get_absolute_url }}" {{ product.title }}>{{ product.title }}</a>{% include "carts/form.html" with object=product in_cart=True %}
|
|
</td>
|
|
<td>{{ product.price }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<td>Subtotal {{ cart.subtotal }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<td>Total {{ cart.total }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<td><a href={% url "carts:checkout" %} class="btn btn-lg btn-block btn-success">Checkout</a></td>
|
|
</tr>
|
|
|
|
{% endblock %} |