• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CSaleStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onPrepareComponentParams

 /**
  * @param $params
  * @override
  * @return array
  */
 public function onPrepareComponentParams($params)
 {
     $params = parent::onPrepareComponentParams($params);
     if (!isset($params["CACHE_TIME"])) {
         $params["CACHE_TIME"] = 86400;
     }
     $params["DETAIL_URL"] = trim($params["DETAIL_URL"]);
     if (isset($params["BY"]) && is_array($params["BY"])) {
         if (count($params["BY"])) {
             $params["BY"] = array_values($params["BY"]);
             $params["BY"] = $params["BY"][0];
         } else {
             $params["BY"] = "AMOUNT";
         }
     }
     if (!isset($params["BY"]) || !strlen(trim($params["BY"]))) {
         $params["BY"] = "AMOUNT";
     }
     if (isset($params["PERIOD"])) {
         if (is_array($params["PERIOD"])) {
             if (count($params["PERIOD"])) {
                 $params["PERIOD"] = array_values($params["PERIOD"]);
                 $params["PERIOD"] = $params["PERIOD"][0];
             } else {
                 $params["PERIOD"] = 0;
             }
         } else {
             $params["PERIOD"] = (int) $params["PERIOD"];
             if ($params["PERIOD"] < 0) {
                 $params["PERIOD"] = 0;
             }
         }
     } else {
         $params["PERIOD"] = 0;
     }
     if (!isset($params['FILTER']) || empty($params['FILTER']) || !is_array($params['FILTER'])) {
         $params['FILTER'] = array();
     }
     if (Loader::includeModule("sale")) {
         $statuses = array("CANCELED", "ALLOW_DELIVERY", "PAYED", "DEDUCTED");
         $saleStatusIterator = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => $this->getLanguageId()), false, false, array("ID"));
         while ($row = $saleStatusIterator->Fetch()) {
             $statuses[] = $row['ID'];
         }
         foreach ($params['FILTER'] as $key => $status) {
             if (!in_array($status, $statuses)) {
                 unset($params['FILTER'][$key]);
             }
         }
     }
     return $params;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:57,代码来源:class.php


示例2: GetMessage

        ?>
			</font>
		</td>
	</tr>
	//-->
	<tr>
		<td align="right" width="40%" class="tablebody">
			<font class="tablefieldtext"><?php 
        echo GetMessage("STPOD_ORDER_STATUS");
        ?>
</font>
		</td>
		<td align="left" width="60%" class="tablebody">
			<font class="tablebodytext">
			<?php 
        $arCurrentStatus = CSaleStatus::GetByID($arOrder["STATUS_ID"]);
        echo $arCurrentStatus["NAME"] . GetMessage("STPOD_ORDER_FROM") . $arOrder["DATE_STATUS"] . ")";
        ?>
			</font>
		</td>
	</tr>
	<tr>
		<td align="right" width="40%" class="tablebody">
			<font class="tablefieldtext"><?php 
        echo GetMessage("P_ORDER_PRICE");
        ?>
:</font>
		</td>
		<td align="left" width="60%" class="tablebody">
			<font class="tablebodytext"><?php 
        echo "<b>" . SaleFormatCurrency($arOrder["PRICE"], $arOrder["CURRENCY"]) . "</b>";
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:order_detail.php


示例3: obtainDataReferences

 /**
  * Function returns reference data as shared cache between this component and sale.personal.order.list.
  *
  * @throws Exception
  * @return void
  */
 protected function obtainDataReferences()
 {
     if ($this->startCache(array('spo-shared'))) {
         try {
             $cachedData = array();
             /////////////////////
             /////////////////////
             // Person type
             $dbPType = CSalePersonType::GetList(array("SORT" => "ASC"));
             while ($arPType = $dbPType->Fetch()) {
                 $cachedData['PERSON_TYPE'][$arPType["ID"]] = $arPType;
             }
             // Save statuses for Filter form
             $dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => LANGUAGE_ID));
             while ($arStatus = $dbStatus->Fetch()) {
                 $cachedData['STATUS'][$arStatus["ID"]] = $arStatus;
             }
             $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"));
             while ($arPaySystem = $dbPaySystem->Fetch()) {
                 $cachedData['PAYSYS'][$arPaySystem["ID"]] = $arPaySystem;
             }
             $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"));
             while ($arDelivery = $dbDelivery->Fetch()) {
                 $cachedData['DELIVERY'][$arDelivery["ID"]] = $arDelivery;
             }
             $dbDelivery = CSaleDeliveryHandler::GetList(array(), array(array("SITE_ID" => SITE_ID)));
             while ($arDeliveryHandler = $dbDelivery->Fetch()) {
                 $cachedData['DELIVERY_HANDLERS'][$arDeliveryHandler["SID"]] = $arDeliveryHandler;
             }
             /////////////////////
             /////////////////////
         } catch (Exception $e) {
             $this->abortCache();
             throw $e;
         }
         $this->endCache($cachedData);
     } else {
         $cachedData = $this->getCacheData();
     }
     $this->dbResult = array_merge($this->dbResult, $this->adaptCachedReferences($cachedData));
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:47,代码来源:class.php


