-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.html
70 lines (67 loc) · 3.04 KB
/
checkout.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
{% extends 'layout.html' %}
{% block styles %}
<link href="./styles/checkout.css" rel="stylesheet" type="text/css">
<link href="./styles/cart.css" rel="stylesheet" type="text/css">
{% endblock %}
{% block body %}
{%if session.get('loggedIn') == True%}
{% if session.get('userType') == 'customer' %}
<div class="checkout-container">
<h1 class="checkouttitle">Checkout</h1>
<div class="items-section">
<!--Cart items here-->
<h2>Items:</h2>
</div>
<div class="delivery-section">
<h2>Delivery Method:</h2>
<label>
<input type="radio" name="deliveryMethod" value="pickUp" checked onclick="handleClick(event)"/>
Pick Up
</label>
<label>
<input type="radio" name="deliveryMethod" value="Deliver" onclick="handleClick(event)"/>
Deliver
</label>
<div class="address-section">
<label for="address1">
Address 1
<input type="text" name="address1" id="address1" required/>
</label>
<label for="address2">
Address 2
<input type="text" name="address2" id="address2" />
</label>
<label for="city">
City
<input type="text" name="city" id="city" required/>
</label>
<label for="state">State
<input type="text" name="state" id="state" required/>
</label>
<label for="zipcode">Zipcode
<input type="text" name="zipcode" id="zipcode" required>
</label>
</div>
<!--Delivery method here-->
</div>
<div class="pricetext">
<h2>Price:</h2>
<p>subtotal: $<span id="subtotal"></span></p>
<p>tax: $<span id="taxes"></span></p>
<p>delivery fee: $<span id="deliveryFee"></span></p>
<p>total: $<span id="total"></span></p>
<!--price, checkout-->
</div>
<button id="checkout-button" onclick="checkout()">Place Order</button>
</div>
<script src="./scripts/cart.js"></script>
<script src="./scripts/checkout.js"></script>
<!-- <script src="./scripts/cart.js"></script> -->
{% else %}
<h1>You must be a customer to place an order.</h1>
{% endif %}
{% else %}
<h1>You must logged in in order to place an order.</h1>
<a class="login" href="/login">Log in</a>
{% endif %}
{% endblock %}