forked from soumyanil22/Group_project_bobbi_brown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshipping.html
357 lines (242 loc) · 15.4 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
<!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 page</title>
<link rel="stylesheet" href="shipping.css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web&display=swap" rel="stylesheet">
-->
</head>
<body>
<div id="heading"><p>B O B B I B R O W N</p></div>
<div id="box">
<div id="checkout">
<div class="headingc"><p style="font-weight: bolder;
font-size: 20px;
font-family: BBText Bold,Helvetica,Arial,sans-serif; margin-left: 20px;padding-top: 20px;">C H E C K O U T</p></div>
<div class="mail" style="background-color:rgb(231, 225, 225)"><p style="font-weight: bolder;margin-left: 20px;">E M A I L</p></div>
<div class="mail" ;"><p style="font-weight: bolder;margin-left: 20px;">rkapade26@gmail.com</p></div>
<div class="mail" style="background-color:rgb(231, 225, 225)"><p style="font-weight: bolder;margin-left: 20px;">S H I P P I N G</p></div>
<div id="shippingform" >
<form id="adddetails">
<input id="fname" class="name" type="text" placeholder="* First Name" value="">
<input id="lname" class="name" type="text" placeholder="* Last Name" value=""><br>
<input class="address" id="address1" type="text" placeholder="* Street Address">
<input class="address" id="address2" type="text" placeholder="* Apt, Suit, unit, floor etc (Optional)">
<input class="add" id="address3" type="number" placeholder="* Zipcode" ><input class="add" id="address4" type="text" placeholder="* City">
<select id="state">
<option value="none" >Select State</option>
<option value="California">California</option>
<option value="Washington">Washington</option>
<option value="New York">New York</option>
<option value="Los Angeles">Los Angeles</option>
<option value="Chicago">Chicago</option>
</select>
<p style="font-size: 14x;margin-left: 15px; margin-top: -10px;">Location <br>United States</p>
<p style="font-size: 12px;margin-left: 15px;margin-top: -10px;">*Shipping limited to United States addresses only</p>
<input id="phone" style="height: 40px; width: 40%;margin-left: 15px;margin-top: 10px;" type="number" placeholder="* Phone Number" >
<div class="freeship"><p style="font-weight: bolder;
font-size: 14px;
font-family: BBText Bold,Helvetica,Arial,sans-serif; margin-left: 20px; margin-top: 25px;
margin-bottom: -30px;">S I G N U P</p></div>
<div id="su">
<input type="checkbox" style="margin-top: 20px;"><p style="font-size: 16px;">I'd like to receive recurring advertising text messages (SMS and MMS) from Bobbi Brown. I understand these text messages may be sent via an autodialer, that consent is not required to purchase goods from Bobbi Brown, and that I can opt-out any time by replying STOP to the text message I receive from Bobbi Brown. I can text HELP for more information. Msg and data rates may apply. If I am a California resident, I agree to the Notice of Financial Incentive. To learn more, view our
<a href="https://www.bobbibrowncosmetics.com/privacy-policy">Privacy Policy</a>.</p>
</div>
<input type="submit" id="subbtton">
</form>
<div class="mail" style="background-color:rgb(231, 225, 225)"><p style="font-weight: bolder;margin-left: 20px; margin-top: 15px;" >P A Y M E N T</p></div>
<div class="mail" style="background-color:rgb(231, 225, 225)"><p style="font-weight: bolder;margin-left: 20px;">C O M P L E T E O R D E R</p></div>
<p style="font-size: 16px;margin-left: 15px;">By clicking Place Order, I agree to be bound by the Bobbi Brown Cosmetics Terms and Conditions and <a href="https://www.bobbibrowncosmetics.com/privacy-policy">Privacy Policy</a>.</p>
<div class="freeship"><p style="font-weight: bolder;
font-size: 14px;
font-family: BBText Bold,Helvetica,Arial,sans-serif; margin-top: 25px;
margin-bottom: -30px;">O U R G U A R A N T E E</p></div>
<div id="su">
<p style="font-size: 16px;margin-left: 10px;margin-right:20px ;">If for any reason you are not completely satisfied with your Bobbi Brown Online purchase, simply return the unused portion and we will be happy to process an exchange or remit your account for the full amount of the purchase. Please refer our Return Policy.</p>
</div>
</div>
</div>
<div id="Reward" >
<div id="bag">
<div id="innerbag">
<div style=" border-bottom: 1px black solid;"><p style="font-weight: bolder; margin-top: 15px;" >S H O P P I N G B A G</p></div>
<div class="mail";" id="noofitems" ><p style="font-weight: bolder;"></p></div>
<div class="mail" style=" border-bottom: 1px black solid;">
<h2 style=" font-family: 'Titillium Web', sans-serif;">O F F E R C O D E</h2></div>
<input type="text" style="width: 96%;height: 35px;border-color: 1px grey;margin-top: 30px; padding-left: 10px; " placeholder="Offer Code">
<div style="display: flex; justify-content: space-between;">
<p >One offer code per order</p>
<a href="https://www.bobbibrowncosmetics.com/includes/content/see_all_offers_popup.tmpl?embed=1" style="font: size 11px; color:#949494; margin-top: 15px;">See all other offers</a>
</div>
<button style="height: 30px ;width: 100px;margin-top: 15px;color: white;background-color: black;font-weight: bolder;">APPLY</button>
<div style="width: 100%; border-bottom:1px solid black;margin-top: 20px;"></div>
<div id="lastbox"><p style="margin-top: 10px;"> Join BB Access <br> and earn 30 points with your purchase today.</p>
</div>
</div>
</div>
<!-- -------------------------------------------------------------------- -->
<div id="donate" class="mail" style="border-bottom: 1px black solid;border-top: 0px;"><h2 style="font-family: 'Titillium Web', sans-serif;">D O N A T E</h2>
<div style="border-bottom: 1px solid black;width: 100%;margin-top: -8px;">
</div>
<img src="https://www.bobbibrowncosmetics.com/media/export/cms/products/80x80/bb_prod_555877_80x80_0.jpg" alt="">
<select type="text" style="width:96%; height: 28px;"><option value="">BCRF DONATION</option>
<option value="">SHE'S THE FIRST</option></select> <div style="height: 200px;width: 100%;"><p>Donate today to The Breast Cancer Research Foundation to support life-saving research. Learn More about BCRF.</p>
<input type="radio" name="donation"><label for="donat">$1.00</label>
<input type="radio" name="donation" ><label for="donat">$5.00</label>
<input type="radio" name="donation" ><label for="donat">$10.00</label><br><br>
<button id="subbtton" style="margin-left: 2px;">Add to Bag</button>
</div>
</div>
<!-- -------------------------------------------------------------------------------- -->
</div>
</div>
<div id="footer">
<div class="foot"><p>© Bobbi Brown Professional Cosmetics, Inc. All worldwide rights reserved.</p></div>
<div class="foot">
Terms & Conditions <br><br>
Interest Based Ads <br><br>
California Do Not Sell My Personal Information <br></div>
<div class="foot"> Privacy Policy <br><br>
Accessibility</div>
<img src="https://www.bobbibrowncosmetics.com/media/images/global/bobbi_access_icon.jpg" style="height: 20px;
width: 60px;margin-right: 100px;margin-top: 75px;" alt="">
</div>
</body>
</html>
<script>
var submission = document.querySelector("#adddetails").addEventListener("submit",myaddress)
// -------------------------------------------------------------------------------------------------------------------------
function myaddress(){
event.preventDefault();
var Name =document.createElement("p")
var addressp =document.createElement("p")
var statep =document.createElement("p")
var phonep = document.createElement("p")
Name.append(adddetails.fname.value+" "+adddetails.lname.value);
var innerstate = statep.innerText=document.querySelector("#state").value
var innernum = phonep.innerText=document.querySelector("#phone").value
var iname =Name.innerText=adddetails.fname.value+" "+adddetails.lname.value
var resiaddress = addressp.innerText=adddetails.address1.value+", "+adddetails.address2.value+", "+adddetails.address4.value+", "+adddetails.address3.value+", "
var storage =localStorage.setItem("username",iname)
localStorage.setItem("address",resiaddress)
localStorage.setItem("innerstate",innerstate)
localStorage.setItem("phoneno",innernum)
if ( iname==""+" "+"" || innernum=="" || resiaddress==", "+", "+", "+", "){
alert("Please enter all the details")
}
else {
window.location.href="payment.html"
}
}
// --------------------------------------------------------------------------------------------------------------
// cart details
var lsfinallength = localStorage.getItem("fulllength")
var lscartdata = JSON.parse(localStorage.getItem("cartData"));
Displayitems (lscartdata)
function Displayitems (cartData){
for (var i=0; i<cartData.length; i++){
var lscart = JSON.parse(localStorage.getItem("cartData"))
var innbag = document.querySelector("#innerbag")
var itemlength = document.querySelector("#noofitems")
itemlength.innerText=lsfinallength+" items"
itemlength.style="display:flex; justify-content:space-between; align-items:center"
var editcart = document.createElement("button")
editcart.innerText="EDIT"
editcart.style="height: 30px ;width: 70px;margin-top: 0px;color: white;background-color: black;font-weight: bolder;"
itemlength.append(editcart)
// var line = document.createElement("div")
// line.style="width=100%; border-bottom : 1px solid grey; margin-top:15px"
// innbag.append(line)
var items = document.createElement("div")
items.style="width=100%; height:100px;margin-top:20px; display:flex"
innbag.append(items)
var itemimg = document.createElement("img")
itemimg.style="width:auto;height:auto "
items.append(itemimg)
itemimg.src=cartData[i].img
// itemimg.append(cartData[i].img)
// -----------Append img in itemimg --------------
var iteminfo = document.createElement("div")
iteminfo.style="width:52%; font-size:15px; font-style:bold; margin-left:10px; display:flex; align-items:center"
items.append(iteminfo)
iteminfo.append(cartData[i].name)
// -----------Append info in iteminfo --------------
var pricequan = document.createElement("div")
pricequan.style="width:23%; display:flex; align-items:center; justify-content:center"
items.append(pricequan)
var sym = "€";
pricequan.append(sym + cartData[i].price)
var line = document.createElement("div")
line.style="width=100%; border-bottom : 1px solid grey; margin-top:15px"
innbag.append(line)
}
}
sumbuys = 0
for (var j=0; j<lscartdata.length; j++){
sumbuys = sumbuys + lscartdata[j].price
}
var sym = "€";
var lsfinalsum = localStorage.getItem("finalSum")
var innbag = document.querySelector("#innerbag")
var sumtotal = document.createElement("div")
sumtotal.style="width:100%; height:250px; margin-top:15px"
innbag.append(sumtotal)
var sumtotalh = document.createElement("div")
sumtotalh.style="width:100%; height:15px; display:flex;justify-content:space-between"
var sumtotalp = document.createElement("p")
sumtotalp.innerText="SUB TOTAL :"
sumtotalh.append(sumtotalp)
var sumtotaltotal = document.createElement("p")
sumtotaltotal.innerText=sym+(lsfinalsum-(lsfinalsum*6/100))
sumtotalh.append(sumtotaltotal)
sumtotal.append(sumtotalh)
// ---------------------------------------------
var time = document.createElement("div")
time.style="width:100%; height:15px; display:flex;justify-content:space-between;margin-top:10px"
var days = document.createElement("p")
days.innerText="Standard (3-5 days)"
time.append(days)
var free = document.createElement("p")
free.innerText="FREE"
time.append(free)
sumtotal.append(time)
// ------------------------------------------------
var tax = document.createElement("div")
tax.style="width:100%; height:15px; display:flex;justify-content:space-between;margin-top:10px"
var sales = document.createElement("p")
sales.innerText="Sales tax (6.000%)"
tax.append(sales)
var taxper = document.createElement("p")
var taxplus = taxper.innerText=sym+(lsfinalsum*(6/100))
tax.append(taxper)
sumtotal.append(tax)
// -------------------------------------------------
var ftotal = document.createElement("div")
ftotal.style="width:100%; height:15px; display:flex;justify-content:space-between;margin-top:10px"
var wtotal = document.createElement("p")
wtotal.innerText="TOTAL"
wtotal.style="font-weight:bolder"
ftotal.append(wtotal)
var totaln = document.createElement("p")
totaln.innerText=sym+(lsfinalsum)
totaln.style="font-weight:bolder"
ftotal.append(totaln)
sumtotal.append(ftotal)
// -----------------------------------------------------
var p1 = document.createElement("div")
p1.innerText="Pay $0 Now"
p1.style="margin-top:25px"
var p2 = document.createElement("div")
p2.innerText="First Payment 2 Weeks From Purchase"
var p3 = document.createElement("div")
p3.innerText="4 interest-free installments of $35.77 with"
var apimg = document.createElement("img")
apimg.src="https://www.bobbibrowncosmetics.com/media/images/checkout/afterpay-logo-black.png"
apimg.style="height:20px; width:90px"
sumtotal.append(p1,p2,p3,apimg)
</script>