-
Notifications
You must be signed in to change notification settings - Fork 2
/
payment.php
164 lines (160 loc) · 4.16 KB
/
payment.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php include "inc/header.php"; ?>
<?php
$login=Session::get('cuslogin');
if($login==false){
header("Location:login.php");
}
?>
<?php
if($_SERVER['REQUEST_METHOD']=='POST' && isset($_POST['submit'])){
$cid=Session::get('cusid');
$custoproup=$cmr->custoproup($_POST,$cid);
}
?>
<?php
if(isset($_GET['orderid']) && $_GET['orderid']=='order'){
$cid=Session::get('cusid');
$orderinsert=$ct->orderinsert($cid);
$deldata=$ct->delcartdata($cid);
header("Location:success.php");
}
?>
<div class="container">
<div class="row">
<div class="col-md-6">
<table class="table table-condensed">
<thead>
<tr class="cart_menu">
<td width="2%">Sl</td>
<td class="description"></td>
<td class="price">Price</td>
<td class="quantity">Quantity</td>
<td class="total">Total</td>
<td></td>
</tr>
</thead>
<tbody>
<?php
$getpro=$ct->getcartpro();
if($getpro){
$i=1;
$sum=0;
while ($result=$getpro->fetch_assoc()) {
?>
<tr>
<td><?php echo $i++; ?></td>
<td class="cart_description">
<h4><?php echo $result['productname']; ?></h4>
</td>
<td class="cart_price">
<p><?php echo $result['price']; ?> Tk</p>
</td>
<td class="cart_quantity">
<div class="cart_quantity_button">
<?php echo $result['quantity'] ?>
</div>
</td>
<td class="cart_total">
<p class="cart_total_price">
<?php
$total=$result['quantity']*$result['price'];
echo $total;
?> Tk
</p>
</td>
</tr>
<?php $sum=$sum+$total;
?>
<?php
}
}
?>
</tbody>
</table>
<div class="total_area">
<?php
$getdata=$ct->checkcart();
if($getdata){
?>
<ul>
<li>Cart Sub Total <span><?php if(isset($sum)) {echo $sum;} ?> Tk</span></li>
<li>Vat <span>0%</span></li>
<li>Shipping Cost <span>50</span></li>
<li>Total <span>
<?php if(isset($sum)) {
$gtotal=$sum+50;
Session::set('gtotal',$gtotal);
echo $gtotal;
}
?>
Tk</span></li>
</ul>
<?php
}
?> <a class="btn btn-default update" href="index.php">Continue Shopping</a>
<a class="btn btn-default check_out" href="?orderid=order">Order Now</a>
</div>
</div>
<div class="col-md-6">
<table class="table table-striped table-bordered">
<?php
$cid=Session::get('cusid');
$getuserpro=$cmr->getuserpro($cid);
if($getuserpro){
while ($result=$getuserpro->fetch_assoc()) {
?>
<tr>
<td colspan="3" align="center"><h2>Your Profile</h2></td>
</tr>
<tr>
<td width="20%">Name</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['name']; ?></td>
</tr>
<tr>
<td width="20%">City/Village</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['city']; ?></td>
</tr>
<tr>
<td width="20%">Zilla</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['zilla']; ?></td>
</tr>
<tr>
<td width="20%">Thana</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['thana']; ?></td>
</tr>
<tr>
<td width="20%">Post Office</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['post']; ?></td>
</tr>
<tr>
<td width="20%">Address</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['address']; ?></td>
</tr>
<tr>
<td width="20%">Email</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['email']; ?></td>
</tr>
<tr>
<td width="20%">Mobile</td>
<td width="5%">:</td>
<td width="75%"><?php echo $result['mobile']; ?></td>
</tr>
<tr>
<td colspan="3"><a class="upd" href="updatepro.php">Update Details</a></td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
<?php include "inc/footer.php"; ?>