-
Notifications
You must be signed in to change notification settings - Fork 1
/
Payment.html
366 lines (288 loc) · 8.98 KB
/
Payment.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checkout | Healthmug</title>
<meta name="theme-color" content="#51c9a6">
<meta name="msapplication-navbutton-color" content="#51c9a6">
<meta name="application-name" content="Healthmug LT">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Healthmug LT">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="apple-touch-icon" sizes="192x192"
href="https://static.oxinis.com/healthmug/image/healthmug/healthmuglogo-192.png">
<link rel="shortcut icon" href="https://static.oxinis.com/healthmug/image/healthmug/healthmuglogo-32.png"
type="image/x-icon">
<link rel="stylesheet" href="https://static.oxinis.com/healthmug/css/healthmug-combined-6a75d3cd87.min.css" />
<style>
.btn, article, body, button, div, form, h1, h2, h3, h4, h5, h6, html, input, label, li, ol, p, span, ul {
font-family: Roboto,sans-serif;
}
.spriteHealthmug {
background-image: url(https://static.oxinis.com/healthmug/css/image/sprite-healthmug.png);
background-repeat: no-repeat;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
top: 100%;
left: 50%;
margin-left: -60px;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
body {
background-color: #F4F4F4;
}
nav {
background-color: #51C9A6;
height: 24px;
margin-top: 4%;
}
.noLink{
color: #FBFBFB;
padding: 0.84%;
font-size:14px;
}
nav {
display: block;
}
.wrapper {
width: 100%;
height: 50px;
background-color: #51C9A6;
display:flex;
}
.checkoutTopIconWrap{
margin-left: 25%;
}
.checkOut {
width: 60%;
height:100%;
margin: auto;
margin-top: 4%;
border: 1px solid #888888;
background-color: #FFFFFF;
box-shadow: 2px 2px 2px 2px #888888;
opacity: 0.8;
}
.stepTitle{
position: relative;
background-color: #fb8903;
margin: 0 -7px;
margin-top: 2%;
box-shadow: 0 -2px 8px 0 rgb(156 154 154 / 40%);
}
.head{
color: #FEFFFF;
font-weight: 500;
font-size: 20px;
margin: auto;
}
.form_1 {
width: 50%;
height: 10%;
border: none;
display:grid;
grid-gap: 5%;
margin: auto;
margin-top: 1%;
outline: none;
}
.paymentBox{
width: 60%;
height: 400px;
margin: 1% 1%;
}
line{
display:inline-block;
}
.form_1 {
width: 50%;
height: 30%;
border: none;
display:grid;
grid-gap: 5%;
margin:0;
margin-top: 1%;
outline: none;
}
input {
height: 30px;
outline: 0;
border-radius: 0;
border: 1px solid #b7b7b7;
transition: .2s;
}
.cont {
width: 100%;
height: 40px;
background-color: #51C9A6;
border: none;
cursor: pointer;
opacity: 0.9;
margin-top: 3%;
display: inline-block;
}
.textfor{
font-size: 20px;
color: #fff;
}
.option{
display: inline-block;
}
.cont_promo {
width: 7%;
height: 30px;
background-color: #51C9A6;
border: none;
cursor: pointer;
opacity: 0.9;
margin-top: 3%;
display: inline-block;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="brandName"><a href="Header.html"><img style="width:70%;height: 50%;margin:0.5% 5%;" src="https://static.oxinis.com/healthmug/image/healthmug/healthmug-logo-bright.png" alt="Healthmug Logo"></a></div>
<p style="color: #F4F4F4;margin: auto 2%;">Need help? Call 7838389846</p>
<div class="checkoutTopIconWrap">
<div class="checkoutTopIcon secureCheckout"><i class="fa fa-lock"></i> <p><span>SECURE</span><br /><span>PAYMENTS</span></p></div>
<div class="checkoutTopIcon easyReturenCheckout"><i class="fa fa-refresh"></i> <p><span>EASY</span><br /><span>RETURN</span></p></div>
<div class="checkoutTopIcon genuineProductCheckout"><i class="fa fa-star"></i> <p><span>GENUINE</span><br /><span>PRODUCTS</span></p></div>
<div class="checkoutTopIcon buyProtectCheckout"><i class="fa fa-shield"></i> <p><span>100% BUYER</span><br /><span>PROTECTION</span></p></div>
</div>
</div>
<div class="checkOut">
<div class="email_1">
<div class="stepTitle">
<p class="head">1 ✔ Product added in cart Successfully</p>
</div>
<div id="medicine" class="line">
</div>
<div class="stepTitle">
<p class="head">2 ✔ Order Summary </p>
</div>
<div style="font-size: 20px;margin-left: 1%;">Total Quantity:<span style="font-size: 15px; font-weight: bolder; margin-left: 2%;" id="add"></span></div>
<div style="font-size: 20px;margin-left: 1%;">Total Price: ₹<span style="font-size: 20px; font-weight: bolder; margin-left: 1%;" id="add_qunt"></span></div>
<form onsubmit="check(event)" id="input" action="">
<input style="width: 20%;margin-left: 1%;" type="text" id="promo" placeholder="Please Enter Here promo"/>
<input class="cont_promo " style="color: #F4F4F4;font-size: 14px;" type="submit"/>
</form>
<div class="stepTitle">
<p class="head">Select Payment Method</p>
</div>
<div class="paymentBox">
<p style="font-size: 20px;color: #40424c;" >Accepted Cards</p>
<img style="width: 50%;" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ12vBiuu4-5dVskmyF3PW7IfOJ6ZBC6s5dfA&usqp=CAU"/>
<form class="form_1" >
<p>Name on the Card</p><input class="a" type="text" placeholder="Name on the Card"/>
<p>Card Number</p><input class="a" type="number" placeholder="xxxx-xxxx-xxxx-xxxx" />
<p>CVV</p><input style="width: 20%;" type="password" placeholder="***"/>
<div class="option">
<div class="option">
<label >Expiry Month/Year</label>
<select style="height: 20px;width: 60px;">
<option value="Select">Select</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="Septeber">Septeber</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</div>
<div class="option">
<label></label>
<select style="height: 20px;width: 50px;">
<option value="Select">Select</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>
<option value="2026">2026</option>
<option value="2027">2027</option>
<option value="2028">2028</option>
</select>
</div>
</div>
<button type="submit" class="cont"><a href="popup.html" class="textfor">Pay ><span></span></a></button>
</form>
</div>
</div>
</body>
</html>
<script>
let parent = document.getElementById('medicine');
let cart = JSON.parse(localStorage.getItem("cart"))
console.log(cart);
function showProducts() {
cart.forEach(function (product){
let div = document.createElement("div");
let img = document.createElement("img");
img.src = product.img;
let product_prize = document.createElement("p");
product_prize.textContent = product.price;
product_prize.style.fontSize="20px"
product_prize.style.textAlign="center"
let product_name = document.createElement("p")
product_name.textContent = product.name;
product_name.style.fontSize="15px"
product_name.style.textAlign="center"
let addtocart_btn = document.createElement("button");
addtocart_btn.innerText = "Add to cart";
addtocart_btn.onclick = function () {
addtoCart(product);
};
parent.append(div);
});
var num = document.createElement("h1");
num.textContent = cart.length;
let added = document.getElementById("add");
added.append(num);
let pr = document.getElementById("pr");
var total = 0;
let total_pr =JSON.parse(localStorage.getItem("cart"));
total_pr.forEach(function(total_pr){
total=total + +total_pr.price;
});
add_qunt.append(total);
console.log(total);
}
function check(e) {
e.preventDefault();
let inp = document.getElementById("input");
let code = inp.promo.value;
let mon = document.getElementById("add_qunt");
if(code==="masai30"){
mon.textContent=Math.floor(mon.textContent * 0.7);
} else {
alert("Please Enter Valid Promo Code")
}
let pro = document.getElementById("promo");
inp.promo.value="";
}
showProducts();
</script>