if(isset($_POST['Submit'])) { date_default_timezone_set('Asia/Kolkata'); $date = date('Y-m-d H:i:s ', time()); $nameaa=""; $browsessionid=$_POST['brows_id']; $checkboxValue = $_POST['dif_chk']; if($checkboxValue!="") { $checkboxValue_2 = 0; } else { $checkboxValue_2 = 1; } $ses_us=$_SESSION["userid"]; $refid=$_POST['refid']; $sessionid_free=$_POST['brows_id']; $cust_id=$_POST['cust_id']; $name=addslashes($_POST['fname']); $mobileno=addslashes($_POST['mobile']); $email=addslashes($_POST['email']); $country=addslashes($_POST['country']); $address=addslashes($_POST['address']); $city=addslashes($_POST['city']); $state=addslashes($_POST['state']); $pin=addslashes($_POST['pin']); $payment_mode=addslashes($_POST['payment_mode']); $company_name=addslashes($_POST['company_name']); $sessionid_free=$cust_id; $login = "SELECT * from shop_user WHERE user_id= '$sessionid_free' "; $resqry = mysql_query($login) or die("ERROR:".mysql_error()); $numrows = mysql_num_rows($resqry); if($numrows==0) { //$Insert_members = "INSERT INTO shop_user(`password`,`name`,`email`,`phone`, `address`,`city`,`postcode`,`country`,`state`,`date`,`status`) VALUES ('test@123','$name','$email','$mobileno' ,'$address' ,'$city','$pin','$country','$state','$date','1')"; //$inexe=mysql_query($Insert_members); //$attachmentfileid_mmmmmmmm = mysql_insert_id(); // $sessionid_free=$attachmentfileid_mmmmmmmm; } if($numrows==1) { //$Updatecart = "UPDATE shop_user SET `email`='$email',`phone`='$phone',`state`='$state',`country`='$country',`postcode`='$pin',`city`='$city',`address`='$address',`name`='$name' WHERE `user_id`='$cust_id' "; } $objcorderid = mysql_query("SELECT * from tbl_confirmorder "); $nosnewcid=mysql_num_rows($objcorderid); $Fetcorderid = mysql_fetch_array($objcorderid); if($nosnewcid=='0') { $maxcorderid='1'; $maxcorderid1=HC.$maxcorderid; } else { $objmaxcorder = mysql_query("SELECT max(orid)+1 as newordid from tbl_confirmorder "); $Fetmaxcorder = mysql_fetch_array($objmaxcorder); $maxcorderid=$Fetmaxcorder['newordid']; $maxcorderid1=HC.$maxcorderid; } $objcorderid = mysql_query("SELECT * from tbl_confirmorder "); $nosnewcid=mysql_num_rows($objcorderid); $Fetcorderid = mysql_fetch_array($objcorderid); if($nosnewcid=='0') { $maxcorderid='1'; $maxcorderid1=HC.$maxcorderid; } else { $objmaxcorder = mysql_query("SELECT max(orid)+1 as newordid from tbl_confirmorder "); $Fetmaxcorder = mysql_fetch_array($objmaxcorder); $maxcorderid=$Fetmaxcorder['newordid']; $maxcorderid1=HC.$maxcorderid; } "SELECT * from shop_cart_admin where session_id='$browsessionid'"; $objRe_1 = mysql_query("SELECT * from shop_cart_admin where session_id='$browsessionid'"); $numrows_ma_1 = mysql_num_rows($objRe_1); $date_ss = date('Y-m-d', time()); $date_ss=strtotime($date_ss); $y=date("Y",$date_ss); $m=date("M",$date_ss); $d=date("d",$date_ss); //$nameaa .="$d"; $nameaa .="$m"; $nameaa .=" / "; $nameaa .=" $y"; //$nameaa .=$y; if($company_name=="Energy Foods") { if($payment_mode=="Cash") { $objcorderid_new = mysql_query("SELECT * FROM `tbl_confirmorder` WHERE varstatus='Cash' and `orid` in (select orderid from tbl_order) "); $nosnewcid_new=mysql_num_rows($objcorderid_new); } else { $objcorderid_new = mysql_query("SELECT * FROM `tbl_confirmorder` WHERE varstatus!='Cash' and company_name='Energy Foods' and `orid` in (select orderid from tbl_order) "); $nosnewcid_new=mysql_num_rows($objcorderid_new); } } $company_name; if($company_name=="Siddhayoga Pharma") { if($payment_mode=="Cash") { $objcorderid_new = mysql_query("SELECT * FROM `tbl_confirmorder` WHERE varstatus='Cash' and `orid` in (select orderid from tbl_order) "); $nosnewcid_new=mysql_num_rows($objcorderid_new); } else { "SELECT * FROM `tbl_confirmorder` WHERE varstatus!='Cash' and company_name='Siddhayoga Pharma' and `orid` in (select orderid from tbl_order) "; $objcorderid_new = mysql_query("SELECT * FROM `tbl_confirmorder` WHERE varstatus!='Cash' and company_name='Siddhayoga Pharma' and `orid` in (select orderid from tbl_order) "); $nosnewcid_new=mysql_num_rows($objcorderid_new); } } $nosnewcid_new_1=$nosnewcid_new+11; $nosnewcid_new_1_mall=$nosnewcid_new+390; if($company_name=="Energy Foods") { if($payment_mode=="Cash") { $nosnewcid_new_m=$nosnewcid_new; $orderid_new_s=CO.$nosnewcid_new_m; } else { $orderid_new_s=HC.$nosnewcid_new_1; } } if($company_name=="Siddhayoga Pharma") { if($payment_mode=="Cash") { $nosnewcid_new_m=$nosnewcid_new; $orderid_new_s=CO.$nosnewcid_new_m; } else { $nosnewcid_new_1_mall; $nosnewcid_new_1; $nosnewcid_new_2=sprintf('%03u', $nosnewcid_new_1_mall); $orderid_new_s=SYP.$nosnewcid_new_2; } } if($numrows_ma_1>0) { $date = date_default_timezone_set('Asia/Kolkata'); $dt2=date('Y-m-d H:i:s' ); $offer=addslashes($_POST['offer']); /* $Insert_memberord = "INSERT INTO tbl_confirmorder (`userid`,`intsessionid`,`orderid`,`refid`,`orderstatus`,`res_id`,`varstatus`,`order_date_time`,`order_tc_id`,`company_name`,`offer`) VALUES ('$sessionid_free','$browsessionid','$maxcorderid','$orderid_new_s','0','$ses_us','$payment_mode','$dt2','$checkboxValue_2','$company_name','$offer')"; $inexeord=mysql_query($Insert_memberord); $attachmentfileid = mysql_insert_id();*/ $attachmentfileid=$_REQUEST['order_id']; $Delete_Question = "DELETE FROM tbl_order WHERE orderid='$attachmentfileid' "; $Result_Question = mysql_query($Delete_Question); //$sessionid_free= addslashes($_POST['sessionid_free']); //$Updatecart = mysql_query("UPDATE tbl_confirmorder SET `order_tc_id`='$checkboxValue_2' where refid='$refid' "); $objRe = mysql_query("SELECT * from shop_cart_admin where session_id='$browsessionid'"); $numrows_ma = mysql_num_rows($objRe); while($Fetchneword = mysql_fetch_array($objRe)) { $del_country=$Fetchneword['del_country']; $del_city=$Fetchneword['del_city']; $del_state=$Fetchneword['del_state']; $del_address=$Fetchneword['del_address']; $del_inp=$Fetchneword['del_inp']; "UPDATE tbl_confirmorder SET `contry`='$del_country',`city`='$del_city',`state`='$del_state',`address`='$del_address',`pin`='$del_inp' where refid='$refid' "; $Updatecart = mysql_query("UPDATE tbl_confirmorder SET `contry`='$country',`city`='$city',`state`='$state',`address`='$address',`pin`='$pin' where refid='$refid' "); $productid= $Fetchneword['productid']; $qty= $Fetchneword['qty']; $freeqty= $Fetchneword['qty_free']; $price= $Fetchneword['price']; $totprice= $Fetchneword['totprice']; $date = date_default_timezone_set('Asia/Kolkata'); $dt2=date('Y-m-d H:i:s' ); $Insert_member = "INSERT INTO tbl_order(`user_id`,`res_id`,`productid`,`qty`,`price`,`totprice`,`orderdate`,`type`,`session_id`,`ordertime`,`orderid`,`freeqty`) VALUES ('$sessionid_free','0','$productid','$qty','$price' ,'$totprice','$dt2','','$browsessionid','','$attachmentfileid','$freeqty')"; $inexe=mysql_query($Insert_member); } $Delete_Question = "DELETE FROM shop_cart_admin WHERE `session_id`='$browsessionid'"; $Result_Question = mysql_query($Delete_Question); "SELECT * from shop_user where user_id='$sessionid_free_123' "; $objcorderid_n_user = mysql_query("SELECT * from shop_user where user_id='$sessionid_free_123' "); $nosnewcid_n_user=mysql_num_rows($objcorderid_n_user); $Fetcorderid_n_user = mysql_fetch_array($objcorderid_n_user); $new_status=$Fetcorderid_n_user['new_status']; $new_user_name=$Fetcorderid_n_user['email']; $objcorderid = mysql_query("SELECT * from tbl_confirmorder where refid='$refid' "); $nosnewcid=mysql_num_rows($objcorderid); $Fetcorderid = mysql_fetch_array($objcorderid); $new_order_id=$Fetcorderid['orderid']; $new_order_id=$Fetcorderid['orderid']; $userid_new_userid=$Fetcorderid['userid']; $orderdate=$Fetcorderid['order_date_time']; $order_id=$Fetcorderid['refid']; $contry=$Fetcorderid['contry']; if($contry=="India") { $sym="Rs"; } else { $sym="$"; } $city=$Fetchneword['city']; $state=$Fetcorderid['state']; $address=$Fetchneword['address']; $pin=$Fetchneword['pin']; ?> mail //$id=170; $objconfirmorder = mysql_query("SELECT * from tbl_confirmorder where refid='$refid' "); //$Fetconfirmorder=$DB->query($objconfirmorder); $nss_con=mysql_num_rows($objconfirmorder); $manssss='0'; $rows_order = mysql_fetch_array($objconfirmorder); $orderid=$rows_order['orderid']; $res_id =$rows_order['res_id']; $type =$rows_order['type']; $datenew=$rows_order['deliverydate']; $userid =$rows_order['userid']; $orderstatus=$rows_order['orderstatus']; $state=$rows_order['state']; $contry=$rows_order['contry']; if($contry=="India") { $ss="Payumoney"; } else { $ss="Paypal"; } $courier_no=$rows_order['courier_no']; "SELECT * from `shop_user` where user_id='$userid' "; $Query = mysql_query("SELECT * from `shop_user` where user_id='$userid' "); //$name=$DB->query($Query); $no=mysql_num_rows($Query); $row = mysql_fetch_array($Query); $new_status=$row['new_status']; ?> $msg1.='';?> mail $msg1; if($numrows_ma>0) {} } header("location:order_confirm_admin.php?id=".$attachmentfileid); exit(); } ?> $Delete_Question = "DELETE FROM shop_cart_admin WHERE session_id='$browsessionid' "; $Result_Question = mysql_query($Delete_Question); $orderid_id_pundai=$_REQUEST['order_id']; $objitem = mysql_query("SELECT * from tbl_order where orderid='$orderid_id_pundai'"); $num_rows = mysql_num_rows($objitem); $totprice1=0; while($Fetitem = mysql_fetch_array($objitem)) { $id=$Fetitem['productid']; $qty=$Fetitem['qty']; $res=mysql_query("insert into shop_cart_admin(`user_id`,`session_id`,`productid`, `qty`, `price`,`totprice`) values('".$user_id_c_m."','$browsessionid','$id','$qty','".$Fetitem['price']."','".$Fetitem['totprice']."')"); } //header("location:checkout.php"); ?>
Product | Total | |
---|---|---|
echo $resmenu['name'];?> x if($x>0) { ?> echo $qty;?> } ?> if($x>0) { ?>( } ?> echo $qty;?> if($x>0) { ?>+ $x;?> Free } ?> ) | } else { ?>echo $resmenu['name'];?> x echo $productprice;?>.00 $qty;?> ?> | } ?>
|
Cart Total | $browsessionid=session_id(); $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM shop_cart_admin where session_id='$browsessionid'"; $objResultnewsubee = mysql_query($objqrynewsubee); $Fetchnewww = mysql_fetch_array($objResultnewsubee); $subtotal=$Fetchnewww['amtTotal']; ?> echo $subtotal;?> | |
Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.
Pay With PayuMoney.
Product | Total | |
---|---|---|
echo $resmenu['name'];?> x if($x>0) { ?> echo $qty;?> } ?> if($x>0) { ?>( } ?> echo $qty;?> if($x>0) { ?>+ $x;?> Free } ?> ) | } else { ?>echo $resmenu['name'];?> x echo $productprice;?>.00 $qty;?> ?> | } ?>
|
Cart Total | $browsessionid=session_id(); $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM shop_cart_admin where session_id='$browsessionid'"; $objResultnewsubee = mysql_query($objqrynewsubee); $Fetchnewww = mysql_fetch_array($objResultnewsubee); $subtotal=$Fetchnewww['amtTotal']; ?> echo $subtotal;?> | |
Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.
Pay With PayuMoney.
Product | Total | |
---|---|---|
echo $resmenu['name'];?> x if($x>0) { ?> echo $qty;?> } ?> if($x>0) { ?>( } ?> echo $qty;?> if($x>0) { ?>+ $x;?> Free } ?> ) | } else { ?>echo $resmenu['name'];?> x echo $productprice;?> $qty;?> ?> | } ?>
|
Cart Total | $browsessionid=session_id(); $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM shop_cart_admin where session_id='$browsessionid'"; $objResultnewsubee = mysql_query($objqrynewsubee); $Fetchnewww = mysql_fetch_array($objResultnewsubee); $subtotal=$Fetchnewww['amtTotal']; ?> echo $subtotal;?> | |
Weight | echo $new_kilo_41=($tot_weight_2/1000);?> | |
Shipping&Packing Charges |
if($country=="India")
{
?>
echo $new_kilo_4=(($new_kilo_6+1)*$courier_fees);?>.00
}
else
{
$tot_weight_2_int=$tot_weight_2;
$Query_job_move_courier_country= mysql_query("SELECT * from tbl_courier_charges_country where state='$country' ");
$row_job_move_courier_country= mysql_fetch_array($Query_job_move_courier_country);
$num_max_ship_int=mysql_num_rows($Query_job_move_courier_country);
if($num_max_ship_int>0)
{
$courier_fees_country=$row_job_move_courier_country['amount'];
$courier_fees_country_extra=$row_job_move_courier_country['additional_amount'];
}
else
{
$Query_job_move_courier_country= mysql_query("SELECT * from tbl_courier_charges_country where state='Others' ");
$row_job_move_courier_country= mysql_fetch_array($Query_job_move_courier_country);
$courier_fees_country=$row_job_move_courier_country['amount'];
$courier_fees_country_extra=$row_job_move_courier_country['additional_amount'];
}
if($tot_weight_2_int<=500)
{
$courier_fees_country_1=$courier_fees_country;
}
else
{
$tot_weight_2_int_1=($tot_weight_2_int-500);
$tot_weight_2_int_1_2=($tot_weight_2_int_1/250);
$new_kilo_5_int = explode('.',$tot_weight_2_int_1_2);
$new_kilo_6_int=$new_kilo_5_int[0];
$new_kilo_6_int_7=($new_kilo_6_int+1);
$new_kilo_6_int_7_8=($courier_fees_country_extra*$new_kilo_6_int_7);
$courier_fees_country_1=($courier_fees_country+$new_kilo_6_int_7_8);
}
?>
$new_kilo_4=($courier_fees_country_1);?> echo sprintf('%0.2f', $new_kilo_4);?>
}
?>
|
|
Order Total ( Inclusive of GST ) | if($country=="India") { ?> $mass= $subtotal+$new_kilo_4;?> echo sprintf('%0.2f', $mass);?> } else { ?> $massss=$new_price+$courier_fees_country_1;?> echo sprintf('%0.2f', $massss);?> } ?> | |
Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.
Pay With PayuMoney.