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


PHP CSaleDelivery::GetList方法代码示例

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


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

示例1: DoLoadDelivery

 public static function DoLoadDelivery($location, $locationZip, $weight, $price, $currency, $siteId = null)
 {
     $location = intval($location);
     if ($location <= 0) {
         return null;
     }
     if ($siteId == null) {
         $siteId = SITE_ID;
     }
     $arResult = array();
     $arFilter = array("COMPABILITY" => array("WEIGHT" => $weight, "PRICE" => $price, "LOCATION_FROM" => COption::GetOptionString('sale', 'location', false, $siteId), "LOCATION_TO" => $location, "LOCATION_ZIP" => $locationZip), "SITE_ID" => $siteId);
     $dbDeliveryServices = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), $arFilter);
     while ($arDeliveryService = $dbDeliveryServices->GetNext()) {
         if (!is_array($arDeliveryService) || !is_array($arDeliveryService["PROFILES"])) {
             continue;
         }
         foreach ($arDeliveryService["PROFILES"] as $profileId => $arDeliveryProfile) {
             if ($arDeliveryProfile["ACTIVE"] != "Y") {
                 continue;
             }
             if (!array_key_exists($arDeliveryService["SID"], $arResult)) {
                 $arResult[$arDeliveryService["SID"]] = array("SID" => $arDeliveryService["SID"], "TITLE" => $arDeliveryService["NAME"], "DESCRIPTION" => $arDeliveryService["DESCRIPTION"], "PROFILES" => array());
             }
             $arResult[$arDeliveryService["SID"]]["PROFILES"][$profileId] = array("ID" => $arDeliveryService["SID"] . ":" . $profileId, "SID" => $profileId, "TITLE" => $arDeliveryProfile["TITLE"], "DESCRIPTION" => $arDeliveryProfile["DESCRIPTION"], "FIELD_NAME" => "DELIVERY_ID");
             $arDeliveryPriceTmp = CSaleDeliveryHandler::CalculateFull($arDeliveryService["SID"], $profileId, array("PRICE" => $price, "WEIGHT" => $weight, "LOCATION_FROM" => COption::GetOptionString('sale', 'location', false, $siteId), "LOCATION_TO" => $location, "LOCATION_ZIP" => $locationZip), $currency);
             if ($arDeliveryPriceTmp["RESULT"] != "ERROR") {
                 $arResult[$arDeliveryService["SID"]]["PROFILES"][$profileId]["DELIVERY_PRICE"] = roundEx($arDeliveryPriceTmp["VALUE"], SALE_VALUE_PRECISION);
                 $arResult[$arDeliveryService["SID"]]["PROFILES"][$profileId]["CURRENCY"] = $currency;
             }
         }
     }
     $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => $siteId, "+<=WEIGHT_FROM" => $weight, "+>=WEIGHT_TO" => $weight, "+<=ORDER_PRICE_FROM" => $price, "+>=ORDER_PRICE_TO" => $price, "ACTIVE" => "Y", "LOCATION" => $location));
     while ($arDelivery = $dbDelivery->GetNext()) {
         $arDeliveryDescription = CSaleDelivery::GetByID($arDelivery["ID"]);
         $arDelivery["DESCRIPTION"] = $arDeliveryDescription["DESCRIPTION"];
         $arDelivery["FIELD_NAME"] = "DELIVERY_ID";
         if (intval($arDelivery["PERIOD_FROM"]) > 0 || intval($arDelivery["PERIOD_TO"]) > 0) {
             $arDelivery["PERIOD_TEXT"] = GetMessage("SALE_DELIV_PERIOD");
             if (intval($arDelivery["PERIOD_FROM"]) > 0) {
                 $arDelivery["PERIOD_TEXT"] .= " " . GetMessage("SOA_FROM") . " " . intval($arDelivery["PERIOD_FROM"]);
             }
             if (intval($arDelivery["PERIOD_TO"]) > 0) {
                 $arDelivery["PERIOD_TEXT"] .= " " . GetMessage("SOA_TO") . " " . intval($arDelivery["PERIOD_TO"]);
             }
             if ($arDelivery["PERIOD_TYPE"] == "H") {
                 $arDelivery["PERIOD_TEXT"] .= " " . GetMessage("SOA_HOUR") . " ";
             } elseif ($arDelivery["PERIOD_TYPE"] == "M") {
                 $arDelivery["PERIOD_TEXT"] .= " " . GetMessage("SOA_MONTH") . " ";
             } else {
                 $arDelivery["PERIOD_TEXT"] .= " " . GetMessage("SOA_DAY") . " ";
             }
         }
         $arResult[] = $arDelivery;
     }
     return $arResult;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:56,代码来源:delivery.php

