-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwishlist.php
149 lines (126 loc) · 6.09 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
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
<!-- Functions -->
<?php include ('functions/functions.php'); ?>
<!-- Session -->
<?php include ('includes/session.php') ?>
<?php $wish_details = wish_details(); ?>
<!-- HTML Start -->
<!DOCTYPE html>
<html lang="en">
<!-- Head Section -->
<head>
<!-- Website Title -->
<title>My Wishlist</title>
<!-- Meta Tags -->
<?php include 'includes/header/meta-tags.php'; ?>
<!-- Default CSS -->
<?php include 'includes/header/header-styles.php'; ?>
<!-- Datatable CSS -->
<?php include 'includes/header/datatable-styles.php'; ?>
<style>
.wishlist{
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0px 2px 0px rgb(161, 163, 164);
}
</style>
</head>
<!-- Body Section -->
<?php include 'includes/body.php'; ?>
<!-- Begin page -->
<div id="layout-wrapper">
<!-- MenuBar -->
<?php include 'includes/menu/menu.php'; ?>
<!-- Main Content -->
<div class="main-content">
<!-- Page Content -->
<div class="page-content">
<!-- Page Container -->
<div class="container-fluid">
<!-- Messages -->
<?php include 'includes/messages.php'; ?>
<!-- Content Title -->
<div class="row">
<div class="col-12">
<div class="page-title-box d-flex align-items-center justify-content-between">
<h4 class="mb-0 font-size-18">
<?php
$fcount = $_SESSION['user']['id'];
$result = mysqli_query($db, "SELECT * FROM wishlist WHERE user_id = $fcount");
$rows = mysqli_num_rows($result);
?>
Wishlist (<?php echo $rows ?>)
</h4>
<!-- Breadcrumb -->
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">Wishlist</li>
</ol>
</div>
</div>
</div>
</div>
<!-- End content Title -->
<!-- Content -->
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-md-8">
<?php foreach ($wish_details as $key => $wish_detail): ?>
<div class="row wishlist p-3 mt-3">
<div class="col-3 col-md-2 d-flex flex-column justify-content-center">
<img src="assets/images/products/<?php echo $wish_detail['product_name'] ?>/<?php echo $wish_detail['product_image'] ?>" alt="product-img" title="product-img" class="avatar-md">
</div>
<div class="col-7 col-md-8 d-flex flex-column justify-content-center">
<h5 class="font-size-14 text-truncate">
<a href="#" class="text-dark">
<?php echo $wish_detail['product_name'] ?>
</a>
</h5>
</div>
<div class="col-2 col-md-2 d-flex flex-column justify-content-center align-items-center">
<form method="post">
<input type="hidden" name="add_wuid" value="<?php echo $_SESSION['user']['id'] ?>">
<input type="hidden" name="add_wpid" value="<?php echo $wish_detail['product_id'] ?>">
<button name="remove_wish" class="btn btn-danger">
<i class="fas fa-trash-alt"></i>
</button>
</form>
</div>
</div>
<?php endforeach ?>
</div>
<div class="col-md-4">
</div>
</div>
<div class="row mt-4">
<div class="col-sm-6">
<a href="index.php" class="btn btn-secondary">
<i class="mdi mdi-arrow-left mr-1"></i> Continue Shopping </a>
</div> <!-- end col -->
<div class="col-sm-6">
<div class="text-sm-right mt-2 mt-sm-0">
<a href="ecommerce-checkout.html" class="btn btn-success">
<i class="mdi mdi-cart-arrow-right mr-1"></i> Checkout </a>
</div>
</div> <!-- end col -->
</div> <!-- end row-->
</div>
</div>
<!-- End Page Container -->
</div>
<!-- End Page Content -->
<?php include 'includes/footer/footer.php'; ?>
</div>
<!-- End Main Content -->
</div>
<!-- End layout Wrapper -->
<!-- Right Sidebar -->
<?php include 'includes/menu/right-sidebar.php'; ?>
<!-- Default JS -->
<?php include 'includes/footer/footer-scripts.php'; ?>
<!-- Datatable JS -->
<?php include 'includes/footer/datatables-scripts.php'; ?>
<script src="assets/libs/datatables/js/datatable.js"></script>
</body>
</html>