MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.119.137.175
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/bsaec.in/css/../../adisgauges.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/bsaec.in/css/../../adisgauges.com/shopping-cart.php
<?php include("site-header.php");?>
  <div class="page-content">
    <div class="dlab-bnr-inr overlay-black-middle" style="background:url(<?=$site_url?>/images/inner-banner.jpg) no-repeat center; background-size:cover;">
      <div class="container">
        <div class="dlab-bnr-inr-entry">
          <h1 class="text-white">Shopping Cart</h1>
          <ul class="list-inline">
            <li><a href="<?=$site_url?>/index.html">Home</a></li>
            <li>|</li>
            <li>Shopping Cart</li>
          </ul>
        </div>
      </div>
    </div>
<div class="section-full bg-gray content-inner-1" >
   




<div class="container">
	<div class="row">
	    <div class="col-md-1"></div>
		<div class="col-md-10">
			<div class="panel panel-info">
			    
			    
			      <?php 
                 $cart_sql=db_query("select * from tbl_basket where bskt_session_id='$_SESSION[cart_session_id]'");
                 if(mysql_num_rows($cart_sql)>0){
               ?>
			    
				<div class="panel-heading">
					<div class="panel-title">
						<div class="row">
							<div class="col-xs-6">
								<h5><span class="glyphicon glyphicon-shopping-cart"></span> Shopping Cart</h5>
							</div>
							<div class="col-xs-6">
							
							</div>
						</div>
					</div>
				</div>
				<div class="panel-body">
				    
				    
<?php 
$sub_total_cart=0;
$tax_cart=0;
$total_cart=0;
$i=0;

while($cart_res=mysql_fetch_array($cart_sql))
{
$i++;
$sub_total_cart=$sub_total_cart+$cart_res['bskt_prd_subtotal'];


$cart_res_cat_url=db_scalar("select category_url from tbl_category where category_id='$cart_res[bskt_prd_id]' ");
?>

					<div class="row">
						<div class="col-xs-2"><img class="img-responsive" src="<?=$site_url?>/uploaded_files/<?=$cart_res['bskt_prd_image_name']?>" style="width:90px;">
						</div>
						<div class="col-xs-4">
							<h4 class="product-name"><strong><a href="<?=$site_url?>/<?=$cart_res_cat_url?>.html" target="_blank"><?=$cart_res['bskt_prd_name']?></a></strong></h4>
						</div>
						<div class="col-xs-6">
							<div class="col-xs-3 text-right">
								<h6><strong><i class="fa fa-usd"></i> <?=$cart_res['bskt_prd_unit_price']?> <span class="text-muted">x</span></strong></h6>
							</div>
							<div class="col-xs-4">
								<input  class="form-control input-sm" min="1" value="<?=$cart_res['bskt_prd_qnty']?>" type="number" id="<?=$i?>" onchange="inc_qty('<?=$i?>','<?=$cart_res[bskt_id]?>');" onkeydown="javascript: return event.keyCode == 69 ? false : true">
							</div>
							<div class="col-xs-3 text-right">
								<h6><strong><i class="fa fa-usd"></i> <?=$cart_res['bskt_prd_subtotal']?></strong></h6>
							</div>
							<div class="col-xs-2">
								<button type="button" class="btn btn-link btn-xs" onclick="del_cart_from_cart('<?=$cart_res[bskt_id]?>');">
									<span class="glyphicon glyphicon-trash"> </span>
								</button>
							</div>
						</div>
					</div>
					<hr>
					
					<?}?>
					
					
				</div>
				<div class="panel-footer">
					<div class="row text-center">
					    <div class="col-xs-3">
					        <button type="button" onclick="window.location.href='<?=$site_url?>/products.html'" class="btn btn-default btn-block">
								 <span class="fa fa-arrow-left"></span> Continue shopping
							</button>
						</div>
<?php 
$total_cart=$sub_total_cart;
?>

						<div class="col-xs-6">
							<h4 class="text-right">Total <strong><i class="fa fa-usd"></i> <?=$total_cart?></strong></h4>
						</div>
						<div class="col-xs-3">
							<button type="button" class="btn btn-success btn-block" onclick="window.location.href='<?=$site_url?>/checkout.html'">
							<span class="glyphicon glyphicon-share-alt"></span>	Checkout
							</button>
						</div>
					</div>
				</div>
				
				<?}else{?>
				
			<center style="padding:50px;">
<h1>
    Your cart is empty !
</h1>
<p>
    <a href="<?=$site_url?>/products.html" style="color:red;">Continue Shopping</a>
</p><hr>
</center>
				<?}?>
				
			</div>
		</div>
	</div>
