当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonModel::get_hsInfo方法代码示例

本文整理汇总了PHP中CommonModel::get_hsInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonModel::get_hsInfo方法的具体用法?PHP CommonModel::get_hsInfo怎么用?PHP CommonModel::get_hsInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommonModel的用法示例。


在下文中一共展示了CommonModel::get_hsInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_hsInfo

 /**
  * OrderPrintAct::get_hsInfo()
  * 获取SPU报关信息 暂时拉取产品中心接口
  * @param array $spus
  * @return void
  */
 public function get_hsInfo($spus)
 {
     $spus = json_encode($spus);
     $key = 'hsInfo' . $spus;
     $data = WhBaseModel::cache($key);
     if (!$data) {
         $data = CommonModel::get_hsInfo($spus);
         if ($data['errCode'] == 200) {
             $data = $data['data'];
             WhBaseModel::cache($key, $data, 24 * 3600);
         } else {
             $data = '';
         }
     }
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:22,代码来源:orderPrint.action.php

示例2: foreach

     $ebay_itemid = $detail['orderDetail']['itemId'];
     //平台产品id
     $ebay_itemtitle = $detail['orderDetailExtension']['itemTitle'];
     $ebay_amount = $detail['orderDetail']['amount'];
     $ebay_itemprice = $detail['orderDetail']['itemPrice'];
     $sku = $sku;
     $ebay_tid = $detail['orderDetailExtension']['transactionID'];
     //交易号
     $onliesku = $detail['orderDetail']['onlinesku'];
     $weight = 0;
     foreach ($detail['skuDetail']['skuInfo'] as $realskus) {
         $weight += $realskus['skuDetail']['goodsWeight'] * $realskus['amount'];
     }
     $weight = $weight > 0 ? $weight : 0.1;
     //取最后一个的报关信息
     $hsinfo = CommonModel::get_hsInfo(json_encode(array($realskus['skuDetail']['spu'])));
     $hsinfo = $hsinfo['data'][$realskus['skuDetail']['spu']];
     $goodsinfo['customsNameEN'] = $hsinfo['customsNameEN'];
     $goodsinfo['customsName'] = $hsinfo['customsName'];
     $customsNameEN = $hsinfo['customsNameEN'] ? $hsinfo['customsNameEN'] : $ebay_itemtitle;
     $customsName = $hsinfo['customsName'] ? $goodsinfo['customsName'] : $ebay_itemtitle;
     $DeclaredValue = 1;
     //不知从哪里获取,定义为1
     if (!in_array($ebay_itemid . '-' . $ebay_tid, $unique_item_tid)) {
         $unique_item_tid[] = $ebay_itemid . '-' . $ebay_tid;
         $item[] = array('CurrencyCode' => $ebay_currency, 'EBayEmail' => $ebay_usermail, 'EBayBuyerID' => $ebay_userid, 'EBayItemID' => $ebay_itemid, 'EBayItemTitle' => $ebay_itemtitle, 'EBayMessage' => '', 'EBaySiteID' => "0", 'EBayTransactionID' => $ebay_tid, 'Note' => '', 'OrderSalesRecordNumber' => $recordnumber, 'PaymentDate' => $ebay_paidtime, 'PayPalEmail' => "0", 'PayPalMessage' => '', 'PostedQTY' => $ebay_amount, 'ReceivedAmount' => $ebay_total, 'SalesRecordNumber' => $recordnumber, 'SoldDate' => $ebay_createdtime, 'SoldPrice' => $ebay_itemprice, 'SoldQTY' => $ebay_amount, 'SKU' => array('SKUID' => $sku, 'Weight' => $weight * $ebay_amount, 'CustomsTitleCN' => $customsName, 'CustomsTitleEN' => $customsNameEN . ' ' . $sku, 'DeclaredValue' => $DeclaredValue * $ebay_amount, 'OriginCountryName' => "China", 'OriginCountryCode' => "CN"));
     }
 }
 sort($item);
 //EUB异常订单申请订单,修改料号,没有对应的物品交易号,不能申请跟踪号问题解决
 $params = array('Version' => "3.0.0", 'APIDevUserID' => $APIDevUserID, 'APIPassword' => $APIPassword, 'APISellerUserID' => $APISellerUserID, 'MessageID' => "135625622432", "OrderDetail" => array("PickUpAddress" => $PickUpAddress, "ShipFromAddress" => $ShipFromAddress, "ShipToAddress" => $ShipToAddress, "ItemList" => array("Item" => $item), "EMSPickUpType" => $shiptype, "ReturnAddress" => $ReturnAddress));
开发者ID:ohjack,项目名称:newErp,代码行数:31,代码来源:wh_eub_tracknumber_ebay.php


注:本文中的CommonModel::get_hsInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。