dschandra commited on
Commit
3631a7f
·
verified ·
1 Parent(s): 548d54d

Create cart.html

Browse files
Files changed (1) hide show
  1. templates/cart.html +27 -0
templates/cart.html ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Cart</title>
7
+ <link rel="stylesheet" href="/static/style.css">
8
+ </head>
9
+ <body>
10
+ <header>
11
+ <h1>Your Cart</h1>
12
+ <a href="/" class="cart-link">Back to Menu</a>
13
+ </header>
14
+ <div id="cart-container">
15
+ {% if cart %}
16
+ <ul>
17
+ {% for item in cart %}
18
+ <li>{{ item['name'] }} (x{{ item['quantity'] }}) - ${{ item['price'] * item['quantity'] }}</li>
19
+ {% endfor %}
20
+ </ul>
21
+ <h3>Total Price: ${{ total_price }}</h3>
22
+ {% else %}
23
+ <p>Your cart is empty!</p>
24
+ {% endif %}
25
+ </div>
26
+ </body>
27
+ </html>