<section class="py-5 container heading">
<h3 class="text-uppercase"><span>Shopping cart</span></h3>
<div class="container">
<div class="row">
<div class="col-md-8">
<table class="table table-responsive mb-4">
<thead class="bg-light">
<tr>
<th class="border-0" > <strong class="text-small text-uppercase">Product</strong></th>
<th class="border-0" > <strong class="text-small text-uppercase">Product Title</strong></th>
<th class="border-0" > <strong class="text-small text-uppercase">Price</strong></th>
<th class="border-0"> <strong class="text-small text-uppercase">Quantity</strong></th>
<th class="border-0"> <strong class="text-small text-uppercase">Total</strong></th>
<th class="border-0"> </th>
</tr>
</thead>
<?php
$query="select * from displaycart";
$sel=mysqli_query($conn,$query);
while($row=mysqli_fetch_array($sel))
{
$display_cart=$row['display_cart'];
$session_id=$row['session_id'];
$pro_id=$row['pro_id'];
$producttitle=$row['product_title'];
$photo=$row['img'];
$productbrand=$row['product_brand'];
$productprice=$row['product_price'];
$quantity=$row['quantity'];
$size=$row['size'];
$totalprice=$row['total_price'];
?>
<tr>
<td><img src="admin/upload/<?php echo $photo; ?>" width="70"></td>
<td><?php echo $producttitle; ?></td>
<td> <?php echo $productprice; ?></td>
<td><?php echo $quantity; ?></td>
<td><?php echo $totalprice; ?></td>
<td><a href="deletecartproduct.php?delcartid=<?php echo $display_cart; ?>"><i class="fas fa-trash-alt small text-muted"></i></a></td>
</tr>
<?php
$sub_total=$sub_total+$totalprice;
} ?>
<tr><td align="right" colspan="7"><strong>Total : Rs. <?php echo $sub_total;?>.00</strong></td></tr>
</table>
<div class="bg-light px-4 py-3">
<div class="row align-items-center text-center">
<div class="col-md-6 mb-3 mb-md-0 text-md-left"><a class="btn btn-link p-0 text-dark btn-sm" href="index.php"><i class="fas fa-long-arrow-alt-left mr-2"> </i>Continue shopping</a></div>
<div class="col-md-6 text-md-right"><a class="btn btn-outline-dark btn-sm" href="checkout.html">Procceed to checkout<i class="fas fa-long-arrow-alt-right ml-2"></i></a></div>
</div>
</div>
</div>
<div class="col-md-4">
<!-- ORDER TOTAL-->
<div class="card border-0 rounded-0 p-lg-4 bg-light">
<div class="card-body">
<h5 class="text-uppercase mb-4">Cart total</h5>
<ul class="list-unstyled mb-0">
<li class="d-flex align-items-center justify-content-between"><strong class="text-uppercase small font-weight-bold">Subtotal</strong>
<span class="text-muted small">
<?php echo $productprice; ?></span></li>
<li class="border-bottom my-2"></li>
<li class="d-flex align-items-center justify-content-between mb-4"><strong class="text-uppercase small font-weight-bold">Total</strong>
<span><?php echo $totalprice; ?></span></li>
<li>
</li></ul></div></div></div></div></div></section>
------------------------------CSS-------------------------
.heading h3{
text-align: center;
max-width: 500px;
position: relative;
color: #FE980F;
font-size: 18px;
font-weight: 700;
margin: 0 auto 30px;
text-transform: uppercase;
}
.heading span{background: #FFF;}
.heading h3:before{
content: "";
display: block;
width: 100px;
height: 2px;
position: absolute;
left: 0;
top: 50%;
z-index: -2;
background: rgb(238, 235, 235);}
.heading h3:after{
content: "";
display: block;
width: 100px;
height: 2px;
position: absolute;
background: rgb(238, 235, 235);
right: 0;
top: 50%;
z-index: -2;
}
0 Comments