</div>



    </div>
    <?php include("site-footer.php");?>
  </div>
</div>


<script>
/* function change_size(size,bskt_id)
 {
     
var size_value = document.getElementById("cart_pro_size_"+size+"").value;
//alert(bskt_id);
//alert(size_value);
 $.ajax({
            url:"<?=$site_url?>/change_cart_pro_size.php",
            type:"POST",
            data:{size_value:size_value, bskt_id:bskt_id},
            success:function(data){
            if(data=="updated")
            {
                // swal("Size Taken ", "", "success");
                 
swal({title: "Size Taken", text: "size updated successfully",showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"},
   function(){ 
       location.reload();
   }
);

                
            }
           
       
            }
        });
 }*/
 
 /* function change_color(color,bskt_id)
 {
     
var color_value = document.getElementById("cart_pro_color_"+color+"").value;
//alert(bskt_id);
//alert(size_value);
 $.ajax({
            url:"<?=$site_url?>/change_cart_pro_color.php",
            type:"POST",
            data:{color_value:color_value, bskt_id:bskt_id},
            success:function(data){
            if(data=="updated")
            {
                 swal("Colour Taken ", "", "success");
                
            }
           
       
            }
        });
 }*/
 

 
 
 
    function inc_qty(qty,pro_id)
                {
                  
                 var qty_value = document.getElementById(qty).value;
                 
                 //   alert(qty_value);
                 //   alert(pro_id);
                 
                  //  document.getElementById('show_sub_total_'+qty).innerHTML="hello_"+qty;
                    
             $.ajax({
            url:"<?=$site_url?>/inc_qty_ajax.php",
            type:"POST",
            data:{qty_value:qty_value, pro_id:pro_id},
            success:function(data){
            if(data=="updated")
            {
 swal({title: "Updated", text: "Quantity updated successfully",showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"},
   function(){ 
       location.reload();
   }
);
}else{
   //  swal("Quantity not available !", "", "error");
      swal({title: "Quantity not available !", text: "",showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "error"},
   function(){ 
/*$('#update_cart').attr("disabled","disabled");
$('#update_cart').css({"cursor":"no-drop"});*/
$('.cart_submit').css({"display":"none"});
$('.checkout_btn').css({"display":"none"});

   }
);
}
           
       
            }
        });
                    
                }
                
                
                function del_cart_from_cart(id)
    {
                $.ajax({
            url:"<?=$site_url?>/delete_cart_item_ajax.php",
            type:"POST",
            data:{id:id},
            success:function(data){
                if(data!=""){
          
          swal({title: "Deleted", text: "Item deleted from your cart",showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"},
   function(){ 
       location.reload();
   }
);
                }
            }
        });
    }


 </script>
 
<script src="<?=$site_url?>/js/jquery.min.js"></script> 
<script src="<?=$site_url?>/js/bootstrap.min.js"></script> 
<script src="<?=$site_url?>/js/bootstrap-select.min.js"></script> 
<script src="<?=$site_url?>/js/jquery.bootstrap-touchspin.js"></script> 
<script src="<?=$site_url?>/js/magnific-popup.js"></script> 
<script src="<?=$site_url?>/js/waypoints-min.js"></script> 
<script src="<?=$site_url?>/js/imagesloaded.js"></script> 
<script src="<?=$site_url?>/js/masonry-3.1.4.js"></script> 
<script src="<?=$site_url?>/js/masonry.filter.js"></script> 
<script src="<?=$site_url?>/js/owl.carousel.js"></script> 
<script src="<?=$site_url?>/js/custom.js"></script> 
<script src="<?=$site_url?>/js/dz.carousel.js"></script> 
<script src="<?=$site_url?>/js/switcher.min.js"></script>
</body>
</html>

MMCT - 2023