Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/imyrqtmy/public_html/opulanceindia/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); include("admin/includes/config.php"); if(isset($_POST['update_product_quantity'])){ $update_value =$_POST['update_quantity']; $update_id=$_POST['update_quantity_id']; $update_query = mysqli_query($conn, "update `cart` set quantity = $update_value where id = $update_id"); echo "updated successfully"; } if(isset($_GET['remove'])){ $remove_id = $_GET['remove']; mysqli_query($conn, "Delete from `cart` where id=$remove_id"); } ?> <!DOCTYPE html> <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]--> <?php require "inc/head.php" ?> <body> <!-- ===== LODER ===== --> <!-- <div class="loder"></div> --> <div class="wrapper"> <!-- ===== HEADER START ===== --> <?php require "inc/header.php" ?> <!-- ===== HEADER END ===== --> <!-- ===== BANNER STRAT ===== --> <div class="breadcrumb"> <h1>Shopping Cart</h1> <ul> <li><a href="index.php">Home</a></li> <li class="active">Shopping Cart</li> </ul> </div> <!-- ===== BREADCRUMB END===== --> <!-- ===== CONTAINER START ===== --> <div class="container"> <div class="row"> <div class="col-xs-12 mb_xs-30"> <div class="cart-item-table commun-table"> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>Product</th> <th>Product Name</th> <th>Price</th> <th>Quantity</th> <th>Sub Total</th> <th>Action</th> </tr> </thead> <?php $query = "SELECT * FROM `cart`"; $query_run =mysqli_query($conn, $query); $num = 1; $grandtotal = 0; if(mysqli_num_rows($query_run) > 0){ foreach($query_run as $row){ ?> <tbody> <tr> <td> <a href=""> <div class="product-image"><img alt="Streetwear" src="<?php echo $row['photo']?>"></div> </a> </td> <td> <div class="product-title"> <a href=""><?php echo $row['name']?></a> </div> </td> <td> <ul> <li> <div class="base-price price-box"> <span class="price">₹ <?php echo $row['price']?></span> </div> </li> </ul> </td> <form method="post" > <input type="hidden" value="<?php echo $row['id']; ?>" name="update_quantity_id"> <td class="cart-product-quantity"> <div class="cart-plus-minus"> <input type="number" min="1" name="update_quantity" value="<?php echo $row['quantity']; ?>" class="cart-plus-minus-box"> </div> <button type="submit" value="Update" name="update_product_quantity" class="btn btn-black">Update</button> </td> </form> <!-- <td> <div class="input-box"> <select data-id="100" class="quantity_cart" name="quantity_cart"> <option selected="" value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </div> </td> --> <td> <div class="total-price price-box"> <span class="price">₹ <?php echo $subtotal = number_format($row['price'] * $row['quantity']); ?></span> </div> </td> <td> <a href="cart.php?remove=<?php echo $row['id']; ?>" onClick="return confirm('Are You Sure You want to delete')"><i title="Remove Item From Cart" data-id="100" class="fa fa-trash cart-remove-item"></i> </td> </tr> <!-- <tr> <td> <a href="product-page.html"> <div class="product-image"><img alt="Streetwear" src="images/product/product2.jpg"></div> </a> </td> <td> <div class="product-title"> <a href="product-page.html">Defyant Reversible Dot Shorts</a> </div> </td> <td> <ul> <li> <div class="base-price price-box"> <span class="price">$80.00</span> </div> </li> </ul> </td> <td> <div class="input-box"> <select data-id="100" class="quantity_cart" name="quantity_cart"> <option selected="" value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </div> </td> <td> <div class="total-price price-box"> <span class="price">$80.00</span> </div> </td> <td><i title="Remove Item From Cart" data-id="100" class="fa fa-trash cart-remove-item"></i></td> </tr> --> </tbody> <?php $grandtotal = $grandtotal+($row['price'] * $row['quantity']); $num ++; }} ?> </table> </div> </div> </div> </div> <div class="mb_30"> <div class="row"> <div class="col-sm-6"> <div class="mt_30"> <a href="shop.php" class="btn btn-black">Continue Shopping</a> </div> </div> <!-- <div class="col-sm-6"> <div class="mt_30 pull-right"> <a class="btn btn-black">Update Cart</a> </div> </div> --> </div> </div> <hr> <!-- <div class="mtb_30"> <div class="row"> <div class="col-sm-6"> <div class="estimate"> <div class="heading-part mb_20"> <h3 class="sub_title">Use Coupon Code </h3> </div> <form class="full"> <div class="row"> <div class="col-sm-12"> <input class="form-control mb_20" id="input-coupon" placeholder="Enter your coupon here" value="" name="coupon" type="text"> </div> <div class="col-sm-6"> <div class="pull-left"> <input class="btn" data-loading-text="Loading..." id="button-coupon" value="Apply Coupon" type="button"> </div> </div> </div> </form> </div> </div> <div class="col-sm-6"> <div class="estimate"> <div class="heading-part mb_20"> <h3 class="sub_title">Use Gift Voucher </h3> </div> <form class="full"> <div class="row"> <div class="col-sm-12"> <input class="form-control mb_20" id="input-Gift" placeholder="Enter your coupon here" value="" name="coupon" type="text"> </div> <div class="col-sm-6"> <div class="pull-left"> <input class="btn" data-loading-text="Loading..." id="button-Gift" value="Apply Voucher" type="button"> </div> </div> </div> </form> </div> </div> </div> </div> --> <hr> <div class="mtb_30"> <div class="row"> <div class="col-sm-6"> <!-- <div class="estimate"> <div class="heading-part mb_20"> <h3 class="sub_title">Estimate shipping and tax</h3> </div> <form class="full"> <div class="row"> <div class="col-sm-12"> <div class="input-box mb_20"> <select id="country_id"> <option selected="" value="">Select Country</option> <option value="1">India</option> <option value="2">China</option> <option value="3">Pakistan</option> </select> </div> </div> <div class="col-sm-6"> <div class="input-box mb_20"> <select id="state_id"> <option selected="" value="1">Select State/Province</option> <option value="2">---</option> </select> </div> </div> <div class="col-sm-6"> <div class="input-box mb_20"> <select id="city_id"> <option selected="" value="1">Select City</option> <option value="2">---</option> </select> </div> </div> </div> </form> </div> --> </div> <div class="col-sm-6"> <div class="cart-total-table commun-table"> <div class="table-responsive"> <table class="table"> <thead> <tr> <th colspan="2">Cart Total</th> </tr> </thead> <tbody> <tr> <td>Item(s) Subtotal</td> <td> <div class="price-box"> <span class="price">₹ <?php echo $grandtotal ?></span> </div> </td> </tr> <!-- <tr> <td>Shipping</td> <td> <div class="price-box"> <span class="price">₹ <?php echo $grandtotal ?></span> </div> </td> </tr> --> <tr> <td><b>Amount Payable</b></td> <td> <div class="price-box"> <span class="price"><b>₹ <?php echo $grandtotal ?></b></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <hr> <div class="mt_30"> <div class="row"> <div class="col-xs-12"> <div class="pull-right"> <a href="checkout.php" class="btn btn-black">Proceed to checkout </a> </div> </div> </div> </div> </div> <!-- ===== CONTAINER END ===== --> <!-- ===== FOOTER START ===== --> <?php require "inc/footer.php" ?> <!-- ===== FOOTER END ===== --> </div> <a id="scrollup">Scroll</a> <script src="js/jQuery_v3.1.1.min.js"></script> <script src="js/owl.carousel.min.js"></script> <script src="js/bootsnav.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/jquery.magnific-popup.js"></script> <script src="js/custom.js"></script> </body> </html>