New Text Document
New Text Document
<div class="container">
<div class="row">
<div class="col-xl-8 col-lg-8 mb-4">
<!-- <div class="card mb-4 border shadow-0">
<div class="p-4 d-flex justify-content-between">
<div class="">
<h5>Have an account?</h5>
<p class="mb-0 text-wrap ">Lorem ipsum dolor sit amet, consectetur
adipisicing elit</p>
</div>
<div class="d-flex align-items-center justify-content-center flex-
column flex-md-row">
<a href="#" class="btn btn-outline-primary me-0 me-md-2 mb-2 mb-md-0
w-100">Register</a>
<a href="#" class="btn btn-primary shadow-0 text-nowrap w-100">Sign
in</a>
</div>
</div>
</div>-->
</div>
<?php $i = 1; ?>
<?php foreach ($this->cart->contents() as $items): ?>
<?php
if(!empty($items['color'])){
?>
Size: <?php echo $items['size']; ?></br>
<?php
}
?>
</div>
</div>
<?php $i++; ?>
<?php endforeach; ?>
<h6 class="mb-3">Summary</h6>
<div class="d-flex justify-content-between">
<p class="mb-2">SubTotal price:</p>
<p class="mb-2">৳ <?php echo number_format($this->cart->total()); ?
></p>
</div>
<div class="d-flex justify-content-between">
<p class="mb-2">Delivery Charge:</p>
<p class="mb-2"><?php $shipfee = '49'; echo $shipfee; ?></p>
</div>
<hr />
<div class="d-flex justify-content-between">
<p class="mb-2">Total price:</p>
<p class="mb-2 fw-bold">৳
<?php
$shipfee = '49';
$cartto = $this->cart->total();
$cartship = $shipfee+$cartto;
echo number_format($cartship);
?></p>
</div>
</div>
</div>
</div>
</div>
</section>
<!--
<script>
function increment_quantity(cart_id) {
var inputQuantityElement = $("#input-quantity-"+cart_id);
var newQuantity = parseInt($(inputQuantityElement).val())+1;
save_to_db(cart_id, newQuantity);
}
function decrement_quantity(cart_id) {
var inputQuantityElement = $("#input-quantity-"+cart_id);
if($(inputQuantityElement).val() > 1)
{
var newQuantity = parseInt($(inputQuantityElement).val()) - 1;
save_to_db(cart_id, newQuantity);
}
}
<?php
$member_id = 2; // you can your integrate authentication module here to get logged
in member
$shoppingCart->updateCartQuantity($_POST["new_quantity"], $_POST["cart_id"]);
$cartItem = $shoppingCart->getMemberCartItem($member_id);
if (! empty($cartItem)) {
$item_quantity = 0;
$item_price = 0;
if (! empty($cartItem)) {
foreach ($cartItem as $item) {
$item_quantity = $item_quantity + $item["quantity"];
$item_price = $item_price + ($item["price"] * $item["quantity"]);
}
}
}
?>
<div id="shopping-cart">
<div class="txt-heading">
<div class="txt-heading-label">Shopping Cart</div>