示例4: StatusOrder

 function StatusOrder($ID, $val)
 {
     global $DB, $USER;
     $ID = IntVal($ID);
     $val = trim($val);
     foreach (GetModuleEvents("sale", "OnSaleBeforeStatusOrder", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID, $val)) === false) {
             return false;
         }
     }
     $arFields = array("STATUS_ID" => $val, "=DATE_STATUS" => $DB->GetNowFunction(), "EMP_STATUS_ID" => IntVal($USER->GetID()) > 0 ? IntVal($USER->GetID()) : false);
     $res = CSaleOrder::Update($ID, $arFields);
     unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_" . $ID]);
     foreach (GetModuleEvents("sale", "OnSaleStatusOrder", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID, $val));
     }
     CTimeZone::Disable();
     $arOrder = CSaleOrder::GetByID($ID);
     CTimeZone::Enable();
     $userEmail = "";
     $dbOrderProp = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $ID, "PROP_IS_EMAIL" => "Y"));
     if ($arOrderProp = $dbOrderProp->Fetch()) {
         $userEmail = $arOrderProp["VALUE"];
     }
     if (strlen($userEmail) <= 0) {
         $dbUser = CUser::GetByID($arOrder["USER_ID"]);
         if ($arUser = $dbUser->Fetch()) {
             $userEmail = $arUser["EMAIL"];
         }
     }
     $dbSite = CSite::GetByID($arOrder["LID"]);
     $arSite = $dbSite->Fetch();
     $arStatus = CSaleStatus::GetByID($arOrder["STATUS_ID"], $arSite["LANGUAGE_ID"]);
     $arFields = array("ORDER_ID" => $ID, "ORDER_DATE" => $arOrder["DATE_INSERT_FORMAT"], "ORDER_STATUS" => $arStatus["NAME"], "EMAIL" => $userEmail, "ORDER_DESCRIPTION" => $arStatus["DESCRIPTION"], "TEXT" => "", "SALE_EMAIL" => COption::GetOptionString("sale", "order_email", "order@" . $_SERVER["SERVER_NAME"]));
     foreach (GetModuleEvents("sale", "OnSaleStatusEMail", true) as $arEvent) {
         $arFields["TEXT"] = ExecuteModuleEventEx($arEvent, array($ID, $arStatus["ID"]));
     }
     $eventName = "SALE_STATUS_CHANGED_" . $arOrder["STATUS_ID"];
     $bSend = true;
     foreach (GetModuleEvents("sale", "OnOrderStatusSendEmail", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID, &$eventName, &$arFields, $arOrder["STATUS_ID"])) === false) {
             $bSend = false;
         }
     }
     if ($bSend) {
         $eventMessage = new CEventMessage();
         $dbEventMessage = $eventMessage->GetList($b = "", $o = "", array("EVENT_NAME" => $eventName, "SITE_ID" => $arOrder["LID"]));
         if (!($arEventMessage = $dbEventMessage->Fetch())) {
             $eventName = "SALE_STATUS_CHANGED";
         }
         $event = new CEvent();
         $event->Send($eventName, $arOrder["LID"], $arFields, "N");
     }
     return $res;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:55,代码来源:order.php


