ok
Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/ramali.in/ |
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/ramali.in/cart-details.php |
<?php include "header.php"; if(!isset($_SESSION['ramali_textiles'])){ echo ("<script LANGUAGE='JavaScript'> window.alert('Please Login...'); window.location.href='index.php'; </script>"); } ?> <style> .header-bottom:not(.fixed) .show-dropdown .dropdown-box { margin-top: 2.2rem; display: none; } ul.breadcrumb.shop-breadcrumb.bb-no { margin-top: 0px; } span.btn.btn-close.cart_remove { padding: 5px !important; border-radius: 60px; /* padding-top: 4px !important; */ font-size: 10px; top: -10px; position: absolute; right: -10px; } tr.row_cart { border-bottom: 2px solid #ccc !important; } </style> <!-- Start of Main --> <main class="main cart"> <!-- Start of Breadcrumb --> <nav class="breadcrumb-nav"> <div class="container"> <ul class="breadcrumb shop-breadcrumb bb-no"> <li class="active" style="font-size: 35px;margin-bottom: -2%;"> Cart Details </li> </ul> </div> </nav> <!-- End of Breadcrumb --> <!-- Start of PageContent --> <div class="page-content"> <div class="container"> <form id="" action="checkout.php" method="POST"> <div class="row gutter-lg mb-10"> <div class="col-lg-8 col-sm-12 pr-lg-4 mb-6"> <div id="add_to_cart_div"> </div> <div class="cart-action mb-6"> <a href="index.php" class="btn btn-dark btn-rounded btn-icon-left btn-shopping mr-auto"><i class="w-icon-long-arrow-left"></i>Continue Shopping</a> </div> </div> <div class="col-lg-4 sticky-sidebar-wrapper"> <div class="sticky-sidebar"> <div class="cart-summary mb-4"> <h3 class="cart-title text-uppercase">Cart Totals</h3> <div class="cart-subtotal d-flex align-items-center justify-content-between"> <label class="ls-25">Subtotal</label> <span><i class="bi bi-currency-rupee"></i><span class="grand_total" id="product_grand_total">0.00</span></span> </div> <hr class="divider"> <hr class="divider mb-6"> <div class="order-total d-flex justify-content-between align-items-center"> <label>Total</label> <span class="ls-50"> <i class="bi bi-currency-rupee"></i><span class="grand_total" id="all_product_grand_total">0.00</span> </span> </div> <button type="submit" class="btn btn-dark btn-block btn-rounded"> Proceed to Checkout </button> </div> </div> </div> </div> </form> </div> </div> <!-- End of PageContent --> </main> <!-- End of Main --> <?php include "footer.php"?> <style> td, th { padding-top: 10px !important; } tr:nth-child(odd) { background-color: unset !important; } .cart-action.mb-6 { margin-top: 10px; } .row.gutter-lg.mb-10 { margin-bottom: 0px !important; } @media (min-width: 340px) and (max-width: 479px) { ul.breadcrumb.shop-breadcrumb.bb-no { margin-bottom: 0px; } nav.breadcrumb-nav li { font-size: 25px !important; } ul.breadcrumb.shop-breadcrumb.bb-no { padding-top: 15px; padding-bottom: 15px; } .cart-action.mb-6 { text-align: center; } .cart-action.mb-6 a { padding: 10px; font-size: 14px; } button.btn.btn-dark.btn-block.btn-rounded { padding: 10px; margin-top: 15px; } .btn i { font-size: 10px; padding: 1px !important; } span.btn.btn-close.cart_remove { padding: 1px !important; border-radius: 60px; /* padding-top: 4px !important; */ font-size: 10px; top: -5px; position: absolute; right: 0px; } span.product_price { font-size: 14px; } tbody { font-size: 12px; } h3.cart-title.text-uppercase { text-align: center; font-size: 20px; } .col-lg-8.col-sm-12.pr-lg-4.mb-6 { margin-bottom: 0px !important; } button.btn.btn-dark.btn-block.btn-rounded { width: 60%; /* text-align: center !important; */ margin-left: 20%; } span.product_price { font-weight: 400; } } </style> <script> $(document).ready(function(){ cart_details(); }); function cart_details(){ $('#add_to_cart_div').empty(); $.ajax({ url: 'ui-api/cart_details.php', type: 'post', data :{type:'total_cart_details'}, success: function (response) { $('#add_to_cart_div').append(response); grand_total() } }); } function removeCart(id){ $.ajax({ url: 'ui-api/api-cart.php', type: 'post', dataType: 'json', data :{delete_id:id,type:'remove'}, success: function (response) { if(response['status']==200){ alert(response['message']) }else{ alert(response['message']) } console.log(response); grand_total(); cart_details() } }); } function myFunction(pro_id,total_quantity){ var quantity = $("#pro_quantity").val(); console.log(quantity); $.ajax({ url: 'ui-api/api-cart.php', type: 'post', data :{quantity:quantity,type:'total_quantity',pro_id:pro_id}, success: function (response) { console.log(response); $('#add_to_cart_div').append(response); //total_quantity(); } }); } $(document).ready(function(){ grand_total(); $("body").on("click",".plus",function(){ console.log("clicked"); var qty=Number($(this).closest("tr").find(".pro_quantity").val()); var price=Number($(this).closest("tr").find(".product_price").text()); console.log(qty); console.log(price); $(this).closest("tr").find(".product_total").text(price*qty); grand_total(); }); $("body").on("keyup",".pro_quantity",function(){ var qty=Number($(this).closest("tr").find(".pro_quantity").val()); var price=Number($(this).closest("tr").find(".product_price").text()); $(this).closest("tr").find(".product_total").text(price*qty); grand_total(); }); }); function grand_total(){ var tot=0; $(".product_total").each(function(){ tot+=Number($(this).text()); }); $("#product_grand_total").text(tot); $("#all_product_grand_total").text(tot); } </script>