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


PHP CSaleLocation::GetLocationZIP方法代码示例

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


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

示例1: __GetLocation

 function __GetLocation($location_id)
 {
     static $arDHLUSACountryList;
     $arLocation = CSaleLocation::GetByID($location_id, 'en');
     $dbZipList = CSaleLocation::GetLocationZIP($location_id);
     while ($arZip = $dbZipList->Fetch()) {
         $arLocation['ZIP_LIST'][] = $arZip['ZIP'];
     }
     if (!is_array($arDHLUSACountryList)) {
         require 'dhl_usa/country.php';
     }
     $arLocation['COUNTRY_DHLUSA'] = $arDHLUSACountryList[ToUpper($arLocation['COUNTRY_NAME'])];
     return $arLocation;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:14,代码来源:delivery_dhl_usa.php

示例2: __GetLocation

 function __GetLocation($location, $bGetZIP = false)
 {
     $arLocation = CSaleLocation::GetByID($location);
     $arLocation["IS_RUSSIAN"] = CDeliveryRUSSIANPOST::__IsRussian($arLocation) ? "Y" : "N";
     if ($bGetZIP) {
         $arLocation["ZIP"] = array();
         if ($arLocation["IS_RUSSIAN"] == "Y") {
             $rsZIPList = CSaleLocation::GetLocationZIP($location);
             while ($arZIP = $rsZIPList->Fetch()) {
                 $arLocation["ZIP"][] = $arZIP["ZIP"];
             }
         }
     }
     return $arLocation;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:15,代码来源:delivery_russianpost.php

示例3: array

$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME', 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_NAME_ORIG']), 'required' => true, 'type' => 'text');
$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME', 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_SHORT_NAME']), 'type' => 'text');
for ($i = 0; $i < $countLang; $i++) {
    $arCity = CSaleLocation::GetCityLangByID($arLoc['CITY_ID'], $arSysLangs[$i]);
    /*
    	$arResult['FIELDS']['tab_params'][] = array(
    		'id' => 'CI_LANG_'.$arSysLangs[$i],
    		'value' => '<b>['.$arSysLangs[$i].'] '.$arSysLangNames[$i].'</b>',
    		'colspan' => true,
    		'type' =>  'label'
    	);
    */
    $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arCity["NAME"]), 'required' => true, 'type' => 'text');
    $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arCity["SHORT_NAME"]), 'type' => 'text');
}
/*ZIP TAB*/
$arResult['FIELDS']['tab_zip'][] = array('id' => 'loc_zip', 'name' => GetMessage('CRM_LOC_SECTION_ZIP'), 'type' => 'section');
$zipHtml = '<div id="zip_list">';
$arZipList = array();
$rsZipList = CSaleLocation::GetLocationZIP($locID);
while ($arZip = $rsZipList->Fetch()) {
    $arZipList[] = $arZip;
}
foreach ($arZipList as $key => $zip) {
    $zipHtml .= '<input type="text" name="ZIP[]" value="' . htmlspecialcharsEx($zip["ZIP"]) . '" size="10" /><span class="bx-crm-location-zip-delete" onclick="BX.crmLocationZip.delete(this);">' . GetMessage("CRM_DEL_ZIP") . '</span><br />';
}
$zipHtml .= '<input type="text" name="ZIP[]" value="" size="10" /><br />
			</div>
			<button onClick="return BX.crmLocationZip.add();">' . GetMessage("CRM_ADD_ZIP") . '</button>';