示例5: htmlspecialcharsEx

						$arFilter,
						$arGroupByTmp,
						false,
						array("ID", "NAME", "SORT")
					);
					while($arStatusListTmp = $dbStatusListTmp->GetNext())
					{
						?><option value="<?echo $arStatusListTmp["ID"] ?>"<?if ($arStatusListTmp["ID"]==$str_STATUS_ID) echo " selected"?>><?echo $arStatusListTmp["NAME"] ?> [<?echo $arStatusListTmp["ID"] ?>]</option><?
					}
					?>
				</select>
				<?
			}
			else
			{
				$arStatusLand = CSaleStatus::GetLangByID($str_STATUS_ID, LANGUAGE_ID);
				echo htmlspecialcharsEx("[".$str_STATUS_ID."] ".$arStatusLand["NAME"]);
			}
			?>
			<input type="hidden" name="user_id" id="user_id" value="<?php 
echo $str_USER_ID;
?>
" onChange="fUserGetProfile(this);" >
		</td>
	</tr>
<?
$tabControl->EndCustomField("ORDER_STATUS");

if ($ID > 0)
{
	$arSitesShop = array();
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php


示例6: echo

									<div id="editStatusDIV">
										<select name="STATUS_ID" id="STATUS_ID" <? echo (!$boolLocked ? 'onchange="BX(\'change_status\').value=\'Y\';"': ''); ?>>
											<?
											if ($arStatusList)
											{
												$arFilter = array("LID" => LANG);
												$arGroupByTmp = false;
												if ($saleModulePermissions < "W")
												{
													$arFilter["GROUP_ID"] = $arUserGroups;
													$arFilter["PERM_STATUS"] = "Y";
												}
												$dbStatusListTmp = CSaleStatus::GetList(
														array("SORT" => "ASC"),
														$arFilter,
														$arGroupByTmp,
														false,
														array("ID", "NAME", "SORT")
													);
												while($arStatusListTmp = $dbStatusListTmp->GetNext())
												{
													$select = "";
													if ($arStatusListTmp["ID"]==$arOrder["STATUS_ID"])
														$select = " selected";

													$statusOrder .= '<option value="'.$arStatusListTmp["ID"].'" '.$select.'>'.$arStatusListTmp["NAME"].'</option>';
												}
											}

											echo $statusOrder;
										?>
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order_detail.php


示例7: intval

$width = intval($_GET["width"]);
$max_width = COption::GetOptionInt("sale", "GRAPH_WEIGHT", 600);
if ($width <= 0 || $width > $max_width) {
    $width = $max_width;
}
$height = intval($_GET["height"]);
$max_height = COption::GetOptionInt("sale", "GRAPH_HEIGHT", 600);
if ($height <= 0 || $height > $max_height) {
    $height = $max_height;
}
if ($mode != "money") {
    $mode = "count";
}
$arColor = array("08738C", "C6B59C", "0000FF", "FF0000", "FFFF00", "F7C684", "8CD694", "9CADCE", "B584BD", "C684BD", "FF94C6", "BDE794", "F7949C", "7BCE6B", "FF6342", "E2F86B", "A5DE63", "42BD6B", "52BDA5", "F79473", "5AC6DE", "94D6C6", "9C52AD", "BD52AD", "9C94C6", "FF63AD", "FF6384", "FE881D", "FF9C21", "FFAD7B", "EFFF29", "7BCE6B", "42BD6B", "52C6AD", "6B8CBD", "3963AD", "F7298C", "A51800", "9CA510", "528C21", "689EB9", "217B29", "6B8CC6", "D6496C", "C6A56B", "00B0A4", "AD844A", "9710B4", "946331", "AD3908", "734210", "008400", "3EC19A", "28D7D7", "6B63AD", "A4C13E", "7BCE31", "A5DE94", "94D6E7", "9C8C73", "FF8C4A", "A7588B", "03CF45", "F7B54A", "808040", "947BBD", "840084", "737373", "C48322", "809254", "1E8259", "63C6DE", "46128D", "8080C0");
$arStatus = array();
$dbStatusList = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => LANGUAGE_ID), false, false, array("ID", "NAME", "SORT"));
while ($arStatusList = $dbStatusList->GetNext()) {
    $arStatus[$arStatusList["ID"]] = $arStatusList["NAME"];
}
$arCurrency = array();
$dbCur = CCurrency::GetList($b = "sort", $order1 = "asc", LANGUAGE_ID);
while ($arCur = $dbCur->GetNext()) {
    $arCurrency[$arCur["CURRENCY"]] = $arCur["FULL_NAME"];
}
$dbSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSites = $dbSite->GetNext()) {
    $arSite[$arSites["LID"]] = $arSites["NAME"];
}
$arFind = array("find_canceled" => $find_canceled, "find_allow_delivery" => $find_allow_delivery, "find_payed" => $find_payed, "find_all" => $find_all, "filter_by" => $filter_by, "mode" => $mode);
foreach ($arCurrency as $k1 => $v1) {
    if (${"find_all_" . $k1} == "Y") {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:stat_graph.php


示例8: array

                @set_time_limit(0);
                $DB->StartTransaction();
                if (!CSaleStatus::Delete($ID)) {
                    $DB->Rollback();
                    if ($ex = $APPLICATION->GetException()) {
                        $lAdmin->AddGroupError($ex->GetString(), $ID);
                    } else {
                        $lAdmin->AddGroupError(GetMessage("ERROR_DEL_STATUS"), $ID);
                    }
                }
                $DB->Commit();
                break;
        }
    }
}
$dbResultList = CSaleStatus::GetList(array($by => $order), $arFilter, false, false, array("ID", "SORT", "LID", "NAME", "DESCRIPTION", $by));
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("STATUS_NAV")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => GetMessage("STATUS_ID"), "sort" => "ID", "default" => true), array("id" => "SORT", "content" => GetMessage("STATUS_SORT"), "sort" => "SORT", "default" => true), array("id" => "NAME", "content" => GetMessage("SALE_NAME"), "sort" => "", "default" => true)));
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
while ($arCCard = $dbResultList->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arCCard);
    $row->AddField("ID", "<a href=\"/bitrix/admin/sale_status_edit.php?ID=" . $f_ID . "&lang=" . LANG . GetFilterParams("filter_") . "\" title=\"" . GetMessage("SALE_EDIT_DESCR") . "\">" . $f_ID . "</a>");
    $row->AddField("SORT", $f_SORT);
    $row->AddField("NAME", $f_NAME . "<br><small>" . $f_DESCRIPTION . "</small><br>");
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("SALE_EDIT_DESCR"), "ACTION" => $lAdmin->ActionRedirect("sale_status_edit.php?ID=" . $f_ID . "&lang=" . LANG . GetFilterParams("filter_") . ""), "DEFAULT" => true);
    if ($saleModulePermissions >= "W" && $f_ID != "N" && $f_ID != "F") {
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("SALE_DELETE_DESCR"), "ACTION" => "if(confirm('" . GetMessage('STATUS_DEL_CONF') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete"));
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:status.php


示例9: GetMessage

    echo "[" . $str_LID . "] ";
    $db_lang = CLang::GetByID($str_LID);
    if ($arLang = $db_lang->GetNext()) {
        echo $arLang["NAME"];
    }
    ?>
			</td>
		</tr>
		<tr>
			<td><?php 
    echo GetMessage("P_ORDER_STATUS");
    ?>
:</td>
			<td>
				<?php 
    $ar_status = CSaleStatus::GetByID($str_STATUS_ID);
    ?>
				[<?php 
    echo $ar_status["ID"];
    ?>
] <?php 
    echo htmlspecialcharsbx($ar_status["NAME"]);
    ?>
			</td>
		</tr>
		<tr>
			<td>
				<?php 
    echo GetMessage("P_ORDER_CANCELED");
    ?>
 / <?php 
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:order_print.php


示例10: mapYandexStatusToOrder

 protected function mapYandexStatusToOrder($order, $yandexStatus, $cancelReason = "")
 {
     global $APPLICATION;
     if (!is_array($order) || !isset($order["ID"]) || strlen($yandexStatus) <= 0) {
         return false;
     }
     $settings = $this->getSettingsBySiteId($order["LID"]);
     if (!isset($settings["STATUS_IN"][$yandexStatus]) || strlen($settings["STATUS_IN"][$yandexStatus]) <= 0) {
         return false;
     }
     $result = false;
     $bitrixStatus = $settings["STATUS_IN"][$yandexStatus];
     switch ($bitrixStatus) {
         /* flags */
         case "CANCELED":
             $errorMessageTmp = "";
             $result = CSaleOrder::CancelOrder($order["ID"], "Y", $cancelReason);
             if (!$result) {
                 if ($ex = $APPLICATION->GetException()) {
                     if ($ex->GetID() != "ALREADY_FLAG") {
                         $errorMessageTmp .= $ex->GetString();
                     }
                 } else {
                     $errorMessageTmp .= GetMessage("ERROR_CANCEL_ORDER") . ". ";
                 }
             }
             if ($errorMessageTmp != "") {
                 $this->log(self::LOG_LEVEL_ERROR, "YMARKET_INCOMING_ORDER_STATUS", $order["XML_ID"], $errorMessageTmp);
             } else {
                 $this->log(self::LOG_LEVEL_INFO, "YMARKET_INCOMING_ORDER_STATUS", $order["XML_ID"], GetMessage("SALE_YMH_INCOMING_ORDER_STATUS_CANCELED") . ": " . $order["ID"]);
             }
             break;
         case "ALLOW_DELIVERY":
             $result = CSaleOrder::DeliverOrder($order["ID"], "Y");
             break;
         case "PAYED":
             $result = CSaleOrder::PayOrder($order["ID"], "Y");
             break;
         case "DEDUCTED":
             $result = CSaleOrder::DeductOrder($order["ID"], "Y");
             break;
             /* statuses */
         /* statuses */
         default:
             if (CSaleStatus::GetByID($bitrixStatus)) {
                 $result = CSaleOrder::StatusOrder($order["ID"], $bitrixStatus);
             }
             break;
     }
     $this->log($result ? self::LOG_LEVEL_INFO : self::LOG_LEVEL_ERROR, "YMARKET_ORDER_STATUS_CHANGE", $order["ID"], ($result ? GetMessage("SALE_YMH_LOG_TYPE_ORDER_STATUS_CHANGE_OK") : GetMessage("SALE_YMH_LOG_TYPE_ORDER_STATUS_CHANGE_ERROR")) . " (" . $bitrixStatus . ")");
     return $result;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:52,代码来源:ym_handler.php


示例11: getStatusesNames

	public static function getStatusesNames($arStatusIds)
	{
		$arStatusNames = array();

		$dbStat = CSaleStatus::GetList(
										array(),
										array("ID" =>$arStatusIds, "LID" => LANGUAGE_ID),
										false,
										false,
										array("ID", "NAME")
		);

		while($arStat = $dbStat->Fetch())
			$arStatusNames[$arStat["ID"]] = htmlspecialcharsbx($arStat["NAME"]);

		return $arStatusNames;
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:17,代码来源:mobile_order.php


示例12: Array

				if($arStatus["ID"] == "P")
					$bStatusP = true;
			}
			if(!$bStatusP)
			{
				$arFields = Array("ID" => "P", "SORT" => 150);
				foreach($arLanguages as $langID)
				{
					WizardServices::IncludeServiceLang("step1.php", $langID);
					$arFields["LANG"][] = Array("LID" => $langID, "NAME" => GetMessage("WIZ_SALE_STATUS_P"), "DESCRIPTION" => GetMessage("WIZ_SALE_STATUS_DESCRIPTION_P"));
				}

				$ID = CSaleStatus::Add($arFields);
				if ($ID !== '')
				{
					CSaleStatus::CreateMailTemplate($ID);
				}
			}
		}

		if(CModule::IncludeModule("currency"))
		{
			$dbCur = CCurrency::GetList($by="currency", $o = "asc");
			while($arCur = $dbCur->Fetch())
			{
				if($lang == "ru")
					CCurrencyLang::Update($arCur["CURRENCY"], $lang, array("DECIMALS" => 2, "HIDE_ZERO" => "Y"));
				elseif($arCur["CURRENCY"] == "EUR")
					CCurrencyLang::Update($arCur["CURRENCY"], $lang, array("DECIMALS" => 2, "FORMAT_STRING" => "&euro;#"));
			}
		}
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:step1.php


示例13: onSaleOrderStatusChangeSendEmail

 /**
  * @param Main\Event $event
  *
  * @return Main\EventResult
  * @throws Main\ObjectNotFoundException
  */
 public static function onSaleOrderStatusChangeSendEmail(Main\Event $event)
 {
     $parameters = $event->getParameters();
     /** @var Sale\Order $basketItem */
     $order = $parameters['ENTITY'];
     $value = $parameters['VALUE'];
     $oldValue = $parameters['OLD_VALUE'];
     if (!$order instanceof Sale\Order) {
         return new Main\EventResult(Main\EventResult::ERROR, new Sale\ResultError(Main\Localization\Loc::getMessage('SALE_EVENT_COMPATIBILITY_ORDER_STATUS_CHANGE_WRONG_ORDER'), 'SALE_EVENT_COMPATIBILITY_ORDER_STATUS_CHANGE_WRONG_ORDER'), 'sale');
     }
     $orderFields = array();
     /** @var Sale\Result $resultOrderFields */
     $resultOrderFields = OrderCompatibility::getOrderFields($order);
     if ($resultOrderFields->isSuccess()) {
         if ($orderFieldsResultData = $resultOrderFields->getData()) {
             if (!empty($orderFieldsResultData['ORDER_FIELDS']) && is_array($orderFieldsResultData['ORDER_FIELDS'])) {
                 $orderFields = $orderFieldsResultData['ORDER_FIELDS'];
             }
         }
     }
     \CSaleMobileOrderPush::send(static::EVENT_COMPATIBILITY_MOBILE_PUSH_ORDER_STATUS_CHANGE, array("ORDER" => $orderFields));
     $propertyCollection = $order->getPropertyCollection();
     $userEmail = "";
     /** @var Sale\PropertyValue $userEmailProperty */
     if ($userEmailProperty = $propertyCollection->getUserEmail()) {
         $userEmail = $userEmailProperty->getValue();
     }
     if (strval(trim($userEmail)) == '') {
         $userRes = \CUser::GetByID($order->getUserId());
         if ($userData = $userRes->fetch()) {
             $userEmail = $userData["EMAIL"];
         }
     }
     static $cacheSiteData = array();
     if (!isset($cacheSiteData[$order->getSiteId()])) {
         $siteRes = \CSite::GetByID($order->getSiteId());
         $siteData = $siteRes->Fetch();
     } else {
         $siteData = $cacheSiteData[$order->getSiteId()];
     }
     if (($statusData = \CSaleStatus::GetByID($order->getField("STATUS_ID"), $siteData['LANGUAGE_ID'])) && $statusData['NOTIFY'] == "Y") {
         $fields = array("ORDER_ID" => $order->getField("ACCOUNT_NUMBER"), "ORDER_DATE" => $order->getField("DATE_INSERT")->toString(), "ORDER_STATUS" => $statusData["NAME"], "EMAIL" => $userEmail, "ORDER_DESCRIPTION" => $statusData["DESCRIPTION"], "TEXT" => "", "SALE_EMAIL" => Main\Config\Option::get("sale", "order_email", "order@" . $_SERVER["SERVER_NAME"]));
         foreach (GetModuleEvents("sale", static::EVENT_COMPATIBILITY_ORDER_STATUS_EMAIL, true) as $oldEvent) {
             $fields["TEXT"] = ExecuteModuleEventEx($oldEvent, array($order->getId(), $statusData["ID"]));
         }
         $eventName = "SALE_STATUS_CHANGED_" . $order->getField("STATUS_ID");
         $isSend = true;
         foreach (GetModuleEvents("sale", static::EVENT_COMPATIBILITY_ORDER_STATUS_SEND_EMAIL, true) as $oldEvent) {
             if (ExecuteModuleEventEx($oldEvent, array($order->getId(), &$eventName, &$fields, $order->getField("STATUS_ID"))) === false) {
                 $isSend = false;
             }
         }
         if ($isSend) {
             $b = '';
             $o = '';
             $eventMessage = new \CEventMessage();
             $eventMessageRes = $eventMessage->GetList($b, $o, array("EVENT_NAME" => $eventName, "SITE_ID" => $order->getSiteId(), 'ACTIVE' => 'Y'));
             if (!($eventMessageData = $eventMessageRes->Fetch())) {
                 $eventName = "SALE_STATUS_CHANGED";
             }
             unset($o, $b);
             $event = new \CEvent();
             $event->Send($eventName, $order->getSiteId(), $fields, "N");
         }
     }
     return new Main\EventResult(Main\EventResult::SUCCESS, null, 'sale');
 }
开发者ID:Satariall,项目名称:izurit,代码行数:73,代码来源:eventcompatibility.php


示例14: FormatOrderStatusChanged

 public static function FormatOrderStatusChanged($arData)
 {
     $info = GetMessage("SOC_ORDER_STATUS_CHANGED_INFO");
     foreach ($arData as $param => $value) {
         if ($param == "STATUS_ID") {
             $res = CSaleStatus::GetByID($value);
             $value = "\"" . $res["NAME"] . "\"";
         }
         $info = str_replace("#" . $param . "#", $value, $info);
     }
     return array("NAME" => GetMessage("SOC_ORDER_STATUS_CHANGED"), "INFO" => $info);
 }
开发者ID:rasuldev,项目名称:torino,代码行数:12,代码来源:order_change.php


示例15: makeMessage

 private static function makeMessage($eventId, $arParams)
 {
     global $DB;
     $strResult = GetMessage('SMOB_PUSH_MES_' . $eventId, array("#ACCOUNT_NUMBER#" => $arParams["ORDER"]["ACCOUNT_NUMBER"], "#DATE_INSERT#" => FormatDate($DB->DateFormatToPHP(CSite::GetDateFormat("SHORT")), strtotime($arParams["ORDER"]["DATE_INSERT"])), "#PRICE#" => $arParams["ORDER"]["PRICE"], "#CURRENCY#" => $arParams["ORDER"]["CURRENCY"]));
     if ($eventId == "ORDER_STATUS_CHANGED") {
         $arFilter = array("LID" => LANGUAGE_ID, "ID" => $arParams["ORDER"]["STATUS_ID"]);
         $dbStatusListTmp = CSaleStatus::GetList(array("SORT" => "ASC"), $arFilter, false, false, array("NAME"));
         if ($arStatus = $dbStatusListTmp->GetNext()) {
             $strResult = str_replace("#STATUS_NAME#", $arStatus["NAME"], $strResult);
         }
     }
     return $strResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:13,代码来源:mobile_order.php


示例16: ExportOrders2Xml


//.........这里部分代码省略.........
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
><?php 
echo $arOrder["STATUS_ID"] == "F" ? "true" : "false";
?>
</<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
>
					</<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
					<<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
><?php 
echo GetMessage("SALE_EXPORT_ORDER_STATUS");
?>
</<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
><?$arStatus = CSaleStatus::GetLangByID($arOrder["STATUS_ID"]); echo htmlspecialcharsbx("[".$arOrder["STATUS_ID"]."] ".$arStatus["NAME"]);?></<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
>
					</<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
					<<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
					<<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
><?php 
echo GetMessage("SALE_EXPORT_ORDER_STATUS_ID");
?>
</<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
>
					<<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
><?php 
echo htmlspecialcharsbx($arOrder["STATUS_ID"]);
?>
</<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
>
					</<?php 
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:export.php


示例17: CEventMessage

         $emess = new CEventMessage();
         $message = str_replace(array("#TITLE#", "#SUB_TITLE#", "#TEXT#", "#FOOTER_BR#", "#FOOTER_SHOP#"), array(GetMessage($eventName . "_HTML_TITLE"), GetMessage($eventName . "_HTML_SUB_TITLE"), str_replace("\n", "<br />\n", GetMessage($eventName . "_HTML_TEXT")), GetMessage("SMAIL_FOOTER_BR"), GetMessage("SMAIL_FOOTER_SHOP")), $template);
         $emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => $eventName, "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage($eventName . "_SUBJECT"), "MESSAGE" => $message, "BODY_TYPE" => "html"));
     }
     $emess = new CEventMessage();
     $emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "SALE_NEW_ORDER_RECURRING", "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage("SALE_NEW_ORDER_RECURRING_SUBJECT"), "MESSAGE" => GetMessage("SALE_NEW_ORDER_RECURRING_MESSAGE"), "BODY_TYPE" => "text"));
     $emess = new CEventMessage();
     $emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "SALE_RECURRING_CANCEL", "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage("SALE_RECURRING_CANCEL_SUBJECT"), "MESSAGE" => GetMessage("SALE_RECURRING_CANCEL_MESSAGE"), "BODY_TYPE" => "text"));
 }
 $dbStatus = CSaleStatus::GetList(array($by => $order), array(), false, false, array("ID"));
 while ($arStatus = $dbStatus->Fetch()) {
     $ID = $arStatus["ID"];
     $eventType = new CEventType();
     $eventMessage = new CEventMessage();
     IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/general/status.php", $lid);
     $arStatusLang = CSaleStatus::GetLangByID($ID, $lid);
     $template = str_replace("#SITE_CHARSET#", $lang["CHARSET"], $templateGeneral);
     $dbEventType = $eventType->GetList(array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "LID" => $lid));
     if (!($arEventType = $dbEventType->Fetch())) {
         $str = "";
         $str .= "#ORDER_ID# - " . GetMessage("SKGS_ORDER_ID") . "\n";
         $str .= "#ORDER_DATE# - " . GetMessage("SKGS_ORDER_DATE") . "\n";
         $str .= "#ORDER_STATUS# - " . GetMessage("SKGS_ORDER_STATUS") . "\n";
         $str .= "#EMAIL# - " . GetMessage("SKGS_ORDER_EMAIL") . "\n";
         $str .= "#ORDER_DESCRIPTION# - " . GetMessage("SKGS_STATUS_DESCR") . "\n";
         $str .= "#TEXT# - " . GetMessage("SKGS_STATUS_TEXT") . "\n";
         $str .= "#SALE_EMAIL# - " . GetMessage("SKGS_SALE_EMAIL") . "\n";
         $eventTypeID = $eventType->Add(array("LID" => $lid, "EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "NAME" => GetMessage("SKGS_CHANGING_STATUS_TO") . " \"" . $arStatusLang["NAME"] . "\"", "DESCRIPTION" => $str));
     }
     if (count($arSites) > 0) {
         $dbEventMessage = $eventMessage->GetList($b = "", $o = "", array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "SITE_ID" => $arSites));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:events.php


