{% extends "base.html" %}
{% load shop_tags i18n %}

{% block body_id %}checkout{% endblock %}

{% block title %}{% trans "Checkout" %}{% endblock %}

{% block breadcrumb_menu %}
<ul>
    <li><a href="{% url home %}">{% trans "Home" %}</a> &gt;</li>
    <li>{% trans "Checkout" %}</li>
</ul><br />
{% endblock %}

{% block main %}

<p>{% order_totals %}</p>

<form method="post" id="checkout-form" class="form">
    {% csrf_token %}

	{% with form.non_field_errors as errors %}
	    {% if errors or form.errors %}
	    <ul class="errorlist">
	        {% for error in errors %}
	        <li>{{ error }}</li>
	        {% empty %}
            <li>Please correct the errors below.</li>
            {% endfor %}
	    </ul>
	    {% endif %}
	{% endwith %}

	{% block fields %}{% endblock %}

	{% if cart.has_items %}
	    <input type="submit" class="button" value="{% trans "Next" %}" />
	    {% if not CHECKOUT_STEP_FIRST %}
	    <input type="submit" class="button" name="back" value="{% trans "Back" %}" />
	    {% endif %}
	{% else %} 
    	<p>{% trans "Your cart is empty." %}</p>
	{% endif %}

</form>

{% endblock %}

