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


PHP CSaleOrderPropsVariant::GetByValue方法代码示例

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


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

示例1: nl2br

									echo '<a href="mailto:'.htmlspecialcharsbx($arOrderProps["VALUE"]).'">'.htmlspecialcharsEx($arOrderProps["VALUE"]).'</a>';
								else
									echo nl2br(htmlspecialcharsbx(trim($arOrderProps["VALUE"])));
							}
							elseif ($arOrderProps["TYPE"] == "SELECT" || $arOrderProps["TYPE"] == "RADIO")
							{
								$arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $arOrderProps["VALUE"]);
								echo htmlspecialcharsEx($arVal["NAME"]);
							}
							elseif ($arOrderProps["TYPE"] == "MULTISELECT")
							{
								$curVal = explode(",", $arOrderProps["VALUE"]);
								$countCurVal = count($curVal);
								for ($i = 0; $i < $countCurVal; $i++)
								{
									$arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $curVal[$i]);
									if ($i > 0)
										echo ", ";
									echo htmlspecialcharsEx($arVal["NAME"]);
								}
							}
							elseif ($arOrderProps["TYPE"] == "LOCATION")
							{
								$arOrder["LOCATION_TO"] = $arOrderProps["VALUE"];

								if(CSaleLocation::isLocationProEnabled())
								{
									$locationString = Location\Admin\LocationHelper::getLocationStringByCode($arOrderProps['VALUE']);
									if(!strlen($locationString))
										$locationString = $arOrderProps['VALUE'];
开发者ID:akniyev,项目名称:arteva.ru,代码行数:30,代码来源:order_detail.php

示例2: obtainProps

 /**
  * Function gets order properties from database
  * @param mixed[] $cached Cached data taken from obtainDataCachedStructure()
  * @return void
  */
 protected function obtainProps(&$cached)
 {
     if (empty($this->dbResult["ID"])) {
         return;
     }
     $props = array();
     $dbOrderProps = CSaleOrderPropsValue::GetOrderProps($this->dbResult["ID"]);
     $iGroup = -1;
     while ($arOrderProps = $dbOrderProps->GetNext()) {
         if (empty($this->arParams["PROP_" . $this->dbResult["PERSON_TYPE_ID"]]) || !in_array($arOrderProps["ORDER_PROPS_ID"], $this->arParams["PROP_" . $this->dbResult["PERSON_TYPE_ID"]])) {
             if ($arOrderProps["ACTIVE"] == "Y" && $arOrderProps["UTIL"] == "N") {
                 $arOrderPropsTmp = $arOrderProps;
                 if ($iGroup != intval($arOrderProps["PROPS_GROUP_ID"])) {
                     $arOrderPropsTmp["SHOW_GROUP_NAME"] = "Y";
                     $iGroup = intval($arOrderProps["PROPS_GROUP_ID"]);
                 }
                 if ($arOrderProps["TYPE"] == "SELECT" || $arOrderProps["TYPE"] == "RADIO") {
                     $arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $arOrderProps["VALUE"]);
                     $arOrderPropsTmp["VALUE"] = htmlspecialcharsEx($arVal["NAME"]);
                 } elseif ($arOrderProps["TYPE"] == "MULTISELECT") {
                     $arOrderPropsTmp["VALUE"] = "";
                     $curVal = explode(",", $arOrderProps["VALUE"]);
                     for ($i = 0, $intCount = count($curVal); $i < $intCount; $i++) {
                         $arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $curVal[$i]);
                         if ($i > 0) {
                             $arOrderPropsTmp["VALUE"] .= ", ";
                         }
                         $arOrderPropsTmp["VALUE"] .= htmlspecialcharsEx($arVal["NAME"]);
                     }
                 } elseif ($arOrderProps["TYPE"] == "LOCATION") {
                     $locationName = "";
                     if (CSaleLocation::isLocationProMigrated()) {
                         $locationName = Location\Admin\LocationHelper::getLocationStringById($arOrderProps["VALUE"]);
                     } else {
                         $arVal = CSaleLocation::GetByID($arOrderProps["VALUE"], LANGUAGE_ID);
                         $locationName .= !strlen($arVal["COUNTRY_NAME"]) ? "" : $arVal["COUNTRY_NAME"];
                         if (strlen($arVal["COUNTRY_NAME"]) && strlen($arVal["REGION_NAME"])) {
                             $locationName .= " - " . $arVal["REGION_NAME"];
                         } elseif (strlen($arVal["REGION_NAME"])) {
                             $locationName .= $arVal["REGION_NAME"];
                         }
                         if (strlen($arVal["COUNTRY_NAME"]) || strlen($arVal["REGION_NAME"])) {
                             $locationName .= " - " . $arVal["CITY_NAME"];
                         } elseif (strlen($arVal["CITY_NAME"])) {
                             $locationName .= $arVal["CITY_NAME"];
                         }
                     }
                     $arOrderPropsTmp["VALUE"] = $locationName;
                 } elseif ($arOrderProps["TYPE"] == "FILE") {
                     if (strpos($arOrderProps["VALUE"], ",") !== false) {
                         $fileValue = "";
                         $values = explode(",", $arOrderProps["VALUE"]);
                         if (self::isNonemptyArray($values)) {
                             foreach ($values as $fileId) {
                                 $fileValue .= CFile::ShowFile(trim($fileId), 0, 90, 90, true) . "<br/>";
                             }
                         }
                         $arOrderPropsTmp["VALUE"] = $fileValue;
                     } else {
                         $arOrderPropsTmp["VALUE"] = CFile::ShowFile($arOrderProps["VALUE"], 0, 90, 90, true);
                     }
                 }
                 $props[] = $arOrderPropsTmp;
             }
         }
     }
     $cached["ORDER_PROPS"] = $props;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:73,代码来源:class.php

示例3: ExportOrders2Xml


//.........这里部分代码省略.........
			$arProp = Array();

			$arProp["ORDER"] = $arOrder;
			if (IntVal($arOrder["USER_ID"]) > 0)
			{
				$dbUser = CUser::GetByID($arOrder["USER_ID"]);
				if ($arUser = $dbUser->Fetch())
					$arProp["USER"] = $arUser;
			}

			$dbOrderPropVals = CSaleOrderPropsValue::GetList(
					array(),
					array("ORDER_ID" => $arOrder["ID"]),
					false,
					false,
					array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE")
				);
			while ($arOrderPropVals = $dbOrderPropVals->Fetch())
			{
				//$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
				if ($arOrderPropVals["PROP_TYPE"] == "CHECKBOX")
				{
					if ($arOrderPropVals["VALUE"] == "Y")
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "true";
					else
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "false";
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "TEXT" || $arOrderPropVals["PROP_TYPE"] == "TEXTAREA")
				{
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "SELECT" || $arOrderPropVals["PROP_TYPE"] == "RADIO")
				{
					$arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["VALUE"]);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arVal["NAME"];
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "MULTISELECT")
				{
					$curVal = explode(",", $arOrderPropVals["VALUE"]);
					for ($i = 0; $i < count($curVal); $i++)
					{
						$arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $curVal[$i]);
						if ($i > 0)
							$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] .=  ", ";
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] .=  $arVal["NAME"];
					}
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "LOCATION")
				{
					$arVal = CSaleLocation::GetByID($arOrderPropVals["VALUE"], LANGUAGE_ID);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] =  ($arVal["COUNTRY_NAME"].((strlen($arVal["COUNTRY_NAME"])<=0 || strlen($arVal["CITY_NAME"])<=0) ? "" : " - ").$arVal["CITY_NAME"]);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]."_CITY"] = $arVal["CITY_NAME"];
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]."_COUNTRY"] = $arVal["COUNTRY_NAME"];
				}
				else
				{
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
				}
			}

			foreach($agentParams as $k => $v)
			{
				if(strpos($k, "REKV_") !== false)
				{
					if(!is_array($v))
					{
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:67,代码来源:export.php

示例4: GetRealValue

 function GetRealValue($propertyID, $propertyCode, $propertyType, $value, $lang = false)
 {
     $propertyID = IntVal($propertyID);
     $propertyCode = Trim($propertyCode);
     $propertyType = Trim($propertyType);
     if ($lang === false) {
         $lang = LANGUAGE_ID;
     }
     $arResult = array();
     $curKey = strlen($propertyCode) > 0 ? $propertyCode : $propertyID;
     if ($propertyType == "SELECT" || $propertyType == "RADIO") {
         $arValue = CSaleOrderPropsVariant::GetByValue($propertyID, $value);
         $arResult[$curKey] = $arValue["NAME"];
     } elseif ($propertyType == "MULTISELECT") {
         $curValue = "";
         if (!is_array($value)) {
             $value = explode(",", $value);
         }
         for ($i = 0; $i < count($value); $i++) {
             if ($arValue1 = CSaleOrderPropsVariant::GetByValue($propertyID, $value[$i])) {
                 if ($i > 0) {
                     $curValue .= ",";
                 }
                 $curValue .= $arValue1["NAME"];
             }
         }
         $arResult[$curKey] = $curValue;
     } elseif ($propertyType == "LOCATION") {
         $arValue = CSaleLocation::GetByID($value, $lang);
         $curValue = $arValue["COUNTRY_NAME"] . (strlen($arValue["COUNTRY_NAME"]) <= 0 || strlen($arValue["CITY_NAME"]) <= 0 ? "" : " - ") . $arValue["CITY_NAME"];
         $arResult[$curKey] = $curValue;
         $arResult[$curKey . "_COUNTRY"] = $arValue["COUNTRY_NAME"];
         $arResult[$curKey . "_CITY"] = $arValue["CITY_NAME"];
     } else {
         $arResult[$curKey] = $value;
     }
     return $arResult;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:38,代码来源:order_props.php

示例5: ExportOrders2Xml


//.........这里部分代码省略.........
					}
				}

				$arProp["CRM"]["CLIENT"] = $clientInfo;
				unset($clientInfo);
			}
			if(IntVal($arOrder["PAY_SYSTEM_ID"]) > 0)
				$arProp["ORDER"]["PAY_SYSTEM_NAME"] = $paySystems[$arOrder["PAY_SYSTEM_ID"]];
			if(strlen($arOrder["DELIVERY_ID"]) > 0)
				$arProp["ORDER"]["DELIVERY_NAME"] = $delivery[$arOrder["DELIVERY_ID"]];

			$dbOrderPropVals = CSaleOrderPropsValue::GetList(
					array(),
					array("ORDER_ID" => $arOrder["ID"]),
					false,
					false,
					array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE")
				);
			while ($arOrderPropVals = $dbOrderPropVals->Fetch())
			{
				if ($arOrderPropVals["PROP_TYPE"] == "CHECKBOX")
				{
					if ($arOrderPropVals["VALUE"] == "Y")
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "true";
					else
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "false";
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "TEXT" || $arOrderPropVals["PROP_TYPE"] == "TEXTAREA")
				{
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "SELECT" || $arOrderPropVals["PROP_TYPE"] == "RADIO")
				{
					$arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["VALUE"]);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arVal["NAME"];
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "MULTISELECT")
				{
					$curVal = explode(",", $arOrderPropVals["VALUE"]);
					foreach($curVal as $vm)
					{
						$arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $vm);
						$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] .=  ", ".$arVal["NAME"];
					}
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = substr($arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]], 2);
				}
				elseif ($arOrderPropVals["PROP_TYPE"] == "LOCATION")
				{
					$arVal = CSaleLocation::GetByID($arOrderPropVals["VALUE"], LANGUAGE_ID);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] =  ($arVal["COUNTRY_NAME"].((strlen($arVal["COUNTRY_NAME"])<=0 || strlen($arVal["REGION_NAME"])<=0) ? "" : " - ").$arVal["REGION_NAME"].((strlen($arVal["COUNTRY_NAME"])<=0 || strlen($arVal["CITY_NAME"])<=0) ? "" : " - ").$arVal["CITY_NAME"]);
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]."_CITY"] = $arVal["CITY_NAME"];
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]."_COUNTRY"] = $arVal["COUNTRY_NAME"];
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]."_REGION"] = $arVal["REGION_NAME"];
				}
				else
				{
					$arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
				}
			}

			foreach($agentParams as $k => $v)
			{
				if(strpos($k, "REKV_") !== false)
				{
					if(!is_array($v))
					{
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:export.php

示例6: GetMessage

						foreach ($curVal as $val)
						{
							if ($bNeedLine)
								$valMulti .= "<hr size=\"1\" width=\"90%\">";
							$arPropVariant = CSaleOrderPropsVariant::GetByValue($arProps["ORDER_PROPS_ID"], $val);
							$valMulti .= "[".htmlspecialcharsEx($val)."] ".htmlspecialcharsEx($arPropVariant["NAME"])."<br />";
							$bNeedLine = true;
						}
						if(strlen($arProps["CODE"]) > 0)
							$row->AddField("PROP_".$arProps["CODE"], $valMulti);
						else
							$row->AddField("PROP_".$arProps["ORDER_PROPS_ID"], $valMulti);
					}
					else
					{
						$arPropVariant = CSaleOrderPropsVariant::GetByValue($arProps["ORDER_PROPS_ID"], $arProps["VALUE"]);
						if(strlen($arProps["CODE"]) > 0)
							$row->AddField("PROP_".$arProps["CODE"], "[".htmlspecialcharsEx($arProps["VALUE"])."] ".htmlspecialcharsEx($arPropVariant["NAME"]));

						else
							$row->AddField("PROP_".$arProps["ORDER_PROPS_ID"], "[".htmlspecialcharsEx($arProps["VALUE"])."] ".htmlspecialcharsEx($arPropVariant["NAME"]));
					}
				}
				elseif($arProps["TYPE"] == "CHECKBOX")
				{
					if($arProps["VALUE"] == "Y")
					{
						if(strlen($arProps["CODE"]) > 0)
							$row->AddField("PROP_".$arProps["CODE"], GetMessage("SALE_YES"));
						else
							$row->AddField("PROP_".$arProps["ORDER_PROPS_ID"], GetMessage("SALE_YES"));
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order.php

示例7: GetRealValue

 function GetRealValue($propertyID, $propertyCode, $propertyType, $value, $lang = false)
 {
     $propertyID = IntVal($propertyID);
     $propertyCode = Trim($propertyCode);
     $propertyType = Trim($propertyType);
     if ($lang === false) {
         $lang = LANGUAGE_ID;
     }
     $arResult = array();
     $curKey = strlen($propertyCode) > 0 ? $propertyCode : $propertyID;
     if ($propertyType == "SELECT" || $propertyType == "RADIO") {
         $arValue = CSaleOrderPropsVariant::GetByValue($propertyID, $value);
         $arResult[$curKey] = $arValue["NAME"];
     } elseif ($propertyType == "MULTISELECT") {
         $curValue = "";
         if (!is_array($value)) {
             $value = explode(",", $value);
         }
         for ($i = 0, $max = count($value); $i < $max; $i++) {
             if ($arValue1 = CSaleOrderPropsVariant::GetByValue($propertyID, $value[$i])) {
                 if ($i > 0) {
                     $curValue .= ",";
                 }
                 $curValue .= $arValue1["NAME"];
             }
         }
         $arResult[$curKey] = $curValue;
     } elseif ($propertyType == "LOCATION") {
         if (CSaleLocation::isLocationProMigrated()) {
             $curValue = '';
             if (strlen($value)) {
                 $arValue = array();
                 if (intval($value)) {
                     try {
                         $locationStreetPropertyValue = '';
                         $res = \Bitrix\Sale\Location\LocationTable::getPathToNode($value, array('select' => array('LNAME' => 'NAME.NAME', 'TYPE_ID'), 'filter' => array('=NAME.LANGUAGE_ID' => LANGUAGE_ID)));
                         $types = \Bitrix\Sale\Location\Admin\TypeHelper::getTypeCodeIdMapCached();
                         $path = array();
                         while ($item = $res->fetch()) {
                             // copy street to STREET property
                             if ($types['ID2CODE'][$item['TYPE_ID']] == 'STREET') {
                                 $arResult[$curKey . "_STREET"] = $item['LNAME'];
                             }
                             if ($types['ID2CODE'][$item['TYPE_ID']] == 'COUNTRY') {
                                 $arValue["COUNTRY_NAME"] = $item['LNAME'];
                             }
                             if ($types['ID2CODE'][$item['TYPE_ID']] == 'REGION') {
                                 $arValue["REGION_NAME"] = $item['LNAME'];
                             }
                             if ($types['ID2CODE'][$item['TYPE_ID']] == 'CITY') {
                                 $arValue["CITY_NAME"] = $item['LNAME'];
                             }
                             if ($types['ID2CODE'][$item['TYPE_ID']] == 'VILLAGE') {
                                 $arResult[$curKey . "_VILLAGE"] = $item['LNAME'];
                             }
                             $path[] = $item['LNAME'];
                         }
                         $curValue = implode(' - ', $path);
                     } catch (\Bitrix\Main\SystemException $e) {
                     }
                 }
             }
         } else {
             $arValue = CSaleLocation::GetByID($value, $lang);
             $curValue = $arValue["COUNTRY_NAME"] . (strlen($arValue["COUNTRY_NAME"]) <= 0 || strlen($arValue["REGION_NAME"]) <= 0 ? "" : " - ") . $arValue["REGION_NAME"] . (strlen($arValue["COUNTRY_NAME"]) <= 0 || strlen($arValue["CITY_NAME"]) <= 0 ? "" : " - ") . $arValue["CITY_NAME"];
         }
         $arResult[$curKey] = $curValue;
         $arResult[$curKey . "_COUNTRY"] = $arValue["COUNTRY_NAME"];
         $arResult[$curKey . "_REGION"] = $arValue["REGION_NAME"];
         $arResult[$curKey . "_CITY"] = $arValue["CITY_NAME"];
     } else {
         $arResult[$curKey] = $value;
     }
     return $arResult;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:75,代码来源:order_props.php

示例8: getSaleProperties

 /**
  * @param \Bitrix\Sale\Order $order
  * @param $arOrder
  * @param $agentParams
  * @param $bExportFromCrm
  * @param $bCrmModuleIncluded
  * @param $paySystems
  * @param $delivery
  * @param array $options
  *
  * @return array|void
  */
 function getSaleProperties(Bitrix\Sale\Order $order, $arOrder, $agentParams, $bExportFromCrm, $bCrmModuleIncluded, $paySystems, $delivery, array $options = array())
 {
     $providersInstance = self::getProvidersInstanceByOrder($order);
     $personTypeId = $order->getPersonTypeId();
     $personTypes = BusinessValue::getPersonTypes();
     if (!($personType = $personTypes[$personTypeId])) {
         self::logError($order->getId(), 'Undefined DOMAIN for person type id "' . $personTypeId . '"');
         return;
     }
     $systemCodes1C = array_flip(self::$systemCodes[$personType['DOMAIN']]);
     $arProp = array();
     $arProp["ORDER"] = $arOrder;
     if (IntVal($arOrder["USER_ID"]) > 0) {
         $dbUser = CUser::GetByID($arOrder["USER_ID"]);
         if ($arUser = $dbUser->Fetch()) {
             $arProp["USER"] = $arUser;
         }
     }
     if ($bExportFromCrm) {
         $arProp["CRM"] = array();
         $companyID = isset($arOrder["UF_COMPANY_ID"]) ? intval($arOrder["UF_COMPANY_ID"]) : 0;
         $contactID = isset($arOrder["UF_CONTACT_ID"]) ? intval($arOrder["UF_CONTACT_ID"]) : 0;
         if ($companyID > 0) {
             $arProp["CRM"]["CLIENT_ID"] = "CRMCO" . $companyID;
         } else {
             $arProp["CRM"]["CLIENT_ID"] = "CRMC" . $contactID;
         }
         $clientInfo = array("LOGIN" => "", "NAME" => "", "LAST_NAME" => "", "SECOND_NAME" => "");
         if ($bCrmModuleIncluded) {
             if ($companyID > 0) {
                 $arCompanyFilter = array('=ID' => $companyID);
                 $dbCompany = CCrmCompany::GetListEx(array(), $arCompanyFilter, false, array("nTopCount" => 1), array("TITLE"));
                 $arCompany = $dbCompany->Fetch();
                 unset($dbCompany, $arCompanyFilter);
                 if (is_array($arCompany)) {
                     if (isset($arCompany["TITLE"])) {
                         $clientInfo["NAME"] = $arCompany["TITLE"];
                     }
                 }
                 unset($arCompany);
             } else {
                 if ($contactID > 0) {
                     $arContactFilter = array('=ID' => $contactID);
                     $dbContact = CCrmContact::GetListEx(array(), $arContactFilter, false, array("nTopCount" => 1), array("NAME", "LAST_NAME", "SECOND_NAME"));
                     $arContact = $dbContact->Fetch();
                     unset($dbContact, $arContactFilter);
                     if (is_array($arContact)) {
                         if (isset($arContact["NAME"])) {
                             $clientInfo["NAME"] = $arContact["NAME"];
                         }
                         if (isset($arContact["LAST_NAME"])) {
                             $clientInfo["LAST_NAME"] = $arContact["LAST_NAME"];
                         }
                         if (isset($arContact["SECOND_NAME"])) {
                             $clientInfo["SECOND_NAME"] = $arContact["SECOND_NAME"];
                         }
                     }
                     unset($arContact);
                 }
             }
         }
         $arProp["CRM"]["CLIENT"] = $clientInfo;
         unset($clientInfo);
     }
     if (IntVal($arOrder["PAY_SYSTEM_ID"]) > 0) {
         $arProp["ORDER"]["PAY_SYSTEM_NAME"] = $paySystems[$arOrder["PAY_SYSTEM_ID"]];
     }
     if (strlen($arOrder["DELIVERY_ID"]) > 0) {
         $arProp["ORDER"]["DELIVERY_NAME"] = $delivery[$arOrder["DELIVERY_ID"]];
     }
     $dbOrderPropVals = CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $arOrder["ID"]), false, false, array("ID", "CODE", "VALUE", "ORDER_PROPS_ID", "PROP_TYPE"));
     $locationStreetPropertyValue = '';
     while ($arOrderPropVals = $dbOrderPropVals->Fetch()) {
         if ($arOrderPropVals["PROP_TYPE"] == "CHECKBOX") {
             if ($arOrderPropVals["VALUE"] == "Y") {
                 $arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "true";
             } else {
                 $arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = "false";
             }
         } elseif ($arOrderPropVals["PROP_TYPE"] == "TEXT" || $arOrderPropVals["PROP_TYPE"] == "TEXTAREA") {
             $arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arOrderPropVals["VALUE"];
         } elseif ($arOrderPropVals["PROP_TYPE"] == "SELECT" || $arOrderPropVals["PROP_TYPE"] == "RADIO") {
             $arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $arOrderPropVals["VALUE"]);
             $arProp["PROPERTY"][$arOrderPropVals["ORDER_PROPS_ID"]] = $arVal["NAME"];
         } elseif ($arOrderPropVals["PROP_TYPE"] == "MULTISELECT") {
             $curVal = explode(",", $arOrderPropVals["VALUE"]);
             foreach ($curVal as $vm) {
                 $arVal = CSaleOrderPropsVariant::GetByValue($arOrderPropVals["ORDER_PROPS_ID"], $vm);
//.........这里部分代码省略.........
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:101,代码来源:export.php


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