本文整理匯總了PHP中CommonModel::getCarrierListById方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::getCarrierListById方法的具體用法?PHP CommonModel::getCarrierListById怎麽用?PHP CommonModel::getCarrierListById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonModel
的用法示例。
在下文中一共展示了CommonModel::getCarrierListById方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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'];
//.........這裏部分代碼省略.........
示例2: C
AND ebay_tracknumber!=''
AND ebay_carrier!=''
AND ebay_account = '".$account."'
AND ebay_site = '".$site."'";// limit 0,7";*/
/*$order_sql = " select a.omOrderId
from om_unshipped_order_warehouse as a
where (a.weighTime BETWEEN $start AND $end)
and a.storeId = 1 ";
$order_db = $dbConn->query($order_sql);
$orders = $dbConn->fetch_array_all($order_db);
//var_dump($orders); echo "\n"; exit;
$handle_cnt=count($orders);
if($handle_cnt<=0 ){
exit("No order to handel\n");
}*/
$delivery_arr = CommonModel::getCarrierListById();
$order_sql = "select a.id,a.recordNumber,a.transportId,a.combinePackage,a.orderStatus \n\t\t\t\tfrom om_shipped_order as a \n\t\t\t\tleft join om_shipped_order_warehouse as b\n\t\t\t\ton a.id = b.omOrderId\n\t\t\t\tleft join om_shipped_order_extension_amazon as c\n\t\t\t\ton a.id = c.omOrderId\n\t\t\t\twhere a.accountId = '{$accountId}'\n\t\t\t\tand\tc.site = '{$site}'\n\t\t\t\tand a.orderStatus ='" . C("STATESHIPPED") . "'\n\t\t\t\tand a.orderType ='" . C("STATEHASSHIPPED_CONV") . "'\n\t\t\t\tand (b.weighTime BETWEEN {$start} AND {$end}) and (a.ShippedTime ='' or a.ShippedTime is null) \n\t\t\t\tORDER BY b.weighTime ";
$order_db = $dbConn->query($order_sql);
$orders = $dbConn->fetch_array_all($order_db);
/*$order_sql = " select ebay_orderid,ebay_account,ebay_ordersn,ebay_countryname,
ebay_id,ebay_tracknumber,ebay_carrier,ebay_combine,recordnumber
from ebay_order where recordnumber in(
'002-8137713-8318634',
'115-9924496-2629023',
'107-8620600-1710651',
'109-4445248-2697864',
'112-8959307-6029052',
'112-8141525-2093001')
";*/
//$order_db = $dbcon->execute($order_sql);
示例3: C
$order_sql = "select id,recordNumber,transportId,combinePackage,orderStatus \n\t\t\t\tfrom om_shipped_order as a \n\t\t\t\tleft join om_shipped_order_warehouse as b \n\t\t\t\ton a.id = b.omOrderId\n\t\t\t\twhere a.accountId = '{$accountId}' \n\t\t\t\tand a.orderStatus ='" . C("STATESHIPPED") . "'\n\t\t\t\tand a.orderType = '" . C("STATEHASSHIPPED_CONV") . "' \n\t\t\t\tand b.weighTime > {$start} and (a.ShippedTime ='' or a.ShippedTime is null) \n\t\t\t\tORDER BY b.weighTime ";
// and ebay_status ='2'
//$testsql = " ORDER BY scantime"; $sql .= $testsql; // for test
/*$order_sql = " select a.omOrderId
from om_unshipped_order_warehouse as a
where (a.weighTime BETWEEN $start AND $end)
and a.storeId = 1 ";*/
//echo $order_sql;exit;
$order_db = $dbConn->query($order_sql);
$alldata = $dbConn->fetch_array_all($order_db);
//var_dump($alldata); echo "\n"; exit;
$sum = sizeof($alldata);
if ($sum <= 0) {
exit("No order to handel\n");
}
$transportData = CommonModel::getCarrierListById();
if ($sum > 0) {
foreach ($alldata as $val) {
$omOrderId = $val['id'];
$transportId = $val['transportId'];
$carrier = $delivery_arr[$transportId];
echo "開始上傳訂單【{$omOrderId}】 ----------運輸方式={$carrier}------\n\n";
$recordnumber = $val['recordNumber'];
//$ebay_carrier = $val['transportId'];
/*$where = " where id = {$omOrderId} and storeId = 1 and is_delete = 0 ";
$orderList = OrderindexModel::showOrderList($tableName, $where);
$orderTracknumber = $orderList[$omOrderId]['orderTracknumber'];*/
$orderList = is_array($omOrderId) ? implode(',', $omOrderId) : $omOrderId;
$orderTracknumber = getTracknumber($orderList);
//獲取訂單的跟蹤號
if (empty($orderTracknumber)) {
示例4: array_filter
//電子類【不帶電池】*/
$__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);
示例5: define
define("WEB_PATH", "/data/web/order.valsun.cn/");
}
//define('SCRIPTS_PATH_CRONTAB', '/data/web/erpNew/order.valsun.cn/crontab/');
require_once WEB_PATH . "crontab/scripts.comm.php";
require_once WEB_PATH_CONF_SCRIPTS . "script.ebay.config.php";
require_once WEB_PATH_LIB_SDK_DRESSLINK . "DLCommenScript.php";
//require_once "/data/web/erpNew/order.valsun.DL/lib/sdk/DL/DLCommenScript.php";
echo "調用DL訂單接口,時間" . date("Y-m-d H:i:s") . "\r\n";
$orders = getDLOrders();
$orders = json_decode($orders, true);
//print_r($orders);
if (!$orders) {
echo "沒有獲取訂單信息!\n";
exit;
}
$carrierList = CommonModel::getCarrierListById();
$flip_carrierList = array_flip($carrierList);
$orderids = $orders['OrderID'];
//print_r($orderids);
/*if(file_exists(WEB_PATH."crontab/dresslink/orderid.txt")&&!empty($orderids)){
$fp = fopen(WEB_PATH."crontab/dresslink/orderid.txt","a+");
$str = "******************".date("Y-m-d H:i:s")."*******************\r\n\r\n\r\n";
foreach($orderids as $id){
$str .= ",".$id;
}
$str .= "\r\n#############################################################";
fwrite($fp,$str);
fclose($fp);
}*/
if (empty($orderids)) {
//$orderids = array('DL100000204','DL100000398','DL100000407','DL100000411','DL100000420','DL100000422');
示例6: act_fetchOrder
public function act_fetchOrder()
{
$message = "";
$accountId = isset($_POST['amazon_account']) ? $_POST['amazon_account'] : "";
$account = OmAvailableModel::getTNameList("om_account", "*", " where id={$accountId}");
$account = $account[0]['account'];
$recordNumber = isset($_POST['amazon_id']) ? $_POST['amazon_id'] : "";
$amazon_account = isset($_POST['amazon_account']) ? $_POST['amazon_account'] : "";
$site = isset($_POST['site']) ? $_POST['site'] : "";
$recordNumbers = explode(",", $recordNumber);
//print_r($recordNumbers);
//$rids = empty($_GET['rids']) ? array() : array_map('trim', explode(',', $_GET['rids']));
$rids = array_values(array_unique(array_filter(array_map('trim', $recordNumbers))));
if (!defined('WEB_PATH')) {
define("WEB_PATH", "/data/web/order.valsun.cn/");
}
//define('SCRIPTS_PATH_CRONTAB', '/data/web/erpNew/order.valsun.cn/crontab/');
require_once WEB_PATH . "crontab/scripts.comm.php";
require_once WEB_PATH_CONF_SCRIPTS . "script.ebay.config.php";
require_once WEB_PATH_LIB_SCRIPTS_AMAZON . "amazon_order_func.php";
if (strtoupper($site) == "US") {
$keyname = WEB_PATH_CONF_SCRIPTS_KEYS_AMAZON . "amazon_keys_{$account}.php";
} elseif (strtoupper($site) == "UK" || strtoupper($site) == "DE") {
$ext = strtolower($site);
$keyname = WEB_PATH_CONF_SCRIPTS_KEYS_AMAZON . "amazon_keys_{$ext}_{$account}.php";
}
//echo $keyname;
if (file_exists($keyname)) {
include_once $keyname;
} else {
//exit ("未找對應的key文件!\n");
$message .= "<font color='red'>未找對應的key文件</font>";
}
define('APPLICATION_NAME', $APPLICATION_NAME);
define('APPLICATION_VERSION', $APPLICATION_VERSION);
define('AWS_ACCESS_KEY_ID', $AWS_ACCESS_KEY_ID);
define('AWS_SECRET_ACCESS_KEY', $AWS_SECRET_ACCESS_KEY);
define('MERCHANT_ID', $MERCHANT_ID);
define('MARKETPLACE_ID', $MARKETPLACE_ID);
//echo "\n".get_include_path()."\n";
set_include_path(get_include_path() . PATH_SEPARATOR . WEB_PATH_LIB_SDK_AMAZON);
//
//echo "\n".get_include_path()."\n";
//
/*function __autoload($className){
$filePath = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
$includePaths = explode('/', get_include_path());
foreach($includePaths as $includePath){
if(file_exists($includePath . DIRECTORY_SEPARATOR . $filePath)){
require_once $filePath;
return;
}
}
}*/
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Client.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Interface.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Exception.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/GetOrderRequest.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/OrderIdList.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/ListOrdersRequest.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/MarketplaceIdList.php';
require_once WEB_PATH_LIB_SDK . 'amazon/MarketplaceWebServiceOrders/Model/ListOrderItemsRequest.php';
$config = array('ServiceURL' => $serviceUrl, 'ProxyHost' => null, 'ProxyPort' => -1, 'MaxErrorRetry' => 3);
$minute = 100;
$start = date("Y-m-d H:i:s", time() - $minute * 60);
//$order_statistics = new OrderStatistics();
$service = new MarketplaceWebServiceOrders_Client(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, APPLICATION_NAME, APPLICATION_VERSION, $config);
$request = new MarketplaceWebServiceOrders_Model_GetOrderRequest();
$request->setSellerId(MERCHANT_ID);
//$request->setCreatedAfter(new DateTime($start, new DateTimeZone('UTC')));
//$request->setCreatedBefore(new DateTime('2012-08-03 12:00:00', new DateTimeZone('UTC')));
//$request->setMarketplaceId($marketplaceIdList);
//由account得出其accountId
/*$tName = 'om_account';
$select = 'id';
$where = "WHERE account='$account' AND platformId=11"; //亞馬孫平台id為11
$accountIdList = OmAvailableModel :: getTNameList($tName, $select, $where);
if (empty ($accountIdList)) {
exit ("$account is not in om_account!\n");
}
$accountId = $accountIdList[0]['id'];*/
$transportList = CommonModel::getCarrierListById();
$flip_transportList = array_flip($transportList);
//var_dump($flip_transportList); exit;
$orderIds = new MarketplaceWebServiceOrders_Model_OrderIdList();
//echo "<pre>"; print_r($rids);
$orderIds->setId($rids);
$request->setAmazonOrderId($orderIds);
$info = self::act_invokeListOrders($service, $request, $account, $site, $accountId, $flip_transportList, $message);
return $info;
}
示例7: array
}
} else {
echo "notice: no data, exit\n";
exit;
}
//$TaobaoAct = new TaobaoAct();
//查詢快遞信息
/*$checkcarrier = array();
$carrierlists = CommonModel::getCarrierList();
//var_dump($carrierlists); exit;
if($carrierlists){
foreach($carrierlists AS $carrierlist){
$checkcarrier[] = "{$carrierlist['carrierNameCn']}";
}
}*/
$checkcarrier = CommonModel::getCarrierListById();
$flip_checkcarrier = array_flip($checkcarrier);
//var_dump($flip_checkcarrier); exit;
$total = 0;
//總訂單條數
$error_data = array();
for ($cur_page = 1; $cur_page <= 1; $cur_page++) {
if ($cur_page > 1) {
$json_data = taobaoTradesSoldGet($url, $session, $appSecret, $appKey, $status, $cur_page, $page_size);
}
//出錯處理
if (isset($json_data['error_response'])) {
echo "error: " . $json_data['error_response']['msg'] . " error code:" . $json_data['error_response']['code'] . "\n";
} else {
//數據入庫
$data = $json_data['trades_sold_get_response']['trades']['trade'];