-
Notifications
You must be signed in to change notification settings - Fork 0
/
shipping.html
537 lines (524 loc) · 16.7 KB
/
shipping.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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!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>Shipping</title>
<link rel="icon" type="image/x-icon" href="https://img.shop.com/Image/resources/logos/shop-s-logo-icon.svg">
<style>
*{
padding: 0px;
margin: 0px;
font-family: Roboto,Arial,Helvetica,sans-serif;
}
#navbar{
display: flex;
background: #f0f1f7;
-webkit-box-shadow: 0 0 8px #202340;
box-shadow: 0 0 8px #202340;
padding: 5px 10px;
top: 0;
width: 100%;
z-index: 10;
justify-content: space-between;
padding-top: 7.5px;
margin-bottom: 50px;
}
#navbar>img{
width: 200px;
}
#navbar>a{
margin-right: 30px;
margin-top: 4px;
color: black;
font-weight: bolder;
color: #202340;
font-family: Roboto,Arial,Helvetica,sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
}
#navbar>a:hover{
color:#00a8ca ;
text-decoration: none;
}
/* mid css */
#mid{
display: block;
/* margin-top: 30px; */
justify-content: center;
/* border: 1px solid black; */
/* border: 5px solid black; */
width: 1400px;
margin:auto
}
.Checkout{
display: flex;
width: 1200px;
justify-content: space-between;
align-items: center;
margin-block-start: 0.67em;
margin-block-end: 0.67em;
margin-inline-start: 0px;
margin-inline-end: 0px;
margin: auto;
padding: 27px;
}
.Checkout>h1{
display: block;
font-size: 2em;
font-weight: bold;
}
.threebuttons{
display: flex;
width: 1200px;
align-items: center;
margin: auto;
}
.threebuttons button{
font-size: 20px;
padding:8px 10px 8px 10px;
background-color: #F0F1F7;
border-radius: 5px;
/* gap: 25px; */
margin-right: 10px;
}
.threebuttons>:nth-child(2){
background-color: #545871;
color:white;
}
/* mid-bottom css */
#bottom{
display: flex;
padding-left: 15px;
justify-content: space-between;
margin: 0 40 40 40px;
}
#left{
width:60%;
}
#left1{
display: flex;
justify-content: space-between;
background-color: #e0e1e6;
padding:10px;
font-size: 15px;
}
.right{
margin-right: 50px ;
width: 400px;
}
#right1{
margin-top: 20px;
font-weight: 600;
color: #545871;
}
#right2{
margin-top: 5px;
}
#right3{
display: flex;
justify-content: space-between;
padding-right: 5px;
margin-top: 20px;
}
#right3a,#right3b{
font-size: 19px;
font-weight: 700;
color: #202340;
}
#right4{
display: flex;
justify-content: space-between;
margin-top: 20px;
padding-right: 5px;
}
#right4a,#right4b{
font-size: 14px;
/* font-weight: 700; */
color: #202340;
}
#right5{
background-color: teal;
margin-top: 10px;
height: 2px;
}
#right6{
width: 90%;
text-align: center;
font-size: 20px;
background-color: #414467;
color: white;
margin-left: 20px;
padding-top: 5px;
padding-bottom: 5px;
margin-top: 10px;
border-radius: 30px;
margin-bottom: 20px;
}
#rightl1{
color: #545871;
font-size: xx-large;
}
#right2a,#right201,#right204{
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
#right7 button{
background-color: #414467;
border-radius: 20px ;
color: white;
font-weight: bold;
font-size: large;
padding: 10px;
margin-left: 129px;
}
#right8{
margin-left: 5px;
margin-top: 19px;
background-color: #F0F1f7;
color:#202340;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
}
/* footer */
/* cart footer */
#cart-footer{
width: 100%;
display: flex;
justify-content: space-between;
background: #f0f1f7;
border-top: 2px solid #bfc1cd;
position: absolute;
left: 0;
padding: 10px;
box-sizing: border-box;
margin-top: 100px;
}
#cart-footer p{
font-size: 12px;
}
#cart-footer a{
text-decoration: none;
color: inherit;
}
#cart-footer div:last-child{
text-align: end;
}
#cart-footer img{
width: 25%;
}
#cart-footer p:last-child:hover{
color: #00a8ca;
cursor: pointer;
}
/* adress box */
#boxx{
display: flex;
border: 1px dashed #545871;
gap: 10px;
padding: 10px;
font-style: italic;
margin-top: 10px;
margin-bottom: 10px;
}
#boxx1 p{
margin: 2px;
}
#boxx1{
display: flex;
flex-direction: column;
}
/* CART */
#box12{
display: flex;
align-items: center;
gap: 20px;
border: 1px dashed gray;
margin: 10px;
}
#box12>img{
width:20%;
}
#boxx12>:nth-child(3){
/* width:20%; */
font-size: medium;
color:rgb(88, 85, 85);
font-weight: bold;
margin-bottom: 6px;
}
#boxx12>:nth-child(4){
/* width:20%; */
font-size: small;
color:rgb(66, 64, 64);
font-weight: bold;
}
#boxxxx12{
display: flex;
margin: 5px;
font-size: small;
margin-left:-1px;
font-style: italic;
}
#boxxxx12>img{
width:2%;
}
#boxx12{
/* border: 1px solid red; */
width: 75%;
}
#boxxx12{
/* border: 1px solid red; */
display: flex;
width: 100%;
gap: 10px;
justify-content: space-between;
padding: 10px;
margin-left:-10px;
}
#price111{
color:rgb(35, 37, 37);
font-weight: bold;
}
@media screen and (max-width: 700px) {
#bottom{
display: flex;
flex-direction: column;
padding-left: 15px;
}
hr{
width: 90%;
}
br+hr{
width: 54.5%;
}
#right4,#right3,#right5,#boxx{
width: 48%;
}
#right6{
width:20%;
margin-left: 28%;
margin-bottom: 20px;
}
#left1{
width: 45%;
}
#checkout{
width: 45%;
/* background-color: #00a8ca; */
margin-left: 0px;
}
.threebuttons{
width: 45%;
/* background-color: #00a8ca; */
margin-left: 30px;
}
#right7,#right8,#right9{
margin-top: 10px;
width: 45%;
text-align: center;
}
#left1{
width:77%
}
#productinfo{
width:77%
}
#box4{
width: 317%;
margin-bottom: 20px;
}
#line4a{
margin-top: 20px;
}
#right{
width:300%
}
#right3,#right4,#right5,#right7{
width:125%
}
#right204,#right201,#right2a,#right{
width: 125%;
}
#right207,#right2{
width:125%
}
/* #right8{
margin-top: 4px;
margin: auto;
} */
}
</style>
</head>
<body>
<!-- TOP SECTION -->
<div id="navbar">
<img src="https://img.shop.com/Image/resources/logos/shop-logo-us.svg" alt="shop.com logo" onclick="fun1()">
<a href="./project.html" onclick="fun1()">Continue Shopping</a>
</div>
<!-- MIDDLE SECTON -->
<div id="mid">
<div class="Checkout" id="checkout">
<h1>Checkout</h1>
<p style="font-size: 1.05em;">Order Total: $<span id="total">0.00</span> </p>
</div>
<div class="threebuttons">
<button>Address</button>
<button>Shipping</button>
<button>Payment</button>
</div>
<br>
<hr>
<br>
<h2 style="color: #545871;margin-left: 14px;">Seven Times Six Shipment</h2>
<br>
<div id="bottom" >
<div id="left">
<hr>
<br>
<div id="left1">
<p>
<img src="https://cdn.pixabay.com/photo/2016/04/01/10/09/black-and-white-1299789_960_720.png" alt="truck" style="width: 20px;"> Congratulations! Your order qualifies for free shipping from Seven Times Six.
</p>
<a href="#">Learn More <img src="https://cdn.pixabay.com/photo/2016/03/31/19/13/information-1294813_960_720.png" alt="i" style="width:14px;"> </a> <p> or </p>
<a href="#">Go to this storefront</a>
</div>
<br>
<div id="productinfo">
<!-- filled via js -->
</div>
</div>
<div class="right">
<p id="line4a">Shipping Address</p>
<div id="box4">
</div>
<div id="right">
<h2 id="rightl1">Order Summary</h2>
<hr id="right2">
<br>
<div id="right2a">
<p id="right2aa">Items Subtotal:</p>
<p id="right2ab">$<span id="total">0.00</span></p>
</div>
<div id="right201">
<p id="right202">Tax Total:</p>
<p id="right203">$<span id="tax">0.00</span></p>
</div>
<div id="right204">
<p id="right205">Shipping:</p>
<p id="right206">FREE</p>
</div>
<hr id="right207">
<div id="right3">
<p id="right3a">Order Total:</p>
<p id="right3b">$<span id="total">0.00</span></p>
</div>
<div id="right4">
<p id="right4a"> <img src="https://img.shop.com/Image/resources/images/cashback-icon.svg" alt="$" style="width: 13px;"> Cashback earned on this order:</p>
<p id="right4b">$1.29</p>
</div>
<hr id="right5">
<br>
<div id="right7">
<a id="right7a" href="./address.html" style="color: black;"> <img src="https://cdn.pixabay.com/photo/2012/04/10/23/37/arrow-27066_960_720.png" alt="$" style="width: 13px;"> Address</a>
<a href="./payment.html"> <button style="cursor:pointer;" id="right7b">Continue Checkout</button></a>
</div>
<p id="right8">Let us know how we are doing <a href="#" style="color: #545871;">Send Feedback</a>
</div>
</div>
</div>
<!-- footer -->
<div id="cart-footer">
<div class="dis">
<p>© 1997-2023 Market America, Inc. or its affiliates. All other designated trademarks, copyrights, and
brands are the property of their respective owners. (famos-p11)</p>
<p>Privacy Policy | Terms of Use | Advertising Disclosure | Return Policy | Shipping Information</p>
</div>
<div>
<a href="">
<img src="https://www.aiowork.com/wp-content/uploads/2021/06/digicert-ssl-certificate.png" alt="">
</a>
</div>
</div>
</body>
</html>
<script>
var address=JSON.parse(localStorage.getItem("address-form"))
var arr=JSON.parse(localStorage.getItem("cart-list"))||[]
function Display(brr){
// event.preventDefault();
console.log("hi")
brr.map(function(ele){
var div1=document.createElement("div")
div1.setAttribute("id","box12")
var img=document.createElement("img")
img.setAttribute("src",ele.image_url);
var img1=document.createElement("img")
img1.setAttribute("src","https://img.shop.com/Image/resources/images/cashback-icon.svg");
var name= document.createElement("h3")
name.textContent=ele.name;
var price=document.createElement("p")
price.setAttribute("id","price111")
price.innerText="$"+ele.price;
var ratio=document.createElement("p")
ratio.innerText= ele.strikedoffprice;
var category=document.createElement("p")
category.textContent= "Category: "+ele.category;
var sold=document.createElement("p")
sold.textContent= "Merchant:"+ele.merchant;
var div2=document.createElement("div")
div2.setAttribute("id","boxx12")
var div3=document.createElement("div")
div3.setAttribute("id","boxxx12")
var div4=document.createElement("div")
div4.setAttribute("id","boxxxx12")
div4.append(img1,ratio)
div3.append(name,price)
div2.append(div3,div4,category,sold)
div1.append(img,div2)
document.getElementById("productinfo").append(div1)
var total= brr.reduce(function(elem1,curr){
return Number(elem1) + (Number(curr.price)*Number(curr.quantity));
},0)
localStorage.setItem("total-payment",total)
localStorage.setItem("local-subtotal",total)
document.querySelector("#total").textContent=total
var x=(total*0.2).toFixed(1);
document.querySelector("#tax").textContent=x
document.querySelector("#right2ab>#total").textContent=(total-x).toFixed(1);
document.querySelector("#right3b>#total").textContent=total
})
}
Display(arr)
showaddress(address)
function showaddress(obj){
console.log("hi",address)
var div1=document.createElement("div")
div1.setAttribute("id","boxx")
// var input=document.createElement("input")
// input.setAttribute("type","radio")
var name=document.createElement("p")
name.innerText=obj.firstname1+" "+obj.lastname1;
var address= document.createElement("p")
address.textContent=obj.address1;
var city=document.createElement("p")
city.innerText=obj.city1;
var state=document.createElement("p")
state.innerText= obj.state1;
var zip=document.createElement("p")
zip.textContent= obj.zip1;
var phone=document.createElement("p")
phone.textContent= obj.phone1;
var div2=document.createElement("div")
div2.setAttribute("id","boxx1")
div2.append(name,address,city,state,phone)
div1.append(div2)
document.getElementById("box4").append(div1)
}
function fun1(){
window.open("../project.html","_self")
}
</script>