本文整理汇总了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())
{
示例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;
}