示例18: ProductsXML

    	$getxml = new ProductsXML();
    	$xml = $getxml->getXML();
    	header('Content-type: text/xml');
    	echo $xml;*/
    $arResult = array("ERROR" => "Не верный запрос");
    // обновление статусов заказа
    if ($_REQUEST["update"]) {
        if ($_REQUEST["orders"] && CModule::IncludeModule("catalog") && CModule::IncludeModule("sale")) {
            $arResult = "";
            $arOrders = $_REQUEST["orders"];
            foreach ($arOrders as $key => $order) {
                if (!CSaleOrder::StatusOrder($order["ID"], $order["STATUS"])) {
                    $result = true;
                } else {
                    $result = false;
                }
                $arResult[] = array("ID" => $order["ID"], "RESULT" => $result);
            }
        }
        // все типы статусов
    } elseif ($_REQUEST["getstatus"] && CModule::IncludeModule("catalog") && CModule::IncludeModule("sale")) {
        $arResult = "";
        $arStatus = array();
        $rsStatus = CSaleStatus::GetList(array("ID" => "ASC"), array("LID" => "ru"));
        while ($arStatus_tmp = $rsStatus->Fetch()) {
            $arResult[] = array("ID" => $arStatus_tmp["ID"], "NAME" => $arStatus_tmp["NAME"], "DESCRIPTION" => $arStatus_tmp["DESCRIPTION"]);
        }
    }
    echo json_encode($arResult);
    exit;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:exchange.php


示例19: ExportOrders2Xml


//.........这里部分代码省略.........
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
><?php 
echo $arOrder["STATUS_ID"] == "F" ? "true" : "false";
?>
</<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
>
					</<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
					<<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
><?php 
echo GetMessage("SALE_EXPORT_ORDER_STATUS");
?>
</<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
>
						<<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
><?$arStatus = CSaleStatus::GetLangByID($arOrder["STATUS_ID"]); echo htmlspecialcharsbx("[".$arOrder["STATUS_ID"]."] ".$arStatus["NAME"]);?></<?php 
echo GetMessage("SALE_EXPORT_VALUE");
?>
>
					</<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>

					<?if(strlen($arOrder["DATE_CANCELED"])>0)
					{
						?>
						<<?php 
echo GetMessage("SALE_EXPORT_PROPERTY_VALUE");
?>
>
							<<?php 
echo GetMessage("SALE_EXPORT_ITEM_NAME");
?>
><?php 
echo GetMessage("SALE_EXPORT_DATE_CANCEL");
?>
</<?php 
echo GetMessage("SALE_EXPORT_ITEM 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CSaleUser类代码示例发布时间:2022-05-20
下一篇:
PHP CSalePersonType类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap