Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add checkout button in cart

Michal Ociepkada0004ce38eb
diff --git a/cart/templates/cart/index.html b/cart/templates/cart/index.html
index 7fa374af88..cefb9c1219 100644
--- a/cart/templates/cart/index.html
+++ b/cart/templates/cart/index.html
@@ -21,9 +21,7 @@
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ form.cart_line.product }}</td>
- <td colspan="2">
- {{ form.quantity|as_bootstrap:"False" }}
- </td>
+ <td colspan="2"> {{ form.quantity|as_bootstrap:"False" }} </td>
<td>{% gross form.cart_line.get_price_per_item %}</td>
</tr>
{% endfor %}
@@ -31,14 +29,22 @@
<tfoot>
<tr>
<td colspan="2">Shipping: {% gross cart.get_delivery_total %}</td>
- <td><button class="btn" type="submit">Update</button></td>
+ <td>
+ <button class="btn" type="submit">
+ Update
+ </button></td>
<td>Total:</td>
<td>{% gross cart.get_total %}</td>
</tr>
</tfoot>
</table>
+ <div class="form-actions">
+ <a href="{% url "checkout:index" %}" class="btn btn-primary">Checkout</a>
+ </div>
</form>
{% else %}
-<p>Your cart is empty</p>
+<p>
+ Your cart is empty
+</p>
{% endif %}
{% endblock content %}