-
Notifications
You must be signed in to change notification settings - Fork 3
/
cart.php
159 lines (119 loc) · 2.65 KB
/
cart.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
<?php include_once('./includes/headerNav.php'); ?>
<div class="overlay" data-overlay></div>
<!--
- HEADER
-->
<header>
<!-- top head action, search etc in php -->
<!-- inc/topheadactions.php -->
<?php require_once './includes/topheadactions.php'; ?>
<!-- desktop navigation -->
<!-- inc/desktopnav.php -->
<?php require_once './includes/desktopnav.php' ?>
<!-- mobile nav in php -->
<!-- inc/mobilenav.php -->
<?php require_once './includes/mobilenav.php'; ?>
<!-- style -->
<style>
:root{
--main-maroon: #CE5959;
--deep-maroon: #89375F;
}
td,th{
text-align:center;
}
td img{
margin-left:auto;
margin-right:auto;
}
.delete-icon{
color:var(--bittersweet);
cursor: pointer;
}
.child-register-btn {
margin-top:20px;
width:85%;
margin-left:auto;
margin-right:auto;
}
.child-register-btn p {
width: 350px;
height: 60px;
background-color: var( --main-maroon);
box-shadow: 0px 0px 4px #615f5f;
line-height: 60px;
color: #FFFFFF;
margin-left: auto;
border-radius: 8px;
text-align: center;
cursor: pointer;
font-size: 19px;
font-weight: 600;
}
@media screen and (max-width: 794px) {
.child-register-btn {
margin-top:30px;
}
.child-register-btn p {
width: 100%;
}
}
</style>
</header>
<!--
- MAIN
-->
<main>
<div class="product-container">
<div class="container">
<!--
- SIDEBAR
-->
<table>
<tr>
<th>Image</th>
<th>Name</th>
<th>Price</th>
<th>Quantity</th>
</tr>
<?php
if(isset($_SESSION['mycart']))
{
foreach($_SESSION['mycart'] as $value)
{
?>
<tr>
<td>
<img class="cart-product-image" src="./admin/upload/<?php echo $value['product_img'] ?>" alt="">
</td>
<td><?php echo $value['name']; ?></td>
<td><?php echo "$".$value['price']; ?></td>
<td ><?php echo $value['product_qty']; ?></td>
</tr>
<?php
}}else
{
?>
<tr >
<td colspan='4' >No item available in cart</td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</div>
<?php
if(isset($_SESSION['mycart']))
{
?>
<div class="child-register-btn">
<p > <a href="checkout.php" style="color:#FFFFFF">Proceed To CheckOut</a>
</p>
</div>
<?php
}
?>
</main>
<?php require_once './includes/footer.php'; ?>