Medicine

[insert_php]




Buy Medicines



“;

echo ““;
?>


Weight Price Qty.
250 gm/ml 100 gm/ml ‘ value=’Add to cart’ id=’addToCart_‘ onclick=’yourEvent(this);’> Add To Cart

“;
} ?>

Your cart contains

Products


var str = btnClick.id; var cnt = str.substring(str.lastIndexOf('_')+1); //var cnt = str.lastIndexOf("_"); //alert(cnt);

var orderid = $("#order_id").val(); //alert("orderid = "+orderid); if(orderid == "") orderid = 0; else orderid = $("#order_id").val(); //alert(orderid); var productId = "#product_id_"+cnt; var product_id = $(productId).val(); //alert("product_id = "+product_id); var productType = "#product_type_"+cnt; var product_type = $(productType).val(); // var product_id = document.getElementById("product_id").rows[1].cells.length; //alert(product_id); var wt100gmqty = "#wt100gmqty_"+cnt; var id1 = $(wt100gmqty).val(); //alert(id1); var wt500gmqty = "#wt500gmqty_"+cnt; var id2 = $(wt500gmqty).val(); var wt1kgqty = "#wt1kgqty_"+cnt; var id3 = $(wt1kgqty).val(); if(id1 > 0 || id2 > 0 || id3 > 0){ $.ajax({ url: "savetocart.php?orderid="+orderid+"&productid="+product_id+"&producttype="+product_type+"&book_qty=0 &wt100gmqty="+id1+"&wt500gmqty="+id2+"&wt1kgqty="+id3, type: 'GET',

success: function(data) { // alert("order_id = "+data); $("#order_id").val(data); //var list = new Array(); $.ajax({ url: "loadcartinfo.php?orderid="+data, type: 'GET', //dataType: 'json', //data: datastring, success: function(data) {

//alert("response = "+result); // alert("response = "+data.length); // var specificitem = $(data).find("num_rows"); // var mydata= $.getJSON(data); // var art1 = result[0]; // var art2 = result[1]; //alert("art2 = "+art2); //alert("art1 = "+art1); // var $response=$(data); // var parsed = $("#info").html(data[1]); //alert($response); //$("#tot").html(data); //$("#info").append(results.args1); $("#info").html(data);

//alert("info = "+result); }, error: function(data) { alert("Error occured"); } });

}, error: function(data) { alert("Error occured"); } }); $("#addToCart_"+cnt).val("Added"); } else alert("Please Enter Valid Quantity");

} function cart(){

var orderid = $("#order_id").val();

window.location = "Cart.php?orderid="+orderid; } function bookFunction() { var orderid = $("#order_id").val(); // alert(orderid);

window.location.href='book.php?order_id='+orderid; }




[/insert_php]

Leave a Reply

Your email address will not be published. Required fields are marked *

Essay Competition Result