$arResult['FIELDS']['tab_zip'][] = array('id' => 'ZIP_INPUTS', 'name' => GetMessage('CRM_LOC_FIELD_LOC_ZIP'), 'value' => $zipHtml, 'type' => 'custom');
$this->IncludeComponentTemplate();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例4: strlen

									if (strlen($arVal["REGION_NAME"]) > 0 && strlen($locationString) > 0)
										$locationString .= " - ".$arVal["REGION_NAME"];
									elseif (strlen($locationString) <= 0 && strlen($arVal["REGION_NAME"]) > 0)
										$locationString = $arVal["REGION_NAME"];

									if (strlen($locationString) > 0 && strlen($arVal["CITY_NAME"]) > 0)
										$locationString .= " - ".$arVal["CITY_NAME"];
									elseif (strlen($locationString) <= 0  && strlen($arVal["CITY_NAME"]) > 0)
										$locationString = $arVal["CITY_NAME"];

									echo htmlspecialcharsEx($locationString);
								}

								$locationData = $arOrderProps["VALUE"];

								$rsZipList = CSaleLocation::GetLocationZIP($locationData);
								if ($arZip = $rsZipList->Fetch())
								{
									if (strlen($arZip["ZIP"]) > 0)
										$locationZip = $arZip["ZIP"];
								}
							}
							elseif ($arOrderProps["TYPE"] == "FILE")
							{
								if (strpos($arOrderProps["VALUE"], ",") !== false)
								{
									$arValues = explode(",", $arOrderProps["VALUE"]);
									foreach ($arValues as $fileId)
									{
										echo showImageOrDownloadLink(trim($fileId), $ID);
										echo "<br/>";
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:order_detail.php

示例5: getOrderPropFormated

function getOrderPropFormated($arProperties, $arResult, &$arUserResult, &$arDeleteFieldLocation = array())
{
    global $USER;
    $curVal = $arUserResult["ORDER_PROP"][$arProperties["ID"]];
    $curLocation = false;
    static $propertyGroupID = 0;
    static $propertyUSER_PROPS = "";
    // take data from user profile
    if ($arUserResult["PROFILE_CHANGE"] == "Y" && intval($arUserResult["PROFILE_ID"]) > 0 && !($arResult["HAVE_PREPAYMENT"] && $arUserResult["PROFILE_DEFAULT"] == "Y" && !empty($arResult["PREPAY_ORDER_PROPS"][$arProperties["CODE"]]))) {
        $dbUserPropsValues = CSaleOrderUserPropsValue::GetList(array("SORT" => "ASC"), array("USER_PROPS_ID" => $arUserResult["PROFILE_ID"], "ORDER_PROPS_ID" => $arProperties["ID"], "USER_ID" => intval($USER->GetID())), false, false, array("VALUE", "PROP_TYPE", "VARIANT_NAME", "SORT", "ORDER_PROPS_ID"));
        if ($arUserPropsValues = $dbUserPropsValues->Fetch()) {
            $valueTmp = "";
            if ($arUserPropsValues["PROP_TYPE"] == "MULTISELECT") {
                $arUserPropsValues["VALUE"] = explode(",", $arUserPropsValues["VALUE"]);
            }
            $curVal = $arUserPropsValues["VALUE"];
        }
    } elseif ($arUserResult["PROFILE_CHANGE"] == "Y" && intval($arUserResult["PROFILE_ID"]) <= 0) {
        if (isset($curVal)) {
            unset($curVal);
        }
    } elseif (isset($arUserResult["ORDER_PROP"][$arProperties["ID"]])) {
        $curVal = $arUserResult["ORDER_PROP"][$arProperties["ID"]];
    } elseif ($arResult["HAVE_PREPAYMENT"] && !empty($arResult["PREPAY_ORDER_PROPS"][$arProperties["CODE"]])) {
        $curVal = $arResult["PREPAY_ORDER_PROPS"][$arProperties["CODE"]];
        if ($arProperties["TYPE"] == "LOCATION") {
            $curLocation = $curVal;
        }
    }
    if (intval($_REQUEST["NEW_LOCATION_" . $arProperties["ID"]]) > 0) {
        $curVal = intval($_REQUEST["NEW_LOCATION_" . $arProperties["ID"]]);
    }
    $arProperties["FIELD_NAME"] = "ORDER_PROP_" . $arProperties["ID"];
    if (strlen($arProperties["CODE"]) > 0) {
        $arProperties["FIELD_ID"] = "ORDER_PROP_" . $arProperties["CODE"];
    } else {
        $arProperties["FIELD_ID"] = "ORDER_PROP_" . $arProperties["ID"];
    }
    if (intval($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID || $propertyUSER_PROPS != $arProperties["USER_PROPS"]) {
        $arProperties["SHOW_GROUP_NAME"] = "Y";
    }
    $propertyGroupID = $arProperties["PROPS_GROUP_ID"];
    $propertyUSER_PROPS = $arProperties["USER_PROPS"];
    if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_EMAIL"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y") {
        $arProperties["REQUIED_FORMATED"] = "Y";
    }
    if ($arProperties["TYPE"] == "CHECKBOX") {
        if ($curVal == "Y" || !isset($curVal) && $arProperties["DEFAULT_VALUE"] == "Y") {
            $arProperties["CHECKED"] = "Y";
            $arProperties["VALUE_FORMATED"] = GetMessage("SOA_Y");
        } else {
            $arProperties["VALUE_FORMATED"] = GetMessage("SOA_N");
        }
        $arProperties["SIZE1"] = intval($arProperties["SIZE1"]) > 0 ? $arProperties["SIZE1"] : 30;
    } elseif ($arProperties["TYPE"] == "TEXT") {
        if (strlen($curVal) <= 0) {
            if (strlen($arProperties["DEFAULT_VALUE"]) > 0 && !isset($curVal)) {
                $arProperties["VALUE"] = $arProperties["DEFAULT_VALUE"];
            } elseif ($arProperties["IS_EMAIL"] == "Y") {
                $arProperties["VALUE"] = $USER->GetEmail();
            } elseif ($arProperties["IS_PAYER"] == "Y") {
                //$arProperties["VALUE"] = $USER->GetFullName();
                $rsUser = CUser::GetByID($USER->GetID());
                $fio = "";
                if ($arUser = $rsUser->Fetch()) {
                    $fio = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arUser["NAME"], "LAST_NAME" => $arUser["LAST_NAME"], "SECOND_NAME" => $arUser["SECOND_NAME"]), false, false);
                }
                $arProperties["VALUE"] = $fio;
            }
        } else {
            $arProperties["VALUE"] = $curVal;
        }
        //select ZIP for LOCATION
        if ($arProperties["IS_ZIP"] == "Y" && $arUserResult["PROFILE_CHANGE"] == "N") {
            $dbPropertiesLoc = CSaleOrderProps::GetList(array("ID" => "DESC"), array("PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"], "ACTIVE" => "Y", "UTIL" => "N", "IS_LOCATION" => "Y"), false, false, array("ID"));
            $arPropertiesLoc = $dbPropertiesLoc->Fetch();
            if ($arPropertiesLoc["ID"] > 0) {
                $arZipLocation = array();
                if (strlen($curVal) > 0) {
                    $arZipLocation = CSaleLocation::GetByZIP($curVal);
                }
                $rsZipList = CSaleLocation::GetLocationZIP($arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]);
                if ($arZip = $rsZipList->Fetch()) {
                    if (strlen($arZip["ZIP"]) > 0 && (empty($arZipLocation) || $arZipLocation["ID"] != $arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]])) {
                        $arProperties["VALUE"] = $arZip["ZIP"];
                    }
                }
            }
        }
        if ($arProperties["IS_ZIP"] == "Y") {
            $arUserResult["DELIVERY_LOCATION_ZIP"] = $arProperties["VALUE"];
        }
        $arProperties["VALUE"] = htmlspecialcharsEx($arProperties["VALUE"]);
        $arProperties["VALUE_FORMATED"] = $arProperties["VALUE"];
    } elseif ($arProperties["TYPE"] == "SELECT") {
        $arProperties["SIZE1"] = intval($arProperties["SIZE1"]) > 0 ? $arProperties["SIZE1"] : 1;
        $dbVariants = CSaleOrderPropsVariant::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ORDER_PROPS_ID" => $arProperties["ID"]), false, false, array("*"));
        $flagDefault = "N";
        $nameProperty = "";
        while ($arVariants = $dbVariants->GetNext()) {
//.........这里部分代码省略.........
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:101,代码来源:functions.php

示例6: htmlspecialcharsEx

								array("ID" => "DESC"),
								array(
									"PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"],
									"ACTIVE" => "Y",
									"UTIL" => "N",
									"IS_LOCATION" => "Y"
									),
								false,
								false,
								array("ID")
							);
						$arPropertiesLoc = $dbPropertiesLoc->Fetch();

						if ($arPropertiesLoc["ID"] > 0)
						{
							$rsZipList = CSaleLocation::GetLocationZIP($arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]);
							$arZip = $rsZipList->Fetch();

							if (strlen($arZip["ZIP"]) > 0)
								$arProperties["VALUE"] = $arZip["ZIP"];
						}
					}
				}

				if ($arProperties["IS_ZIP"]=="Y")
					$arUserResult["DELIVERY_LOCATION_ZIP"] = $arProperties["VALUE"];


				$arProperties["VALUE"] = htmlspecialcharsEx($arProperties["VALUE"]);
				$arProperties["VALUE_FORMATED"] = $arProperties["VALUE"];
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:component.php

