Finished checkout page and added a prototype sidebar
This commit is contained in:
+93
-64
@@ -35,11 +35,69 @@
|
||||
<div class="container-fluid">
|
||||
<div class="sectionShopping">
|
||||
<?php include 'shopping_headerNav.php' ?>
|
||||
<h1>Checkout</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12" id="shopping_cartTitle">
|
||||
<?php
|
||||
$totalprice = 0;
|
||||
foreach ($_SESSION['mycar'] as $product):
|
||||
$totalprice += $product['buy_price'];
|
||||
endforeach;
|
||||
?>
|
||||
<h1>Comfirm Order</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row checkoutProduct">
|
||||
<div class="col-sm-12 customer-col">
|
||||
<table class="checkoutTable">
|
||||
<thead>
|
||||
<tr class="tr_title">
|
||||
<td>Product</td>
|
||||
|
||||
<td>Quantity</td>
|
||||
|
||||
<td>Price</td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php $totalprice = 0;?>
|
||||
|
||||
<?php foreach ($_SESSION['mycar'] as $product): ?>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<span> <?=$product['buy_name']?> </span>
|
||||
</td>
|
||||
|
||||
<td id="td_num">
|
||||
<span > <?=$product['buy_num']?> </span>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="cart_priceP">
|
||||
<span> $<?=$product['buy_price']?> </span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php $totalprice += $product['buy_price']?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row customerInformation">
|
||||
<div class="col"></div>
|
||||
<div class="col-sm-4">
|
||||
<h2>Customer Information</h2>
|
||||
<div class="col-sm-8"></div>
|
||||
<div class="col-sm-4 customer-col">
|
||||
<label>Full Name:</label>
|
||||
<label><?php echo $_SESSION['username']?></label>
|
||||
<br>
|
||||
@@ -51,82 +109,53 @@
|
||||
<br>
|
||||
<label>Full Address:</label>
|
||||
<br>
|
||||
<label><?php echo $row["C_UNIT"]?>, <?php echo $row["C_ADDRESS"]?></label>
|
||||
<label><?php if ($row["C_UNIT"] !== '') { echo $row["C_UNIT"] ; echo '-'; }?><?php echo $row["C_ADDRESS"]?></label>
|
||||
<br>
|
||||
<label><?php echo $row["C_CITY"]?>, <?php echo $row["C_ZIP"]?></label>
|
||||
<br>
|
||||
<label><?php echo $row["C_COUNTRY"]?></label>
|
||||
<br>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12" id="shopping_cartTitle">
|
||||
<?php
|
||||
$totalprice = 0;
|
||||
foreach ($_SESSION['mycar'] as $product):
|
||||
$totalprice += $product['buy_price'];
|
||||
endforeach;
|
||||
?>
|
||||
<h1>Total</h1> <h1>CA$<?php echo $totalprice?></h1>
|
||||
|
||||
<div class="row checkoutSubtotal">
|
||||
<div class="col-sm-12 customer-col">
|
||||
<span class="checkout_subtotalSpan" >Subtotal: $<span class="checkout_subtotalPrice"><?= $totalprice ?></span></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row checkoutComfirm">
|
||||
<div class="col-sm-8"></div>
|
||||
<div class="col-sm-4 customer-col">
|
||||
<a class="btn btn-primary checkout_back_button" type="button" href="cart.php"> ⮪ Back To Cart</a>
|
||||
<button class="btn btn-primary checkout_confirm_button" data-bs-toggle="modal" data-bs-target="#checkoutModal">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="cartTable">
|
||||
<thead>
|
||||
<!-- <tr style="margin:auto; border: 2px solid black;">
|
||||
<td>Product</td>
|
||||
|
||||
<td>Quantity</td>
|
||||
|
||||
<td>Price</td>
|
||||
|
||||
</tr> -->
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?php $totalprice = 0;?>
|
||||
|
||||
<?php foreach ($_SESSION['mycar'] as $product): ?>
|
||||
<tr>
|
||||
<td class="cart_quantity">
|
||||
<h3> <?=$product['buy_num']?> </h3>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<span> <?=$product['buy_name']?> </span>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="cart_priceP">
|
||||
<span> $<?=$product['buy_price']?> </span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php $totalprice += $product['buy_price']?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<div class="subtotal">
|
||||
<span class="text" style="font-weight: 1em; font-family: cursive;">Subtotal: $<span><?= $totalprice ?></span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
|
||||
<div class="modal fade" id="checkoutModal" tabindex="-1" aria-labelledby="checkoutLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<h1 class="checkMarkIcon"></h1>
|
||||
<h1>Checkout Successful!</h1>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php include '../footer.php' ?>
|
||||
<?php include_once '../footer.php' ?>
|
||||
<?php include_once '../scripts.php' ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user