當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSaleDeliveryHandler::getActionsList方法代碼示例

本文整理匯總了PHP中CSaleDeliveryHandler::getActionsList方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSaleDeliveryHandler::getActionsList方法的具體用法?PHP CSaleDeliveryHandler::getActionsList怎麽用?PHP CSaleDeliveryHandler::getActionsList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CSaleDeliveryHandler的用法示例。


在下文中一共展示了CSaleDeliveryHandler::getActionsList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetMessage

							<div id="popup_form" class="sale_popup_form adm-workarea" style="display:none; font-size:13px;">
								<table>
									<tr>
										<td class="head"><?php 
echo GetMessage('SOD_POPUP_ORDER_STATUS');
?>
:</td>
										<td><select name="FORM_STATUS_ID" id="FORM_STATUS_ID" onChange="fChangeOrderStatus();"><?php 
echo $statusOrder;
?>
</select></td>
									</tr>
									<?
										$arActions = array();

										$actions = CSaleDeliveryHandler::getActionsList($arOrder["DELIVERY_ID"]);

										if(array_key_exists("REQUEST_SELF", $actions))
											$arActions["REQUEST_SELF"] = $actions["REQUEST_SELF"];

										if(array_key_exists("REQUEST_TAKE", $actions))
											$arActions["REQUEST_TAKE"] = $actions["REQUEST_TAKE"];
									?>
									<?if(!empty($arActions)):?>
										<?
											$depList = \Bitrix\Sale\Delivery\OrderDeliveryTable::getList(array(
												'filter'=>array('=ORDER_ID' => $ID),
											));

											if($dep = $depList->fetch())
											{
開發者ID:akniyev,項目名稱:arteva.ru,代碼行數:31,代碼來源:order_detail.php

示例2: execHandlerAction

 public static function execHandlerAction($orderId, $actionId)
 {
     global $DB, $USER;
     $arResult = array();
     $arOrder = CSaleOrder::GetById($orderId);
     $handlerActions = CSaleDeliveryHandler::getActionsList($arOrder["DELIVERY_ID"]);
     if (!array_key_exists($actionId, $handlerActions)) {
         $arResult = array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DHLP_HANDLER_HAS_NO_ACTION"));
     }
     $dt = new \Bitrix\Main\Type\DateTime();
     $depList = \Bitrix\Sale\Internals\OrderDeliveryReqTable::getList(array('filter' => array('=ORDER_ID' => $orderId)));
     $dep = $depList->fetch();
     if ($dep && !is_null($dep["DATE_REQUEST"])) {
         $arResult = array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DHLP_HANDLER_REQUEST_ALREADY_SENT"));
     }
     if (empty($arResult)) {
         $arUserGroups = $USER->GetUserGroupArray();
         $arOrder["ITEMS"] = array();
         $dbItemsList = CSaleBasket::GetList(array("SET_PARENT_ID" => "DESC", "TYPE" => "DESC", "NAME" => "ASC"), array("ORDER_ID" => $orderId));
         while ($arItem = $dbItemsList->GetNext()) {
             $arItem["DIMENSIONS"] = unserialize($arItem["~DIMENSIONS"]);
             unset($arItem["~DIMENSIONS"]);
             $arOrder["ITEMS"][] = $arItem;
         }
         $arResult = CSaleDeliveryHandler::executeAction($arOrder["DELIVERY_ID"], $actionId, $arOrder);
         if ($actionId == "REQUEST_SELF" && isset($arResult["TRACKING_NUMBER"])) {
             $bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($orderId, $arUserGroups);
             if ($bUserCanEditOrder) {
                 if ($dep) {
                     \Bitrix\Sale\Internals\OrderDeliveryReqTable::update($dep["ID"], array("DATE_REQUEST" => $dt));
                 } else {
                     \Bitrix\Sale\Internals\OrderDeliveryReqTable::add(array("ORDER_ID" => $orderId, "DATE_REQUEST" => $dt));
                 }
                 $fields = array();
                 if (isset($arResult["TRACKING_NUMBER"])) {
                     $fields["TRACKING_NUMBER"] = $arResult["TRACKING_NUMBER"];
                 }
                 if (isset($arResult["DELIVERY_DOC_NUM"])) {
                     $fields["DELIVERY_DOC_NUM"] = $arResult["DELIVERY_DOC_NUM"];
                     $fields["DELIVERY_DOC_DATE"] = Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", $arOrder["LID"])));
                 }
                 CSaleOrder::Update($orderId, $fields);
             }
         }
         CSaleOrderChange::AddRecord($orderId, "ORDER_DELIVERY_REQUEST_SENT", $arResult);
     }
     return $arResult;
 }
開發者ID:akniyev,項目名稱:itprom_dobrohost,代碼行數:48,代碼來源:delivery_helper.php


注:本文中的CSaleDeliveryHandler::getActionsList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。