本文整理汇总了PHP中commonModel::checkOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP commonModel::checkOrder方法的具体用法?PHP commonModel::checkOrder怎么用?PHP commonModel::checkOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commonModel
的用法示例。
在下文中一共展示了commonModel::checkOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_dresslinkOrderImport
//.........这里部分代码省略.........
$sku = mysql_real_escape_string(trim($currentSheet->getCell($acc)->getValue()));
$itemTitle = mysql_real_escape_string(trim($currentSheet->getCell($add)->getValue()));
$itemPrice = round_num(trim($currentSheet->getCell($aff)->getValue()), 2);
$amount = intval(trim($currentSheet->getCell($agg)->getValue()));
$shipingfee = round_num(trim($currentSheet->getCell($ahh)->getValue()), 2);
/***************BEGIN 订单详细数据***************/
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']['recordNumber'] = $recordnumber;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']['sku'] = $sku;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']['itemPrice'] = $itemPrice;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']['amount'] = $amount;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']["shippingFee"] = $shipingfee;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailData']['createdTime'] = time();
/*************END 订单详细数据***************/
/***************BEGIN 订单详细扩展表数据***************/
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailExtenData']['itemTitle'] = $itemTitle;
$orderData[$recordNumber]['orderDetail'][$c]['orderDetailExtenData']['transId'] = $transId;
//$orderData['orderDetail']['orderDetailExtenData']['note'] = $value[10];
$categoryName = trim($currentSheet->getCell($ajj)->getValue());
$customCode = trim($currentSheet->getCell($akk)->getValue());
$material = trim($currentSheet->getCell($all)->getValue());
$ShenBaoQuantity = trim($currentSheet->getCell($amm)->getValue());
$ShenBaoUnitPrice = trim($currentSheet->getCell($ann)->getValue());
$ChineseDesc = trim($currentSheet->getCell($aww)->getValue());
//$salePrice = round_num(mysql_real_escape_string(trim($detail['SalePrice'])), 2); //实际SKU付款价
/*************END 订单详细扩展表数据***************/
$ebay_fedex_remark[$recordNumber][$categoryName][] = array('real_price' => $ShenBaoUnitPrice, 'qty' => $ShenBaoQuantity, 'hamcodes' => $customCode, 'detail' => $material);
$orderData[$recordNumber]['fedexRemark'] = $ebay_fedex_remark[$recordNumber];
$orderData[$recordNumber]['dresslinkInfo'] = $dresslinks;
$ChineseDescs[$recordNumber][$categoryName] = $ChineseDesc;
}
}
if ($orderData) {
foreach ($orderData as $id => $order) {
$msg = commonModel::checkOrder($id);
if ($msg) {
$message .= "<font color='red'>订单{$id}已存在!</font><br>";
continue;
}
//计算订单属性
if (count($order['orderDetail']) == 1) {
$detail = current($order['orderDetail']);
if ($detail['orderDetailData']['amount'] == 1) {
$orderData[$id]['orderData']['orderAttribute'] = 1;
} else {
$orderData[$id]['orderData']['orderAttribute'] = 2;
}
} else {
$orderData[$id]['orderData']['orderAttribute'] = 3;
}
//计算订单重量及包材
$obj_order_detail_data = array();
foreach ($order['orderDetail'] as $sku => $detail) {
$obj_order_detail_data[] = $detail['orderDetailData'];
}
$weightfee = commonModel::calcOrderWeight($obj_order_detail_data);
$orderData[$id]['orderData']['calcWeight'] = $weightfee[0];
$orderData[$id]['orderData']['pmId'] = $weightfee[1];
//计算运费
$calcShippingInfo = CommonModel::calcAddOrderShippingFee($insertOrder, $orderData[$id]['orderData']['isFixed']);
//计算运费
$orderData[$id]['orderData']['channelId'] = $calcShippingInfo['fee']['channelId'];
$orderData[$id]['orderData']['calcShipping'] = $calcShippingInfo['fee'];
$ChineseDescs_arr = array_filter(array_unique($ChineseDescs[$id]));
$orderData[$id]['orderNote'] = array('content' => join(' ', $ChineseDescs_arr), 'userId' => $_SESSION['sysUserId'], 'createdTime' => time());
/*//缺货拦截
$orderData[$id] = AutoModel :: auto_contrast_intercept($orderData[$id]);
示例2: act_sureAddOrder
function act_sureAddOrder()
{
$order_data = array();
$detail_data = array();
$exten_data = array();
$userinfo_data = array();
$buyer_data = array();
$time = time();
$platform_id = trim($_POST['platform']);
$username = trim($_POST['fullname']);
$account_id = trim($_POST['account']);
$street1 = trim($_POST['street1']);
$platformUsername = trim($_POST['userid']);
$email = trim($_POST['ebay_usermail1']);
$street2 = trim($_POST['street2']);
$recordNumber = trim($_POST['orderid']);
$city = trim($_POST['city']);
$ordersTime = strtotime(trim($_POST['ebay_createdtime']));
$state = trim($_POST['state']);
$paymentTime = strtotime(trim($_POST['ebay_paidtime']));
$countryname = trim($_POST['country']);
$ebay_itemprice = trim($_POST['ebay_itemprice']);
$zipCode = trim($_POST['zip']);
$shippingFee = trim($_POST['ebay_shipfee']);
$ebay_tel1 = trim($_POST['tel1']);
$actualTotal = trim($_POST['ebay_total']);
$ebay_tel2 = trim($_POST['tel2']);
$ebay_tel3 = trim($_POST['tel3']);
$currency = trim($_POST['ebay_currency']);
$other_currency = trim($_POST['other_currency']);
$isCheckOrder = self::act_checkOrder();
$returnArr = array();
//返回的数组信息
if (!$isCheckOrder) {
$returnArr['errCode'] = self::$errCode;
$returnArr['errMsg'] = self::$errMsg;
return $returnArr;
}
if ($currency == '其他') {
$currency = $other_currency;
}
$phone = trim($_POST['tel1']);
$transId = trim($_POST['ebay_ptid']);
$other_ptid = trim($_POST['other_ptid']);
if ($transId == 'paypal' || $transId == 'Escrow' || $transId == '其他') {
$transId = $other_ptid;
}
$PayPalPaymentId = $transId;
$orderweight = trim($_POST['orderweight']);
$ebay_usermail2 = trim($_POST['ebay_usermail2']);
$ebay_carrier = trim($_POST['ebay_carrier']);
$ebay_usermail3 = trim($_POST['ebay_usermail3']);
$ebay_tracknumber = trim($_POST['ebay_tracknumber']);
$ebay_noteb = trim($_POST['ebay_noteb']);
$orderStatus = 100;
$orderType = 101;
$tracknumber = trim($_POST['ebay_tracknumber']);
//order信息
$orderData[$recordNumber]['orderData']['recordNumber'] = $recordNumber;
$orderData[$recordNumber]['orderData']['ordersTime'] = $ordersTime;
$orderData[$recordNumber]['orderData']['paymentTime'] = $paymentTime;
$orderData[$recordNumber]['orderData']['actualTotal'] = $actualTotal;
$orderData[$recordNumber]['orderData']['onlineTotal'] = $actualTotal;
//默认线上总价和实际总价一样
$orderData[$recordNumber]['orderData']['orderAddTime'] = time();
//$orderData[$recordNumber]['orderData']['calcWeight'] = $orderweight;//估算重量
$orderData[$recordNumber]['orderData']['accountId'] = $account_id;
$orderData[$recordNumber]['orderData']['platformId'] = $platform_id;
//添加状态信息
$orderData[$recordNumber]['orderData']['orderStatus'] = 100;
$orderData[$recordNumber]['orderData']['orderType'] = 101;
$SYS_ACCOUNTS = OmAvailableModel::getPlatformAccount();
foreach ($SYS_ACCOUNTS as $platform => $accounts) {
foreach ($accounts as $accountId => $accountname) {
if ($account_id == $accountId) {
if ($platform == 'ebay') {
//为ebay平台
$orderData[$recordNumber]['orderData']['isFixed'] = 2;
} else {
$orderData[$recordNumber]['orderData']['isFixed'] = 1;
}
}
}
}
$transportation = CommonModel::getCarrierList();
//所有的
foreach ($transportation as $tranValue) {
if ($tranValue['id'] == $ebay_carrier) {
$orderData[$recordNumber]['orderData']['transportId'] = $tranValue['id'];
break;
}
}
//order扩展信息
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
$orderData[$recordNumber]['orderExtenData']['paymentStatus'] = "PAY_SUCCESS";
//$orderData[$recordNumber]['orderExtenData']['transId'] = $transId;
$orderData[$recordNumber]['orderExtenData']['PayPalPaymentId'] = $PayPalPaymentId;
$orderData[$recordNumber]['orderExtenData']['platformUsername'] = $platformUsername;
//user信息
$orderData[$recordNumber]['orderUserInfoData']['platformUsername'] = $platformUsername;
//.........这里部分代码省略.........
示例3: view_aliexpressimport
//.........这里部分代码省略.........
}
}
}
}
$transportation = CommonModel::getCarrierList();
//所有的
foreach ($transportation as $tranValue) {
if ($tranValue['carrierNameCn'] == $carrierNameCn) {
$orderData[$recordNumber]['orderData']['transportId'] = $tranValue['id'];
break;
}
//$transportationList[$tranValue['id']] = $tranValue['carrierNameCn'];
}
//order扩展信息
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
$orderData[$recordNumber]['orderExtenData']['paymentStatus'] = "PAY_SUCCESS";
$orderData[$recordNumber]['orderExtenData']['transId'] = $recordNumber;
// 交易id;;
$orderData[$recordNumber]['orderExtenData']['platformUsername'] = $platformUsername;
//$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
//user信息
$orderData[$recordNumber]['orderUserInfoData']['platformUsername'] = $platformUsername;
$orderData[$recordNumber]['orderUserInfoData']['username'] = $username;
$orderData[$recordNumber]['orderUserInfoData']['email'] = $email;
$orderData[$recordNumber]['orderUserInfoData']['street'] = $street;
$orderData[$recordNumber]['orderUserInfoData']['currency'] = $currency;
$orderData[$recordNumber]['orderUserInfoData']['address2'] = $address2;
$orderData[$recordNumber]['orderUserInfoData']['address3'] = $address3;
$orderData[$recordNumber]['orderUserInfoData']['city'] = $city;
$orderData[$recordNumber]['orderUserInfoData']['state'] = $state;
$orderData[$recordNumber]['orderUserInfoData']['zipCode'] = $zipCode;
$orderData[$recordNumber]['orderUserInfoData']['countryName'] = $countryName;
$orderData[$recordNumber]['orderUserInfoData']['landline'] = $landline;
//detail信息
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['sku'] = $sku;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['amount'] = $amount;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['itemPrice'] = $itemPrice;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['shippingFee'] = $shippingFee;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['recordNumber'] = $recordNumber;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['createdTime'] = time();
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailExtenData']['itemTitle'] = $itemTitle;
//$orderData['orderDetail']['orderDetailExtenData']['note'] = $value[10];
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailExtenData']['transId'] = $transId;
//note信息
if (!empty($note)) {
$orderData[$recordNumber]['orderNote'][$c]['content'] = $note;
$orderData[$recordNumber]['orderNote'][$c]['userId'] = $_SESSION['sysUserId'];
}
}
}
//echo "<pre>";print_r($orderData);
$message = "";
foreach ($orderData as $id => $order) {
$msg = commonModel::checkOrder($id);
if ($msg) {
$message .= "<font color='red'>订单{$id}已存在!</font><br>";
continue;
}
//计算订单属性
if (count($order['orderDetail']) == 1) {
$detail = current($order['orderDetail']);
if ($detail['orderDetailData']['amount'] == 1) {
$orderData[id]['orderData']['orderAttribute'] = 1;
} else {
$orderData[id]['orderData']['orderAttribute'] = 2;
}
} else {
$orderData[id]['orderData']['orderAttribute'] = 3;
}
//计算订单重量及包材
$obj_order_detail_data = array();
foreach ($order['orderDetail'] as $sku => $detail) {
$obj_order_detail_data[] = $detail['orderDetailData'];
}
$weightfee = commonModel::calcOrderWeight($obj_order_detail_data);
$orderData[$id]['orderData']['calcWeight'] = $weightfee[0];
//$orderData[$value[0]]['orderData']['calcShipping'] = $weightfee[3];
$orderData[$id]['orderData']['pmId'] = $weightfee[1];
//计算运费
$calcShippingInfo = CommonModel::calcAddOrderShippingFee($insertOrder, $orderData[$id]['orderData']['isFixed']);
//计算运费
$orderData[$id]['orderData']['channelId'] = $calcShippingInfo['fee']['channelId'];
//缺货拦截
$status = commonModel::auto_contrast_intercept($orderData[$id]);
$orderData[$id]['orderData']['orderStatus'] = $status['orderStatus'];
$orderData[$id]['orderData']['orderType'] = $status['orderType'];
//print_r($order);
//插入订单
$info = OrderAddModel::insertAllOrderRowNoEvent($order);
if ($info) {
$message .= "<font color='green'>订单{$id}上传成功!</font><br>";
} else {
$message .= "<font color='red'>订单{$id}上传失败!</font><br>";
}
}
$this->smarty->assign("showerrorinfo", $message);
//header("location:index.php?mod=underLineOrderImport&act=importOrder");
}
$this->smarty->display('underLineOrderImport.htm');
}