本文整理汇总了PHP中CSaleLocation::getLocationCODEbyID方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleLocation::getLocationCODEbyID方法的具体用法?PHP CSaleLocation::getLocationCODEbyID怎么用?PHP CSaleLocation::getLocationCODEbyID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleLocation
的用法示例。
在下文中一共展示了CSaleLocation::getLocationCODEbyID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TranslateLocationPropertyValues
public static function TranslateLocationPropertyValues($personTypeId, &$orderProps, $direct = true)
{
if (CSaleLocation::isLocationProMigrated()) {
// location ID to CODE
$dbOrderProps = CSaleOrderProps::GetList(array("SORT" => "ASC"), array('PERSON_TYPE_ID' => $personTypeId), false, false, array("ID", "NAME", "TYPE", "IS_LOCATION", "IS_LOCATION4TAX", "IS_PROFILE_NAME", "IS_PAYER", "IS_EMAIL", "REQUIED", "SORT", "IS_ZIP", "CODE", "MULTIPLE"));
while ($item = $dbOrderProps->fetch()) {
if ($item['TYPE'] == 'LOCATION' && strlen($orderProps[$item['ID']])) {
$source = $orderProps[$item['ID']];
$replace = $direct ? CSaleLocation::getLocationCODEbyID($source) : CSaleLocation::getLocationIDbyCODE($source);
$orderProps[$item['ID']] = $replace;
}
}
}
}
示例2: array
if ($arOrderProps["TYPE"]=="MULTISELECT")
{
$curVal = "";
for ($i = 0, $cnt = count($_POST["ORDER_PROP_".$arOrderProps["ID"]]); $i < $cnt; $i++)
{
if ($i > 0)
$curVal .= ",";
$curVal .= $_POST["ORDER_PROP_".$arOrderProps["ID"]][$i];
}
}
if (isset($_POST["ORDER_PROP_".$arOrderProps["ID"]]))
{
if(CSaleLocation::isLocationProMigrated() && isset($propsOfTypeLocation[$arOrderProps["ID"]]))
$curVal = CSaleLocation::getLocationCODEbyID($curVal);
$arFields = array(
"USER_PROPS_ID" => $ID,
"ORDER_PROPS_ID" => $arOrderProps["ID"],
"NAME" => $arOrderProps["NAME"],
"VALUE" => $curVal
);
CSaleOrderUserPropsValue::Add($arFields);
}
}
}
if (strlen($errorMessage) > 0)
$bInitVars = True;
示例3: getLocation
public static function getLocation($value)
{
if (is_string($value) === false) {
return false;
} elseif ($location = CSaleLocation::GetList(array(), array("LID" => LANGUAGE_ID, "CITY_NAME" => $value))->Fetch()) {
return method_exists('CSaleLocation', 'getLocationCODEbyID') ? CSaleLocation::getLocationCODEbyID($location['ID']) : $location['ID'];
} else {
return false;
}
}