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


PHP CSaleLocation::checkLocationIdExists方法代码示例

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


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

示例1: elseif

             $i++;
         }
         $arProperties["VARIANTS"][] = $arVariants;
     }
 } elseif ($arProperties["TYPE"] == "TEXTAREA") {
     $arProperties["SIZE2"] = IntVal($arProperties["SIZE2"]) > 0 ? $arProperties["SIZE2"] : 4;
     $arProperties["SIZE1"] = IntVal($arProperties["SIZE1"]) > 0 ? $arProperties["SIZE1"] : 40;
     $arProperties["VALUE"] = htmlspecialcharsEx(isset($curVal) ? $curVal : $arProperties["DEFAULT_VALUE"]);
     $arProperties["VALUE_FORMATED"] = $arProperties["VALUE"];
 } elseif ($arProperties["TYPE"] == "LOCATION") {
     if (CSaleLocation::isLocationProMigrated()) {
         $locId = false;
         if (strlen($curVal)) {
             $locId = CSaleLocation::checkLocationIdExists($curVal);
         } elseif (strlen($arProperties["DEFAULT_VALUE"])) {
             $locId = CSaleLocation::checkLocationIdExists($arProperties["DEFAULT_VALUE"]);
         }
         if ($locId) {
             $arProperties["VALUE"] = $locId;
             if ($arProperties["IS_LOCATION"] == "Y") {
                 $arUserResult["DELIVERY_LOCATION"] = $locId;
             }
             if ($arProperties["IS_LOCATION4TAX"] == "Y") {
                 $arUserResult["TAX_LOCATION"] = $locId;
             }
         }
     } else {
         //enable location town text
         if ($_REQUEST["is_ajax_post"] == "Y" && $arProperties["IS_LOCATION"] == "Y" && IntVal($arProperties["INPUT_FIELD_LOCATION"]) > 0 && isset($_REQUEST["ORDER_PROP_" . $arProperties["ID"]])) {
             $rsLocationsList = CSaleLocation::GetList(array(), array("ID" => $curVal), false, false, array("ID", "CITY_ID"));
             $arCity = $rsLocationsList->GetNext();
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例2: DoProcessOrder


//.........这里部分代码省略.........
					);
					while ($arVariant = $dbVariants->Fetch())
						$arVariants[] = $arVariant["VALUE"];

					if (!is_array($curVal))
						$curVal = array($curVal);

					$arKeys = array_keys($curVal);
					foreach ($arKeys as $k)
					{
						if (!in_array($curVal[$k], $arVariants))
							unset($curVal[$k]);
					}

					if ($arOrderProp["TYPE"] == "SELECT" || $arOrderProp["TYPE"] == "RADIO")
						$curVal = array_shift($curVal);
				}
				elseif ($arOrderProp["TYPE"] == "LOCATION")
				{
					if (is_array($curVal))
						$curVal = array_shift($curVal);

					if(CSaleLocation::isLocationProMigrated())
					{
						// if we came from places like CRM, we got location in CODEs, because CRM knows nothing about location IDs.
						// so, CRM sends LOCATION_IN_CODES in options array. In the other case, we assume we got locations as IDs
						if($arOptions['LOCATION_IN_CODES'])
						{
							if(!($locId = CSaleLocation::checkLocationCodeExists($curVal)))
								$curVal = null;
						}
						else
						{
							if(!($locId = CSaleLocation::checkLocationIdExists($curVal)))
								$curVal = null;
						}

						//self::TranslateLocationPropertyValues($personTypeId, $arOrderPropsValues, false);
					}
					else
					{
						$dbVariants = CSaleLocation::GetList(
							array(),
							array("ID" => $curVal),
							false,
							false,
							array("ID")
						);
						if ($arVariant = $dbVariants->Fetch())
							$curVal = intval($arVariant["ID"]);
						else
							$curVal = null;
					}
				}
			}

			if ($arOrderProp["TYPE"] == "LOCATION" && ($arOrderProp["IS_LOCATION"] == "Y" || $arOrderProp["IS_LOCATION4TAX"] == "Y"))
			{
				if(!$arOptions['LOCATION_IN_CODES'])
					$locId = intval($curVal);

				if ($arOrderProp["IS_LOCATION"] == "Y")
					$arOrder["DELIVERY_LOCATION"] = $locId;
				if ($arOrderProp["IS_LOCATION4TAX"] == "Y")
					$arOrder["TAX_LOCATION"] = $locId;
开发者ID:akniyev,项目名称:arteva.ru,代码行数:66,代码来源:order_props.php


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