-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddress.html
368 lines (361 loc) · 10.9 KB
/
address.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" type="image/x-icon" href="https://img.shop.com/Image/resources/logos/shop-s-logo-icon.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Address</title>
<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;
justify-content: center;
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>:first-child{
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;
}
.right{
border: #00a8ca;
margin-right: 50px ;
}
#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: 16px;
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;
}
#right8{
margin-top: 10px;
}
#right8 a,#right9 a{
color:#414467;
font-size: small;
}
#right8 ,#right9 {
/* color:#414467; */
font-size: small;
}
#right9{
margin-left: 20px;
margin-top: 20px;
background-color: #F0F1f7;
color:#202340;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
width:400px;
text-align: center;
}
/* 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;
}
#boxx1 p{
margin: 2px;
}
#boxx1{
display: flex;
flex-direction: column;
}
@media screen and (max-width: 700px) {
#bottom{
display: flex;
flex-direction: column;
padding-left: 15px;
}
hr{
width: 48%;
}
#right4,#right3,#right2,#right5,#boxx{
width: 48%;
}
#right6{
width:20%;
margin-left: 28%;
margin-bottom: 20px;
}
#rightl1{
margin-top: 30px;
}
#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;
}
}
</style>
</head>
<body>
<!-- TOP SECTION -->
<div id="navbar">
<img style="cursor:pointer" src="https://img.shop.com/Image/resources/logos/shop-logo-us.svg" alt="shop.com logo" onclick="fun1()">
<a style="cursor:pointer" 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 id="line33">
<br>
<div id="bottom" >
<div id="left">
<div id="left1">
<p id="line4a" style="font-weight: bold;">Shipping Address</p>
<a id="line4b"style="cursor:pointer; color:#2E2C38 ;" href="./shipping address form.html" >add address</a>
</div>
<br>
<p id="address" href="" >Choose Address</p>
<!-- address fill via js -->
</div>
<div class="right">
<h2 id="rightl1">Order Summary</h2>
<hr id="right2">
<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="cashback-icon" style="width: 14px;"> Cashback earned on this order:</p>
<p id="right4b">$1.29</p>
</div>
<hr id="right5">
<a href="./shipping.html"><button style="cursor:pointer;" id="right6">Continue Checkout</button></a>
<p id="right7">By clicking continue, you agree to the SHOP.COM</p>
<p id="right8"><a href="#">Terms of Use</a> and <a href="#">Privacy Policy</a>.</p>
<p id="right9">Let us know how we are doing <a href="#">Send Feedback</a></p>
</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>
// localStorage.setItem("total-payment",JSON.parse(localStorage.getItem("local-subtotal")))
total=JSON.parse(localStorage.getItem("local-subtotal"))||0
document.querySelector("#total").textContent=total
document.querySelector("#right3b>#total").textContent=total
var address=JSON.parse(localStorage.getItem("address-form"))
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(input,div2)
document.getElementById("left").append(div1)
}
function fun1(){
window.open("../project.html","_self")
}
</script>