-
Notifications
You must be signed in to change notification settings - Fork 0
/
product_chekout_result.php
112 lines (90 loc) · 4.06 KB
/
product_chekout_result.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
<?php
error_reporting(0);
include('header.php');
//including the database connection file
include_once("config/connection.php");
$transaction_id = $_REQUEST['id'];
?>
<hr class="featurette-divider">
<div class="container">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-inverse" style="background:#04B745;">
<div class="container-fluid pull-left" style="width:300px;">
<div class="navbar-header">
<span style="color:#FFFFFF;">Payment</span>
</div>
</div>
<div class="pull-right" style="margin-top:7px;margin-right:7px;"><a href="product_list.php" class="btn btn-info">New Order</a></div>
</nav>
</div>
</div>
<br>
<?php if (!empty($_SESSION['products'])) : ?>
<div class="row">
<div class="col-md-12">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Image</th>
<th>Name</th>
<th align="right">Price</th>
<th align="right">Qty</th>
<th align="right">Amount</th>
</tr>
</thead>
<?php foreach ($_SESSION['products'] as $key => $product) : ?>
<?php
$img_src = "backend/uploads/default_images/1.jpg";
if ($product['image'] != "") {
$img_src = 'backend/uploads/' . $product['image'];
}
?>
<tr>
<td><img src="<?php print $img_src ?>" width="50"></td>
<td><?php print $product['name'] ?></td>
<td align="right">$<?php print $product['price'] ?></td>
<td align="right"><?php print $product['qty'] ?></td>
<td align="right"><?php print $product['qty'] * $product['price'] ?></td>
</tr>
<?php $total = $total + ($product['price'] * $product['qty']); ?>
<?php endforeach; ?>
<?php $_SESSION['products'] = []; ?>
<tr>
<td colspan="4" align="right">
Total
</td>
<td align="right">
<h6>$ <?php print $total ?></h6>
</td>
</tr>
<tr>
<form method="post" action="product_cart_payment.php">
<td colspan="4" align="right">
Payment Type
</td>
<td align="right">
<select name="payment_type" class="form-control">
<option value="0" disabled>Select One Pyament Type</option>
<option selected value="1">Cash On Delivery</option>
<option value="2">Bank Transfer</option>
<option value="3">With Paypal</option>
</select>
</td>
</tr>
<tr>
<td colspan="6" align="right">
<input type="hidden" name="checkout" value="checkout">
<input type="hidden" name="id" value="<?php echo $transaction_id; ?>">
<button onClick="return confirm('Are you sure you want to submit?')" type="submit" class="btn btn-info">Submit Payment</button>
</td>
</form>
</tr>
</table>
<?php endif; ?>
</div>
</div>
</div>
<?php
include('footer.php');
?>