示例2: getDelivery

    public static function getDelivery($id = false)
    {
        static $result = null;
        static $resultById = null;

        if($result === null)
        {
            $rs = \CSaleDelivery::GetList(array(), array(), false, false, array('ID', 'NAME'));
            while($ar = $rs->GetNext(true, false))
            {
                $obj = new Delivery($ar);
                $resultById[ $ar['ID'] ] = &$obj;
                $result[] = &$obj;
                unset($obj);
            }
        }

        return $id ? (isset($resultById[$id]) ? $resultById[$id] : false) : $result;
    }
开发者ID:AlexSmerw,项目名称:domino,代码行数:19,代码来源:Delivery.class.php

示例3: getDelivery

/**
 * [getDelivery description]
 * @return array or false
 */
function getDelivery()
{
    if (CModule::IncludeModule('sale')) {
        $db_dtype = CSaleDelivery::GetList(array("SORT" => "ASC", "ID" => "ASC"), array("LID" => SITE_ID, "ACTIVE" => "Y"), false, false, array());
        while ($ar_dtype = $db_dtype->Fetch()) {
            $arDelivery[] = $ar_dtype;
        }
        return $arDelivery;
    }
    return false;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:15,代码来源:functions.php

示例4: obtainDataReferences

 /**
  * Function returns reference data as shared cache between this component and sale.personal.order.list.
  *
  * @throws Exception
  * @return void
  */
 protected function obtainDataReferences()
 {
     if ($this->startCache(array('spo-shared'))) {
         try {
             $cachedData = array();
             /////////////////////
             /////////////////////
             // Person type
             $dbPType = CSalePersonType::GetList(array("SORT" => "ASC"));
             while ($arPType = $dbPType->Fetch()) {
                 $cachedData['PERSON_TYPE'][$arPType["ID"]] = $arPType;
             }
             // Save statuses for Filter form
             $dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => LANGUAGE_ID));
             while ($arStatus = $dbStatus->Fetch()) {
                 $cachedData['STATUS'][$arStatus["ID"]] = $arStatus;
             }
             $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"));
             while ($arPaySystem = $dbPaySystem->Fetch()) {
                 $cachedData['PAYSYS'][$arPaySystem["ID"]] = $arPaySystem;
             }
             $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"));
             while ($arDelivery = $dbDelivery->Fetch()) {
                 $cachedData['DELIVERY'][$arDelivery["ID"]] = $arDelivery;
             }
             $dbDelivery = CSaleDeliveryHandler::GetList(array(), array(array("SITE_ID" => SITE_ID)));
             while ($arDeliveryHandler = $dbDelivery->Fetch()) {
                 $cachedData['DELIVERY_HANDLERS'][$arDeliveryHandler["SID"]] = $arDeliveryHandler;
             }
             /////////////////////
             /////////////////////
         } catch (Exception $e) {
             $this->abortCache();
             throw $e;
         }
         $this->endCache($cachedData);
     } else {
         $cachedData = $this->getCacheData();
     }
     $this->dbResult = array_merge($this->dbResult, $this->adaptCachedReferences($cachedData));
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:47,代码来源:class.php

示例5: array

//get status order
$arOrderStatus = array();
$dbStatusList = CSaleStatus::GetList(
	array("SORT" => "ASC"),
	array("LID" => LANGUAGE_ID),
	false,
	false,
	array("ID", "NAME")
);
while ($arStatusList = $dbStatusList->Fetch())
	$arOrderStatus[htmlspecialcharsbx($arStatusList["ID"])] = htmlspecialcharsbx($arStatusList["NAME"]);

