-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwishlist.php
59 lines (57 loc) · 1.38 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
<?php
$title = 'Yêu thích';
include 'inc/header2.php';
$login_check = Session::get('customer_login');
if ($login_check == false) {
header('Location: dang-nhap.html');
}
if (isset($_GET['proid'])) {
$customer_id = Session::get('customer_id');
$proid = $_GET['proid'];
$delwlist = $product->del_wlist($proid, $customer_id);
}
?>
</div>
<?php
include 'inc/sidebar.php';
?>
<h2 class="title2">Yêu thích</h2>
<table class="table">
<thead>
<th>STT</th>
<th>Sản phẩm</th>
<th>Hình ảnh</th>
<th>Giá</th>
<th></th>
</thead>
<?php
$get_wishlist = $product->get_wishlist($idcus);
if ($get_wishlist) {
$i = 0;
while ($result = $get_wishlist->fetch_assoc()) {
$i++;
?>
<tr>
<td data-label="STT"><?php echo $i; ?></td>
<td data-label="Sản phẩm"><?php echo $result['productName'] ?></td>
<td data-label="Hình ảnh"><img src="admin/uploads/<?php echo $result['image'] ?>" alt="" /></td>
<td data-label="Giá"><?php echo $fm->format_currency($result['price']) . " " . "VNĐ" ?></td>
<td data-label="">
<p>
<a href="yeu-thich.html?proid=<?php echo $result['productId'] ?>">Xoá</a> ||
<a href="<?php echo 'san-pham/' . $result['productId'] .'-'. $result['catId'] .'-'. $fm->makeUrl($result['productName']) . '.html' ?>">Mua</a>
</p>
</td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
</div>
<?php
include 'inc/footer.php';
?>