本文整理汇总了PHP中CSaleOrderPropsValue类的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderPropsValue类的具体用法?PHP CSaleOrderPropsValue怎么用?PHP CSaleOrderPropsValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CSaleOrderPropsValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOrderInfo
protected static function getOrderInfo($orderId)
{
// order itself
$order = \CSaleOrder::getById($orderId);
// buyer info
$siteUserId = $order['USER_ID'];
$phone = '';
$email = '';
$result = \CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $orderId));
while ($row = $result->fetch()) {
if (empty($phone) && stripos($row['CODE'], 'PHONE') !== false) {
$stPhone = static::normalizePhoneNumber($row['VALUE']);
if (!empty($stPhone)) {
$phone = sha1($stPhone);
}
}
if (empty($email) && stripos($row['CODE'], 'EMAIL') !== false) {
if (!empty($row['VALUE'])) {
$email = sha1($row['VALUE']);
}
}
}
// products info
$products = array();
$result = \CSaleBasket::getList(array(), $arFilter = array('ORDER_ID' => $orderId), false, false, array('PRODUCT_ID'));
while ($row = $result->fetch()) {
$products[] = array('product_id' => $row['PRODUCT_ID'], 'recommendation' => '0');
}
// all together
$data = array('order_id' => $orderId, 'user_id' => $siteUserId, 'phone' => $phone, 'email' => $email, 'products' => $products);
return $data;
}
示例2: DoSaveUserProfile
static function DoSaveUserProfile($userId, $profileId, $profileName, $personTypeId, $orderProps, &$arErrors)
{
$profileId = intval($profileId);
$arIDs = array();
if ($profileId > 0) {
$dbProfile = CSaleOrderUserProps::GetList(array(), array("ID" => $profileId), false, false, array("ID", "NAME", "USER_ID", "PERSON_TYPE_ID"));
$arProfile = $dbProfile->Fetch();
if (!$arProfile) {
$arErrors[] = array("CODE" => "PROFILE_NOT_FOUND", "TEXT" => GetMessage('SKGOUP_PROFILE_NOT_FOUND'));
return false;
}
if ($arProfile["USER_ID"] != $userId || $arProfile["PERSON_TYPE_ID"] != $personTypeId) {
$arErrors[] = array("CODE" => "PARAM", "TEXT" => GetMessage('SKGOUP_PARRAMS_ERROR'));
return false;
}
//if (strlen($profileName) > 0 && $profileName != $arProfile["NAME"])
if (strlen($profileName) > 0) {
$arFields = array("NAME" => $profileName, "USER_ID" => $userId);
CSaleOrderUserProps::Update($profileId, $arFields);
}
$dbUserPropsValues = CSaleOrderUserPropsValue::GetList(array(), array("USER_PROPS_ID" => $profileId), false, false, array("ID", "ORDER_PROPS_ID"));
while ($arUserPropsValue = $dbUserPropsValues->Fetch()) {
$arIDs[$arUserPropsValue["ORDER_PROPS_ID"]] = $arUserPropsValue["ID"];
}
}
if (!is_array($orderProps)) {
$dbOrderPropsValues = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => intval($orderProps)), false, false, array("ORDER_PROPS_ID", "VALUE"));
$orderProps = array();
while ($arOrderPropsValue = $dbOrderPropsValues->Fetch()) {
$orderProps[$arOrderPropsValue["ORDER_PROPS_ID"]] = $arOrderPropsValue["VALUE"];
}
}
$dbOrderProperties = CSaleOrderProps::GetList(array(), array("PERSON_TYPE_ID" => $personTypeId, "ACTIVE" => "Y", "UTIL" => "N", "USER_PROPS" => "Y"), false, false, array("ID", "TYPE", "NAME", "CODE"));
while ($arOrderProperty = $dbOrderProperties->Fetch()) {
$curVal = $orderProps[$arOrderProperty["ID"]];
if ($arOrderProperty["TYPE"] == "MULTISELECT" && is_array($curVal)) {
$curVal = implode(",", $curVal);
}
if (strlen($curVal) > 0) {
if ($profileId <= 0) {
if (strlen($profileName) <= 0) {
$profileName = GetMessage("SOA_PROFILE") . " " . Date("Y-m-d");
}
$arFields = array("NAME" => $profileName, "USER_ID" => $userId, "PERSON_TYPE_ID" => $personTypeId);
$profileId = CSaleOrderUserProps::Add($arFields);
}
if (array_key_exists($arOrderProperty["ID"], $arIDs)) {
$arFields = array("NAME" => $arOrderProperty["NAME"], "VALUE" => $curVal);
CSaleOrderUserPropsValue::Update($arIDs[$arOrderProperty["ID"]], $arFields);
unset($arIDs[$arOrderProperty["ID"]]);
} else {
$arFields = array("USER_PROPS_ID" => $profileId, "ORDER_PROPS_ID" => $arOrderProperty["ID"], "NAME" => $arOrderProperty["NAME"], "VALUE" => $curVal);
CSaleOrderUserPropsValue::Add($arFields);
}
}
}
foreach ($arIDs as $id) {
CSaleOrderUserPropsValue::Delete($id);
}
}
示例3: getOrderPropsValue
public static function getOrderPropsValue($orderId, $fetchByCode = true)
{
static $result = array();
$hash = $orderId . '_' . $fetchByCode;
if($result[$hash] === null)
{
$result[$hash] = array();
$rs = \CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $orderId), false, false, array('NAME', 'VALUE', 'CODE'));
while($ar = $rs->GetNext(true, false))
{
$obj = new OrderPropsValue($ar);
if($fetchByCode)
{
$result[$hash][$ar['CODE']] = $obj;
}
else
{
$result[$hash][] = $obj;
}
}
}
return $result[$hash];
}
示例4: OnBeforeEventAddHandler
public static function OnBeforeEventAddHandler(&$event, &$lid, &$arFields)
{
if ($event == "SALE_NEW_ORDER") {
$orderId = $arFields['ORDER_ID'];
$dbOrderProps = CSaleOrderPropsValue::GetList(array("CODE" => "ASC"), array("ORDER_ID" => $orderId, "CODE" => array("ORDER_PHONE", "ORDER_ADDRESS", "ORDER_ADDRESS_DETAILS", "ORDER_NAME")));
while ($arOrderProps = $dbOrderProps->GetNext()) {
$arFields[$arOrderProps['CODE']] = $arOrderProps['~VALUE'];
}
$arFields["ORDER_DESCRIPTION"] = trim(CSaleOrder::GetByID($orderId)["USER_DESCRIPTION"]);
}
}
示例5: getProperties
public function getProperties()
{
if (!isset($this->props)) {
$this->props = $this->propsRaw = array();
$res = \CSaleOrderPropsValue::GetList(array('SORT' => 'ASC'), array('ORDER_ID' => $this->id));
while ($row = $res->Fetch()) {
$this->props[$row['CODE']] = $row['VALUE'];
$this->propsRaw[] = $row;
}
}
return $this->props;
}
示例6: Update
function Update($ID, $arFields)
{
global $DB;
$ID = IntVal($ID);
if (!CSaleOrderPropsValue::CheckFields("UPDATE", $arFields, $ID)) {
return false;
}
$strUpdate = $DB->PrepareUpdate("b_sale_order_props_value", $arFields);
$strSql = "UPDATE b_sale_order_props_value SET " . "\t" . $strUpdate . " " . "WHERE ID = " . $ID . " ";
$DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
return $ID;
}
示例7: GetByID
function GetByID($ID)
{
global $DB;
$ID = IntVal($ID);
if (CSaleLocation::isLocationProMigrated()) {
$strSql = "SELECT V.ID, V.USER_PROPS_ID, V.ORDER_PROPS_ID, V.NAME, " . CSaleOrderPropsValue::getPropertyValueFieldSelectSql('V') . ", P.TYPE " . "FROM b_sale_user_props_value V " . "INNER JOIN b_sale_order_props P ON (V.ORDER_PROPS_ID = P.ID) " . CSaleOrderPropsValue::getLocationTableJoinSql('V') . "WHERE V.ID = " . $ID . "";
} else {
$strSql = "SELECT * " . "FROM b_sale_user_props_value " . "WHERE ID = " . $ID . "";
}
$db_res = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
if ($res = $db_res->Fetch()) {
return $res;
}
return False;
}
示例8: AddOrderProperty
function AddOrderProperty($prop_id, $value, $order)
{
if (!strlen($prop_id)) {
return false;
}
if (CModule::IncludeModule('sale')) {
if ($arOrderProps = CSaleOrderProps::GetByID($prop_id)) {
$db_vals = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $order, 'ORDER_PROPS_ID' => $arOrderProps['ID']));
if ($arVals = $db_vals->Fetch()) {
return CSaleOrderPropsValue::Update($arVals['ID'], array('NAME' => $arVals['NAME'], 'CODE' => $arVals['CODE'], 'ORDER_PROPS_ID' => $arVals['ORDER_PROPS_ID'], 'ORDER_ID' => $arVals['ORDER_ID'], 'VALUE' => $value));
} else {
return CSaleOrderPropsValue::Add(array('NAME' => $arOrderProps['NAME'], 'CODE' => $arOrderProps['CODE'], 'ORDER_PROPS_ID' => $arOrderProps['ID'], 'ORDER_ID' => $order, 'VALUE' => $value));
}
}
}
}
示例9: Update
function Update($ID, $arFields)
{
global $DB;
$ID = IntVal($ID);
if (!CSaleOrderPropsValue::CheckFields("UPDATE", $arFields, $ID)) {
return false;
}
// need to check here if we got CODE or ID came
if (isset($arFields['VALUE']) && (string) $arFields['VALUE'] != '' && CSaleLocation::isLocationProMigrated()) {
$propValue = self::GetByID($ID);
if ($propValue['TYPE'] == 'LOCATION') {
$arFields['VALUE'] = CSaleLocation::tryTranslateIDToCode($arFields['VALUE']);
}
}
$strUpdate = $DB->PrepareUpdate("b_sale_order_props_value", $arFields);
$strSql = "UPDATE b_sale_order_props_value SET " . "\t" . $strUpdate . " " . "WHERE ID = " . $ID . " ";
$DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
return $ID;
}
示例10: preparePreregistrationReqData
public static function preparePreregistrationReqData($arOrder, $profileId, $arConfig)
{
$result = array();
$result["sender"] = array("inn" => $arConfig["INN"]["VALUE"], "city" => static::getFilialAndCity($arConfig["CITY_DELIVERY"]["VALUE"]), "title" => $arConfig["NAME"]["VALUE"], "phone" => $arConfig["PHONE"]["VALUE"]);
$inn = "";
$city = "";
$title = "";
$phone = "";
$address = "";
if (isset($extraParams["location"])) {
$city = $extraParams["location"];
}
$dbOrderProps = \CSaleOrderPropsValue::GetOrderProps($arOrder["ID"]);
while ($arOrderProps = $dbOrderProps->Fetch()) {
if ($arOrderProps["CODE"] == "COMPANY" || $arOrderProps["CODE"] == "FIO") {
$title = $arOrderProps["VALUE"];
}
if ($arOrderProps["CODE"] == "INN") {
$inn = $arOrderProps["VALUE"];
}
if ($arOrderProps["CODE"] == "PHONE") {
$phone = $arOrderProps["VALUE"];
}
if ($arOrderProps["CODE"] == "LOCATION") {
$location = $arOrderProps["VALUE"];
$locDelivery = Adapter::mapLocation($location);
// todo: if more than one
$city = static::getFilialAndCity(key($locDelivery));
}
if ($arOrderProps["CODE"] == "ADDRESS") {
$address = $arOrderProps["VALUE"];
}
}
$arPacks = \CSaleDeliveryHelper::getBoxesFromConfig($profileId, $arConfig);
$arPackagesParams = \CSaleDeliveryHelper::getRequiredPacks($arOrder["ITEMS"], $arPacks, 0);
$result["cargos"] = array(array("common" => array("positionsCount" => count($arPackagesParams), "decription" => GetMessage("SALE_DH_PECOM_DESCRIPTION_GOODS"), "orderNumber" => $arOrder["ACCOUNT_NUMBER"], "paymentForm" => $arConfig["PAYMENT_FORM"]["VALUE"], "accompanyingDocuments" => false), "receiver" => array("inn" => $inn, "city" => $city, "title" => $title, "phone" => $phone, "addressStock" => $address), "services" => array("transporting" => array("payer" => array("type" => 1)), "hardPacking" => array("enabled" => \CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_OTHER_RIGID_PACKING'), "payer" => array("type" => \CDeliveryPecom::getConfValue($arConfig, 'SERVICE_OTHER_RIGID_PAYER'))), "palletTransporting" => array("enabled" => !\CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_OTHER_RIGID_PACKING') && \CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_OTHER_PALLETE'), "payer" => array("type" => \CDeliveryPecom::getConfValue($arConfig, 'SERVICE_OTHER_PALLETE_PAYER'))), "insurance" => array("enabled" => \CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_OTHER_INSURANCE'), "payer" => array("type" => \CDeliveryPecom::getConfValue($arConfig, 'SERVICE_OTHER_INSURANCE_PAYER')), "cost" => intval($arOrder["PRICE"])), "sealing" => array("enabled" => \CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_OTHER_PLOMBIR_ENABLE'), "payer" => array("type" => \CDeliveryPecom::getConfValue($arConfig, 'SERVICE_OTHER_PLOMBIR_PAYER'))), "strapping" => array("enabled" => false), "documentsReturning" => array("enabled" => false), "delivery" => array("enabled" => \CDeliveryPecom::isConfCheckedVal($arConfig, 'SERVICE_DELIVERY_ENABLED'), "payer" => array("type" => \CDeliveryPecom::getConfValue($arConfig, 'SERVICE_OTHER_DELIVERY_PAYER'))))));
return $result;
}
示例11: array
$html = "";
$arRelFilter = array();
$arRelFilter["RELATED"]["DELIVERY_ID"] = $str_DELIVERY_ID;
$arRelFilter["RELATED"]["PAYSYSTEM_ID"] = $str_PAY_SYSTEM_ID;
if (isset($arRelFilter["RELATED"]) && (strlen($arRelFilter["RELATED"]["DELIVERY_ID"]) > 0 || intval($arRelFilter["RELATED"]["PAYSYSTEM_ID"]) > 0))
{
$dbRelatedProps = CSaleOrderProps::GetList(array(), $arRelFilter, false, false, array("*"));
while ($arRelatedProps = $dbRelatedProps->GetNext())
$arProps[] = $arRelatedProps;
$arPropsValues = array();
if (!$bVarsFromForm)
{
$dbPropValue = CSaleOrderPropsValue::GetOrderRelatedProps($ID, $arRelFilter["RELATED"]);
while ($arValue = $dbPropValue->GetNext())
$arPropsValues[$arValue["ORDER_PROPS_ID"]] = $arValue["VALUE"];
}
$propsHTML = getOrderPropertiesHTML($arProps, $arPropsValues, $LID, $str_USER_ID, $ID, $bVarsFromForm);
}
$tabControl->AddSection("RELATED_PROPS", GetMessage("NEW_ORDER_RELATED_PROPS"));
$tabControl->BeginCustomField("RELATED_PROPS_DATA", GetMessage("NEW_ORDER_RELATED_PROPS"), true);
?>
<tr>
<td id="related_props_content" colspan="2">
<?php
echo $propsHTML;
?>
示例12: array
array(
"ORDER_ID" => $ID,
"PERSON_TYPE_ID" => $arPersonType["ID"],
"ACTIVE" => "Y",
">INPUT_FIELD_LOCATION" => 0
),
false,
false,
array("INPUT_FIELD_LOCATION")
);
while ($arProperties = $dbProperties->Fetch())
$arTownOrderProps[$arProperties["INPUT_FIELD_LOCATION"]] = $arProperties["INPUT_FIELD_LOCATION"];
$arEnableTownProps = array();
$arOrderPropsValue = array();
$dbOrderProps = CSaleOrderPropsValue::GetOrderProps($ID);
while ($arOrderProps = $dbOrderProps->Fetch())
{
$arOrderPropsValue[] = $arOrderProps;
if ($arOrderProps["TYPE"] == "LOCATION" && $arOrderProps["ACTIVE"] == "Y" && $arOrderProps["IS_LOCATION"] == "Y" && in_array($arOrderProps["INPUT_FIELD_LOCATION"], $arTownOrderProps))
{
if(CSaleLocation::isLocationProMigrated())
{
$arEnableTownProps[$arOrderProps["INPUT_FIELD_LOCATION"]] = CSaleLocation::checkLocationIsAboveCity($arOrderProps["VALUE"]);
}
else
{
$arLocation = CSaleLocation::GetByID($arOrderProps["VALUE"]);
if (IntVal($arLocation["CITY_ID"]) <= 0)
$arEnableTownProps[$arOrderProps["INPUT_FIELD_LOCATION"]] = true;
else
示例13: fGetBuyerType
//.........这里部分代码省略.........
{
$arPropertiesList[$property['ID']] = $property;
}
// getting values
$arPropValues = array();
if ($formVarsSubmit) // from request
{
$locationIndexForm = "";
foreach ($_POST as $key => $value)
{
if (substr($key, 0, strlen("CITY_ORDER_PROP_")) == "CITY_ORDER_PROP_")
{
$arPropValues[intval(substr($key, strlen("CITY_ORDER_PROP_")))] = htmlspecialcharsbx($value);
$locationIndexForm = intval(substr($key, strlen("CITY_ORDER_PROP_")));
}
if (substr($key, 0, strlen("ORDER_PROP_")) == "ORDER_PROP_")
{
if ($locationIndexForm != intval(substr($key, strlen("ORDER_PROP_"))) && !is_array($value))
$arPropValues[intval(substr($key, strlen("ORDER_PROP_")))] = htmlspecialcharsbx($value);
}
}
$userComment = $_POST["USER_DESCRIPTION"];
}
elseif ($ORDER_ID == "" AND $USER_ID != "") // from profile
{
//profile
$userProfile = array();
$userProfile = CSaleOrderUserProps::DoLoadProfiles($USER_ID, $PERSON_TYPE_ID);
$arPropValues = $userProfile[$PERSON_TYPE_ID]["VALUES"];
}
elseif ($ORDER_ID != "") // from order properties
{
$dbPropValuesList = CSaleOrderPropsValue::GetList(
array(),
array("ORDER_ID" => $ORDER_ID, "ACTIVE" => "Y"),
false,
false,
array("ID", "ORDER_PROPS_ID", "NAME", "VALUE", "CODE")
);
while ($arPropValuesList = $dbPropValuesList->Fetch())
{
// from db
if(CSaleLocation::isLocationProMigrated() && $arPropertiesList[$arPropValuesList['ORDER_PROPS_ID']]['TYPE'] == 'LOCATION')
$arPropValuesList["VALUE"] = CSaleLocation::getLocationIDbyCODE($arPropValuesList["VALUE"]);
$arPropValues[intval($arPropValuesList["ORDER_PROPS_ID"])] = htmlspecialcharsbx($arPropValuesList["VALUE"]);
}
}
$location2townFldMap = array();
$arDisableFieldForLocation = array();
//select field (town) for disable
$dbProperties = CSaleOrderProps::GetList(
array(),
array("PERSON_TYPE_ID" => $PERSON_TYPE_ID, "ACTIVE" => "Y", ">INPUT_FIELD_LOCATION" => 0),
false,
false,
array("INPUT_FIELD_LOCATION")
);
while ($arProperties = $dbProperties->Fetch())
{
$arDisableFieldForLocation[$arProperties["INPUT_FIELD_LOCATION"]] = $arProperties["INPUT_FIELD_LOCATION"];
}
//show town if location is another
示例14: bxModifySaleMails
/**
* событие вызывается перед отправкой письма о новом заказе
* @param $orderID
* @param $eventName
* @param $arFields
*/
function bxModifySaleMails($order_id, &$eventName, &$arFieldsEmail)
{
//unset($_SESSION['OnBeforeOrderAddHandler']);
//$_SESSION['OnBeforeOrderAddHandler']['bxModifySaleMails']='bxModifySaleMails';
//$_SESSION['OnBeforeOrderAddHandler']['id']=$order_id;
//$_SESSION['OnBeforeOrderAddHandler']['arFields']=$arFieldsorder_old;
$basket_props="";
$post['INFO']="";
$id_product=array();
if(
(CModule::IncludeModule("main"))
&&
(CModule::IncludeModule("iblock"))
&&
(CModule::IncludeModule("catalog"))
&&
(CModule::IncludeModule("sale"))
){
/**
* получаем параметры сформировавшегося старого заказа
*/
$arFieldsorder_old = CSaleOrder::GetByID($order_id);
/*
echo "<pre>";
var_dump($arFieldsorder_old);die();
echo "</pre>";*/
/**
* выборка свойства сформировавшегося заказа по id заказа
*/
$db_props = CSaleOrderPropsValue::GetOrderProps($order_id);
$arFields_props = array();
while ($arProps = $db_props->Fetch())
{
$arFields_props_old[$arProps['CODE']]=$arProps;
}
//_debug($arFields_props_old);
/**
* выборка из корзины по id заказа
* получаем масси id продукта
*/
$rsUser = CUser::GetByID(CUser::GetID());
$arUser = $rsUser->Fetch();
/*if (!$ORDER_ID = CSaleOrder::Add(array(
"LID" => SITE_ID,
"PERSON_TYPE_ID" => 1,
"PAYED" => "N",
"CANCELED" => "N",
"STATUS_ID" => "N",
"PRICE" => 0,
"CURRENCY" => CSaleLang::GetLangCurrency(SITE_ID),
"USER_ID" => $arUser['ID'],
"PAY_SYSTEM_ID" => $arFieldsorder_old['PAY_SYSTEM_ID'],
"PRICE_DELIVERY" => 0,
"DELIVERY_ID" => $arFieldsorder_old['DELIVERY_ID'],
"DISCOUNT_VALUE" => $arFieldsorder_old['DISCOUNT_VALUE'],
"TAX_VALUE" => $arFieldsorder_old['TAX_VALUE'],
"USER_DESCRIPTION" => $post['INFO']
))){
$rows['msg'] = 'Ошибка создания заказа';
$fail = true;
}else{
$rows['msg']=$ORDER_ID;
//continue;
}*/
$dbBasketItems = CSaleBasket::GetList(
array("ID" => "ASC"),
array(
"LID" => SITE_ID,
"ORDER_ID" => $order_id
),
false,
false,
array()
);
while ($arItem = $dbBasketItems->Fetch()){
$id_product[] = $arItem['PRODUCT_ID'];
$products_basket[$arItem['PRODUCT_ID']]=$arItem;
}
foreach($products_basket as $product){
$price_product+=$product['PRICE']*$product['QUANTITY'];
$products_descriptions.=$product['NAME']." - ".$product['QUANTITY']." шт: ".intval($product['PRICE'])." руб <br/>";
}
$price_product+=$arFieldsorder_old["PRICE_DELIVERY"];
//.........这里部分代码省略.........
示例15: round
$val["DISCOUNT_RATION_PERCENT"] = round($val["PRICE"] * 100 / $priceTotal, 5);
$val["DISCOUNT_RATION_VALUE"] = round($discount * $val["DISCOUNT_RATION_PERCENT"] / 100, 5);
$val["PRICE"] -= $val["DISCOUNT_RATION_VALUE"];
$arBasket[$key] = $val;
}
return $arBasket;
}
if (CModule::IncludeModule("sale")) {
if ($arOrder = CSaleOrder::GetByID($ORDER_ID)) {
$rep_file_name = GetRealPath2Report($doc . ".php");
if (strlen($rep_file_name) <= 0) {
ShowError("PRINT TEMPLATE NOT FOUND");
die;
}
$arOrderProps = array();
$dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $ORDER_ID), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
$arCurOrderPropsTmp = CSaleOrderProps::GetRealValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["CODE"], $arOrderPropVals["PROP_TYPE"], $arOrderPropVals["VALUE"], LANGUAGE_ID);
foreach ($arCurOrderPropsTmp as $key => $value) {
$arOrderProps[$key] = $value;
}
}
if (CSaleLocation::isLocationProMigrated()) {
if (strlen($arOrderProps['LOCATION_VILLAGE']) && !strlen($arOrderProps['LOCATION_CITY'])) {
$arOrderProps['LOCATION_CITY'] = $arOrderProps['LOCATION_VILLAGE'];
}
// street added to the beginning of address, as it used to be before
if (strlen($arOrderProps['LOCATION_STREET']) && isset($arOrderProps['ADDRESS'])) {
$arOrderProps['ADDRESS'] = $arOrderProps['LOCATION_STREET'] . (strlen($arOrderProps['ADDRESS']) ? ', ' . $arOrderProps['ADDRESS'] : '');
}
}