//get delivery
$arDelivery = array();
$dbDeliveryList = CSaleDelivery::GetList(
		array("SORT" => "ASC"),
		array()
		);
while ($arDeliveryList = $dbDeliveryList->Fetch())
	$arDelivery[$arDeliveryList["ID"]] = htmlspecialcharsbx($arDeliveryList["NAME"]);

//get paysystem
$arPaySystem = array();
$dbPaySystemList = CSalePaySystem::GetList(
		array("SORT"=>"ASC"),
		array()
		);
while ($arPaySystemList = $dbPaySystemList->Fetch())
	$arPaySystem[$arPaySystemList["ID"]] = htmlspecialcharsbx($arPaySystemList["NAME"]);


$sTableID_tab5 = "table_order_change";
开发者ID:akniyev,项目名称:arteva.ru,代码行数:32,代码来源:order_detail.php

示例6: array

             }
             $arResult["DELIVERY"][$delivery_id]["LOGOTIP"] = $arDeliveryService["LOGOTIP"];
             $arResult["DELIVERY"][$delivery_id]["PROFILES"][$profile_id] = $arProfile;
             $bFirst = false;
         }
     }
 }
 if (!$bFound && !empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") !== false) {
     $arUserResult["DELIVERY_ID"] = "";
 }
 /*Old Delivery*/
 $arStoreId = array();
 $arDeliveryAll = array();
 $bFound = False;
 $bFirst = True;
 $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => SITE_ID, "+<=WEIGHT_FROM" => $arResult["ORDER_WEIGHT"], "+>=WEIGHT_TO" => $arResult["ORDER_WEIGHT"], "+<=ORDER_PRICE_FROM" => $arResult["ORDER_PRICE"], "+>=ORDER_PRICE_TO" => $arResult["ORDER_PRICE"], "ACTIVE" => "Y", "LOCATION" => $arUserResult["DELIVERY_LOCATION"]));
 while ($arDelivery = $dbDelivery->Fetch()) {
     $arStore = array();
     if (strlen($arDelivery["STORE"]) > 0) {
         $arStore = unserialize($arDelivery["STORE"]);
         foreach ($arStore as $val) {
             $arStoreId[$val] = $val;
         }
     }
     $arDelivery["STORE"] = $arStore;
     if (isset($_POST["BUYER_STORE"]) && in_array($_POST["BUYER_STORE"], $arStore)) {
         $arUserResult['DELIVERY_STORE'] = $arDelivery["ID"];
     }
     $arDeliveryDescription = CSaleDelivery::GetByID($arDelivery["ID"]);
     $arDelivery["DESCRIPTION"] = htmlspecialcharsbx($arDeliveryDescription["DESCRIPTION"]);
     $arDeliveryAll[] = $arDelivery;
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php

示例7: ExportOrders2Xml

	public static function ExportOrders2Xml($arFilter = Array(), $nTopCount = 0, $currency = "", $crmMode = false)
	{
		global $DB;
		$count = false;
		if(IntVal($nTopCount)>0)
			$count = Array("nTopCount" => $nTopCount);

		$arResultStat = array(
			"ORDERS" => 0,
			"CONTACTS" => 0,
			"COMPANIES" => 0,
		);

		$accountNumberPrefix = COption::GetOptionString("sale", "1C_SALE_ACCOUNT_NUMBER_SHOP_PREFIX", "");

		$arOrder = array("ID" => "DESC");
		if ($crmMode)
			$arOrder = array("DATE_UPDATE" => "ASC");

		$dbOrderList = CSaleOrder::GetList(
				$arOrder,
				$arFilter,
				false,
				$count,
				array(
					"ID", "LID", "PERSON_TYPE_ID", "PAYED", "DATE_PAYED", "EMP_PAYED_ID", "CANCELED", "DATE_CANCELED",
					"EMP_CANCELED_ID", "REASON_CANCELED", "STATUS_ID", "DATE_STATUS", "PAY_VOUCHER_NUM", "PAY_VOUCHER_DATE", "EMP_STATUS_ID",
					"PRICE_DELIVERY", "ALLOW_DELIVERY", "DATE_ALLOW_DELIVERY", "EMP_ALLOW_DELIVERY_ID", "PRICE", "CURRENCY", "DISCOUNT_VALUE",
					"SUM_PAID", "USER_ID", "PAY_SYSTEM_ID", "DELIVERY_ID", "DATE_INSERT", "DATE_INSERT_FORMAT", "DATE_UPDATE", "USER_DESCRIPTION",
					"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"
				)
			);

		$dbPaySystem = CSalePaySystem::GetList(Array("ID" => "ASC"), Array("ACTIVE" => "Y"), false, false, Array("ID", "NAME", "ACTIVE"));
		while($arPaySystem = $dbPaySystem -> Fetch())
			$paySystems[$arPaySystem["ID"]] = $arPaySystem["NAME"];

		$dbDelivery = CSaleDelivery::GetList(Array("ID" => "ASC"), Array("ACTIVE" => "Y"), false, false, Array("ID", "NAME", "ACTIVE"));
		while($arDelivery = $dbDelivery -> Fetch())
			$delivery[$arDelivery["ID"]] = $arDelivery["NAME"];

		$rsDeliveryHandlers = CSaleDeliveryHandler::GetAdminList(array("SID" => "ASC"));
		while ($arHandler = $rsDeliveryHandlers->Fetch())
		{
			if(is_array($arHandler["PROFILES"]))
			{
				foreach($arHandler["PROFILES"] as $k => $v)
				{
					$delivery[$arHandler["SID"].":".$k] = $v["TITLE"]." (".$arHandler["NAME"].")";
				}
			}
		}

		$dbExport = CSaleExport::GetList();
		while($arExport = $dbExport->Fetch())
		{
			$arAgent[$arExport["PERSON_TYPE_ID"]] = unserialize($arExport["VARS"]);
		}

		$dateFormat = CSite::GetDateFormat("FULL");

		if ($crmMode)
		{
			echo "<"."?xml version=\"1.0\" encoding=\"UTF-8\"?".">\n";

			$arCharSets = array();
			$dbSitesList = CSite::GetList(($b=""), ($o=""));
			while ($arSite = $dbSitesList->Fetch())
				$arCharSets[$arSite["ID"]] = $arSite["CHARSET"];
		}
		else
			echo "<"."?xml version=\"1.0\" encoding=\"windows-1251\"?".">\n";
		?>
		<<?php 
echo GetMessage("SALE_EXPORT_COM_INFORMATION");
?>
 <?php 
echo GetMessage("SALE_EXPORT_SHEM_VERSION");
?>
="2.05" <?php 
echo GetMessage("SALE_EXPORT_SHEM_DATE_CREATE");
?>
="<?php 
echo date("Y-m-d");
?>
T<?php 
echo date("G:i:s");
?>
" <?php 
echo GetMessage("SALE_EXPORT_DATE_FORMAT");
?>
="<?php 
echo GetMessage("SALE_EXPORT_DATE_FORMAT_DF");
?>
=yyyy-MM-dd; <?php 
echo GetMessage("SALE_EXPORT_DATE_FORMAT_DLF");
?>
=DT" <?php 
echo GetMessage("SALE_EXPORT_DATE_FORMAT_DATETIME");
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:export.php

示例8: ob_start

        $bUseDeliveryHandlers = false;
        ob_start();
        ?>
				<td width="40%" align="right">
					<?php 
        echo GetMessage("SOE_DELIVERY_COM");
        ?>
:
				</td>
				<td width="60%">
					<script language="JavaScript">
					<!--
					var arDeliveryPrice = new Array();
					var arDeliveryCurrency = new Array();
					<?php 
        $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => $str_LID, 'ACTIVE' => 'Y'), false, false, array("ID", "NAME", "SORT", "PRICE", "CURRENCY"));
        $arDeliveries = array();
        while ($arDelivery = $dbDelivery->GetNext()) {
            $bUseDelivery = true;
            $arDeliveries[] = $arDelivery;
            ?>
arDeliveryPrice[<?php 
            echo $arDelivery["ID"];
            ?>
]=<?php 
            echo $arDelivery["PRICE"];
            ?>
;<?php 
            ?>
arDeliveryCurrency[<?php 
            echo $arDelivery["ID"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

示例9: getDeliveryOptions

 public function getDeliveryOptions($locationId = null, $from = null)
 {
     if (empty($locationId)) {
         $locationId = $this->getLocationId();
     }
     if (empty($locationId)) {
         throw new \Exception('Для получения служб доставки нужно указать место доставки ' . __METHOD__);
     }
     $filter = array('COMPABILITY' => array('WEIGHT' => $this->getWeight(), 'PRICE' => $this->getTotal(), 'LOCATION_FROM' => !empty($from) ? $from : \COption::GetOptionString('sale', 'location', false, SITE_ID), 'LOCATION_TO' => $locationId, 'ITEMS' => $this->getItemsRaw()));
     $delivery = array();
     $res = \CSaleDeliveryHandler::GetList(array('SORT' => 'ASC'), $filter);
     while ($deliveryItem = $res->Fetch()) {
         if (!is_array($deliveryItem) || !is_array($deliveryItem['PROFILES'])) {
             continue;
         }
         foreach ($deliveryItem['PROFILES'] as $key => $profile) {
             $deliveryProfile = array('ID' => $deliveryItem['SID'] . ':' . $key, 'SID' => $deliveryItem['SID'], 'PROFILE' => $key, 'NAME' => $deliveryItem['NAME'], 'TITLE' => $profile['TITLE'], 'DESCRIPTION' => $deliveryItem['DESCRIPTION'], 'DESCRIPTION_INNER' => $deliveryItem['DESCRIPTION_INNER'], 'BASE_CURRENCY' => $deliveryItem['BASE_CURRENCY'], 'HANDLER' => $deliveryItem['HANDLER'], 'DELIVERY' => $deliveryItem);
             $delivery[] = $deliveryProfile;
         }
     }
     $res = \CSaleDelivery::GetList(array('SORT' => 'ASC', 'NAME' => 'ASC'), array('LID' => SITE_ID, '+<=WEIGHT_FROM' => $this->getWeight(), '+>=WEIGHT_TO' => $this->getWeight(), 'ACTIVE' => 'Y', 'LOCATION' => $locationId));
     while ($deliveryItem = $res->Fetch()) {
         $deliveryDescription = \CSaleDelivery::GetByID($deliveryItem['ID']);
         $deliveryItem['DESCRIPTION'] = htmlspecialcharsbx($deliveryDescription['DESCRIPTION']);
         $delivery[] = $deliveryItem;
     }
     foreach ($delivery as $k => $deliveryItem) {
         if ($deliveryItem['NAME'] == 'Самовывоз') {
             continue;
         }
         if (empty($deliveryItem['SID'])) {
             continue;
         }
         /**
          * TODO
          * dimensions
          */
         $arOrderTmpDel = array('PRICE' => $this->getTotal(), 'WEIGHT' => $this->getWeight() / 1000, 'DIMENSIONS' => array(10, 10, 10), 'LOCATION_FROM' => COption::GetOptionInt('sale', 'location'), 'LOCATION_TO' => $locationId, 'ITEMS' => $this->getItemsRaw());
         $price = \CSaleDeliveryHandler::CalculateFull($deliveryItem['SID'], $deliveryItem['PROFILE'], $arOrderTmpDel, 'RUB');
         $delivery[$k]['PRICE'] = $price['VALUE'];
     }
     return $delivery;
 }
开发者ID:ASDAFF,项目名称:bitrix_lib,代码行数:43,代码来源:Cart.class.php

示例10: DoInstall

 /**
  * Functions DoInstall and DoUninstall are
  * All other functions are optional
  */
 function DoInstall()
 {
     global $APPLICATION, $step, $arResult;
     if (!in_array('curl', get_loaded_extensions())) {
         $APPLICATION->ThrowException(GetMessage("INTAROCRM_CURL_ERR"));
         return false;
     }
     if (!date_default_timezone_get()) {
         if (!ini_get('date.timezone')) {
             $APPLICATION->ThrowException(GetMessage("DATE_TIMEZONE_ERR"));
             return false;
         }
     }
     include $this->INSTALL_PATH . '/../classes/general/RestApi.php';
     include $this->INSTALL_PATH . '/../classes/general/Response/ApiResponse.php';
     include $this->INSTALL_PATH . '/../classes/general/ICrmOrderActions.php';
     include $this->INSTALL_PATH . '/../classes/general/ICMLLoader.php';
     include $this->INSTALL_PATH . '/../classes/general/Exception/InvalidJsonException.php';
     include $this->INSTALL_PATH . '/../classes/general/Exception/CurlException.php';
     include $this->INSTALL_PATH . '/../classes/general/RestNormalizer.php';
     $step = intval($_REQUEST['step']);
     if (file_exists($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/intaro.intarocrm/classes/general/config/options.xml')) {
         $options = simplexml_load_file($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/intaro.intarocrm/classes/general/config/options.xml');
         foreach ($options->contragents->contragent as $contragent) {
             $type["NAME"] = $APPLICATION->ConvertCharset((string) $contragent, 'utf-8', SITE_CHARSET);
             $type["ID"] = (string) $contragent["id"];
             $arResult['contragentType'][] = $type;
             unset($type);
         }
         foreach ($options->fields->field as $field) {
             $type["NAME"] = $APPLICATION->ConvertCharset((string) $field, 'utf-8', SITE_CHARSET);
             $type["ID"] = (string) $field["id"];
             if ($field["group"] == 'custom') {
                 $arResult['customFields'][] = $type;
             } elseif (!$field["group"]) {
                 $arResult['orderProps'][] = $type;
             } else {
                 $groups = explode(",", (string) $field["group"]);
                 foreach ($groups as $group) {
                     $type["GROUP"][] = trim($group);
                 }
                 $arResult['legalDetails'][] = $type;
             }
             unset($type);
         }
     }
     if ($step == 11) {
         $arResult['arSites'] = array();
         $rsSites = CSite::GetList($by, $sort, array('ACTIVE' => 'Y'));
         while ($ar = $rsSites->Fetch()) {
             $arResult['arSites'][] = $ar;
         }
         if (count($arResult['arSites']) < 2) {
             $step = 2;
         }
     }
     if ($step <= 1) {
         if (!CModule::IncludeModule("sale")) {
             $arResult['errCode'] = 'ERR_SALE';
         }
         if (!CModule::IncludeModule("iblock")) {
             $arResult['errCode'] = 'ERR_IBLOCK';
         }
         if (!CModule::IncludeModule("catalog")) {
             $arResult['errCode'] = 'ERR_CATALOG';
         }
         $arResult['arSites'] = array();
         $rsSites = CSite::GetList($by, $sort, array('ACTIVE' => 'Y'));
         while ($ar = $rsSites->Fetch()) {
             $arResult['arSites'][] = $ar;
         }
         $APPLICATION->IncludeAdminFile(GetMessage('MODULE_INSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step1.php');
     } else {
         if ($step == 11) {
             //new page
             if (!CModule::IncludeModule("sale")) {
                 $arResult['errCode'] = 'ERR_SALE';
             }
             if (!CModule::IncludeModule("iblock")) {
                 $arResult['errCode'] = 'ERR_IBLOCK';
             }
             if (!CModule::IncludeModule("catalog")) {
                 $arResult['errCode'] = 'ERR_CATALOG';
             }
             if (isset($arResult['errCode']) && $arResult['errCode']) {
                 $APPLICATION->IncludeAdminFile(GetMessage('MODULE_INSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step1.php');
                 return;
             }
             $api_host = htmlspecialchars(trim($_POST[$this->CRM_API_HOST_OPTION]));
             $api_key = htmlspecialchars(trim($_POST[$this->CRM_API_KEY_OPTION]));
             // form correct url
             $api_host = parse_url($api_host);
             if ($api_host['scheme'] != 'https') {
                 $api_host['scheme'] = 'https';
             }
             $api_host = $api_host['scheme'] . '://' . $api_host['host'];
//.........这里部分代码省略.........
开发者ID:Ksenobyte,项目名称:bitrix-module,代码行数:101,代码来源:index.php

示例11: catch

 } catch (\RetailCrm\Exception\CurlException $e) {
     ICrmOrderActions::eventLog('intaro.crm/options.php', 'RetailCrm\\RestApi::*List::CurlException', $e->getCode() . ': ' . $e->getMessage());
     echo CAdminMessage::ShowMessage(GetMessage('ERR_' . $e->getCode()));
 } catch (InvalidArgumentException $e) {
     $badKey = true;
     echo CAdminMessage::ShowMessage(GetMessage('ERR_403'));
 }
 //bitrix orderTypesList -- personTypes
 $dbOrderTypesList = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array());
 if ($arOrderTypesList = $dbOrderTypesList->Fetch()) {
     do {
         $arResult['bitrixOrderTypesList'][] = $arOrderTypesList;
     } while ($arOrderTypesList = $dbOrderTypesList->Fetch());
 }
 //bitrix deliveryTypesList
 $dbDeliveryTypesList = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array());
 if ($arDeliveryTypesList = $dbDeliveryTypesList->Fetch()) {
     do {
         $arResult['bitrixDeliveryTypesList'][] = $arDeliveryTypesList;
     } while ($arDeliveryTypesList = $dbDeliveryTypesList->Fetch());
 }
 // bitrix deliveryServicesList
 $dbDeliveryServicesList = CSaleDeliveryHandler::GetList(array('SORT' => 'ASC', 'NAME' => 'ASC'), array('ACTIVE' => 'Y', 'SITE_ID' => $arResult['arSites'][0]['LID']));
 if ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch()) {
     do {
         $arResult['bitrixDeliveryTypesList'][] = array('ID' => $arDeliveryServicesList['SID'], 'NAME' => $arDeliveryServicesList['NAME']);
     } while ($arDeliveryServicesList = $dbDeliveryServicesList->Fetch());
 }
 //bitrix paymentTypesList
 $dbPaymentTypesList = CSalePaySystem::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"));
 if ($arPaymentTypesList = $dbPaymentTypesList->Fetch()) {
开发者ID:Ksenobyte,项目名称:bitrix-module,代码行数:31,代码来源:options.php

示例12: foreach

?>
<form method="post" action="<?php 
echo $APPLICATION->GetCurPage();
?>
?lang=<?php 
echo LANGUAGE_ID;
?>
" name="ymform">
<?php 
if (CSaleYMHandler::isActive(false)) {
    $tabControl->Begin();
    foreach ($arTabs as $arTab) {
        $tabControl->BeginNextTab();
        $siteSetts = CSaleYMHandler::getSettingsBySiteId($arTab["SITE_ID"]);
        $arDeliveryFilter = array("LID" => $arTab["SITE_ID"], "ACTIVE" => "Y");
        $dbDeliveryList = CSaleDelivery::GetList(array("NAME" => "ASC"), $arDeliveryFilter, false, false, array("ID", "NAME"));
        $arDeliveryList = array();
        while ($arDelivery = $dbDeliveryList->Fetch()) {
            $arDeliveryList[$arDelivery["ID"]] = $arDelivery["NAME"];
        }
        $dbResultList = CSalePersonType::GetList("NAME", "ASC", array("LID" => $arTab["SITE_ID"], "ACTIVE" => "Y"));
        $arPersonTypes = array();
        while ($arPT = $dbResultList->Fetch()) {
            $arPersonTypes[$arPT['ID']] = $arPT['NAME'];
        }
        if (isset($siteSetts["PERSON_TYPE"]) && array_key_exists($siteSetts["PERSON_TYPE"], $arPersonTypes)) {
            $personTypeId = $siteSetts["PERSON_TYPE"];
        } else {
            reset($arPersonTypes);
            $personTypeId = key($arPersonTypes);
        }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:ymarket.php

示例13: foreach

    // разбиваем элементы по разделам
    foreach ($arElements as $arElem)
    {
        $sectionID = $arElem['SECTION_ID'];
        if (!isset($arModifiers[$sectionID]))
        {
            $arModifiers[$sectionID] = array(
                'ID'   => $arElem['SECTION_ID'],
                'NAME' => $arElem['SECTION_NAME']
            );
        }
        $arModifiers[$sectionID]['ITEMS'][] = $arElem;
    }
}

$rsDelivery = CSaleDelivery::GetList(array('SORT' => 'ASC'));
while ($arItem = $rsDelivery->Fetch())
{
    $arDelivery[] = array(
        'ID' => $arItem['ID'],
        'NAME' => $arItem['NAME']
    );
}

$rsOrderProps = CSaleOrderProps::GetList();
while ($arItem = $rsOrderProps->Fetch())
{
    $arOrderProps[] = $arItem;
}

$aTabs = array(
开发者ID:phwb,项目名称:ugraweb.iiko,代码行数:31,代码来源:options.php

示例14: while

    $dbRes = CSaleOrderProps::GetOrderPropsRelations(array("PROPERTY_ID" => $ID, "ENTITY_TYPE" => "D"));
    while ($arRes = $dbRes->Fetch()) {
        $arDeliverySystemID[] = $arRes["ENTITY_ID"];
    }
}
?>
					<option value="" <?php 
echo count($arDeliverySystemID) <= 0 ? "selected" : "";
?>
><?php 
echo GetMessage("SALE_PROPERTY_SELECT_ALL");
?>
</option>
				<?php 
$arDeliveryOptions = array();
$dbResultList = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "ACTIVE", "SORT"));
while ($arDeliverySystem = $dbResultList->Fetch()) {
    $selected = in_array($arDeliverySystem["ID"], $arDeliverySystemID) ? " selected=\"selected\"" : "";
    $arDeliveryOptions[] = "<option value=\"" . intval($arDeliverySystem["ID"]) . "\"" . $selected . ">" . htmlspecialcharsbx($arDeliverySystem["NAME"]) . " [" . $arDeliverySystem["ID"] . "]</option>";
}
$dbDeliveryServices = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), array("SITE_ID" => trim($arPersonType["LID"])));
while ($arDeliveryService = $dbDeliveryServices->GetNext()) {
    $dsName = strlen($arDeliveryService["LID"]) > 0 ? " (" . $arDeliveryService["LID"] . ")" : "";
    foreach ($arDeliveryService["PROFILES"] as $profileId => $arDeliveryProfile) {
        if ($arDeliveryProfile["ACTIVE"] != "Y") {
            continue;
        }
        $id = $arDeliveryService["SID"] . ":" . $profileId;
        $selected = in_array($id, $arDeliverySystemID) ? " selected=\"selected\"" : "";
        $arDeliveryOptions[] = "<option" . $selected . " value=\"" . $id . "\">" . $arDeliveryService["NAME"] . " (" . $arDeliveryProfile["TITLE"] . ") [" . $id . "] " . $dsName . "</option>";
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:order_props_edit.php

示例15: getDeliveryOptions

 protected function getDeliveryOptions($delivery, $price, $weight = 0)
 {
     $arResult = array();
     $locationId = $this->locationMapper->getLocationByCityName($delivery["region"]["name"]);
     if ($locationId > 0) {
         foreach ($this->mapDelivery as $deliveryId => $deliveryType) {
             if ($deliveryType == "") {
                 continue;
             }
             $filter = array("ID" => $deliveryId, "LID" => $this->siteId, "ACTIVE" => "Y", "LOCATION" => $locationId, "+<=ORDER_PRICE_FROM" => $price, "+>=ORDER_PRICE_TO" => $price);
             if (intval($weight) > 0) {
                 $filter["+<=WEIGHT_FROM"] = $weight;
                 $filter["+>=WEIGHT_TO"] = $weight;
             }
             $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), $filter);
             if ($arDelivery = $dbDelivery->Fetch()) {
                 $arDates = $this->getDeliveryDates($arDelivery["PERIOD_FROM"], $arDelivery["PERIOD_TO"], $arDelivery["PERIOD_TYPE"]);
                 if (!empty($arDates)) {
                     $arDeliveryTmp = array("id" => $arDelivery["ID"], "type" => $deliveryType, "serviceName" => substr($arDelivery["NAME"], 0, 50), "price" => round(floatval($arDelivery["PRICE"]), 2), "dates" => $arDates);
                     if ($deliveryType == "PICKUP" && !empty($this->outlets)) {
                         foreach ($this->outlets as $outlet) {
                             $arDeliveryTmp["outlets"][] = array("id" => intval($outlet));
                         }
                     }
                     $arResult[] = $arDeliveryTmp;
                 }
             }
         }
     }
     return $arResult;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:ym_handler.php


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