-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_order_details.php
101 lines (94 loc) · 4.47 KB
/
my_order_details.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
<?php
require('top.php');
if(!isset($_SESSION['USER_LOGIN'])){
?>
<script>
window.location.href='index.php';
</script>
<?php
}
$order_id=get_safe_value($con,$_GET['id']);
$coupon_details=mysqli_fetch_assoc(mysqli_query($con,"select coupon_value from `order` where id='$order_id'"));
$coupon_value=$coupon_details['coupon_value'];
if($coupon_value==''){
$coupon_value=0;
}
?>
<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">Thank You</span>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Bradcaump area -->
<!-- cart-main-area start -->
<div class="wishlist-area ptb--100 bg__white">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="wishlist-content">
<form action="#">
<div class="wishlist-table table-responsive">
<table>
<thead>
<tr>
<th class="product-thumbnail">Product Name</th>
<th class="product-thumbnail">Product Image</th>
<th class="product-name">Qty</th>
<th class="product-price">Price</th>
<th class="product-price">Total Price</th>
</tr>
</thead>
<tbody>
<?php
$uid=$_SESSION['USER_ID'];
$res=mysqli_query($con,"select distinct(order_detail.id) ,order_detail.*,product.name,product.image from order_detail,product ,`order` where order_detail.order_id='$order_id' and `order`.user_id='$uid' and order_detail.product_id=product.id");
$total_price=0;
while($row=mysqli_fetch_assoc($res)){
$total_price=$total_price+($row['qty']*$row['price']);
?>
<tr>
<td class="product-name"><?php echo $row['name']?></td>
<td class="product-name"> <img src="<?php echo PRODUCT_IMAGE_SITE_PATH.$row['image']?>"></td>
<td class="product-name"><?php echo $row['qty']?></td>
<td class="product-name"><?php echo $row['price']?></td>
<td class="product-name"><?php echo $row['qty']*$row['price']?></td>
</tr>
<?php }
if($coupon_value!=''){
?>
<tr>
<td colspan="3"></td>
<td class="product-name">Coupon Value</td>
<td class="product-name"><?php echo $coupon_value?></td>
</tr>
<?php } ?>
<tr>
<td colspan="3"></td>
<td class="product-name">Total Price</td>
<td class="product-name">
<?php
echo $total_price-$coupon_value;
?></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php require('footer.php')?>