File manager - Edit - /home/gppowercontrol/public_html/cart.php
Back
<!doctype html> <html class="no-js" lang=""> <head> <?php include "include/head.php"; isLogin(); ?> </head> <body> <?php include "include/header.php" ?> <div class="breadcurb-area"> <div class="container"> <ul class="breadcrumb"> <li class="home"><a href="index.php">Home </a></li> <li> Cart</li> </ul> </div> </div> <div class="chart-area"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="cart-title"> <h2>Shopping Cart</h2> </div> </div> </div> <?php if (isset($_SESSION['cart']) && count($_SESSION['cart']) > 0) { ?> <div class="row"> <div class="col-md-12"> <!-- Cart Item --> <div class="chart-item table-responsive fix"> <table class="col-md-12"> <thead> <tr> <th class="th-delate">Remove</th> <th class="th-product">Images</th> <th class="th-details">Product Name</th> <th class="th-price">Unit Price</th> <th class="th-qty">Qty</th> <th class="th-total">Subtotal</th> </tr> </thead> <tbody> <?php global $total_price; $total_price = 0; foreach ($_SESSION['cart'] as $item) { foreach ($item as $data) { $object = json_decode(json_encode($item), FALSE); $total_price += $object->product_price; ?> <tr> <td class="th-delate"><a onclick="remove_item_from_cart('<?php echo $object->product_id ?>','<?php echo $object->product_name ?>')"><i class="fa fa-trash"></i></a></td> <td class="th-product"> <a href="product.php?url=<?php echo $object->url; ?>"><img src="media/product/<?php echo $object->product_image; ?>" alt="<?php echo $object->product_name; ?>"></a> </td> <td class="th-details"> <h2><a href="product.php?url=<?php echo $object->url; ?>"><?php echo $object->product_name; ?></a></h2> </td> <?php $final_price = $object->product_actual_price * $object->product_quantity; ?> <td class="th-price">₹ <?php echo $object->product_actual_price; ?></td> <td class="th-qty"> X <?php echo $object->product_quantity; ?> </td> <td class="th-total">₹<?php echo $final_price; ?></td> </tr> <?php break; } ?> <?php } ?> </tbody> </table> </div><!-- End Cart Item --> <div class="shoping-cart-button"> <div class="cart-button-left"> <a href="shop.php" class="btn custom-button">Continue Shopping</a> </div> <div class="cart-button-right"> <a href="unset.php" class="btn custom-button">Clear Cart</a> </div> </div> </div> </div> <div class="cart-shopping-area fix"> <!-- Cart Shoping Area --> <div class="row"> <div class="col-lg-4 col-md-12 ms-auto"> <div class="shopping-summary chart-all fix"> <div class="shopping-cost-area"> <div class="shopping-cost"> <div class="shopping-cost-right"> <p> ₹<?php echo $total_price ?></p> <p>₹<?php echo $total_price ?></p> </div> <div class="shopping-cost-left"> <p class="floatright">Sub Total </p> <p>GRAND TOTAL</p> </div> </div> <div class="shiping-cart-button"> <form action="checkout.php" method="post"> <button type="submit" name="checkout" class="btn custom-button">Proceed to Checkout</button> </form> </div> </div> </div> </div> </div><!-- End Cart Shoping Area --> </div> <?php } else { ?> <p>Cart is Empty.</p> <?php } ?> </div> </div><!-- End Cart Area --> <?php include "include/footer.php" ?> <?php include "include/foot.php" ?> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.67 |
proxy
|
phpinfo
|
Settings