Preview: mithaas-order-detail.php
Size: 15.03 KB
/home/godevadmin/public_html/admin/mithaas-order-detail.php
<?php
session_start();
include("../include/config.php");
include("../include/functions.php");
validate_admin();
$objmithaas = new DB($db_namemithaas, $hostmithaas, $usernamemithaas, $passwordmithaas);
if($_REQUEST['order_id']!=''){
$sql=$objmithaas->query("select * from tbl_order where id=".$_REQUEST['order_id']);
$result=$objmithaas->fetchNextObject($sql);
$prosub=array();
if($result->sub_id){
$subArr=explode(",",$result->sub_id);
if(count($subArr)>0){
foreach($subArr as $value){
$sqlsubs=$objmithaas->query("SELECT b.product_id,b.subscription_type FROM user_subscription as a left join user_subscription_order_details as b on a.sub_id=b.subs_id WHERE a.userid='" . $result->user_id . "' and a.sub_id=$value");
$Subresult = $objmithaas->fetchNextObject($sqlsubs);
$prosub[$Subresult->product_id]=$Subresult->subscription_type;
}
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo SITE_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="middle" class="headingbg bodr text14"><em><img src="images/arrow2.gif" width="21" height="21" hspace="10" align="absmiddle" /></em>Admin: order Details </td>
</tr>
<tr>
<td height="100" align="left" valign="top" bgcolor="#f7faf9" class="bodr"><form name="frm" method="POST" enctype="multipart/form-data" action="" onSubmit="return validate(this)">
<input type="hidden" name="submitForm" value="yes" />
<input type="hidden" name="id" value="<?php echo $_REQUEST['id'];?>" />
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Order Details</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><strong>Order Date:</strong></td>
<td width="34%"><?php $added_date=explode("-",$result->order_date); if($added_date[0]!='0000'){ echo date("d M Y H:i",strtotime($result->order_date)); }?></td>
<td width="14%"><strong>Order ID:</strong></td>
<td width="34%"><?php echo stripslashes($result->id); ?></td>
</tr>
<tr>
<td width="18%"><strong>User ID:</strong></td>
<td width="34%"><?php echo stripslashes($result->user_id);?></td>
<td width="14%"><strong>Email:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_email);?></td>
</tr>
</table></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Delivery Information</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><strong> First Name:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_fname);?></td>
<td width="14%"><strong> Last Name:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_lname);?></td>
</tr>
<?php
if($result->ship_full_address!=""){
?>
<tr>
<td width="18%"><strong> Full address:</strong></td>
<td width="34%" colspan="3" ><?php echo stripslashes($result->ship_full_address);?></td>
</tr>
<?php
} else {
?>
<tr>
<td width="18%"><strong> House Number:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_house_no);?></td>
<td width="14%"><strong> Street:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_street);?></td>
</tr>
<tr>
<td width="18%"><strong> Complex:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_complex);?></td>
<td width="14%"><strong> Landmark:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_landmark);?></td>
</tr>
<tr>
<td width="18%"><strong> City:</strong></td>
<td width="34%"><?php echo getField('city',$tbl_city,$result->ship_city_id);?></td>
<td width="14%"><strong> Area:</strong></td>
<td width="34%"><?php echo $result->ship_area;?></td>
</tr>
<?php
}
?>
<!--<tr>
<td width="18%"><strong> Latitude:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_latitude);?></td>
<td width="18%"><strong> Longitude:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_longitude);?></td>
</tr>-->
<tr>
<td width="18%"><strong> Pincode:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_pincode);?></td>
<td width="14%"><strong> </strong></td>
<td width="34%"> </td>
</tr>
<tr>
<td width="18%"><strong> Mobile:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_mobile);?></td>
<td width="18%"><strong> Phone:</strong></td>
<td width="34%"><?php echo stripslashes($result->ship_phone);?></td>
</tr>
</table></td>
</tr>
<?php if($result->coupon_code!=''){ ?>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Discount Information</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><strong><?php if($result->discount_via!=''){ echo $result->discount_via;}else{ ?>Coupoun<?php }?> Code Used:</strong></td>
<td width="34%"><?php echo stripslashes($result->coupon_code);?></td>
<td width="14%"> </td>
<td width="34%"> </td>
</tr>
</table></td>
</tr>
<?php } ?>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Payment Information</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><strong>Payment Method:</strong></td>
<td width="34%"><?php echo stripslashes($result->payment_method);?></td>
<td width="14%"> </td>
<td width="34%"> </td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Delivery Option</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><strong><?php echo $result->delivery_type; ?></strong></td>
<td width="34%"><?php if($result->delivery_type=='Home Delivery'){echo $result->ship_timing;}else{?> <?php }?></td>
<td width="14%"> </td>
<td width="34%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Delivery Notes (if any)</h2></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%"><?php echo $result->delivery_note;?></td>
<td width="34%"> </td>
<td width="14%"> </td>
<td width="34%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="paddBot11 paddRt14" colspan="2"><h2>Ordered Products</h2></td>
</tr>
<tr>
<td colspan="2"><?php
$enq_message.="<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='100%'><table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr style='background:#e7f6f1;' >
<td width='40%' height='30'><h3>Product Purchased</h3></td> <td width='15%' height='15'><!--<h3>User Remarks</h3>--></td>
<td width='10%'><h3>Qty</h3></td>
<td width='22%'><h3>Unit Price($website_currency_symbol)</h3></td>
<td width='23%'><h3>Price ($website_currency_symbol)</h3></td>
</tr>
<tr>
<td><strong> </strong></td> <td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>";
$itmesArr=$objmithaas->query("select * from tbl_order_itmes where order_id='".$result->id."'");
while($resultItem=$objmithaas->fetchNextObject($itmesArr)){
if($result->order_type=="Wholesale"){
$barcode=getFieldWhere('barcode_number','tbl_productprice','id',$resultItem->productid);
if($barcode) $barcode="(".getFieldWhere('barcode_number','tbl_productprice','id',$resultItem->productid).")";
}
$custumdate='2021-07-08 00:00:00';
$substype='';
if($result->order_date > $custumdate){
if($resultItem->subscription_type=='Weekly' || $resultItem->subscription_type=='Bi Weekly' || $resultItem->subscription_type=='Monthly'){
$substype=" ($resultItem->subscription_type Subscription)";
}
} else {
$substype=$prosub[$resultItem->product_id];
if($substype=='Weekly' || $substype=='Bi Weekly' || $substype=='Monthly'){
$substype=" ($substype Subscription)";
}
}
$enq_message.="<tr>
<td><strong>".$resultItem->product_name.' '.$resultItem->size.$resultItem->size_type.$substype." ".$barcode."</strong></td> <td>".$resultItem->user_replacement_option."</td>
<td>".$resultItem->qty."</td>
<td>".number_format($resultItem->price,2)."</td>
<td>$website_currency_symbol ".number_format($resultItem->price*$resultItem->qty,2)."</td>
</tr>";
}
$enq_message.=" <tr>
<td> </td>
<td> </td>
<td>Billed Amount</td>
<td>$website_currency_symbol ".number_format($result->amount,2)."</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>Tax</td>
<td>$website_currency_symbol ".number_format($result->tax_value,2)."</td>
</tr>
<tr>";
if($result->special_discount!=''){
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Special Discount</td>
<td>$website_currency_symbol ".number_format($result->special_discount,2)."</td>
</tr>";
}
if($result->other_discount>0){
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>".$result->other_discount_via." Discount</td>
<td>$website_currency_symbol".number_format($result->other_discount,2)."</td>
</tr>";
}
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>".$result->discount_via." Discounts</td>
<td>$website_currency_symbol ".number_format($result->discount,2)."</td>
</tr>";
if($result->expres_amt>0){
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Express Delivery</td>
<td>$website_currency_symbol ".number_format($result->expres_amt,2)."</td>
</tr>";
}else{
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Delivery Charges</td>
<td>$website_currency_symbol ".number_format($result->shipping_amount,2)."</td>
</tr>";
}
if($result->pkgcharge>0){
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Packaging/Handling</td>
<td>$website_currency_symbol ".number_format($result->pkgcharge,2)."</td>
</tr>";
}
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Minimum Order Charge</td>
<td>$website_currency_symbol ".number_format($result->min_order_charge,2)."</td>
</tr>";
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Tip</td>
<td>$website_currency_symbol ".number_format($result->drivertip,2)."</td>
</tr>";
if($result->saving>0){
$enq_message.="<tr>
<td> </td>
<td> </td>
<td>Saving</td>
<td>$website_currency_symbol ".number_format($result->saving,2)."</td>
</tr>";
}
$enq_message.="
<tr>
<td> </td>
<td> </td>
<td><strong>Total Amount:</strong></td>
<td>$website_currency_symbol ".number_format($result->total_amount,2)."</td>
</tr>
</table></td>
</tr>
</table>"; echo $enq_message;?></td>
</tr>
<tr>
<td width="43%" align="right" class="paddRt14 paddBot11"> </td>
<td width="57%" align="left" class="paddBot11"></td>
</tr>
<tr>
<td colspan="4" class="paddRt14 paddBot11"><strong>Forgot to order something?</strong><br>
To add items to an undelivered order, please start a new order and select ‘Pick up from Stores’ at checkout. You will not be charged any delivery fee or minimum store order fee. Once you receive the order confirmation email, please reply to that email informing our operations staff to combine this and your previous order by providing both Order IDs.<br></td>
</tr>
<tr>
<td colspan="4" class="paddRt14 paddBot11"><strong>Cancellation/Returns/Refund/Replacement Policy -</strong><br>
1) Any order cancelled after 2 hours of placing the order will be levied a 50% cancellation charge. <br>
2) No order can be cancelled after 1 PM on delivery day.<br>
3) Any items missing or not delivered in good condition need to be notified to MyValue365 within 3 hours of receiving the delivery. No item will be replaced, refunded or returned after that.<br></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td align="center"></td>
</tr>
</table>
</body>
</html>
Directory Contents
Dirs: 10 × Files: 414