Repository navigation
Expand file tree
/
Copy pathcheckout.php
More file actions
65 lines (65 loc) · 3.02 KB
/
Copy pathcheckout.php
File metadata and controls
65 lines (65 loc) · 3.02 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
<?php require_once('inc/header.php'); ?>
<!-- Header-->
<header class="bg-dark py-5">
<div class="container px-4 px-lg-5 my-5">
<div class="text-center text-white">
<h1 class="display-4 fw-bolder">Shop in style</h1>
<p class="lead fw-normal text-white-50 mb-0">With this shop hompeage template</p>
</div>
</div>
</header>
<!-- Section-->
<section class="py-5">
<div class="container px-4 px-lg-5 mt-5">
<div class="row">
<div class="col-4">
<div class="border p-2">
<div class="products">
<ul class="list-unstyled">
<?php if (isset($_SESSION['cart']) && !empty($_SESSION['cart'])): ?>
<?php $total = 0; ?>
<?php foreach ($_SESSION['cart'] as $index => $item): ?>
<li class="border p-2 my-1"> <?php echo $item['name']; ?>
<span class="text-success mx-2 mr-auto bold">$<?php echo $item['price']; ?></span>
</li>
<?php $total += $item['price'] * $item['quantity']; ?>
<?php endforeach;;?>
<?php endif;?>
</ul>
</div>
<h3>Total : $<?php echo $total ?></h3>
</div>
</div>
<div class="col-8">
<form action="handlers/product/order.php" class="form border my-2 p-3" method="post">
<div class="mb-3">
<div class="mb-3">
<label for="">Name</label>
<input type="text" name="name" id="name" class="form-control">
</div>
<div class="mb-3">
<label for="">Email</label>
<input type="email" name="email" id="email" class="form-control">
</div>
<div class="mb-3">
<label for="">Address</label>
<input type="text" name="address" id="address" class="form-control">
</div>
<div class="mb-3">
<label for="">Phone</label>
<input type="number" name="phone" id="phone" class="form-control">
</div>
<div class="mb-3">
<label for="">Notes</label>
<input type="text" name="notes" id="notes" class="form-control">
</div>
<div class="mb-3">
<input type="submit" value="Send" id="" class="btn btn-success">
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<?php require_once('inc/footer.php'); ?>