-
Notifications
You must be signed in to change notification settings - Fork 0
/
cart.html
256 lines (229 loc) · 10.2 KB
/
cart.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>eMercado - Todo lo que busques está aquí</title>
<link href="https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,700,700i,900,900i" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark p-1">
<div class="container">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav w-100 justify-content-between">
<li class="nav-item">
<a class="nav-link" href="index.html">Inicio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="categories.html">Categorías</a>
</li>
<li class="nav-item">
<a class="nav-link" href="sell.html">Vender</a>
</li>
<li class="nav-item" id="usuarioMail">
</li>
</ul>
</div>
</div>
</nav>
<main>
<div class="container">
<div class="text-center p-4">
<h2>Carrito de compras</h2>
</div>
<h4 class="mb-1">Artículos a comprar</h4>
<table class="table">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Nombre</th>
<th scope="col">Costo</th>
<th scope="col">Cantidad</th>
<th scope="col">Subtotal</th>
<th scope="col"></th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<hr class="mb-4">
<!-- FORM -->
<form class="row mt-4 needs-validation" name="form-compra" novalidate>
<h4 class="mb-1">Tipo de envío</h5>
<div class="d-block my-3">
<div class="custom-control custom-radio">
<input id="premiumradio" name="deliveryType" type="radio" class="custom-control-input" required value="15" >
<label class="custom-control-label" for="premiumradio">Premium 2 a 5 días (15%)</label>
</div>
<div class="custom-control custom-radio">
<input id="expressradio" name="deliveryType" type="radio" class="custom-control-input" required value="7" >
<label class="custom-control-label" for="expressradio">Express 5 a 8 días (7%)</label>
</div>
<div class="custom-control custom-radio">
<input id="standardradio" name="deliveryType" type="radio" class="custom-control-input" required value="5" >
<label class="custom-control-label" for="standardradio">Standard 12 a 15 días (5%)</label>
</div>
</div>
<hr class="mb-4">
<h4 class="mb-1">Dirección de envío</h5>
<div class="row">
<div class="col-md-6 mb-3">
<label for="userStreet" class="form-label">Calle</label>
<input type="text" class="form-control" id="userStreet" name="userStreet" aria-describedby="validationStreetFeedback" required>
<div class="invalid-feedback" id="validationStreetFeedback">
Ingresa una calle
</div>
</div>
<div class="col-md-6 mb-3">
<label for="userStreetNum" class="form-label">Número</label>
<input type="text" class="form-control street-num" id="userStreetNum" name="userStreetNum" aria-describedby="validationStreetNumFeedback" required>
<div class="invalid-feedback" id="validationStreetNumFeedback">
Ingresa un número
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="userStreetEsq" class="form-label">Esquina</label>
<input type="text" class="form-control" id="userStreetEsq" name="userStreetEsq" aria-describedby="validationStreetEsqFeedback" required>
<div class="invalid-feedback" id="validationStreetEsqFeedback">
Ingresa la esquina
</div>
</div>
</div>
<hr class="mb-4">
<h4 class="mb-3">Costos</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">Subtotal</h6>
<small class="text-muted">Unitario del producto por cantidad</small>
</div>
<span class="text-muted" id="productSubtotalText">-</span>
</li>
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0">Costo de envío</h6>
<small class="text-muted">Según el tipo de envio</small>
</div>
<span class="text-muted" id="deliveryText">-</span>
</li>
<li class="list-group-item d-flex justify-content-between">
<span>Total ($)</span>
<strong id="totalCostText">-</strong>
</li>
</ul>
<hr class="mb-4">
<h4 class="mb-3">Forma de pago</h4>
<span>
<span id="payment-metod-text">No ha seleccionado </span>
<button type="button" class="btn btn-link ps-0" data-bs-toggle="modal"
data-bs-target="#paymentModal">Seleccionar
</button>
</span>
<div class="danger hide" id="validationPaymentMetod">
Debe seleccionar una forma de pago.
</div>
<hr class="mb-4">
<div class="text-center">
<button class="btn btn-primary btn-lg" type="submit" id="buyBtn">Finalizar compra</button>
</div>
</form>
<div id="liveAlertPlaceholder"></div>
</div>
</main>
<footer class="text-muted">
<div class="container">
<p class="float-end">
<a href="#" class="linkBlack">Volver arriba</a>
</p>
<p>Este sitio forma parte de <a class="linkBlack" href="https://jovenesaprogramar.edu.uy/" target="_blank">Jovenes a Programar</a> -
2022 - Alex N. Diban</p>
</div>
</footer>
<div class="modal fade" id="paymentModal" tabindex="-1" aria-labelledby="paymentModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="paymentModalLabel">Forma de pago</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form class="row mt-4 needs-validation" name="form-modal" novalidate>
<div class="danger hide" id="validationPaymentMetodModal">
Debe seleccionar una forma de pago
</div>
<div class="modal-body">
<div class="custom-control custom-radio">
<input id="credito" name="paymentMetod" type="radio" class="custom-control-input" required>
<label class="custom-control-label" for="credito">Tarjeta de crédito</label>
</div>
<hr class="mb-4">
<div class="row">
<div class="col-md-6 mb-3">
<label for="cardNum" class="form-label">Número de tarjeta</label>
<input type="text" class="form-control" id="cardNum" name="cardNum" aria-describedby="validationCardNumFeedback" required>
<div class="invalid-feedback" id="validationCardNumFeedback">
Ingrese número de tarjeta
</div>
</div>
<div class="col-md-6 mb-3">
<label for="cardCode" class="form-label">Código de seg.</label>
<input type="text" class="form-control" id="cardCode" name="cardCode" aria-describedby="validationCodeFeedback" required>
<div class="invalid-feedback" id="validationCodeFeedback">
Ingrese código de seguridad
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="cardExpire" class="form-label">Vencimiento(MM/AA)</label>
<input type="text" class="form-control" id="cardExpire" name="cardExpire" aria-describedby="validationExpireFeedback" required>
<div class="invalid-feedback" id="validationExpireFeedback">
Ingrese fecha de vencimiento
</div>
</div>
</div>
<div class="custom-control custom-radio">
<input id="transf" name="paymentMetod" type="radio" class="custom-control-input" required>
<label class="custom-control-label" for="transf">Transferencia bancaria</label>
</div>
<hr class="mb-4">
<div class="row">
<div class="col-md-6 mb-3">
<label for="acountNum" class="form-label">Número de cuenta</label>
<input type="text" class="form-control" id="acountNum" name="acountNum" aria-describedby="validationAcountNumFeedback" required>
<div class="invalid-feedback" id="validationAcountNumFeedback">
Ingrese número de cuenta
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" id="modalSubmit" class="btn btn-secondary">Cerrar</button>
</div>
</form>
</div>
</div>
</div>
<div id="spinner-wrapper">
<div class="lds-ring">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/init.js"></script>
<script src="js/cart.js"></script>
</body>
</html>