本文整理匯總了PHP中OmAvailableModel::getPlatformAccount方法的典型用法代碼示例。如果您正苦於以下問題:PHP OmAvailableModel::getPlatformAccount方法的具體用法?PHP OmAvailableModel::getPlatformAccount怎麽用?PHP OmAvailableModel::getPlatformAccount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OmAvailableModel
的用法示例。
在下文中一共展示了OmAvailableModel::getPlatformAccount方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: applyTheLineEUBTrackNumber
public static function applyTheLineEUBTrackNumber($recordnumber, $tracknumber)
{
!self::$dbConn ? self::initDB() : null;
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
$accountIds = array();
foreach ($SYSTEM_ACCOUNTS['Amazon'] as $id => $account) {
$accountIds[] = $id;
}
//print_r($SYSTEM_ACCOUNTS['Amazon']);
$tableName = 'om_unshipped_order';
$where = " WHERE recordNumber='{$recordnumber}' AND accountId in ('" . join("','", $accountIds) . "') AND is_delete =0 AND storeId=1 ";
$tinfo = OrderindexModel::showOnlyOrderList($tableName, $where);
self::$errMsg = '';
if ($tinfo) {
$omOrderId = $tinfo[0]['id'];
$trackinfo = OrderindexModel::selectOrderTracknumber(" WHERE tracknumber = '" . $tracknumber . "' AND is_delete = 0 ");
//var_dump($trackinfo);
if ($trackinfo) {
self::$errCode = "001";
self::$errMsg = " 第" . $row . "行已經存在跟蹤" . $tinfo['ebay_tracknumber'] . " 新跟蹤號[{$tracknumber}]更新失敗<br>";
return false;
} else {
$data['omOrderId'] = $omOrderId;
$data['tracknumber'] = $tracknumber;
$data['addUser'] = $_SESSION['sysUserId'];
$data['createdTime'] = time();
$msg = OrderRecordModel::insertOrderTrackRow($data);
//echo $msg;
if (!$msg) {
self::$errCode = "001";
self::$errMsg = " 第" . $row . "行訂單號[{$recordnumber}]添加跟蹤號[{$tracknumber}]失敗<br>";
return false;
}
}
self::$errCode = "200";
self::$errMsg = "獲取數據成功";
return true;
//失敗則設置錯誤碼和錯誤信息, 返回false
} else {
self::$errCode = "001";
self::$errMsg = " 第" . $row . "行訂單號[{$recordnumber}]不是亞馬孫訂單或者不存在係統<br>";
return false;
}
}
示例2: auto_contrast_intercept
public static function auto_contrast_intercept($orderData)
{
global $SYSTEM_ACCOUNTS, $__liquid_items_fenmocsku, $__liquid_items_BuiltinBattery, $__liquid_items_SuperSpecific, $__liquid_items_Paste;
global $GLOBAL_EBAY_ACCOUNT;
global $express_delivery, $no_express_delivery;
if (!$SYSTEM_ACCOUNTS) {
$__liquid_items_array = PurchaseAPIModel::getAdjustransportFromPurchase();
//var_dump($__liquid_items_array);
//echo time(); echo "<br>";
$__liquid_items_postbyhkpost = array_filter(explode(",", $__liquid_items_array['液體產品']));
//液體產品
$__liquid_items_postbyfedex = array_filter(explode(",", $__liquid_items_array['貴重產品']));
//貴重物品走聯邦
$__liquid_items_cptohkpost = array_filter(explode(",", $__liquid_items_array['指甲油產品']));
//指甲油轉香港小包
$__liquid_items_elecsku = array_filter(explode(",", $__liquid_items_array['電子類產品']));
//電子類產品走香港小包
//$__elecsku_countrycn_array = array_filter(explode(",", $__liquid_items_array['']));//電子類產品指定國家
$__liquid_items_fenmocsku = array_filter(explode(",", $__liquid_items_array['粉末狀產品']));
//粉末狀SKU
$__liquid_items_BuiltinBattery = array_filter(explode(",", $__liquid_items_array['內置電池產品']));
//內置電池類產品
$__liquid_items_SuperSpecific = array('6471', '14995');
//超規格的產品,長度大於60cm, 三邊大於 90cm
$__liquid_items_Paste = array_filter(explode(",", $__liquid_items_array['膏狀產品']));
//膏狀SKU*/
$__liquid_items_elecWithoutBattery = array_filter(explode(",", $__liquid_items_array['電子類【不帶電池】']));
//電子類【不帶電池】*/
$__liquid_items_OutWeight = array_filter(explode(",", $__liquid_items_array['超重產品>=1.9kg']));
//超重產品>=1.9kg*/
//取統一包裝材料重量數據
//$MaterInfo = CommonModel::getMaterInfo();
//取統一國家中文名對應英文名
/*$ec = "select * from ebay_countrys where ebay_user='$user' ";
$result = $dbConn->execute($ec);
$ebay_country_lists = $dbConn->getResultArray($result);
$global_countrycn_coutryen = array();
foreach($ebay_country_lists AS $ebay_country_list){
$global_countrycn_coutryen[trim($ebay_country_list['countryen'])] = trim($ebay_country_list['countrycn']);
}*/
//取各個平台的賬號名稱
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
//echo "<pre>";print_r($SYSTEM_ACCOUNTS);
$express_delivery = array();
$express_delivery_value = array();
$no_express_delivery = array();
$no_express_delivery_value = array();
$express_delivery_value = CommonModel::getCarrierListById(1);
/*foreach($express_delivery_arr as $value){
$express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$express_delivery = array_keys($express_delivery_value);
//var_dump($express_delivery);
$no_express_delivery_value = CommonModel::getCarrierListById(0);
/*foreach($no_express_delivery_arr as $value){
$no_express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$no_express_delivery = array_keys($no_express_delivery_value);
}
if (!$GLOBAL_EBAY_ACCOUNT) {
$GLOBAL_EBAY_ACCOUNT = array();
foreach ($SYSTEM_ACCOUNTS as $acct) {
foreach ($acct as $key => $value) {
$GLOBAL_EBAY_ACCOUNT[$key] = $value;
}
}
}
//var_dump($GLOBAL_EBAY_ACCOUNT);exit;
self::initDB();
//var_dump($orderData); echo "\n";
$log_data = "";
$actualTotal0 = 0;
//該訂單實際總數
//$ebay_id = $orderData['orderData']['id'];
$orderStatus = empty($orderData['orderData']['orderStatus']) ? C('STATEPENDING') : $orderData['orderData']['orderStatus'];
$orderType = empty($orderData['orderData']['orderType']) ? C('STATEPENDING_CONV') : $orderData['orderData']['orderType'];
$returnStatus = array('orderStatus' => $orderStatus, 'orderType' => $orderType);
$isNote = $orderData['orderData']['isNote'];
if ($isNote) {
$orderType = C('STATEPENDING_MSG');
}
$calcWeight = $orderData['orderData']['calcWeight'];
$pmId = $orderData['orderData']['pmId'];
//var_dump($calcWeight); echo "\n";
$orderdetaillist = $orderData['orderDetail'];
if (empty($calcWeight)) {
$calcInfo = CommonModel::calcAddOrderWeight($orderdetaillist);
//計算重量和包材
$calcWeight = $calcInfo[0];
$pmId = $calcInfo[1];
$orderData['orderData']['calcWeight'] = $calcWeight;
$orderData['orderData']['pmId'] = $pmId;
}
//var_dump($calcWeight); echo "\n";
$transportId = @$orderData['orderData']['transportId'];
$countryName = $orderData['orderUserInfoData']['countryName'];
$accountId = $orderData['orderData']['accountId'];
$actualTotal = $orderData['orderData']['actualTotal'];
$ebay_username = $orderData['orderUserInfoData']['username'];
$orderDataid = $orderData['orderExtenData']['orderId'];
//.........這裏部分代碼省略.........
示例3: 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;
//.........這裏部分代碼省略.........
示例4: array_filter
$__liquid_items_elecWithoutBattery = array_filter(explode(",", $__liquid_items_array['電子類【不帶電池】']));
//電子類【不帶電池】*/
$__liquid_items_OutWeight = array_filter(explode(",", $__liquid_items_array['超重產品>=1.9kg']));
//超重產品>=1.9kg*/
//取統一包裝材料重量數據
//$MaterInfo = CommonModel::getMaterInfo();
//取統一國家中文名對應英文名
/*$ec = "select * from ebay_countrys where ebay_user='$user' ";
$result = $dbConn->execute($ec);
$ebay_country_lists = $dbConn->getResultArray($result);
$global_countrycn_coutryen = array();
foreach($ebay_country_lists AS $ebay_country_list){
$global_countrycn_coutryen[trim($ebay_country_list['countryen'])] = trim($ebay_country_list['countrycn']);
}*/
//取各個平台的賬號名稱
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
//echo "<pre>";print_r($SYSTEM_ACCOUNTS);
$express_delivery = array();
$express_delivery_value = array();
$no_express_delivery = array();
$no_express_delivery_value = array();
$express_delivery_value = CommonModel::getCarrierListById(1);
/*foreach($express_delivery_arr as $value){
$express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
$express_delivery = array_keys($express_delivery_value);
//var_dump($express_delivery);
$no_express_delivery_value = CommonModel::getCarrierListById(0);
/*foreach($no_express_delivery_arr as $value){
$no_express_delivery_value[$value['id']] = $value['carrierNameCn'];
}*/
示例5: view_guoneiSaleImport
//.........這裏部分代碼省略.........
$noteArr = explode(',', $noteStr);
$skuCount = count($skuArrlist);
for ($i = 0; $i < $skuCount; $i++) {
list($sku, $amount) = explode('*', $skuArrlist[$i]);
//echo "--sku=$sku---amount=$amount-------";
//detail信息
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['sku'] = $sku;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['amount'] = $amount;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['recordNumber'] = $recordNumber;
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailData']['createdTime'] = time();
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailExtenData']['itemTitle'] = $noteArr[$i];
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailExtenData']['transId'] = $transId;
if (!empty($note)) {
$orderData[$recordNumber]['orderNote'][$c]['content'] = $note;
$orderData[$recordNumber]['orderNote'][$c]['userId'] = $_SESSION['sysUserId'];
}
}
//order信息
$orderData[$recordNumber]['orderData']['recordNumber'] = $recordNumber;
$orderData[$recordNumber]['orderData']['ordersTime'] = $ordersTime;
$orderData[$recordNumber]['orderData']['paymentTime'] = $paymentTime;
$orderData[$recordNumber]['orderData']['onlineTotal'] = $onlineTotal;
$orderData[$recordNumber]['orderData']['actualTotal'] = $actualTotal;
$orderData[$recordNumber]['orderData']['actualShipping'] = $shippingFee;
$orderData[$recordNumber]['orderData']['calcShipping'] = $shippingFee;
$orderData[$recordNumber]['orderData']['orderAddTime'] = time();
$orderData[$recordNumber]['orderData']['orderStatus'] = 100;
$orderData[$recordNumber]['orderData']['orderType'] = 101;
$SYS_ACCOUNTS = OmAvailableModel::getTNameList("om_account", "*", " where account='{$account}'");
$orderData[$recordNumber]['orderData']['accountId'] = $SYS_ACCOUNTS[0]['id'];
$orderData[$recordNumber]['orderData']['platformId'] = $SYS_ACCOUNTS[0]['platformId'];
$plataccountId = $SYS_ACCOUNTS[0]['id'];
$platformId = $SYS_ACCOUNTS[0]['platformId'];
$SYS_ACCOUNTS = OmAvailableModel::getPlatformAccount();
foreach ($SYS_ACCOUNTS as $platform => $accounts) {
foreach ($accounts as $accountId => $accountname) {
if ($account == $accountname) {
if ($platform == "ebay") {
$orderData[$recordNumber]['orderData']['isFixed'] = 2;
} else {
$orderData[$recordNumber]['orderData']['isFixed'] = 1;
}
}
}
}
foreach ($transportation as $tranValue) {
if ($tranValue['carrierNameCn'] == $carrierNameCn) {
$orderData[$recordNumber]['orderData']['transportId'] = $tranValue['id'];
break;
}
}
if ($trackNumber != '') {
$orderData[$recordNumber]['orderTrack']['tracknumber'] = $trackNumber;
$orderData[$recordNumber]['orderTrack']['addUser'] = $_SESSION['sysUserId'];
$orderData[$recordNumber]['orderTrack']['createdTime'] = time();
}
//order擴展信息
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
$orderData[$recordNumber]['orderExtenData']['paymentStatus'] = "PAY_SUCCESS";
$orderData[$recordNumber]['orderExtenData']['transId'] = $recordNumber;
// 交易id;;
$orderData[$recordNumber]['orderExtenData']['PayPalPaymentId'] = $PayPalPaymentId;
$orderData[$recordNumber]['orderExtenData']['platformUsername'] = $platformUsername;
$orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
//user信息
$orderData[$recordNumber]['orderUserInfoData']['platformUsername'] = $platformUsername;
示例6: view_aliexpressimport
//.........這裏部分代碼省略.........
$address3 = trim($currentSheet->getCell($ss)->getValue());
$city = trim($currentSheet->getCell($tt)->getValue());
$state = trim($currentSheet->getCell($uu)->getValue());
$zipCode = trim($currentSheet->getCell($vv)->getValue());
$countryName = trim($currentSheet->getCell($ww)->getValue());
$landline = trim($currentSheet->getCell($xx)->getValue());
$carrierNameCn = trim($currentSheet->getCell($yy)->getValue());
if (empty($account)) {
break;
}
if (in_array($recordNumber, $orderid)) {
$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]['orderDetailExtenData']['itemTitle'] = $itemTitle;
//$orderData['orderDetail']['orderDetailExtenData']['note'] = $value[10];
$orderData[$recordNumber]['orderDetail'][$sku]['orderDetailExtenData']['transId'] = $transId;
if (!empty($note)) {
$orderData[$recordNumber]['orderNote'][$c]['content'] = $note;
$orderData[$recordNumber]['orderNote'][$c]['userId'] = $_SESSION['sysUserId'];
}
} else {
$orderid[] = $recordNumber;
//order信息
$orderData[$recordNumber]['orderData']['recordNumber'] = $recordNumber;
$orderData[$recordNumber]['orderData']['ordersTime'] = strtotime($ordersTime);
$orderData[$recordNumber]['orderData']['paymentTime'] = strtotime($paymentTime);
$orderData[$recordNumber]['orderData']['actualTotal'] = $actualTotal;
$orderData[$recordNumber]['orderData']['orderAddTime'] = time();
$SYSTEM_ACCOUNTS = OmAvailableModel::getTNameList("om_account", "*", " where account='{$account}'");
$orderData[$recordNumber]['orderData']['accountId'] = $SYSTEM_ACCOUNTS[0]['id'];
$orderData[$recordNumber]['orderData']['platformId'] = $SYSTEM_ACCOUNTS[0]['platformId'];
$SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
foreach ($SYSTEM_ACCOUNTS as $platform => $accounts) {
foreach ($accounts as $accountId => $accountname) {
if ($account == $accountname) {
if ($platform == "ebay") {
$orderData[$recordNumber]['orderData']['isFixed'] = 2;
} else {
$orderData[$recordNumber]['orderData']['isFixed'] = 1;
}
}
}
}
$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;