ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/proc/thread-self/root/home2/selectio/www/ramali.in/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/proc/thread-self/root/home2/selectio/www/ramali.in/cart.php

<?php include "header1.php";

if(!isset($_SESSION['ramali_textiles'])){
    echo ("<script LANGUAGE='JavaScript'>
    window.alert('Please Login...');
    window.location.href='index.php';
    </script>");
}

?>   


<main class="main cart">
            <!-- Start of Breadcrumb -->
            <!--<nav class="breadcrumb-nav">
                <div class="container">
                    <ul class="breadcrumb shop-breadcrumb bb-no">
                        <li class="active"><a href="#">Shopping Cart</a></li>
                        <li><a href="#">Payment Details</a></li>
                        <li><a href="#">Checkout</a></li>
                        <li><a href="#">Order Complete</a></li>
                    </ul>
                </div>
            </nav>-->
            <!-- End of Breadcrumb -->

            <!-- Start of PageContent -->
            <div class="page-content">
                <div class="container">
                    <div class="row gutter-lg mb-10">
                        <div class="col-lg-8 pr-lg-4 mb-6">
                            <div id="add_to_cart_div">
                                
                            </div>
                            
                             
                            
                            
                            

                            <div class="cart-action mb-6">
                                <a href="#" class="btn btn-dark btn-rounded btn-icon-left btn-shopping mr-auto"><i class="w-icon-long-arrow-left"></i>Continue Shopping</a>
                                <button type="submit" class="btn btn-rounded btn-default btn-clear" name="clear_cart" value="Clear Cart">Clear Cart</button> 
                                <button type="submit" class="btn btn-rounded btn-update disabled" name="update_cart" value="Update Cart">Update Cart</button>
                            </div>
                        </div>
                        <div class="col-lg-4 sticky-sidebar-wrapper">
                            <div class="pin-wrapper" style="height: 791.359px;"><div class="sticky-sidebar" style="border-bottom: 0px none rgb(102, 102, 102); width: 393.312px;">
                                <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">

                                    <ul class="shipping-methods mb-2">
                                        <li>
                                            <label class="shipping-title text-dark font-weight-bold">Shipping</label>
                                        </li>
                                        <li>
                                            <div class="custom-radio">
                                                <input type="radio" id="free-shipping" class="custom-control-input" name="shipping">
                                                <label for="free-shipping" class="custom-control-label color-dark">Free
                                                    Shipping</label>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="custom-radio">
                                                <input type="radio" id="local-pickup" class="custom-control-input" name="shipping">
                                                <label for="local-pickup" class="custom-control-label color-dark">Local
                                                    Pickup</label>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="custom-radio">
                                                <input type="radio" id="flat-rate" class="custom-control-input" name="shipping">
                                                <label for="flat-rate" class="custom-control-label color-dark">Flat
                                                    rate:
                                                    $5.00</label>
                                            </div>
                                        </li>
                                    </ul>

                                    <hr class="divider mb-6">
                                    <div class="order-total d-flex justify-content-between align-items-center">
                                        <label>Total</label>
                                        <span class="ls-50">$100.00</span>
                                    </div>
                                    <a href="payment-details.php" class="btn btn-block btn-dark btn-icon-right btn-rounded  btn-checkout">
                                        Proceed to checkout<i class="w-icon-long-arrow-right"></i></a>
                                </div>
                            </div></div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End of PageContent -->
        </main>
        


<?php include "footer1.php"?>


<script>

function get_cart_list(pro_id,type){
    if(type=='remove'){
    $('#add_to_cart_div').empty();}
    else 
    {
         //$('#cart-div').empty();
    }
    $.ajax({
        url: 'ui-api/cart.php',
        type: 'post',
        data :{pro_id:pro_id,type:type},
        success: function (response) {
            console.log(response);
             //console.log('cart response--909:'+response);
            $('#add_to_cart_div').append(response);
            grand_total();
            //cart_subtotal();
        //  $('#product-filter-list').focus();
        }
    });
}


$(document).ready(function(){
    $.ajax({
                url: 'ui-api/cart.php',
                type: 'post',
                success: function (response) {
                    console.log('cart response:'+response);
                    $('#add_to_cart_div').append(response);
                  
                }
            }); 
}); 
     
     $(document).ready(function(){
          grand_total();
          
          
          
            $("body").on("click",".plus",function(){
                console.log("clicked");
                //delete_DE();
                 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);
        }    
          
        
     
 
      });  
      
         function grand_total(){
          var tot=0;
          $(".product_total").each(function(){
            tot+=Number($(this).text());
          });
          $("#product_grand_total").text(tot);
        }
        
</script>

Zerion Mini Shell 1.0