本文整理汇总了PHP中CSaleLocation::checkLocationIsAboveCity方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleLocation::checkLocationIsAboveCity方法的具体用法?PHP CSaleLocation::checkLocationIsAboveCity怎么用?PHP CSaleLocation::checkLocationIsAboveCity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleLocation
的用法示例。
在下文中一共展示了CSaleLocation::checkLocationIsAboveCity方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
$arProperties["SIZE1"] = intval($arProperties["SIZE1"]) > 0 ? $arProperties["SIZE1"] : 40;
$arProperties["VALUE"] = isset($curVal) ? $curVal : $arProperties["DEFAULT_VALUE"];
$arProperties["VALUE_FORMATED"] = htmlspecialcharsEx($arProperties["VALUE"]);
} elseif ($arProperties["TYPE"] == "LOCATION") {
$arProperties["VARIANTS"] = array();
if (strlen($locationForZip) > 0 && $arProperties["IS_LOCATION"] == "Y") {
$curVal = $locationForZip;
}
$locationID = $arProperties["ID"];
$_POST["ORDER_PROP_" . $locationID] = $curVal;
//enable location text
if ($_REQUEST["form"] == "Y" && $arProperties["IS_LOCATION"] == "Y" && intval($arProperties["INPUT_FIELD_LOCATION"]) > 0 && isset($_REQUEST["ORDER_PROP_" . $arProperties["ID"]])) {
if (CSaleLocation::isLocationProMigrated()) {
// now we have no had-coded type-table for locations, so turn this logic on only when there is "CITY" type
// note: support only one town property? what if there are several location props with the corresponding town props?
if (!CSaleLocation::checkLocationIsAboveCity($curVal)) {
$bDeleteFieldLocation = intval($arProperties["INPUT_FIELD_LOCATION"]);
// remove by default
} else {
$bDeleteFieldLocation = '';
}
} else {
$rsLocationsList = CSaleLocation::GetList(array(), array("ID" => $curVal), false, false, array("ID", "CITY_ID"));
$arCity = $rsLocationsList->GetNext();
if (intval($arCity["CITY_ID"]) <= 0) {
$bDeleteFieldLocation = "";
} else {
$bDeleteFieldLocation = intval($arProperties["INPUT_FIELD_LOCATION"]);
}
}
} elseif ($arProperties["IS_LOCATION"] == "Y" && intval($arProperties["INPUT_FIELD_LOCATION"]) > 0) {
示例2: fGetBuyerType
//.........这里部分代码省略.........
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
$arEnableTownProps = array();
$dbOrderProps = CSaleOrderPropsValue::GetOrderProps($ORDER_ID);
while ($arOrderProps = $dbOrderProps->Fetch())
{
if($arOrderProps["TYPE"] == "LOCATION" && $arOrderProps["ACTIVE"] == "Y" && $arOrderProps["IS_LOCATION"] == "Y")
{
if (in_array($arOrderProps["INPUT_FIELD_LOCATION"], $arDisableFieldForLocation))
{
if(CSaleLocation::isLocationProMigrated())
{
if(CSaleLocation::checkLocationIsAboveCity($arPropValues[$arOrderProps["ORDER_PROPS_ID"]]))
unset($arDisableFieldForLocation[$arOrderProps["INPUT_FIELD_LOCATION"]]);
}
else
{
$arLocation = CSaleLocation::GetByID($arPropValues[$arOrderProps["ORDER_PROPS_ID"]]);
if (intval($arLocation["CITY_ID"]) <= 0)
unset($arDisableFieldForLocation[$arOrderProps["INPUT_FIELD_LOCATION"]]);
}
}
$location2townFldMap[$arOrderProps['ORDER_PROPS_ID']] = $arOrderProps['INPUT_FIELD_LOCATION'];
}
}
$propertyGroupID = -1;
foreach($arPropertiesList as $arProperties)
{
if (intval($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID)
{
$resultHtml .= "<tr><td colspan=\"2\" style=\"text-align:center;font-weight:bold;font-size:14px;color:rgb(75, 98, 103);\" >".htmlspecialcharsEx($arProperties["GROUP_NAME"])."\n</td>\n</tr>";
$propertyGroupID = intval($arProperties["PROPS_GROUP_ID"]);
}
if (intval($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID)
$propertyGroupID = intval($arProperties["PROPS_GROUP_ID"]);
$adit = "";
$requiredField = "";
if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y")
{
$adit = " class=\"adm-detail-required-field\"";
示例3:
$arOrderPropsValues[$locationZipID] = $locationZip;
// enable/disable town for location
$dbProperties = CSaleOrderProps::GetList(
array("SORT" => "ASC"),
array("ID" => $locationID, "ACTIVE" => "Y", ">INPUT_FIELD_LOCATION" => 0, "RELATED" => false),
false,
false,
array("INPUT_FIELD_LOCATION")
);
if ($arProperties = $dbProperties->Fetch())
$bDeleteFieldLocationID = $arProperties["INPUT_FIELD_LOCATION"];
if(CSaleLocation::isLocationProEnabled())
{
$bDeleteFieldLocation = CSaleLocation::checkLocationIsAboveCity($location) ? 'Y' : 'N';
}
else
{
$rsLocationsList = CSaleLocation::GetList(
array(),
array("ID" => $location),
false,
false,
array("ID", "CITY_ID")
);
$arCity = $rsLocationsList->GetNext();
if (intval($arCity["CITY_ID"]) <= 0)
$bDeleteFieldLocation = "Y";
else
$bDeleteFieldLocation = "N";
示例4: array
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
$arEnableTownProps[$arOrderProps["INPUT_FIELD_LOCATION"]] = false;
}
}
}
$iGroup = -1;
$locationData = 0;
$locationZip = 0;
示例5: getOrderPropFormated
//.........这里部分代码省略.........
$arProperties["VALUE_FORMATED"] .= $arVariants["NAME"];
$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::isLocationProEnabled())
{
if(!strlen($curVal) && strlen($arProperties["DEFAULT_VALUE"]))
$curVal = CSaleLocation::getLocationIDbyCODE($arProperties["DEFAULT_VALUE"]);
//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"]]))
{
if(isset($arResult['LOCATION_ALT_PROP_DISPLAY_MANUAL'][$arProperties["ID"]])) // look at the manual flag
{
if($arResult['LOCATION_ALT_PROP_DISPLAY_MANUAL'][$arProperties["ID"]]) // if it set to TRUE, show alt location
unset($arDeleteFieldLocation[$arProperties["ID"]]);
else
$arDeleteFieldLocation[$arProperties["ID"]] = $arProperties["INPUT_FIELD_LOCATION"]; // otherwise, hide
}
else
{
// now we have no had-coded type-table for locations, so turn this logic on only when there is "CITY" type
if(!CSaleLocation::checkLocationIsAboveCity($curVal))
{
$arDeleteFieldLocation[$arProperties["ID"]] = $arProperties["INPUT_FIELD_LOCATION"]; // remove by default
}
else
{
unset($arDeleteFieldLocation[$arProperties["ID"]]);
}
}
}
elseif ($arProperties["IS_LOCATION"] == "Y" && intval($arProperties["INPUT_FIELD_LOCATION"]) > 0)
{
$arDeleteFieldLocation[$arProperties["ID"]] = $arProperties["INPUT_FIELD_LOCATION"];
}
$arProperties["VALUE"] = $curVal;
#######################
#######################
#######################
# here we sacrifice perfromance for the sake of compatibility
$arUserResult["DELIVERY_LOCATION"] = $arProperties["VALUE"];
if($arProperties["IS_LOCATION4TAX"]=="Y")
$arUserResult["TAX_LOCATION"] = $arProperties["VALUE"];
// variants
$locationFound = false;
$dbVariants = CSaleLocation::GetList(
array("SORT" => "ASC", "COUNTRY_NAME_LANG" => "ASC", "CITY_NAME_LANG" => "ASC"),
array("LID" => LANGUAGE_ID),
false,