Şuanki Dizin: /home/wwwdreamtechnolo/public_html/balajimall.com/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/balajimall.com/cart.php |
<?php require_once("lib/functions.php"); $db = new login_function(); $current_session = ""; $show_checkout_btn = 0; if(isset($_GET['delete_id'])) { $delete_id = $_GET['delete_id']; $db->delete_product_from_temp_cart($delete_id); } ?> <?php require_once("header.php"); ?> <div class="slider_above_div"> </div> <div class="banner-top"> <div class="container"> <h3 >CART</h3> <h4><a href="index.php">Home</a><label>/</label>CART</h4> <div class="clearfix"> </div> </div> </div> <style> tr:nth-child(even) { background: #efefef; } tr:hover { background: #cdcdcd; } .btn_data { background:#8aea7c; padding:20px; font-size:16px; cursor:pointer; margin-top:30px; margin-bottom:50px; display:inline-table; } .btn_data:hover { background:#64ed50; } .plus_button { background-color: #357ebd; color: white; margin: 5px; padding: 5px; } .minus_button { background-color: #357ebd; color: white; margin: 5px; padding: 5px; } </style> <script type="text/javascript"> $( document ).ready(function() { $("#close_cart_section").click(function(){ $("#cart_closed_panel").hide('slow'); }); //Working of Plus button $(".plus_button_new").click(function(){ var current_minus_qnty = $(this).parent().find(".field").first().val(); var id_of_product = $(this).parent().find(".val_id").first().val(); var val_price_of_product = $(this).parent().find(".val_price").first().val(); var url_val = "add-cart-background.php"; $.post("add-cart-background.php", { c_id: id_of_product, actual_price: val_price_of_product, qnty:current_minus_qnty }, function(data, status){ if(data=="success") { $('#data_loader').load('checkout_data.php'); //$("#carts_section").load("added_carts.php"); $(".inblock").load("cartscount.php"); $("#data_loader").load("checkout_data_another.php"); //alert("Cart added successfully"); } }); return false; }); //Working of Minus button $(".minus_button_new").click(function(){ var current_minus_qnty = $(this).parent().find(".field").first().val(); var id_of_product = $(this).parent().find(".val_id").first().val(); var val_price_of_product = $(this).parent().find(".val_price").first().val(); var url_val = "add-cart-background.php"; $.post("minus-cart-background.php", { c_id: id_of_product, actual_price: val_price_of_product, qnty:current_minus_qnty }, function(data, status){ if(data=="success") { $('#data_loader').load('checkout_data.php'); //$("#carts_section").load("added_carts.php"); $("#cart_block").load("cartscount.php"); $("#data_loader").load("checkout_data_another.php"); //alert("Cart removed successfully"); } }); return false; }); }); </script> <style> .heading_data { background:#A349A4; color:#FFF; text-align:center; font-size:15px !important; } </style> <br /> <br /> <form method="post"> <table style="margin:auto;" class="cart_t"> <thead> <td class="heading_data" width="30" style="font-size:15px !important;">Sr.no</td> <td class="heading_data" width="350" style="font-size:15px !important;">Product Name</td> <td class="heading_data" width="150" style="font-size:15px !important;">Image</td> <td class="heading_data" width="150" style="font-size:15px !important;">Qty</td> <td class="heading_data" width="100" style="font-size:15px !important;">Price</td> <td class="heading_data" width="50" style="font-size:15px !important;">Action</td> </thead> <?php $total = 0; $total1 = 0; $product_id = $db->fetch_all_temp_cart_data($current_session); if(!empty($product_id)) { $counter = 0; foreach($product_id as $record) { $show_checkout_btn = 1; $t_id = $product_id[$counter][0]; $s_id = $product_id[$counter][1]; $p_id = $product_id[$counter][2]; $qty = $product_id[$counter][3]; $cart_data = $db->get_all_product_info_display_cart($p_id); $fetch_qty = $db->fetch_total_qty($s_id,$p_id); $f_p_qty = $db->fetch_particular_product_qty($current_session,$p_id); if(!empty($cart_data)) { $id = $cart_data[0]; $category = $cart_data[1]; $product_name = $cart_data[2]; $tags = $cart_data[3]; $description = $cart_data[4]; $actual_price = $cart_data[5]; $selling_price = $cart_data[6]; $p_images = $db->fetch_product_images_by_product_id($id); ?> <tr> <td style="text-align:center;"><?php echo $counter+1; ?></td> <td><?php echo $product_name; ?></td> <td style="text-align:center; padding-top:7px; padding-bottom:7px;"> <?php if($p_images != "") { ?> <a href="product/<?php echo $p_images; ?>" target="_blank"><img src="product/<?php echo $p_images; ?>" height="100px" style="border:1px solid #cdcdcd;padding:2px;"></a> <?php } else { ?> <img src="/images/no-image.png" height="100px"> <?php } ?> </td> <td style="text-align:center;"> <!-- <a href="<?php $_SERVER['PHP_SELF']; ?>?delete_id=<?php echo $id; ?>" style="background-color:red;color:white;margin:5px;padding:5px;"> - </a> <input type="text" style="width:50px" value=<?php if($f_p_qty == "") {?> 0 <?php }else { echo $f_p_qty; ?><?php }?> class=field > <a href="<?php $_SERVER['PHP_SELF']; ?>?c_id=<?php echo $id; ?>&actual_price=<?php echo $selling_price; ?>" style="background-color:red;color:white;margin:5px;padding:5px;">+</a> --> <a href="<?php $_SERVER['PHP_SELF']; ?>?rmsgtm=<?php echo $t_id; ?>" class="minus_button_new1" style="font-weight:bold; font-size:25px;"> - </a> <input type="text" style="width:20px" value=<?php if($f_p_qty == "") {?> 1 <?php }else { echo $f_p_qty; ?><?php }?> class="field" /> <input type="hidden" value=<?php echo $id; ?> class="val_id" /> <input type="hidden" value=<?php echo $selling_price; ?> class="val_price" /> <a href="<?php $_SERVER['PHP_SELF']; ?>?i_c_id=<?php echo $id; ?>&actual_price=<?php echo $selling_price; ?>" class="plus_button_new1" style="font-weight:bold; font-size:25px;">+</a> </td> <td style="text-align:center;">Rs. <?php echo $selling_price = $selling_price*$f_p_qty; ?></td> <td style="text-align:center;"><a href="cart.php?delete_id=<?php echo $t_id; ?>" style="color:red; text-align:center;" onclick="return confirm('Are you sure?');"><i class="fa fa-trash" aria-hidden="true" ></i></a></td> </tr> <?php $total = $total+$fetch_qty; $total1 = $total1+$selling_price; } $counter++; } ?> <tr style="background:#A349A4; height:40px; font-family:Cambria; font-weight:bold; color:#FFF;"> <td colspan="3" style="text-align:center;font-size:15px !important;"><b>Total Amount- </b></td> <td style="text-align:center;font-size:15px !important;"><b><?php echo $total; ?></b></td> <td style="text-align:center;font-size:15px !important;"><b>Rs. <?php echo $total1; ?></b></td> <td></td> </tr> <?php }else { ?> <tr style="background:#A349A4;height:30px;font-size:14px;"> <td colspan="6">You have not added any products in cart.</td> </tr> <?php } ?> </table> <?php if($show_checkout_btn == 1) { ?> <br /> <br /> <center><a href="checkout-complete.php" id="Register" name="checkout_btn" class="btn_new" onclick="return confirm('Are you sure?');" style="padding:15px;">CHECKOUT</a></center> <?php } ?> </form> </div> <?php require_once("footer.php"); ?> <script src="js/easyResponsiveTabs.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#horizontalTab').easyResponsiveTabs({ type: 'default', //Types: default, vertical, accordion width: 'auto', //auto or any width like 600px fit: true // 100% fit in a container }); }); </script> <!-- //tabs --> <!-- smooth scrolling --> <script type="text/javascript"> $(document).ready(function() { /* var defaults = { containerID: 'toTop', // fading element id containerHoverID: 'toTopHover', // fading element hover id scrollSpeed: 1200, easingType: 'linear' }; */ $().UItoTop({ easingType: 'easeOutQuart' }); }); </script> <a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a> <!-- //smooth scrolling --> <!-- for bootstrap working --> <script src="js/bootstrap.js"></script> <!-- //for bootstrap working --> <script type='text/javascript' src="js/jquery.mycart.js"></script> </div> </div> </div> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4