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


PHP CSaleLocation类代码示例

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


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

示例1: getRegionsList

 /**
  * getRegionsList
  * @return array regions (locations) list
  */
 public static function getRegionsList($countryId = 0, $bFlip = false)
 {
     static $arRegions = array();
     $flipIndex = intval($bFlip);
     if (isset($arRegions[$countryId][$flipIndex])) {
         return $arRegions[$countryId][$flipIndex];
     }
     if (CSaleLocation::isLocationProMigrated()) {
         $types = array();
         $res = \Bitrix\Sale\Location\TypeTable::getList(array('select' => array('ID', 'CODE')));
         while ($item = $res->fetch()) {
             $types[$item['CODE']] = $item['ID'];
         }
         $filter = array(array('LOGIC' => 'OR', array('=TYPE_ID' => $types['CITY'], '=NAME.LANGUAGE_ID' => LANGUAGE_ID, array('LOGIC' => 'OR', array('=PARENT.TYPE_ID' => $types['COUNTRY']), array('=PARENT.TYPE_ID' => $types['COUNTRY_DISTRICT']), array('=PARENT_ID' => '0'))), array('=TYPE_ID' => $types['REGION'])));
         if (intval($countryId)) {
             $filter['=PARENTS.TYPE_ID'] = $types['COUNTRY'];
             $filter['=PARENTS.ID'] = $countryId;
         }
         $dbRegionList = \Bitrix\Sale\Location\LocationTable::getList(array('filter' => $filter, 'select' => array('ID', 'CODE', 'NAME_LANG' => 'NAME.NAME'), 'order' => array('NAME.NAME' => 'asc')));
     } else {
         $arFilterRegion = array();
         if (intval($countryId) > 0) {
             $arFilterRegion["COUNTRY_ID"] = $countryId;
         }
         $dbRegionList = CSaleLocation::GetRegionList(array("NAME_LANG" => "ASC"), $arFilterRegion, LANGUAGE_ID);
     }
     $key = 'ID';
     while ($arRegionList = $dbRegionList->Fetch()) {
         if ($key == 'ID' && isset($arRegionList['CODE'])) {
             $key = 'CODE';
         }
         if ($key == 'CODE' && strlen($arRegionList['CODE']) <= 0) {
             continue;
         }
         $arRegions[$countryId][0][$arRegionList[$key]] = $arRegionList["NAME_LANG"];
         // $bFlip == false
         $arRegions[$countryId][1][$arRegionList["NAME_LANG"]] = $arRegionList[$key];
         // $bFlip == true
     }
     return isset($arRegions[$countryId][$flipIndex]) ? $arRegions[$countryId][$flipIndex] : array();
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:45,代码来源:delivery_helper.php

示例2: prepareParamsForSaving

 protected static function prepareParamsForSaving(array $params = array(), $deliveryId = 0)
 {
     if ($deliveryId > 0) {
         $arLocation = array();
         if (!!\CSaleLocation::isLocationProEnabled()) {
             if (strlen($params["LOCATION"]['L'])) {
                 $LOCATION1 = explode(':', $params["LOCATION"]['L']);
             }
             if (strlen($params["LOCATION"]['G'])) {
                 $LOCATION2 = explode(':', $params["LOCATION"]['G']);
             }
         }
         if (isset($LOCATION1) && is_array($LOCATION1) && count($LOCATION1) > 0) {
             $arLocation["L"] = array();
             $locationCount = count($LOCATION1);
             for ($i = 0; $i < $locationCount; $i++) {
                 if (strlen($LOCATION1[$i])) {
                     $arLocation["L"][] = $LOCATION1[$i];
                 }
             }
         }
         if (isset($LOCATION2) && is_array($LOCATION2) && count($LOCATION2) > 0) {
             $arLocation["G"] = array();
             $locationCount = count($LOCATION2);
             for ($i = 0; $i < $locationCount; $i++) {
                 if (strlen($LOCATION2[$i])) {
                     $arLocation["G"][] = $LOCATION2[$i];
                 }
             }
         }
         DeliveryLocationTable::resetMultipleForOwner($deliveryId, $arLocation);
     }
     return array();
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:34,代码来源:bylocation.php

示例3: onAfterPerformIteration

 public function onAfterPerformIteration()
 {
     $this->data['migrator_data'] = serialize($this->migrator);
     if ($this->getPercent() == 100) {
         \CSaleLocation::locationProSetMigrated();
         \CSaleLocation::locationProEnable();
     }
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:8,代码来源:migration.php

示例4: __GetLocationPrice

 function __GetLocationPrice($LOCATION_ID, $arConfig)
 {
     $dbLocationGroups = CSaleLocationGroup::GetLocationList(array("LOCATION_" . (CSaleLocation::checkIsCode($LOCATION_ID) ? 'CODE' : 'ID') => $LOCATION_ID));
     while ($arLocationGroup = $dbLocationGroups->Fetch()) {
         if (array_key_exists('price_' . $arLocationGroup["LOCATION_GROUP_ID"], $arConfig) && strlen($arConfig['price_' . $arLocationGroup["LOCATION_GROUP_ID"]]["VALUE"]) > 0) {
             return $arConfig['price_' . $arLocationGroup["LOCATION_GROUP_ID"]]["VALUE"];
         }
     }
     return false;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:10,代码来源:delivery_simple.php

示例5: loadDataToCache

 /**
  * Loads data from base
  */
 private function loadDataToCache()
 {
     $cityNames = array();
     $dbLocations = CSaleLocation::GetList(array(), array(), false, false, array("ID", "CITY_NAME_LANG"));
     while ($arLocation = $dbLocations->Fetch()) {
         if (isset($arLocation["CITY_NAME_LANG"]) && strlen($arLocation["CITY_NAME_LANG"]) > 0) {
             $cityNames[$arLocation["ID"]] = ToLower($arLocation["CITY_NAME_LANG"]);
         }
     }
     return $cityNames;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:14,代码来源:ym_location.php

示例6: addPropertyValueField

 protected static function addPropertyValueField($tableAlias = 'V', &$arFields, &$arSelectFields)
 {
     $tableAlias = \Bitrix\Main\HttpApplication::getConnection()->getSqlHelper()->forSql($tableAlias);
     // locations kept in CODEs, but must be shown as IDs
     if (CSaleLocation::isLocationProMigrated()) {
         $arSelectFields = array_merge(array('PROP_TYPE'), $arSelectFields);
         // P.TYPE should be there and go above our join
         $arFields['VALUE'] = array("FIELD" => "\n\t\t\t\tCASE\n\n\t\t\t\t\tWHEN\n\t\t\t\t\t\tP.TYPE = 'LOCATION'\n\t\t\t\t\tTHEN\n\t\t\t\t\t\tCAST(L.ID as " . \Bitrix\Sale\Location\DB\Helper::getSqlForDataType('char', 255) . ")\n\n\t\t\t\t\tELSE\n\t\t\t\t\t\t" . $tableAlias . ".VALUE\n\t\t\t\tEND\n\t\t\t", "TYPE" => "string", "FROM" => "LEFT JOIN b_sale_location L ON (P.TYPE = 'LOCATION' AND " . $tableAlias . ".VALUE IS NOT NULL AND " . $tableAlias . ".VALUE = L.CODE)");
         $arFields['VALUE_ORIG'] = array("FIELD" => $tableAlias . ".VALUE", "TYPE" => "string");
     } else {
         $arFields['VALUE'] = array("FIELD" => $tableAlias . ".VALUE", "TYPE" => "string");
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:13,代码来源:order_user_props_value.php

示例7: __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

示例8: __GetLocation

 function __GetLocation($location, $bGetZIP = false)
 {
     $arLocation = CSaleHelper::getLocationByIdHitCached($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

示例9: getConfig

 public static function getConfig($siteId = false)
 {
     $shopLocationId = CSaleHelper::getShopLocationId($siteId);
     $arShopLocation = CSaleLocation::GetByID($shopLocationId);
     $locString = strlen($arShopLocation["COUNTRY_NAME_LANG"]) > 0 ? $arShopLocation["COUNTRY_NAME_LANG"] : "";
     $locString .= strlen($arShopLocation["REGION_NAME_LANG"]) > 0 ? (strlen($locString) > 0 ? ", " : "") . $arShopLocation["REGION_NAME_LANG"] : "";
     $locString .= strlen($arShopLocation["CITY_NAME_LANG"]) > 0 ? (strlen($locString) > 0 ? ", " : "") . $arShopLocation["CITY_NAME_LANG"] : "";
     $locDelivery = Adapter::mapLocation($shopLocationId);
     $arConfig = array('CONFIG_GROUPS' => array('exchange_sett' => GetMessage('SALE_DH_PECOM_EXCH_TITLE'), 'add_services' => GetMessage('SALE_DH_PECOM_ADD_SERVICES_TITLE'), 'auto' => GetMessage('SALE_DH_PECOM_AUTO_TITLE'), 'avia' => GetMessage('SALE_DH_PECOM_AVIA_TITLE')), "CONFIG" => array("LOGIN" => array("DEFAULT" => '', "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_LOGIN'), "GROUP" => "exchange_sett"), "KEY" => array("DEFAULT" => '', "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_KEY'), "GROUP" => "exchange_sett"), "NAME" => array("DEFAULT" => '', "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_NAME'), "GROUP" => "exchange_sett"), "INN" => array("DEFAULT" => '', "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_INN'), "GROUP" => "exchange_sett"), "CITY" => array("TYPE" => "TEXT_RO", "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_CITY'), "VALUE" => $locString, "GROUP" => "exchange_sett"), "CITY_DELIVERY" => array("TYPE" => "DROPDOWN", "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_CITY_DELIVERY'), "VALUES" => $locDelivery, "GROUP" => "exchange_sett"), "PHONE" => array("DEFAULT" => '', "TITLE" => GetMessage('SALE_DH_PECOM_EXCH_PHONE'), "GROUP" => "exchange_sett"), "PAYMENT_FORM" => array("TYPE" => "DROPDOWN", "DEFAULT" => self::$PAYER_BUYER, "TITLE" => GetMessage('SALE_DH_PECOM_AS_PAYMENT_FORM'), "GROUP" => "exchange_sett", "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYMENT_BANK'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYMENT_KASSA'))), "SERVICE_TAKE" => array('TYPE' => 'SECTION', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_TAKE'), 'GROUP' => 'add_services'), "SERVICE_TAKE_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_TAKE_ENABLE'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'HIDE_BY_NAMES' => array('SERVICE_TAKE_TENT_ENABLED', 'SERVICE_TAKE_HYDRO_ENABLED')), "SERVICE_TAKE_TENT_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_TAKE_TENT'), 'GROUP' => 'add_services', 'DEFAULT' => ''), "SERVICE_TAKE_HYDRO_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_TAKE_HYDRO'), 'GROUP' => 'add_services', 'DEFAULT' => ''), "SERVICE_DELIVERY" => array('TYPE' => 'SECTION', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_DELIVERY'), 'GROUP' => 'add_services'), "SERVICE_DELIVERY_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_DELIVERY_ENABLE'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'HIDE_BY_NAMES' => array('SERVICE_DELIVERY_TENT_ENABLED', 'SERVICE_DELIVERY_HYDRO_ENABLED', 'SERVICE_OTHER_DELIVERY_PAYER')), "SERVICE_DELIVERY_TENT_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_DELIVERY_TENT'), 'GROUP' => 'add_services', 'DEFAULT' => ''), "SERVICE_DELIVERY_HYDRO_ENABLED" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_DELIVERY_HYDRO'), 'GROUP' => 'add_services', 'DEFAULT' => ''), "SERVICE_OTHER_DELIVERY_PAYER" => array('TYPE' => 'DROPDOWN', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_PAYER'), 'GROUP' => 'add_services', 'DEFAULT' => self::$PAYER_BUYER, "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYER_SHOP'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYER_BUYER'))), "SERVICE_OTHER" => array('TYPE' => 'SECTION', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER'), 'GROUP' => 'add_services'), "SERVICE_OTHER_PLOMBIR_ENABLE" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER_PLOMBIR_ENABLE'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'HIDE_BY_NAMES' => array('SERVICE_OTHER_PLOMBIR_COUNT', 'SERVICE_OTHER_PLOMBIR_PAYER')), "SERVICE_OTHER_PLOMBIR_COUNT" => array('TYPE' => 'STRING', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER_PLOMBIR_COUNT'), 'GROUP' => 'add_services', 'DEFAULT' => '0'), "SERVICE_OTHER_PLOMBIR_PAYER" => array('TYPE' => 'DROPDOWN', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_PAYER'), 'GROUP' => 'add_services', 'DEFAULT' => self::$PAYER_BUYER, "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYER_SHOP'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYER_BUYER'))), "SERVICE_OTHER_PALLETE" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER_PALLETE'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'TOP_LINE' => 'Y', 'HIDE_BY_NAMES' => array('SERVICE_OTHER_PALLETE_PAYER')), "SERVICE_OTHER_PALLETE_PAYER" => array('TYPE' => 'DROPDOWN', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_PAYER'), 'GROUP' => 'add_services', 'DEFAULT' => self::$PAYER_BUYER, "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYER_SHOP'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYER_BUYER'))), "SERVICE_OTHER_INSURANCE" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER_INSURANCE'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'TOP_LINE' => 'Y', 'HIDE_BY_NAMES' => array('SERVICE_OTHER_INSURANCE_PAYER')), "SERVICE_OTHER_INSURANCE_PAYER" => array('TYPE' => 'DROPDOWN', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_PAYER'), 'GROUP' => 'add_services', 'DEFAULT' => self::$PAYER_BUYER, "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYER_SHOP'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYER_BUYER'))), "SERVICE_OTHER_RIGID_PACKING" => array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_OTHER_RIGID_PACKING'), 'GROUP' => 'add_services', 'DEFAULT' => '', 'TOP_LINE' => 'Y', 'HIDE_BY_NAMES' => array('SERVICE_OTHER_RIGID_PAYER')), "SERVICE_OTHER_RIGID_PAYER" => array('TYPE' => 'DROPDOWN', 'TITLE' => GetMessage('SALE_DH_PECOM_AS_PAYER'), 'GROUP' => 'add_services', 'DEFAULT' => self::$PAYER_BUYER, "VALUES" => array(self::$PAYER_SHOP => GetMessage('SALE_DH_PECOM_AS_PAYER_SHOP'), self::$PAYER_BUYER => GetMessage('SALE_DH_PECOM_AS_PAYER_BUYER')))));
     $aviableBoxes = self::getAviableBoxes();
     foreach ($aviableBoxes as $boxId => $arBox) {
         CSaleDeliveryHelper::makeBoxConfig($boxId, $arBox, 'auto', $arConfig);
         CSaleDeliveryHelper::makeBoxConfig($boxId, $arBox, 'avia', $arConfig);
     }
     return $arConfig;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:16,代码来源:delivery_pecom.php

