-
Notifications
You must be signed in to change notification settings - Fork 2
/
cart.html
261 lines (213 loc) · 15.4 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
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
<!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">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<title>Online Supermarket & Premium Grocery Shopping Store in India -... naturebasket.co.in</title>
<link rel="stylesheet" href="home.css">
<link rel="stylesheet" href="home.js">
<link rel="stylesheet" href="cart.js">
<link rel="stylesheet" href="cart.css">
</head>
<body>
<div id="parent">
<div id="heading">
<div id="image">
<img src="https://www.naturesbasket.co.in/Images/logosnew.png?v=2"/>
</div>
<div id="search" >
<div id="type">
<div>Online Slots Availability |</div>
<div>fresh & Fast |</div>
<div>Store Locator |</div>
<div>Contact us |</div>
</div>
<div id="address">
<div id="pin"><input type="number" placeholder="✎Enter pin"></div>
<div id="location">
<select>
<option>Mumbai</option>
<option>Pune</option>
<option>Delhi</option>
<option>Kolkatta</option>
<option>Thane</option>
<option>Bengaluru</option>
</select></div>
<div ><input type="text" id="stab" placeholder=" Start shopping..."></div>
<div ><img id="simg" src="https://www.naturesbasket.co.in/Images/search-button.jpg"></div>
</div>
</div>
<div id="user">
<div id="userlogin">
<div><a style="text-decoration: none;color:black;" href="login.html">Login |</a></div>
<div><a style="text-decoration: none;color:black;" href="register.html">Register</a></div>
</div>
<div id="starbasket">
<div ><img style="margin-left: 40%;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsJCQcJCQcJCQkJCwkJCQkJCQsJCwsMCwsLDA0QDBEODQ4MEhkSJRodJR0ZHxwpKRYlNzU2GioyPi0pMBk7IRP/2wBDAQcICAsJCxULCxUsHRkdLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCz/wAARCADrASgDASIAAhEBAxEB/8QAGwABAQADAQEBAAAAAAAAAAAAAAECBQYEAwf/xAA+EAACAQIEAwQGBwcEAwAAAAAAAQIDEQQSMVEFIXETIkGBMkNSYWKxBkJykaHB8BQjM1OCorJjc5LRROHx/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAUGAgMEBwH/xAAvEQEAAgECBAQGAQQDAAAAAAAAAQIDBBEFEiExE0FRcQYiMmGxweEUgZHRQqHw/9oADAMBAAIRAxEAPwD9Wbd3zeovLdkerAFvLdkvLdgAW8t2Ly3ZAAvLdi8t2AAvLdi8t2CAW8t2Ly3YAFvLdkvLdgAW8t2S8t2ABby3ZLy3YAC8t2Ly3Z5/27h2fs/2qhm0sprXa+n4noMKZK3+mYl8i0T2lby3ZLy3YBm+reW7JeW7AAt5bsl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9QkcWlpj695AATTrAAAAAAAADw4vheCxd5OPZ1X6ylZN/aWjPcDTmwY89eTLWJhhalbxtaN3I4vheNwmaTj2lJespJtJfFHVHhO8Ndi+EYLE3nFdjVfNypJZZP4oaFT1nw7P16Wf7T+pR2XQ+eNyh1/C3J8PwLlr2K/43eX8DX0fo9FSTxGIz00+cKcMmb3Sk2+RvEoxUYxSUUkopckkuSSOngfDs+lvbJmjbeNtmejwXxzNrKAC0pEAAAAAAABVquoItV1AB6vqDOy2GWOwGAM8sdhljsBgDPLHYZY7AYAzyx2GWOwGBD6ZY7DLHYDAGeWOwyx2AwBnljsMsdgMAZ5Y7DLHYDAGeWOwyx2AwBnljsMsdgMAZ5Y7DLHYDAGeWOwyx2AwBnljsMsdgMAZ5Y7DLHYDAGeWOwyx2AwBnljsMsdgMAZ5Y7DLHYDAGeWOwyx2AwWq6gzstgB//2Q=="></div>
<div><img src="https://th.bing.com/th/id/OIP.xOhzzARIYSQn_-Un5FB1OQHaHa?w=173&h=180&c=7&r=0&o=5&dpr=1.25&pid=1.7"></div>
</div>
</div>
</div>
<!-- ---------------------------------------------------------------heading completed -->
<div id="category">
<div id="heading2">
<div id="SHOPBYCATEGORY" value="SHOP BY CATEGORY">
<select id="sel">
<option><span>SHOP BY CATEGORY</span> <span><img src="https://www.naturesbasket.co.in/Images/menuicon1.png"></span></option>
<option>Wine & Beer</option>
<option>Gift Hampers</option>
<option>Fruits & Vegetables</option>
<option>Cheese, Meat & Fruit Platters </option>
<option>Delicatessen & Cheese</option>
<option>International Cuisine</option>
<option>Health</option>
<option>Indian Grocery</option>
<option>Confectionary & Patisserie</option>
<option>Meats, Seafood And Eggs</option>
<option>Snack Bar</option>
<option>Snack & Beverages</option>
<option>Breakfast, Diary & Bakery</option>
<option>Instant Meals & Aids</option>
<option>The Good Food Cafe</option>
<option>Packing Material</option>
</select>
</div>
<div><SPan>PAST PURCHASES</span></div>
<div>GIFTING</div>
<div>REWARDS</div>
<div>BLOG</div>
<div>OFFERS</div>
<div><sapn>CONNOISSEUR'S SELECTION</sapn></div>
<div><sapn>BOOK STORE</sapn></div>
</div>
<!-- -_-------------------------------------------------------------000 -->
<div id="carousel">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
<li data-target="#myCarousel" data-slide-to="5"></li>
<li data-target="#myCarousel" data-slide-to="6"></li>
<li data-target="#myCarousel" data-slide-to="7"></li>
<li data-target="#myCarousel" data-slide-to="8"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/0f2301bb-4607-47f9-859c-1c2c21642159_1320x376.jpg" alt="Chania">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/d923ad74-9f00-45a0-b19f-4af69eb07df6_1320x376.jpg" alt="Chicago">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/5658ebaa-f296-4121-991c-c2009109e764_1320x376.jpg" alt="Chicago">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/172ece1d-70d5-44d5-a5f4-0d236c1d815a_1320x376.jpg" alt="Chicago">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/69fbb757-9d70-45c0-9875-14c8b4f18804_1320x376.jpg" alt="Chicago">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/29e5f6d0-7087-49d0-bd5a-dab151d860de_1320x376.jpg" alt="New York">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/4c720a91-f8f7-437a-bbfd-71e63580e802_1320x376.jpg" alt="New York">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/69fbb757-9d70-45c0-9875-14c8b4f18804_1320x376.jpg" alt="New York">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://d1z88p83zuviay.cloudfront.net/BannerImages/82a1ea7f-02c2-4192-b0d7-588973fa8d14_1320x376.jpg" alt="New York">
<div class="carousel-caption">
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<h1 style="color: grey;">_______________________________________________________________________________</h1>
<div id="products">
</div>
<div id="total">
</div>
</div>
</body>
</html>
<script>
var cartLSData = JSON.parse(localStorage.getItem("masai-cart")) ||[];
totalprice(cartLSData);
function totalprice(data){
var add=0;
var tp=document.createElement("h2");
data.forEach(function(element){
add+=+(element.price);
});
console.log(add);
tp.append("Total Price - "+add)
total.append(tp);
window.location.reload()
}
function display(data){
products.innerHTML=null;
data.forEach(function(element){
var card=document.createElement("div");
var img=document.createElement("img");
img.src=element.img;
var title=document.createElement("p");
title.textContent=element.time;
var name=document.createElement("h3");
name.textContent=element.name;
var price=document.createElement("h4");
price.textContent=element.price;
var button=document.createElement("button");
button.innerText="Delete";
button.addEventListener("click",function(event){
Delete(element.productID);
});
card.append(img,title,name,price,button);
products.append(card);
})
}
display(cartLSData);
function Delete(id){
cartLSData=cartLSData.filter(function(element){
return element.productID !=id;
})
display(cartLSData);
localStorage.setItem("masai-cart",JSON.stringify(cartLSData));
alert("deleted");
}
</script>