/
base_pay_ship.html
78 lines (64 loc) · 2.84 KB
/
base_pay_ship.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% extends "shop/base.html" %}
{% load i18n %}
{% block extra-head %}
<script type="text/javascript" src="/static/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript" src="/static/js/stripe.js"></script>
{% endblock %}
{% block navbar %}
<li class="first"><a href="{{ shop_base }}/">{% trans "Home" %}</a></li>
<li>{% trans "Checkout" %}</li>
{% endblock %}
{% block content %}
<h3>{% trans "Checkout" %}</h3>
<div id="checkoutprogress">
<ul class="breadcrumb">
<li class="first"><a href="{% url satchmo_checkout-step1 %}">{% trans "Ship/Bill" %}</a></li>
<li class="active">{% trans "Payment" %}</li>
<li>{% trans "Confirmation" %}</li>
</ul>
</div>
<h4>{% trans "Please complete the following information in order to submit your order." %}</h4>
{% if form.errors %}
<h2>{% blocktrans count form.errors|length as count %}Please correct the following error:{% plural %}Please correct the following errors:{% endblocktrans %}</h2>
{% if form.non_field_errors %}<p>
{{ form.non_field_errors }}
</p>{% endif %}
{% endif %}
<form method="post" action="." id="stripe-payment-form">{% csrf_token %}
<table>
{% block payment_table %}
{# put your payment module specific rows here. For example, CC number. #}
{% endblock %}
{% if cart.is_shippable %}
{% if form.shipping_hidden %}
{{ form.shipping }}
</table>
{% else %}
<tr><td><h4>{% trans "Shipping Information" %}</h4></td></tr>
</table>
{% block shipping_table %}
<div id="shipping">
{% if form.shipping_description or form.shipping.field.choices|length_is:1 %}
<label for="id_shipping">{% trans "The following shipping method will be used" %}:</label>
{% else %}
<label for="id_shipping">{% trans "Please choose your preferred shipping method" %}</label>
{% endif %}
{{ form.shipping }}
{% if form.shipping_description %}<br/>{{ form.shipping_description }}{% endif %}
{% if form.shipping.errors %}*** {{ form.shipping.errors|join:", " }}{% endif %}
</div>
{% endblock %}
{% endif %}
{% else %}
<tr><td colspan="2"><h4>{% trans "There are no items in this order to ship." %}</h4></td></tr>
<tr><td colspan="2"> {{ form.shipping }} </td></tr>
</table>
{% endif %}
{% if form.shipping.field.choices|length_is:0 and cart.is_shippable %}
<h4>{% blocktrans %}No valid shipping method is available. Please verify that your address is correct.{% endblocktrans %}</h4>
{% else %}
<input type="submit" value="{% trans "Confirm" %}"/>
{% endif %}
</form>
{% endblock %}