function delete_cart(id) { jQuery.ajax({ type: "POST", url: "/ajaxfiles/delete_cart.php", data: {cart_id:id}, success : function(data){ if(data == "ok") { window.location.reload(); } } }); } function onplusmin(type,cart_id) { var qty1=$("#proqty"+cart_id).val(); if(type=="min") { var qty=+qty1 - 1; } else { var qty=+qty1 + 1; } console.log(qty); if(qty!="0") { console.log(qty+" "+cart_id); $.ajax({ type: "POST", url: "/ajaxfiles/update_to_cart.php", dataType: "JSON", data: { Qty:qty,CID:cart_id}, success: function(data){ console.log(data.status); if(data.status=="error") { $("#error"+cart_id).show() $("#proqty"+cart_id).val(data.qty) $("#error"+cart_id).html(data.message); if(data.qty!=0) { setTimeout(function(){ $("#error"+cart_id).hide(); $("#error"+cart_id).html("")}, 3000); } } else { $("#error"+cart_id).hide() $("#error"+cart_id).html("") $("#proqty"+cart_id).val(data.qty) var productgst=data.gst; var progstprice=data.gstperproduct; var prosubtot=data.subtotal; var productrate=data.total; var productgstval=data.payment_fees; var per_product_weight=data.per_product_weight; var oldsubtot=$("#fullsubtotal").val(); var oldgst=$("#fullgst").val(); var oldgrandtot=$("#fullgrandtot").val(); var ttsubtot=+prosubtot - +progstprice; $("#tt-subtot"+cart_id).html(''+Math.round(ttsubtot)); $("#tt-subtot1"+cart_id).html(''+Math.round(ttsubtot)); $("#tt-weight"+cart_id).html(''+Math.round(per_product_weight)+" Kg"); $("#tt-weight1"+cart_id).html(''+Math.round(per_product_weight)+" Kg"); if(type=="min") { var subtot=+oldsubtot - +productrate; var gst=+oldgst - +productgstval; var grandtot=+subtot + +gst; $("#subtot").html(''+Math.round(subtot)); $("#gst").html(''+Math.round(gst)); $("#grandtot").html(''+Math.round(grandtot)); $("#fullsubtotal").val(subtot); $("#fullgst").val(gst.toFixed(0)); $("#fullgrandtot").val(grandtot); } else { var subtot=+oldsubtot + +productrate; var gst=+oldgst + +productgstval; var grandtot=+subtot + +gst; $("#subtot").html(''+Math.round(subtot)); $("#gst").html(''+Math.round(gst)); $("#grandtot").html(''+Math.round(grandtot)); $("#fullsubtotal").val(subtot); $("#fullgst").val(gst.toFixed(0)); $("#fullgrandtot").val(grandtot); } $(".plus-btn").css("pointer-events","visible"); $(".minus-btn").css("pointer-events","visible"); } } }); } else { $(".plus-btn").css("pointer-events","visible"); $(".minus-btn").css("pointer-events","visible"); } } function checkout() { var gtot=$("#fullgrandtot").val(); if(gtot!="0") { var base='https://rrgandhi.com/'; window.location.href=base+"checkout"; } else { $("#ordererr").show(); $("#ordererr").html("0 QTY not allowed"); setTimeout(function(){ $("#ordererr").hide(); }, 3000); } }
Contact Us To Get Wholesale Discounts Of Full Catalog | +91 8000078727

My Shopping Cart

Product Quantity Unit Price Total
Order Summary
Total Item:
0
Sub Total:
0
GST:
0
Grand Total :
0
-