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