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


PHP CSaleDeliveryHandler::GetList方法代码示例

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


在下文中一共展示了CSaleDeliveryHandler::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: ExecuteModuleEventEx

     ExecuteModuleEventEx($arEvent, array(&$arResult, &$arUserResult, &$arParams));
 }
 /* Order Props End */
 //delete prop for text location
 if (count($arDeleteFieldLocation) > 0) {
     foreach ($arDeleteFieldLocation as $fieldId) {
         unset($arResult["ORDER_PROP"]["USER_PROPS_Y"][$fieldId]);
     }
 }
 /* Delivery Begin */
 if (IntVal($arUserResult["DELIVERY_LOCATION"]) > 0) {
     $arFilter = array("COMPABILITY" => array("WEIGHT" => $arResult["ORDER_WEIGHT"], "PRICE" => $arResult["ORDER_PRICE"], "LOCATION_FROM" => COption::GetOptionString('sale', 'location', false, SITE_ID), "LOCATION_TO" => $arUserResult["DELIVERY_LOCATION"], "LOCATION_ZIP" => $arUserResult["DELIVERY_LOCATION_ZIP"], "MAX_DIMENSIONS" => $arResult["MAX_DIMENSIONS"], "ITEMS" => $arResult["BASKET_ITEMS"]));
     $bFirst = true;
     $arDeliveryServiceAll = array();
     $bFound = false;
     $rsDeliveryServicesList = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), $arFilter);
     while ($arDeliveryService = $rsDeliveryServicesList->Fetch()) {
         if (!is_array($arDeliveryService) || !is_array($arDeliveryService["PROFILES"])) {
             continue;
         }
         if (!empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") !== false) {
             foreach ($arDeliveryService["PROFILES"] as $profile_id => $arDeliveryProfile) {
                 if ($arDeliveryProfile["ACTIVE"] == "Y") {
                     $delivery_id = $arDeliveryService["SID"];
                     if ($arUserResult["DELIVERY_ID"] == $delivery_id . ":" . $profile_id) {
                         $bFound = true;
                     }
                 }
             }
         }
         $arDeliveryServiceAll[] = $arDeliveryService;
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:component.php

示例3: ShowStep

    function ShowStep()
    {
        $wizard =& $this->GetWizard();
        $shopLocalization = $wizard->GetVar("shopLocalization", true);
        $personType = $wizard->GetVar("personType");
        $arAutoDeliveries = array();
        if (CModule::IncludeModule("sale")) {
            $dbDelivery = CSaleDeliveryHandler::GetList();
            while ($arDelivery = $dbDelivery->Fetch()) {
                $arAutoDeliveries[$arDelivery["SID"]] = $arDelivery["ACTIVE"];
            }
        }
        $siteID = WizardServices::GetCurrentSiteID($wizard->GetVar("siteID"));
        $this->content .= '<div class="wizard-input-form">';
        $this->content .= '
		<div class="wizard-input-form-block">
			<div class="wizard-catalog-title">' . GetMessage("WIZ_PAY_SYSTEM_TITLE") . '</div>
			<div>
				<div class="wizard-input-form-field wizard-input-form-field-checkbox">
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField('paysystem[cash]', 'Y', array("id" => "paysystemC")) . ' <label for="paysystemC">' . GetMessage("WIZ_PAY_SYSTEM_C") . '</label>
					</div>';
        if (LANGUAGE_ID == "ru") {
            if ($shopLocalization == "ua" && ($personType["fiz"] == "Y" || $personType["fiz_ua"] == "Y")) {
                $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('paysystem[oshad]', 'Y', array("id" => "paysystemO")) . ' <label for="paysystemS">' . GetMessage("WIZ_PAY_SYSTEM_O") . '</label>
							</div>';
            }
            if ($shopLocalization == "ru") {
                if ($personType["fiz"] == "Y") {
                    $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('paysystem[sber]', 'Y', array("id" => "paysystemS")) . ' <label for="paysystemS">' . GetMessage("WIZ_PAY_SYSTEM_S") . '</label>
								</div>';
                }
                if ($personType["fiz"] == "Y" || $personType["ur"] == "Y") {
                    $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('paysystem[collect]', 'Y', array("id" => "paysystemCOL")) . ' <label for="paysystemCOL">' . GetMessage("WIZ_PAY_SYSTEM_COL") . '</label>
								</div>';
                }
            }
            if ($personType["ur"] == "Y") {
                $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('paysystem[bill]', 'Y', array("id" => "paysystemB")) . ' <label for="paysystemB">';
                if ($shopLocalization == "ua") {
                    $this->content .= GetMessage("WIZ_PAY_SYSTEM_B_UA");
                } else {
                    $this->content .= GetMessage("WIZ_PAY_SYSTEM_B");
                }
                $this->content .= '</label>
							</div>';
            }
        } else {
            $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('paysystem[paypal]', 'Y', array("id" => "paysystemP")) . ' <label for="paysystemP">PayPal</label>
						</div>';
        }
        $this->content .= '</div>
			</div>
			<div class="wizard-catalog-form-item">' . GetMessage("WIZ_PAY_SYSTEM") . '</div>
		</div>';
        if (LANGUAGE_ID != "ru" || LANGUAGE_ID == "ru" && (COption::GetOptionString("youstore", "wizard_installed", "N", $siteID) != "Y" || $shopLocalization == "ru" && ($arAutoDeliveries["russianpost"] != "Y" || $arAutoDeliveries["rus_post"] != "Y" || $arAutoDeliveries["rus_post_first"] != "Y") || $shopLocalization == "ua" && $arAutoDeliveries["ua_post"] != "Y" || $shopLocalization == "kz" && $arAutoDeliveries["kaz_post"] != "Y")) {
            $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_DELIVERY_TITLE") . '</div>
				<div>
					<div class="wizard-input-form-field wizard-input-form-field-checkbox">';
            if (COption::GetOptionString("youstore", "wizard_installed", "N", $siteID) != "Y") {
                $this->content .= '<div class="wizard-catalog-form-item">
								' . $this->ShowCheckboxField('delivery[courier]', 'Y', array("id" => "deliveryC")) . ' <label for="deliveryC">' . GetMessage("WIZ_DELIVERY_C") . '</label>
							</div>
							<div class="wizard-catalog-form-item">
								' . $this->ShowCheckboxField('delivery[self]', 'Y', array("id" => "deliveryS")) . ' <label for="deliveryS">' . GetMessage("WIZ_DELIVERY_S") . '</label>
							</div>';
            }
            if (LANGUAGE_ID == "ru") {
                if ($shopLocalization == "ru") {
                    if ($arAutoDeliveries["russianpost"] != "Y") {
                        $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[russianpost]', 'Y', array("id" => "deliveryR")) . ' <label for="deliveryR">' . GetMessage("WIZ_DELIVERY_R") . '</label>
										</div>';
                    }
                    if ($arAutoDeliveries["rus_post"] != "Y") {
                        $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[rus_post]', 'Y', array("id" => "deliveryR2")) . ' <label for="deliveryR2">' . GetMessage("WIZ_DELIVERY_R2") . '</label>
										</div>';
                    }
                    if ($arAutoDeliveries["rus_post_first"] != "Y") {
                        $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[rus_post_first]', 'Y', array("id" => "deliveryRF")) . ' <label for="deliveryRF">' . GetMessage("WIZ_DELIVERY_RF") . '</label>
										</div>';
                    }
                } elseif ($shopLocalization == "ua") {
                    if ($arAutoDeliveries["ua_post"] != "Y") {
                        $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[ua_post]', 'Y', array("id" => "deliveryU")) . ' <label for="deliveryU">' . GetMessage("WIZ_DELIVERY_UA") . '</label>
										</div>';
                    }
                } elseif ($shopLocalization == "kz") {
                    if ($arAutoDeliveries["kaz_post"] != "Y") {
                        $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[kaz_post]', 'Y', array("id" => "deliveryK")) . ' <label for="deliveryK">' . GetMessage("WIZ_DELIVERY_KZ") . '</label>
										</div>';
                    }
                }
            } else {
                $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[dhl]', 'Y', array("id" => "deliveryD")) . ' <label for="deliveryD">DHL</label>
								</div>';
                $this->content .= '<div class="wizard-catalog-form-item">' . $this->ShowCheckboxField('delivery[ups]', 'Y', array("id" => "deliveryU")) . ' <label for="deliveryU">UPS</label>
								</div>';
            }
//.........这里部分代码省略.........
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:101,代码来源:wizard.php

示例4: ShowStep

 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $arResult = $wizard->GetVars(true);
     $dbSite = CSite::GetByID($arResult["siteID"]);
     $arSite = $dbSite->GetNext();
     CModule::IncludeModule("currency");
     $dbCurrency = CCurrency::GetList($b = "SORT", $o = "ASC", $arResult["siteID"]);
     while ($arCur = $dbCurrency->GetNext()) {
         $arCurrency[$arCur["CURRENCY"]] = $arCur["FULL_NAME"];
     }
     $dbUGroup = CGroup::GetList($b = "c_sort", $o = "ASC", array("ACTIVE" => "Y"));
     while ($arUGroup = $dbUGroup->GetNext()) {
         $arGroups[$arUGroup["ID"]] = $arUGroup["NAME"];
     }
     CModule::IncludeModule("sale");
     $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $arResult["siteID"]));
     while ($arPersonType = $dbPersonType->GetNext()) {
         $arPersons[$arPersonType["ID"]] = $arPersonType["NAME"];
     }
     $dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y", "LID" => $arResult["siteID"]));
     while ($arPaySystem = $dbPaySystem->GetNext()) {
         $arPaySystems[$arPaySystem["ID"]] = $arPaySystem["NAME"];
     }
     $dbDelivery = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), array("SITE_ID" => $arResult["siteID"], "ACTIVE" => "Y"));
     while ($arDelivery = $dbDelivery->GetNext()) {
         $arDeliveries[$arDelivery["SID"] . "_new"] = $arDelivery["NAME"] . " " . GetMessage("WW_STEP8_1");
     }
     $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"), array("LID" => $arResult["siteID"], "ACTIVE" => "Y"));
     while ($arDelivery = $dbDelivery->GetNext()) {
         $arDeliveries[$arDelivery["ID"]] = $arDelivery["NAME"];
     }
     $this->content = GetMessage("WW_2") . "<br />";
     $this->content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"/bitrix/wizards/bitrix/sale.install/styles.css\">";
     $this->content .= "<table class=\"data-table\">";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_2") . "</th><td>[" . $arSite["ID"] . "] " . $arSite["NAME"] . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_3") . "</th><td>" . $arResult["orderEmail"] . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_STEP1_5") . "</th><td>" . $arResult["currencyID"] . " (" . $arCurrency[$arResult["currencyID"]] . ")" . "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_3") . "</th><td>";
     foreach ($arResult["groupID"] as $v) {
         $this->content .= $arGroups[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_4") . "</th><td>";
     foreach ($arResult["personType"] as $v) {
         $this->content .= $arPersons[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_5") . "</th><td>";
     $arPS = array();
     foreach ($arResult["paySystem"] as $v) {
         if (!empty($v)) {
             foreach ($v as $v1) {
                 if (!in_array($v1, $arPS)) {
                     $arPS[] = $v1;
                 }
             }
         }
     }
     foreach ($arPS as $v) {
         $this->content .= $arPaySystems[$v] . "<br />";
     }
     $this->content .= "</td></tr>";
     $this->content .= "<tr><th>" . GetMessage("WW_6") . "</th><td>";
     if (!empty($arResult["delivery"])) {
         foreach ($arResult["delivery"] as $v) {
             $this->content .= $arDeliveries[$v] . "<br />";
         }
     }
     $this->content .= "</td></tr>";
     $this->content .= "</table>";
 }
开发者ID:Satariall,项目名称:izurit,代码行数:72,代码来源:wizard.php

示例5: ob_get_contents

			</tr>
<?php 
        $obDelivery = ob_get_contents();
        ob_end_clean();
        ob_start();
        ?>
				<td width="40%" align="right">
					<?php 
        echo GetMessage("SOE_DELIVERY_COM");
        ?>
:
				</td>
				<td width="60%">
<?php 
        $arFilter = array("SITE_ID" => $str_LID);
        $dbDeliveries = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), $arFilter);
        $arDeliveries = array();
        while ($arDelivery = $dbDeliveries->GetNext()) {
            $bUseDeliveryHandlers = true;
            $arDeliveries[$arDelivery["SID"]] = $arDelivery;
        }
        ?>
					<select name="DELIVERY_ID_handler" OnChange="recalcDelivery(this.value)">
						<option value="">(<?php 
        echo GetMessage("SOE_NO");
        ?>
)</option>
						<?php 
        foreach ($arDeliveries as $SID => $arDelivery) {
            foreach ($arDelivery["PROFILES"] as $profile_id => $arProfile) {
                $DELIVERY_ID = $SID . ":" . $profile_id;
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

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

示例7: array

    }
}
// RELATION SETTINGS ///////////////////////////////////////////////////////////////////////////////////////////////////
// payment system options
$paymentOptions = array('' => Loc::getMessage('SALE_PROPERTY_SELECT_ALL'));
$result = CSalePaySystem::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "ACTIVE", "SORT", "LID"));
while ($row = $result->Fetch()) {
    $paymentOptions[$row['ID']] = $row['NAME'] . ($row['LID'] ? " ({$row['LID']}) " : ' ') . "[{$row['ID']}]";
}
// delivery system options
$deliveryOptions = array('' => Loc::getMessage('SALE_PROPERTY_SELECT_ALL'));
$result = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "ACTIVE", "SORT"));
while ($row = $result->Fetch()) {
    $deliveryOptions[$row['ID']] = $row['NAME'] . " [" . $row['ID'] . "]";
}
$result = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), array("SITE_ID" => trim($personType['LID'])));
while ($row = $result->GetNext()) {
    $dsName = $row['LID'] ? " ({$row['LID']})" : '';
    foreach ($row['PROFILES'] as $profileId => $arDeliveryProfile) {
        if ($arDeliveryProfile['ACTIVE'] == 'Y') {
            $id = $row['SID'] . ':' . $profileId;
            $deliveryOptions[$id] = $row['NAME'] . " ({$arDeliveryProfile["TITLE"]}) [{$id}] {$dsName}";
        }
    }
}
$relationsSettings = array('P' => array('TYPE' => 'ENUM', 'LABEL' => Loc::getMessage('SALE_PROPERTY_PAYSYSTEM'), 'OPTIONS' => $paymentOptions, 'MULTIPLE' => 'Y', 'SIZE' => '5'), 'D' => array('TYPE' => 'ENUM', 'LABEL' => Loc::getMessage('SALE_PROPERTY_DELIVERY'), 'OPTIONS' => $deliveryOptions, 'MULTIPLE' => 'Y', 'SIZE' => '5'));
// VALIDATE AND SAVE POST //////////////////////////////////////////////////////////////////////////////////////////////
if ($_SERVER['REQUEST_METHOD'] == 'POST' && (isset($_POST["apply"]) || isset($_POST["save"])) && bitrix_sessid()) {
    // validate property
    foreach ($propertySettings as $name => $input) {
        if ($error = Input\Manager::getError($input, $property[$name])) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:order_props_edit.php

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

示例9: getSyncData

 public static function getSyncData()
 {
     $arD2PS = array();
     $dbD2PS = self::GetList();
     while ($arTmpD2PS = $dbD2PS->Fetch()) {
         $arD2PS[] = $arTmpD2PS;
     }
     static $arPS = null;
     if (is_null($arPS)) {
         $arPS = array();
         $dbPS = CSalePaySystem::GetList();
         while ($arTmpPS = $dbPS->Fetch()) {
             $arPS[] = $arTmpPS;
         }
     }
     static $arDS = null;
     if (is_null($arDS)) {
         $arDS = array();
         $dbDS = CSaleDeliveryHandler::GetList();
         while ($arTmpDS = $dbDS->Fetch()) {
             $arDS[] = $arTmpDS;
         }
         $dbDS = CSaleDelivery::GetList();
         while ($arTmpDS = $dbDS->Fetch()) {
             if (!isset($arTmpDS["SID"])) {
                 $arTmpDS["SID"] = $arTmpDS["ID"];
             }
             $arDS[] = $arTmpDS;
         }
     }
     return array("D2PS" => $arD2PS, "DS" => $arDS, "PS" => $arPS);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:32,代码来源:delivery_2_pay_system.php

示例10: array

}
//Save statuses for Filter form
$dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array("LID" => LANGUAGE_ID));
while ($arStatus = $dbStatus->GetNext()) {
    $arResult["INFO"]["STATUS"][$arStatus["ID"]] = $arStatus;
}
$dbPaySystem = CSalePaySystem::GetList(array("SORT" => "ASC"));
while ($arPaySystem = $dbPaySystem->GetNext()) {
    $arResult["INFO"]["PAY_SYSTEM"][$arPaySystem["ID"]] = $arPaySystem;
}
$dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"));
while ($arDelivery = $dbDelivery->GetNext()) {
    $arResult["INFO"]["DELIVERY"][$arDelivery["ID"]] = $arDelivery;
}
$arResult["INFO"]["DELIVERY_HANDLERS"] = array();
$dbDelivery = CSaleDeliveryHandler::GetList(array(), array(array("SITE_ID" => SITE_ID)));
while ($arDeliveryHandler = $dbDelivery->GetNext()) {
    $arResult["INFO"]["DELIVERY_HANDLERS"][$arDeliveryHandler["SID"]] = $arDeliveryHandler;
}
$arResult["CURRENT_PAGE"] = $APPLICATION->GetCurPage();
//Preparing filter
$arFilter = array();
$arFilter["USER_ID"] = IntVal($USER->GetID());
if (strlen($_REQUEST["del_filter"]) > 0) {
    unset($_REQUEST["filter_id"]);
    unset($_REQUEST["filter_date_from"]);
    unset($_REQUEST["filter_date_to"]);
    unset($_REQUEST["filter_status"]);
    unset($_REQUEST["filter_payed"]);
    unset($_REQUEST["filter_canceled"]);
    $_REQUEST["filter_history"] = "Y";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

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

示例12: array

 //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()) {
     do {
         $arResult['bitrixPaymentTypesList'][] = $arPaymentTypesList;
     } while ($arPaymentTypesList = $dbPaymentTypesList->Fetch());
 }
 //bitrix paymentStatusesList
 $dbPaymentStatusesList = CSaleStatus::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => "ru", "ACTIVE" => "Y"));
 if ($arPaymentStatusesList = $dbPaymentStatusesList->Fetch()) {
开发者ID:Ksenobyte,项目名称:bitrix-module,代码行数:31,代码来源:options.php

示例13: array

<?
if (CModule::IncludeModule('sale') && CModule::IncludeModule('gpwidget')) {
	if ($delivery_names = CGPWidget::GetDeliveryNames()) {
		$delivery_handler_res = CSaleDeliveryHandler::GetList(array(), array('ACTIVE' => 'Y', 'SID' => $delivery_names['SID']));
		if ($delivery_handler_ar = $delivery_handler_res->GetNext()) {
			if (is_array($delivery_handler_ar['PROFILES']) && !empty($delivery_handler_ar['PROFILES'][$delivery_names['PROFILE']])) {
				$delivery = $delivery_handler_ar;
			}
		}
		if ($delivery) {
			$payment_types = CGPWidget::GetPaymentTypes();
			$paysystem_id_res = CSaleDelivery2PaySystem::GetList(array('DELIVERY_ID' => $delivery['SID'], 'DELIVERY_PROFILE_ID' => $delivery_names['PROFILE']));
			while ($paysystem_id_ar = $paysystem_id_res->GetNext()) {
				$paysystem_id_list[] = $paysystem_id_ar['PAYSYSTEM_ID'];
			}
			if (is_array($paysystem_id_list) && !empty($paysystem_id_list)) {
				$paysystem_res = CSalePaySystem::GetList(array(), array("ID" => $paysystem_id_list));
				while ($paysystem_ar = $paysystem_res->GetNext()):
					$name = "paysystem_match_".$paysystem_ar['ID'];
					$val = COption::GetOptionString("gpwidget", $name);
					?>
					<tr>
						<td width="40%" nowrap>
							<label for="<?php 
echo htmlspecialcharsbx($name);
?>
"><?php 
echo $paysystem_ar['NAME'];
?>
 [<?php 
echo $paysystem_ar['ID'];
开发者ID:ASDAFF,项目名称:gpbitrix,代码行数:31,代码来源:options_paysystem.php

示例14: count

?>
					<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>";
    }
}
foreach ($arDeliveryOptions as $optionHTML) {
    echo $optionHTML;
}
?>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:order_props_edit.php

示例15: getDeliveriesInfo

 public static function getDeliveriesInfo($arDeliveryIds)
 {
     if (!is_array($arDeliveryIds)) {
         return false;
     }
     static $arDeliveries = array();
     $arTmpSD = array();
     foreach ($arDeliveryIds as $deliveryId) {
         if (!$deliveryId || is_null($deliveryId)) {
             continue;
         }
         if (!isset($arDeliveries[$deliveryId])) {
             if (strpos($deliveryId, ":") !== false) {
                 $arId = explode(":", $deliveryId);
                 $dbDelivery = CSaleDeliveryHandler::GetList(array(), array("SID" => $arId[0]));
                 if ($arDelivery = $dbDelivery->Fetch()) {
                     $arDeliveries[$deliveryId] = htmlspecialcharsEx($arDelivery["NAME"]);
                     if (strlen($arId[1]) > 0 && isset($arDelivery["PROFILES"][$arId[1]]["TITLE"])) {
                         $arDeliveries[$deliveryId] .= " / " . htmlspecialcharsEx($arDelivery["PROFILES"][$arId[1]]["TITLE"]);
                     }
                 }
             } else {
                 $arTmpSD[] = $deliveryId;
             }
         }
     }
     if (is_array($arTmpSD)) {
         $dbDelivery = CSaleDelivery::GetList(array(), array("ID" => $arTmpSD), false, false, array("ID", "NAME"));
         while ($arDelivery = $dbDelivery->Fetch()) {
             $arDeliveries[$arDelivery["ID"]] = htmlspecialcharsbx($arDelivery["NAME"]);
         }
     }
     return $arDeliveries;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:34,代码来源:mobile_order.php


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