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

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

{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %}
{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %}

{% block extra_head %}
<script>
var _gaq = [['_trackPageview', '{{ request.path }}{{ step_url }}/']];
</script>
{% endblock %}

{% block breadcrumb_menu %}
<ul>
    {% for step in steps %}
    <li{% ifequal step.title step_title %} class="current-step"{% endifequal %}
        >{{ step.title }} &gt;</li>
    {% endfor %}
    <li>{% trans "Complete" %}</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 %}