示例7: getOrderPropFormated


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

			$arProperties["SOURCE"] = 'DEFAULT';
		}
		else
		{
			$arProperties["VALUE"] = $curVal;
			$arProperties["SOURCE"] = 'FORM';
		}

		//select ZIP for LOCATION
		if ($arProperties["IS_ZIP"] == "Y" && $arUserResult["PROFILE_CHANGE"] == "N")
		{
			$dbPropertiesLoc = CSaleOrderProps::GetList(
					array("ID" => "DESC"),
					array(
						"PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"],
						"ACTIVE" => "Y",
						"UTIL" => "N",
						"IS_LOCATION" => "Y"
						),
					false,
					false,
					array("ID")
				);
			$arPropertiesLoc = $dbPropertiesLoc->Fetch();

			if ($arPropertiesLoc["ID"] > 0)
			{
				$arZipLocation = array();
				if(strlen($curVal) > 0)
					$arZipLocation = CSaleLocation::GetByZIP($curVal);

				$rsZipList = CSaleLocation::GetLocationZIP($arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]);
				if($arZip = $rsZipList->Fetch())
				{
					if (strlen($arZip["ZIP"]) > 0 && (empty($arZipLocation) || $arZipLocation["ID"] != $arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]))
						$arProperties["VALUE"] = $arZip["ZIP"];
				}
			}
		}

		if ($arProperties["IS_ZIP"]=="Y")
			$arUserResult["DELIVERY_LOCATION_ZIP"] = $arProperties["VALUE"];


		$arProperties["VALUE"] = htmlspecialcharsEx($arProperties["VALUE"]);
		$arProperties["VALUE_FORMATED"] = $arProperties["VALUE"];

		if ($isProfileChanged || $isEmptyUserResult)
		{
			$arUserResult["ORDER_PROP"][$arProperties["ID"]] = $arProperties["VALUE"];
		}

	}
	elseif ($arProperties["TYPE"] == "SELECT")
	{
		$arProperties["SIZE1"] = ((intval($arProperties["SIZE1"]) > 0) ? $arProperties["SIZE1"] : 1);
		$dbVariants = CSaleOrderPropsVariant::GetList(
				array("SORT" => "ASC", "NAME" => "ASC"),
				array("ORDER_PROPS_ID" => $arProperties["ID"]),
				false,
				false,
				array("*")

		);
开发者ID:CheBurashka334,项目名称:zakrepi,代码行数:67,代码来源:functions.php

示例8: getOrderPropFormated


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

			$arProperties["SOURCE"] = 'DEFAULT';
		}
		else
		{
			$arProperties["VALUE"] = $curVal;
			$arProperties["SOURCE"] = 'FORM';
		}

		//select ZIP for LOCATION
		if ($arProperties["IS_ZIP"] == "Y" && $arUserResult["PROFILE_CHANGE"] == "N")
		{
			$dbPropertiesLoc = CSaleOrderProps::GetList(
					array("ID" => "DESC"),
					array(
						"PERSON_TYPE_ID" => $arUserResult["PERSON_TYPE_ID"],
						"ACTIVE" => "Y",
						"UTIL" => "N",
						"IS_LOCATION" => "Y"
						),
					false,
					false,
					array("ID")
				);
			$arPropertiesLoc = $dbPropertiesLoc->Fetch();

			if ($arPropertiesLoc["ID"] > 0)
			{
				$arZipLocation = array();
				if(strlen($curVal) > 0)
					$arZipLocation = CSaleLocation::GetByZIP($curVal);

				$rsZipList = CSaleLocation::GetLocationZIP($arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]);
				if($arZip = $rsZipList->Fetch())
				{
					if (strlen($arZip["ZIP"]) > 0 && (empty($arZipLocation) || $arZipLocation["ID"] != $arUserResult["ORDER_PROP"][$arPropertiesLoc["ID"]]))
						$arProperties["VALUE"] = $arZip["ZIP"];
				}
			}
		}

		if ($arProperties["IS_ZIP"]=="Y")
			$arUserResult["DELIVERY_LOCATION_ZIP"] = $arProperties["VALUE"];


		$arProperties["VALUE"] = htmlspecialcharsEx($arProperties["VALUE"]);
		$arProperties["VALUE_FORMATED"] = $arProperties["VALUE"];

	}
	elseif ($arProperties["TYPE"] == "SELECT")
	{
		$arProperties["SIZE1"] = ((intval($arProperties["SIZE1"]) > 0) ? $arProperties["SIZE1"] : 1);
		$dbVariants = CSaleOrderPropsVariant::GetList(
				array("SORT" => "ASC", "NAME" => "ASC"),
				array("ORDER_PROPS_ID" => $arProperties["ID"]),
				false,
				false,
				array("*")

		);
		$flagDefault = "N";
		$nameProperty = "";
		while ($arVariants = $dbVariants->GetNext())
		{
			if ($flagDefault == "N" && $nameProperty == "")
开发者ID:akniyev,项目名称:arteva.ru,代码行数:67,代码来源:functions.php


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