-
Notifications
You must be signed in to change notification settings - Fork 0
/
cart.html
213 lines (199 loc) · 10.8 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
<!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/font-awesome.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/cart.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
</head>
<body>
<main>
<div id="successAlert" class="alert alert-success d-block d-none" role="alert" style="z-index:999;">
¡Has comprado con éxito!
</div>
<div class="container">
<div class="row text-center p-4">
<h2> Carrito de Compras </h2>
</div>
<div class="row">
<h5 class="pb-2"> Artículos a Comprar </h5>
<table id="shopping-cart" class="table table-striped table-hover text-center align-middle">
<thead class="bg-light">
<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="shopping-cart-body">
</tbody>
</table>
</div>
<hr>
<form class="row pt-4 needs-validation" novalidate>
<h5 class="pb-2"> Tipo de envío </h5>
<div class="form-check">
<input class="form-check-input" type="radio" name="shippingType" id="premium-radio" value="0.15" required>
<label class="form-check-label" for="premium-radio">
Premium 2 a 5 días (%15)
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="shippingType" id="express-radio" value="0.07" required>
<label class="form-check-label" for="express-radio">
Express 5 a 8 días (7%)
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="shippingType" id="standard-radio" value="0.05" required>
<label class="form-check-label" for="standard-radio">
Standard 12 a 15 días (5%)
</label>
</div>
</form>
<form class="row pt-4 pb-2 needs-validation" novalidate>
<h5 class="pb-2"> Dirección de envío </h5>
<div class="row row-cols-2 gy-3 ge-5 mt-0 ps-0">
<div class="col">
<label for="street" class="form-label">Calle</label>
<input type="text" class="form-control" id="street" required>
<div class="invalid-feedback">Ingresa una calle</div>
</div>
<div class="col">
<label for="stnumber" class="form-label">Número</label>
<input type="text" class="form-control" id="stnumber" required>
<div class="invalid-feedback">Ingresa un número</div>
</div>
<div class="col">
<label for="stcorner" class="form-label">Esquina</label>
<input type="text" class="form-control" id="stcorner" required>
<div class="invalid-feedback">Ingresa una esquina</div>
</div>
</div>
</form>
<hr>
<div class="row pt-4">
<h5 class="pb-2"> Costos </h5>
<div class="list-group-item">
<div class="row row-cols-2">
<div class="col-10">
<p class="m-0">Subtotal</p>
<small class="text-muted">Costo unitario del producto por cantidad</small>
</div>
<div class="col-2 d-flex justify-content-center align-self-center">
<span>USD <span id="subtotal" class="m-0">0</span></span>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row row-cols-2">
<div class="col-10">
<p class="m-0">Costo de Envío</p>
<small class="text-muted">Según el tipo de envío</small>
</div>
<div class="col-2 d-flex justify-content-center align-self-center">
<span>USD <span id="shippingCost" class="m-0">0</span></span>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row row-cols-2">
<div class="col-10">
<p class="m-0">Total ($)</p>
</div>
<div class="col-2 d-flex justify-content-center align-self-center">
<span class="fw-bold">USD <span id="total" class="m-0">0</span></span>
</div>
</div>
</div>
</div>
<hr>
<div class="row row-cols-2 pt-4">
<div class="col">
<h5 class="pb-2"> Forma de Pago </h5>
<div class="row row-cols-2 align-content-center">
<div class="col-6 d-flex">
<small id="paymentMethodmsg" class="m-0 d-flex align-items-center">
No ha seleccionado
<i class="fas fal fa-exclamation-circle ps-2" style="color:rgb(255, 167, 2);"></i>
</small>
</div>
<div class="col-6 float-start">
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#paymentMethodModal">
Seleccionar
</button>
</div>
</div>
</div>
<div class="col d-flex align-items-center justify-content-end">
<button type="button" class="btn btn-success btn-lg float-end" id="checkoutBtn">
Finalizar Compra
<i class="fas fa-arrow-right ps-3"></i>
</button>
</div>
<div class="modal fade" id="paymentMethodModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Forma de Pago</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<form id="pmForm" class="modal-body needs-validation" novalidate>
<div class="form-check">
<label for="creditCard" class="form-check-label">Tarjeta de Crédito
<input type="radio" name="paymentMethod" id="creditCard" class="form-check-input" required>
</label>
</div>
<hr>
<div class="row row-cols-2 gy-2">
<div class="col-7">
<label for="creditCardNumber">Número de la Tarjeta</label>
<input type="numeric" class="form-control mt-1 cc-info" name="creditCardNumber" autocomplete="cc-number" disabled required>
</div>
<div class="col-5">
<label for="creditCardSecurityCode">Código de Seguridad</label>
<input type="numeric" class="form-control mt-1 cc-info" name="creditCardSecurityCode" autocomplete="cc-csc" disabled required>
</div>
<div class="col-7">
<label for="creditCardExpirationDate">Vencimiento (MM/AA)</label>
<input type="numeric" class="form-control mt-1 cc-info" name="creditCardExpirationDate" autocomplete="cc-exp" disabled required>
</div>
</div>
<div class="form-check">
<label for="bankTransfer" class="form-check-label mt-4">Transferencia Bancaria
<input type="radio" name="paymentMethod" id="bankTransfer" class="form-check-input" required>
</label>
</div>
<hr>
<div class="row row-cols-2 gy-2">
<div class="col-7">
<label for="accountNumber">Número de Cuenta</label>
<input type="numeric" class="form-control mt-1 bt-info" name="accountNumber" autocomplete="cc-number" disabled required>
</div>
</div>
</form>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/init.js"></script>
<script src="js/structural/navbar-footer.js"></script>
<script src="js/cart.js"></script>
</body>
</html>