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


PHP CSaleLocation::GetByID方法代码示例

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


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

示例1: getPrice

 public static function getPrice(&$arPaySystem, $orderPrice, $deliveryPrice, $buyerLocationId)
 {
     if (!isset($arPaySystem["PSA_TARIF"]) || strlen($arPaySystem["PSA_TARIF"]) <= 0) {
         return 0;
     }
     $result = 0;
     $arLoc = CSaleLocation::GetByID($buyerLocationId);
     $regId = $arLoc["REGION_ID"];
     $arTarifs = self::extractFromField($arPaySystem["PSA_TARIF"]);
     $arTarif = isset($arTarifs[$regId]) ? $arTarifs[$regId] : $arTarifs[0];
     $fullPrice = $orderPrice + $deliveryPrice;
     if ($fullPrice <= 1000) {
         $tarifNum = "0";
     } elseif ($fullPrice <= 5000) {
         $tarifNum = "1";
     } elseif ($fullPrice <= 20000) {
         $tarifNum = "2";
     } elseif ($fullPrice <= 500000) {
         $tarifNum = "3";
     }
     if (isset($tarifNum)) {
         $percent = 0;
         if ($arTarif["TARIFS"][$tarifNum]["UPPER_SUMM"] < $orderPrice) {
             $percent = floatval($arTarif["TARIFS"][$tarifNum]["PERCENT"]) * floatval($orderPrice) / 100;
         }
         $result = floatval($arTarif["TARIFS"][$tarifNum]["FIX"]) + $percent;
     }
     return round($result, 0);
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:29,代码来源:tarif.php

示例2: checkLocationId

 /**
  * Checks if location id is in sales zone
  * @param int $locationId
  * @param string $siteId
  * @return bool
  */
 public static function checkLocationId($locationId, $siteId)
 {
     $result = false;
     $arLocation = \CSaleLocation::GetByID($locationId);
     if (static::checkCountryId($arLocation["COUNTRY_ID"], $siteId) && static::checkRegionId($arLocation["REGION_ID"], $siteId) && static::checkCityId($arLocation["CITY_ID"], $siteId)) {
         $result = true;
     }
     return $result;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:15,代码来源:saleszone.php

示例3: GetByID

 public static function GetByID($locID)
 {
     if (intval($locID) <= 0) {
         return false;
     }
     if (CSaleLocation::isLocationProMigrated()) {
         return CSaleLocation::GetByID($locID);
     }
     $arLocs = self::GetAll();
     return isset($arLocs[$locID]) ? $arLocs[$locID] : false;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:11,代码来源:crm_locations.php

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

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

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

示例7: htmlspecialcharsbx

<p class=Normal style='margin-top:1.0pt;margin-right:0cm;margin-bottom:0cm;
margin-left:0cm;margin-bottom:.0001pt;line-height:normal'><span
style='font-size:7.0pt'>Плательщик   </span><span
style='font-size:7.0pt'><a name=ТекстовоеПоле31></a><?php 
if (empty($arParams)) {
    echo "[" . $arOrder["USER_ID"] . "] ";
    $db_user = CUser::GetByID($arOrder["USER_ID"]);
    $arUser = $db_user->Fetch();
    echo htmlspecialcharsbx($arUser["NAME"]) . " " . htmlspecialcharsbx($arUser["LAST_NAME"]) . ", ";
    if (strlen($arOrderProps["F_INN"]) > 0) {
        echo "ИНН: " . $arOrderProps["F_INN"];
    }
    if (strlen($arOrderProps["F_INDEX"]) > 0) {
        echo $arOrderProps["F_INDEX"] . ",";
    }
    $arVal = CSaleLocation::GetByID($arOrderProps["F_LOCATION"], "ru");
    if (strlen($arVal["COUNTRY_NAME"]) > 0 && strlen($arVal["CITY_NAME"]) > 0) {
        echo htmlspecialcharsbx($arVal["COUNTRY_NAME"] . " - " . $arVal["CITY_NAME"]);
    } elseif (strlen($arVal["COUNTRY_NAME"]) > 0 || strlen($arVal["CITY_NAME"]) > 0) {
        echo htmlspecialcharsbx($arVal["COUNTRY_NAME"] . $arVal["CITY_NAME"]);
    }
    if (strlen($arOrderProps["F_CITY"]) > 0) {
        echo ", г. " . $arOrderProps["F_CITY"];
    }
    if (strlen($arOrderProps["F_ADDRESS"]) > 0 && strlen($arOrderProps["F_CITY"]) > 0) {
        echo ", " . $arOrderProps["F_ADDRESS"];
    } elseif (strlen($arOrderProps["F_ADDRESS"]) > 0) {
        echo $arOrderProps["F_ADDRESS"];
    }
} else {
    if (strlen($arParams["BUYER_COMPANY_NAME"]) > 0) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:waybill.php

示例8: elseif

            $nameDefault .= " - " . $arLocDefault["REGION_NAME"];
        } elseif (strlen($arLocDefault["REGION_NAME"]) > 0) {
            $nameDefault .= $arLocDefault["REGION_NAME"];
        }
        if ((strlen($arLocDefault["COUNTRY_NAME"]) > 0 || strlen($arLocDefault["REGION_NAME"]) > 0) && strlen($arLocDefault["CITY_NAME"]) > 0) {
            $nameDefault .= " - " . $arLocDefault["CITY_NAME"];
        } elseif (strlen($arLocDefault["CITY_NAME"]) > 0) {
            $nameDefault .= $arLocDefault["CITY_NAME"];
        }
        $arLocDefault["LOC_DEFAULT_NAME"] = $nameDefault;
        $arParams["LOC_DEFAULT"][] = $arLocDefault;
    }
}
//location value
if ($arParams["LOCATION_VALUE"] > 0) {
    if ($arLocation = CSaleLocation::GetByID($arParams["LOCATION_VALUE"])) {
        if ($arResult["EMPTY_REGION"] == "Y" && $arResult["EMPTY_CITY"] == "Y") {
            $arParams["COUNTRY"] = $arParams["LOCATION_VALUE"];
        } else {
            $arParams["COUNTRY"] = $arLocation["COUNTRY_ID"];
        }
        if ($arResult["EMPTY_CITY"] == "Y") {
            $arParams["REGION"] = $arLocation["ID"];
        } else {
            $arParams["REGION"] = $arLocation["REGION_ID"];
        }
        $arParams["CITY"] = $arParams["CITY_OUT_LOCATION"] == "Y" ? $arParams["LOCATION_VALUE"] : $arLocation["CITY_ID"];
    }
}
$locationString = "";
//select country
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例9: getShopLocation

 public static function getShopLocation($siteId = false)
 {
     static $shopLocation = array();
     if (empty($shopLocation)) {
         $shopLocationId = self::getShopLocationId($siteId);
         if (intval($shopLocationId) > 0) {
             $shopLocation = CSaleLocation::GetByID($shopLocationId);
         }
     }
     return $shopLocation;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:11,代码来源:helper.php

示例10: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
CModule::IncludeModule("sale");
// Выберем все профили покупателя для текущего пользователя,
// упорядочив результат по дате последнего изменения
$db_sales = CSaleOrderUserProps::GetList(array("DATE_UPDATE" => "DESC"), array("USER_ID" => $USER->GetID()));
while ($ar_sales = $db_sales->Fetch()) {
    $props = array();
    $db_propVals = CSaleOrderUserPropsValue::GetList(array("ID" => "ASC"), array("USER_PROPS_ID" => $ar_sales["ID"]));
    while ($arPropVals = $db_propVals->Fetch()) {
        if ($arPropVals["PROP_TYPE"] == "LOCATION") {
            $arPropVals["~VALUE"] = $arPropVals["VALUE"];
            $loc = CSaleLocation::GetByID($arPropVals["VALUE"]);
            $arPropVals["VALUE"] = $loc["CITY_NAME"] ?: $loc["REGION_NAME"] ?: $loc["COUNTRY_NAME"];
        }
        $props[] = $arPropVals;
    }
    $ar_sales["PROPS"] = $props;
    $arResult["DELIVERY_ADDR"][] = $ar_sales;
}
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:23,代码来源:result_modifier.php

示例11: Compability

 function Compability($arOrder, $arConfig)
 {
     $arLocationFrom = CSaleLocation::GetByID($arOrder["LOCATION_FROM"]);
     if (ToUpper($arLocationFrom["CITY_NAME_ORIG"]) == "МОСКВА" || ToUpper($arLocationFrom["CITY_SHORT_NAME"]) == "МОСКВА" || ToUpper($arLocationFrom["CITY_NAME_LANG"]) == "МОСКВА" || ToUpper($arLocationFrom["CITY_NAME_ORIG"]) == "MOSCOW" || ToUpper($arLocationFrom["CITY_SHORT_NAME"]) == "MOSCOW" || ToUpper($arLocationFrom["CITY_NAME_LANG"]) == "MOSCOW") {
         $arLocationTo = CSaleLocation::GetByID($arOrder["LOCATION_TO"]);
         if (!CDeliveryRUSSIANPOST::__IsRussian($arLocationTo) && $arConfig['category']['VALUE'] == 26) {
             return array();
         }
         if (isset($arConfig["category"]["VALUE"]) && $arConfig["category"]["VALUE"] == 26) {
             return array("ground");
         } else {
             return array("ground", "avia");
         }
     } else {
         return array();
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:17,代码来源:delivery_russianpost.php

示例12:

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!empty($arResult['DISPLAY_PROPERTIES']['LOCATION']['VALUE']) && \Bitrix\Main\Loader::includeModule('sale')) {
    $arResult['DISPLAY_PROPERTIES']['LOCATION']['DISPLAY_VALUE'] = CSaleLocation::GetByID($arResult['DISPLAY_PROPERTIES']['LOCATION']['VALUE']);
}
if ($arResult['PROPERTIES']['vote_count']['VALUE'] == '') {
    $arResult['PROPERTIES']['vote_count']['VALUE'] = 0;
}
开发者ID:Tvaruga,项目名称:ae,代码行数:11,代码来源:result_modifier.php

示例13: strlen

								$arOrder["LOCATION_TO"] = $arOrderProps["VALUE"];

								if(CSaleLocation::isLocationProEnabled())
								{
									$locationString = Location\Admin\LocationHelper::getLocationStringByCode($arOrderProps['VALUE']);
									if(!strlen($locationString))
										$locationString = $arOrderProps['VALUE'];

									print(htmlspecialcharsEx($locationString));
								}
								else
								{
									if(CSaleLocation::isLocationProMigrated())
										$arOrderProps["VALUE"] = CSaleLocation::getLocationIDbyCODE($arOrderProps["VALUE"]);

									$arVal = CSaleLocation::GetByID($arOrderProps["VALUE"], LANG);
									$locationString = $arVal["COUNTRY_NAME"];

									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);
								}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:30,代码来源:order_detail.php

示例14: ExportOrders2Xml


//.........这里部分代码省略.........
			"ADDITIONAL_INFO", "PS_STATUS", "PS_STATUS_CODE", "PS_STATUS_DESCRIPTION", "PS_STATUS_MESSAGE", "PS_SUM", "PS_CURRENCY", "PS_RESPONSE_DATE",
			"COMMENTS", "TAX_VALUE", "STAT_GID", "RECURRING_ID", "ACCOUNT_NUMBER", "SUM_PAID", "DELIVERY_DOC_DATE", "DELIVERY_DOC_NUM", "TRACKING_NUMBER", "STORE_ID",
			"ID_1C", "VERSION",
		);

		$bCrmModuleIncluded = false;
		if ($bExportFromCrm)
		{
			$arSelect[] = "UF_COMPANY_ID";
			$arSelect[] = "UF_CONTACT_ID";
			if (IsModuleInstalled("crm") && CModule::IncludeModule("crm"))
				$bCrmModuleIncluded = true;
		}

		$dbOrderList = CSaleOrder::GetList($arOrder, $arFilter, false, $count, $arSelect);

		while($arOrder = $dbOrderList->Fetch())
		{
			if ($crmMode)
			{			
				if($bNewVersion && is_array($_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix]) && in_array($arOrder["ID"], $_SESSION["BX_CML2_EXPORT"][$lastOrderPrefix]) && empty($arFilter["ID"]))
					continue;
				ob_start();
			}

			$arResultStat["ORDERS"]++;

			$agentParams = $arAgent[$arOrder["PERSON_TYPE_ID"]];
			$arProp = Array();
			$arProp["ORDER"] = $arOrder;

			if (IntVal($arOrder["USER_ID"]) > 0)
			{
				$dbUser = CUser::GetByID($arOrder["USER_ID"]);
				if ($arUser = $dbUser->Fetch())
					$arProp["USER"] = $arUser;
			}
			if ($bExportFromCrm)
			{
				$arProp["CRM"] = array();
				$companyID = isset($arOrder["UF_COMPANY_ID"]) ? intval($arOrder["UF_COMPANY_ID"]) : 0;
				$contactID = isset($arOrder["UF_CONTACT_ID"]) ? intval($arOrder["UF_CONTACT_ID"]) : 0;
				if ($companyID > 0)
				{
					$arProp["CRM"]["CLIENT_ID"] = "CRMCO".$companyID;
				}
				else
				{
					$arProp["CRM"]["CLIENT_ID"] = "CRMC".$contactID;
				}

				$clientInfo = array(
					"LOGIN" => "",
					"NAME" => "",
					"LAST_NAME" => "",
					"SECOND_NAME" => ""
				);

				if ($bCrmModuleIncluded)
				{
					if ($companyID > 0)
					{
						$arCompanyFilter = array('=ID' => $companyID);
						$dbCompany = CCrmCompany::GetListEx(
							array(), $arCompanyFilter, false, array("nTopCount" => 1),
							array("TITLE")
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:export.php

示例15: Calculate

 public static function Calculate($profile, $arConfig, $arOrder, $STEP, $TEMP = false)
 {
     $maxWeight = self::isHeavyEnabled($arConfig) ? self::$MAX_WEIGHT_HEAVY : self::$MAX_WEIGHT;
     $arPacks = CSaleDeliveryHelper::getBoxesFromConfig($profile, $arConfig);
     $arPackagesParams = CSaleDeliveryHelper::getRequiredPacks($arOrder["ITEMS"], $arPacks, $maxWeight);
     $packageCount = count($arPackagesParams);
     if (intval($packageCount) <= 0) {
         return array("RESULT" => "ERROR", "TEXT" => GetMessage("SALE_DH_RP_OVERLOAD"));
     }
     $totalPrice = 0;
     $arLocationTo = CSaleLocation::GetByID($arOrder['LOCATION_TO']);
     foreach ($arPackagesParams as $arPackage) {
         $totalPrice += self::calculatePackPrice($arPackage, $profile, $arConfig, $arLocationTo);
     }
     $arResult = array('RESULT' => 'OK', 'VALUE' => $totalPrice, 'PACKS_COUNT' => $packageCount);
     return $arResult;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:17,代码来源:delivery_rus_post.php


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