-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorder-details.php
More file actions
153 lines (99 loc) · 4.64 KB
/
order-details.php
File metadata and controls
153 lines (99 loc) · 4.64 KB
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
<?php require_once'inc/header.php' ?>
<?php
require_once'inc/nav.php';
?>
<!-- ============================================== HEADER : END ============================================== -->
<div class="breadcrumb">
<div class="container">
<div class="breadcrumb-inner">
<ul class="list-inline list-unstyled">
<li><a href="#">Home</a></li>
<li class='active'>Shopping Cart</li>
</ul>
</div><!-- /.breadcrumb-inner -->
</div><!-- /.container -->
</div><!-- /.breadcrumb -->
<div class="body-content outer-top-xs">
<div class="container">
<div class="row ">
<div class="shopping-cart">
<div class="shopping-cart-table ">
<div class="table-responsive">
<form method="post" name="cart" >
<table class="table">
<thead>
<tr>
<th class="cart-romove item"> Order code</th>
<th class="cart-description item">Image</th>
<th class="cart-product-name item">Product Name</th>
<th class="cart-qty item">Quantity</th>
<th class="cart-sub-total item">Price</th>
<th class="cart-total last-item">Total</th>
</tr>
</thead><!-- /thead -->
<tbody>
<?php
$orderid=$_POST['ordercode'];
$email=$_POST['email'];
$ret = mysqli_query($con,"select t.email,t.code from (select usr.email,odrs.code from user as usr join orders as odrs on usr.id=odrs.userId) as t where t.email='$email' and (t.code='$orderid')");
$num=mysqli_num_rows($ret);
if($num>0)
{
$query=mysqli_query($con,"select products.code , products.price , products.img1 as pimg1,products.name as pname,orders.productId as opid,orders.quantity as qty,products.price as pprice,orders.paymentMethod as paym,orders.orderDate as odate,orders.code as ordercode,orders.Total_price as order_total from orders join products on orders.productId=products.id where orders.code='$orderid' and orders.paymentMethod is not null");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td class="romove-item"><h3><?php echo $ocode=$row['ordercode'];?></h3></td>
<td class="cart-image">
<a class="entry-thumbnail" href="detail.html">
<img src="admin/img/products/<?php echo $row['pimg1'];?>" alt="">
</a>
</td>
<td class="cart-product-name-info">
<h4 class='cart-product-description'><a href="detail.php?id=<?php echo $row['id'] ?>"><?php echo $row['pname'];
?></a></h4>
<div class="cart-product-info">
<span class="product-color">Code:<span><?php echo $code=$row['code'];?></span></span>
</div>
</td>
<td class="cart-product-quantity">
<?php echo $qty=$row['qty']; ?>
</td>
<input type="hidden" value="<?php echo $total_price=$row['total_price']; ?>" >
<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo $price=$row['price']; ?>.KS</span></td>
<td class="cart-product-grand-total"><span class="cart-grand-total-price"><?php echo $total=(($qty*$price));?>.KS</span></td>
</tr>
</tbody><!-- /tbody -->
<tbody>
<td><span class="cart-sub-total-price"><?php echo $price=$row['order_total']; ?>.KS</span></td>
</tbody>
<?php $cnt=$cnt+1;} }
else { ?>
<tr><td colspan="8">Either order id or Registered email id is invalid</td></tr>
<?php } ?>
<tfoot>
<tr>
<td colspan="7">
</td>
</tr>
</tfoot>
</table>
<!-- /table -->
</div>
</div>
</div>
</form>
<!-- /table -->
</div><!-- /.cart-shopping-total --> </div><!-- /.shopping-cart -->
</div> <!-- /.row -->
<!-- ============================================== BRANDS CAROUSEL ============================================== -->
<!-- ============================================== BRANDS CAROUSEL : END ============================================== --> </div><!-- /.container -->
</div><!-- /.body-content -->
<!-- ============================================================= FOOTER ============================================================= -->
<!-- ============================================== INFO BOXES ============================================== -->
<?php require_once'inc/footer_bar.php' ?>
<!-- /.info-boxes -->
<!-- ============================================== INFO BOXES : END ============================================== -->
<?php require_once'inc/footer.php' ?>