-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwishlist.php
89 lines (87 loc) · 3.85 KB
/
wishlist.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
<?php
require('top.php');
if (!isset($_SESSION['USER_ID'])) {
?>
<script>
window.location.href = 'index.php';
</script>
<?php }
$uid = $_SESSION['USER_ID'];
$sql = "SELECT p.name, p.image, p.price, p.mrp, w.id FROM wishlist AS w";
$sql .= " INNER JOIN product AS p ON w.product_id=p.id";
$sql .= " WHERE w.user_id='$uid'";
$res = mysqli_query($con, $sql);
if (!isset($_SESSION['cart'])) {
$_SESSION['cart'] = array();
}
?>
<!-- Start Bradcaump area -->
<div class="ht__bradcaump__area" style="background: rgba(0, 0, 0, 0) url(images/bg/4.jpg) no-repeat scroll center center / cover ;">
<div class="ht__bradcaump__wrap">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="bradcaump__inner">
<nav class="bradcaump-inner">
<a class="breadcrumb-item" href="index.html">Home</a>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<span class="breadcrumb-item active">Wishlist</span>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Bradcaump area -->
<!-- cart-main-area start -->
<div class="cart-main-area ptb--100 bg__white">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<form action="#">
<div class="table-content table-responsive">
<table>
<thead>
<tr>
<th class="product-thumbnail">products</th>
<th class="product-name">name of products</th>
<th class="product-remove">Remove</th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_assoc($res)) {
?>
<tr>
<td class="product-thumbnail"><a href="#"><img src="<?php echo PRODUCT_IMAGE_SITE_PATH . $row['image'] ?>" /></a></td>
<td class="product-name"><a href="#"><?php echo $row['name'] ?></a>
<ul class="pro__prize">
<li class="old__prize"><?php echo $row['mrp'] ?></li>
<li><?php echo $row['price'] ?></li>
</ul>
</td>
<td class="product-remove"><a href="wishlist.php?wishlist_id=<?php echo $row['id'] ?>"><i class="icon-trash icons"></i></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="buttons-cart--inner">
<div class="buttons-cart">
<a href="<?php echo SITE_PATH ?>">Continue Shopping</a>
</div>
<div class="buttons-cart checkout--btn">
<a href="<?php echo SITE_PATH ?>checkout.php">checkout</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php require('footer.php'); ?>