示例10: Update

 function Update($ID, $arFields)
 {
     global $DB;
     $ID = IntVal($ID);
     // need to check here if we got CODE or ID came
     if (isset($arFields['VALUE']) && (string) $arFields['VALUE'] != '' && CSaleLocation::isLocationProMigrated()) {
         $propValue = self::GetByID($ID);
         if ($propValue['TYPE'] == 'LOCATION') {
             $arFields['VALUE'] = CSaleLocation::tryTranslateIDToCode($arFields['VALUE']);
         }
     }
     $strUpdate = $DB->PrepareUpdate("b_sale_user_props_value", $arFields);
     $strSql = "UPDATE b_sale_user_props_value SET " . "\t" . $strUpdate . " " . "WHERE ID = " . $ID . " ";
     $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     return $ID;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:16,代码来源:order_user_props_value.php

示例11: getLocation

 public function getLocation()
 {
     if (!$this->getLocationId()) {
         throw new \Exception('Не указано место доставки ' . __METHOD__);
     }
     $retval = false;
     $res = \CSaleLocation::GetList(array(), array('LID' => LANGUAGE_ID, 'ID' => $this->getLocationId()));
     while ($city = $res->GetNext()) {
         if (!\Bitrix\Sale\SalesZone::checkCityId($city['CITY_ID'], SITE_ID)) {
             continue;
         }
         if (empty($city['CITY_NAME'])) {
             continue;
         }
         $retval = $city;
     }
     return $retval;
 }
开发者ID:ASDAFF,项目名称:bitrix_lib,代码行数:18,代码来源:Cart.class.php

示例12: Calculate

 function Calculate($profile, $arConfig, $arOrder, $STEP, $TEMP = false)
 {
     $arPacks = CSaleDeliveryHelper::getBoxesFromConfig($profile, $arConfig);
     $arPackagesParams = CSaleDeliveryHelper::getRequiredPacks($arOrder["ITEMS"], $arPacks, self::$MAX_WEIGHT);
     $packageCount = count($arPackagesParams);
     if (intval($packageCount) <= 0) {
         return array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DH_KP_OVERLOAD"));
     }
     $totalPrice = 0;
     $shopLocationId = CSaleHelper::getShopLocationId(SITE_ID);
     $arShopLocation = CSaleLocation::GetByID($shopLocationId);
     $arLocationTo = CSaleLocation::GetByID($arOrder['LOCATION_TO']);
     foreach ($arPackagesParams as $arPackage) {
         $totalPrice += self::calculatePackPrice($arPackage, $profile, $arConfig, $arShopLocation['REGION_ID'], $arLocationTo['REGION_ID']);
     }
     $arResult = array('RESULT' => 'OK', 'VALUE' => $totalPrice, 'PACKS_COUNT' => $packageCount);
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:delivery_kaz_post.php

示例13: GetConfig

	function GetConfig() {
		// $locations = array();
		// $locationRes = CSaleLocation::GetList();
		// while ($locationAr = $locationRes->Fetch()) {
			// if ($locationAr["CITY_NAME"]) {
				// $locations[$locationAr["ID"]] = $locationAr["CITY_NAME"];
			// }
		// }
		$moduleID = 'getparcel.gpwidget';
		if (CModule::IncludeModule($moduleID)) {
			$default = COption::GetOptionString($moduleID, 'default_location');
		}
		$location_list = array();
		$location_res = CSaleLocation::GetList(
			array("SORT" => "ASC", "CITY_NAME" => "ASC"), array("LID" => LANGUAGE_ID, ">CITY_ID" => ""),
			false, false, array("ID", "CITY_NAME")
		);
		while ($location_ar = $location_res->Fetch()) {
			$location_list[$location_ar['ID']] = $location_ar['CITY_NAME'];
		}
		$arConfig = array(
			"CONFIG_GROUPS" => array(
				"all" => GetMessage("CONFIG_GROUPS_ALL"),
			),

			"CONFIG" => array(
				"LOCATION_ID" => array(
					"TYPE" => "DROPDOWN",
					"DEFAULT" => intVal($default) > 0 ? $default : "",
					"TITLE" => GetMessage("CONFIG_LOCATION_ID_TITLE"),
					"GROUP" => "all",
					"VALUES" => $location_list,
				),
                "URLES" => array(
                    "SYSTEM_STATUS_URL" => "api/shop-company/v1/system_status",
                    "TOKEN_URL" => "api/widget/v1/auth_token.json",
                    "POST_URL" => "api/shop-company/v1/orders.json",
                    "PATCH_URL" => "api/shop-company/v1/orders/#ID#.json",
                    "DELIVERY_URL" => "api/shop-company/v1/orders/delivery_price",
                )
			),
		);
		return $arConfig;
	}
开发者ID:ASDAFF,项目名称:gpbitrix,代码行数:44,代码来源:delivery_handler.php

示例14: getRegionsList

 /**
  * getRegionsList
  * @return array regions (locations) list
  */
 public static function getRegionsList($countryId = 0, $bFlip = false)
 {
     static $arRegions = array();
     $flipIndex = intval($bFlip);
     if (isset($arRegions[$countryId][$flipIndex])) {
         return $arRegions[$countryId][$flipIndex];
     }
     $arFilterRegion = array();
     if (intval($countryId) > 0) {
         $arFilterRegion["COUNTRY_ID"] = $countryId;
     }
     $dbRegionList = CSaleLocation::GetRegionList(array("NAME_LANG" => "ASC"), $arFilterRegion, LANGUAGE_ID);
     while ($arRegionList = $dbRegionList->Fetch()) {
         $arRegions[$countryId][0][$arRegionList['ID']] = $arRegionList["NAME_LANG"];
         // $bFlip == false
         $arRegions[$countryId][1][$arRegionList["NAME_LANG"]] = $arRegionList['ID'];
         // $bFlip == true
     }
     return isset($arRegions[$countryId][$flipIndex]) ? $arRegions[$countryId][$flipIndex] : array();
 }
开发者ID:rasuldev,项目名称:torino,代码行数:24,代码来源:delivery_helper.php

示例15: array

			),
		);

		/* LOCATIONS BEGIN */
		// this file can be loaded directly, without module include, so ...
		require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/include.php");

		if(class_exists('CSaleLocation'))
		{
			$locationMenu = array(
				"text" => GetMessage("SALE_LOCATION"),
				"title" => GetMessage("SALE_LOCATION_DESCR"),
				"items_id" => "menu_sale_locations",
			);

			if(CSaleLocation::isLocationProEnabled())
			{
				$locationMenu["items"] = array(
					array(
						"text" => GetMessage("sale_menu_locations"),
						"title" => GetMessage("sale_menu_locations_title"),
						"url" => Location\Admin\LocationHelper::getListUrl(0),
						"more_url" => array(Location\Admin\LocationHelper::getEditUrl()),

						"module_id" => "sale",
						"items_id" => Location\Admin\LocationHelper::packItemsQueryString(),
						"dynamic" => true,
						"items" => Location\Admin\LocationHelper::getLocationSubMenu()
					),
					array(
						"text" => GetMessage("SALE_LOCATION_GROUPS"),
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:menu.php


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