-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnew 4.php
457 lines (373 loc) · 14.1 KB
/
new 4.php
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
<?php
session_start();
$mail=$_SESSION['alogin'];
$_SESSION['cart_total']=0;
$con=mysqli_connect("localhost","root","","db_dreams_project")or die ("Couldn't connect");
$viewprod="SELECT * FROM((tbl_seller_stock INNER JOIN tbl_seller_profile_brand ON tbl_seller_stock.seller_profile_brand_id = tbl_seller_profile_brand.seller_profile_brand_id) )INNER JOIN tbl_customer_cart ON tbl_customer_cart.stock_product_id=tbl_seller_stock.stock_product_id WHERE tbl_customer_cart.register_email='$mail' and tbl_seller_profile_brand.status='VALID' AND tbl_seller_stock.status='VALID' ";
$d_seller_prod=mysqli_query($con,$viewprod);
$subtotal=0;
?>
<!DOCTYPE html>
<html>
<head>
<title>Dreams|Customer Home</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Grocery Store Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet" type="text/css" media="all" />
<!-- //font-awesome icons -->
<!-- js -->
<script src="js/jquery-1.11.1.min.js"></script>
<!-- //js -->
<link href='//fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,500,500italic,700,700italic' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!-- start-smoth-scrolling -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- start-back button disable -->
<style>
.a_btn{
background-color: #f44336;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
}
.errmessage
{
color:red;
}
</style>
</head>
<body>
<!-- header -->
<div class="agileits_header">
<div class="w3l_offers">
<a href="customer_home.php">Dreams!</a>
</div>
<div class="w3l_search">
<form action="search_prod_action.php" method="POST">
<input type="text" name="product" id="product" placeholder="Search a product..." required>
<input type="submit" name="search" id="search" value=" ">
</form>
</div>
<div class="product_list_header">
<form action="view_cart.php" method="post" >
<fieldset>
<input type="submit" name="submit" value="View your cart" class="button" />
</fieldset>
</form>
</div>
<div class="w3l_header_right">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Welcome   <?php echo $mail ?>   <i class="fa fa-user" aria-hidden="true"></i><span class="caret"></span></a>
<div class="w3ls_vegetables">
<ul class="dropdown-menu drp-mnu">
<li><a href="customer_profile.php">View profile</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</div>
</li>
</ul>
<!-- </div> -->
</div>
<div class="clearfix"> </div>
</div>
<!-- script-for sticky-nav -->
<script>
$(document).ready(function() {
var navoffeset=$(".agileits_header").offset().top;
$(window).scroll(function(){
var scrollpos=$(window).scrollTop();
if(scrollpos >=navoffeset){
$(".agileits_header").addClass("fixed");
}else{
$(".agileits_header").removeClass("fixed");
}
});
});
</script>
<!-- //header -->
<!-- products-breadcrumb -->
<!-- //products-breadcrumb -->
<!-- banner -->
</br>
</br>
<div class="banner">
<div class="w3l_banner_nav_left">
<nav class="navbar nav_bottom">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header nav_2">
<button type="button" class="navbar-toggle collapsed navbar-toggle1" data-toggle="collapse" data-target="#bs-megadropdown-tabs">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</br>
</br>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-megadropdown-tabs">
<ul class="nav navbar-nav nav_1">
<li><a href="customer_update_profile.php">Update Profile</a></li>
<li><a href="customer_prod_view.php">Shop Now</a></li>
<li><a href="customer_home.php">View Orders</a></li>
<li><a href="customer_home.php">About us</a></li>
<li><a href="customer_home.php">Contact us</a></li>
</br>
</br>
</ul>
</div><!-- /.navbar-collapse -->
</div>
</nav>
</div>
<!-- login -->
<div class="w3l_banner_nav_right">
<!-- about -->
<div class="privacy about">
<h3>Your<span>Cart</span></h3>
<div class="checkout-right">
<h4>Your shopping cart contains:</h4>
<table class="timetable_sub">
<thead>
<tr>
<th>Brand Name</th>
<th>Product</th>
<th>Product Name</th>
<th>Quantity</th>
<th>Total Price</th>
<th>Remove</th>
</tr>
</thead>
<tbody>
<?php
while ($prod=mysqli_fetch_array($d_seller_prod))
{
?>
<tr class="rem1">
<td class="invert"><?php echo $prod['brand_name'] ?> </td>
<td class="invert-image"><a href="view_cart.php"><img src="seller/uploads/products/<?php echo $prod['img1'] ?>" alt="image" class="img-responsive"></a></td>
<td class="invert"><?php echo $prod['product_name'] ?></td>
<td class="invert">
<div class="quantity">
<form action="update_cart_qty.php" method="POST" >
<div class="quantity-select">
<div class="entry value" style="background-color:white;border:none">
<input type="text" value="<?php echo $prod['item_price'] ?>" name="item_price" id="item_price" hidden>
<input type="text" value="<?php echo $prod['customer_cart_item_id'] ?>" name="item_id" id="item_id" hidden>
<input type="number" name="qty" id="qty" min="1" max="<?php echo $prod['stock_item_count'] ?>" style="width: 3em;" value="<?php echo $prod['quantity'] ?>" required="required"/></div>
<div ><input type="submit" name="add_qty" id="add_qty" style="background-color:green;border:none; color:white; display: inline-block" Value="Update" ></div>
</div>
</form>
</div>
</td>
<td class="invert">Rs.<?php echo $prod['total_price'] ?></td>
<td class="invert">
<div class="rem">
<div class="close1">
<form action="delete_cart_item.php" method="POST" >
<input type="text" value="<?php echo $prod['customer_cart_item_id'] ?>" name="item_id" id="item_id" hidden>
<input type="submit" name="delete_item" id="delete_item" class="btn btn-danger btn-sm" value="" style="background-color: Transparent;border:none">
</form>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="checkout-left">
<div class="col-md-4 checkout-left-basket">
<h4><a href="checkout_prod.php"> Proceed to Buy</a></h4>
<ul>
<?php
$viewprice="SELECT * FROM((tbl_seller_stock INNER JOIN tbl_seller_profile_brand ON tbl_seller_stock.seller_profile_brand_id = tbl_seller_profile_brand.seller_profile_brand_id) )INNER JOIN tbl_customer_cart ON tbl_customer_cart.stock_product_id=tbl_seller_stock.stock_product_id WHERE tbl_customer_cart.register_email='$mail' and tbl_seller_profile_brand.status='VALID' AND tbl_seller_stock.status='VALID' ";
$d_cart_prod=mysqli_query($con,$viewprice);
$subtotal=0;
$i=1;
while ($prod1=mysqli_fetch_array($d_cart_prod))
{
?>
<li><?php echo $prod1['product_name'] ?> <i>:</i> <span>Rs.<?php $subtotal=$subtotal+$prod1['total_price'];
echo $prod1['total_price'] ?></span></li>
<?php $i=$i+1; } ?>
<li>Cart Total <i>:</i> <span>Rs.<?php
echo $subtotal;
$_SESSION['cart_total']=$subtotal;
?></span></li>
</ul>
</div>
<div class="col-md-8 address_form_agile">
</div>
<div class="clearfix"> </div>
</div>
</div>
<!-- //about -->
</div>
<div class="clearfix"> </div>
</div>
<!-- banner -->
</div>
</div>
<!-- //top-brands -->
<!-- fresh-vegetables -->
<div class="fresh-vegetables">
</div>
<!-- //fresh-vegetables -->
<!-- newsletter -->
<!--
<div class="newsletter">
<div class="container">
<div class="w3agile_newsletter_left">
<h3>sign up for our newsletter</h3>
</div>
<div class="w3agile_newsletter_right">
<form action="#" method="post">
<input type="email" name="Email" value="Email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" required="">
<input type="submit" value="subscribe now">
</form>
</div>
<div class="clearfix"> </div>
</div>
</div>
-->
<!-- //newsletter -->
<!-- footer -->
<div class="footer">
<div class="container">
<div class="col-md-3 w3_footer_grid">
<h3>information</h3>
<ul class="w3_footer_grid_list">
<li><a href="customer_home.php">About Us</a></li>
<li><a href="customer_home.php">Contact us</a></li>
</ul>
</div>
<div class="col-md-3 w3_footer_grid">
<h3>policy info</h3>
<ul class="w3_footer_grid_list">
<li><a href="customer_home.php">FAQ</a></li>
<li><a href="customer_home.php">privacy policy</a></li>
<li><a href="customer_home.php">terms of use</a></li>
</ul>
</div>
<div class="col-md-3 w3_footer_grid">
<h3>what in stores</h3>
<ul class="w3_footer_grid_list">
<li><a href="customer_home.php">Jewellery</a></li>
<li><a href="customer_home.php">Gift cards</a></li>
<li><a href="customer_home.php">Teddys and Toys</a></li>
<li><a href="customer_home.php">Paintings</a></li>
<li><a href="customer_home.php">Handy crafts</a></li>
</ul>
</div>
<!--<div class="col-md-3 w3_footer_grid">
<h3>twitter posts</h3>
<ul class="w3_footer_grid_list1">
<li><label class="fa fa-twitter" aria-hidden="true"></label><i>01 day ago</i><span>Non numquam <a href="#">http://sd.ds/13jklf#</a>
eius modi tempora incidunt ut labore et
<a href="#">http://sd.ds/1389kjklf#</a>quo nulla.</span></li>
<li><label class="fa fa-twitter" aria-hidden="true"></label><i>02 day ago</i><span>Con numquam <a href="#">http://fd.uf/56hfg#</a>
eius modi tempora incidunt ut labore et
<a href="#">http://fd.uf/56hfg#</a>quo nulla.</span></li>
</ul>
</div>
-->
<div class="clearfix"> </div>
<div class="agile_footer_grids">
<div class="col-md-3 w3_footer_grid agile_footer_grids_w3_footer">
<div class="w3_footer_grid_bottom">
<h4>100% secure payments</h4>
<img src="images/card.png" alt=" " class="img-responsive" />
</div>
</div>
<div class="col-md-3 w3_footer_grid agile_footer_grids_w3_footer">
<div class="w3_footer_grid_bottom">
<h5>connect with us</h5>
<ul class="agileits_social_icons">
<li><a href="#" class="facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
<li><a href="#" class="twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
<li><a href="#" class="google"><i class="fa fa-google-plus" aria-hidden="true"></i></a></li>
<li><a href="#" class="instagram"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li><a href="#" class="dribbble"><i class="fa fa-dribbble" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
<div class="clearfix"> </div>
</div>
<div class="wthree_footer_copy">
<p>© All rights reserved | Design by <a href="customer_home.php">Dreams online</a></p>
</div>
</div>
</div>
<!-- //footer -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$(".dropdown").hover(
function() {
$('.dropdown-menu', this).stop( true, true ).slideDown("fast");
$(this).toggleClass('open');
},
function() {
$('.dropdown-menu', this).stop( true, true ).slideUp("fast");
$(this).toggleClass('open');
}
);
});
</script>
<!-- here stars scrolling icon -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<!-- //here ends scrolling icon -->
<script src="js/minicart.js"></script>
<script>
paypal.minicart.render();
paypal.minicart.cart.on('checkout', function (evt) {
var items = this.items(),
len = items.length,
total = 0,
i;
// Count the number of each item in the cart
for (i = 0; i < len; i++) {
total += items[i].get('quantity');
}
if (total < 3) {
alert('The minimum order quantity is 3. Please add more to your shopping cart before checking out');
evt.preventDefault();
}
});
</script>
</body>
</html>