芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/public_html/ajax/placeOrder.php
0) { $sqlRegData = mysqli_fetch_array($sqlReg); $orderId = $sqlRegData['max(order_id)']+1; } if(isset($_SESSION['kxproductList']) && count($_SESSION['kxproductList'])>0) { $subTotal = 0; $deliveryCharges = 0; $orderTotal = 0; $loop = 0; $loop = 0; foreach($_SESSION['kxproductList'] as $pL) { $remark = ""; $sizeId = ""; $polishId = ""; $sqlProductCart = mysqli_query($cn,"select * from `tbl_product` where `id`='".$pL['productId']."'"); $sqlProductCartData = mysqli_fetch_array($sqlProductCart); if(isset($_SESSION['adInfo'])){ $remark = $_SESSION['adInfo'][$loop];} if(!empty($pL['sizeId'])){ $sizeId = sizeName($pL['sizeId']); } if(!empty($pL['polishId'])){ $polishId = polishName($pL['polishId']); } $sqlOrder = mysqli_query($cn, "INSERT INTO `tbl_order` SET `order_date`='".$orderDate."', `order_id`='".$orderId."', `customer_id`=' ', `product_id`='".$pL['productId']."', `size`='".$sizeId."', `polish`='".$polishId."', `product_name`='".$sqlProductCartData['name']."', `price`=0, `qty`='".$pL['qty']."', `total`=0, `delivery_charge`=0, `order_total`=0, `remark`='".$remark."', `notes`='".$notes."', `discount_amount`=0, `status`=0, `name`='".$name."', `phone`='".$mobile."', `email`='".$email."', `address`='".$address."', `country`='".$country."', `city`='".$city."', `landmark`='".$landmark."', `alternate_mobile`='".$alt_mobile."', `date`=Now()"); } $arr = array('status'=>true, 'orderId'=>$orderId); unset($_SESSION['kxproductList']); unset($_SESSION['adInfo']); } else { $_SESSION['placeError'] = "Somthing Went Wrong Try Again."; $arr = array('status'=>false); } echo json_encode($arr); ?>