-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcart.html
More file actions
122 lines (110 loc) · 4.54 KB
/
cart.html
File metadata and controls
122 lines (110 loc) · 4.54 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Cart | Tenjiku</title>
<meta name="description" content="View and manage your shopping cart at Tenjiku Fashion." />
<meta name="robots" content="noindex, nofollow" />
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="css/cart.css" />
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark px-3">
<a class="navbar-brand" href="shop.html">Tenjiku</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a href="profile.html" class="nav-link">profile</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link">Logout</a>
</li>
</ul>
</div>
</nav>
<!-- Main Content -->
<main class="container my-5" role="main">
<h2 class="mb-4">Your Shopping Cart</h2>
<!-- Empty cart message -->
<div id="cartEmptyMessage" class="alert alert-info d-none" role="alert" aria-live="polite">
Your cart is empty. <a href="shop.html" class="alert-link">Continue shopping</a>.
</div>
<!-- Loading spinner -->
<div id="loadingSpinner" class="d-none text-center my-3">
<div class="spinner-border text-primary" role="status" aria-hidden="true"></div>
</div>
<!-- Retry Button -->
<div class="text-center mb-4">
<button id="retryCart" class="btn btn-outline-primary d-none">Retry Loading Cart</button>
</div>
<!-- Cart Table -->
<div class="table-responsive">
<table class="table align-middle table-hover">
<thead>
<tr>
<th scope="col" class="text-center">Product</th>
<th scope="col" class="text-end">Price</th>
<th scope="col" class="text-center">Quantity</th>
<th scope="col" class="text-end">Subtotal</th>
<th scope="col" class="text-center">Actions</th>
</tr>
</thead>
<tbody id="cartBody">
<!-- JavaScript will populate this -->
</tbody>
</table>
</div>
<!-- Cart Summary -->
<div class="d-flex justify-content-between align-items-center mt-4">
<h4 id="cartTotal" aria-live="polite">Total: ₹0</h4>
<button id="checkoutBtn" class="btn btn-primary" disabled>Checkout</button>
</div>
</main>
<!-- Toast Container -->
<div id="toastContainer" class="toast-container position-fixed top-0 end-0 p-3"></div>
<!-- Remove Confirmation Modal -->
<div class="modal fade" id="removeConfirmModal" tabindex="-1" aria-labelledby="removeConfirmLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="removeConfirmLabel">Confirm Removal</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Are you sure you want to remove this item from your cart?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger" id="confirmRemove">Remove</button>
</div>
</div>
</div>
</div>
<!-- Checkout Confirmation Modal -->
<div class="modal fade" id="checkoutConfirmModal" tabindex="-1" aria-labelledby="checkoutConfirmLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="checkoutConfirmLabel">Confirm Checkout</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Proceed to place your order?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="confirmCheckout">Checkout</button>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Modular Scripts -->
<script type="module" src="js/utils.js"></script>
<script type="module" src="js/cart.js"></script>
</body>
</html>