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


PHP CCatalogGroup::GetListEx方法代码示例

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


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

示例1: getCatalogPrices

 private static function getCatalogPrices()
 {
     if (!isset(self::$catalogPriceCache)) {
         self::$catalogPriceCache = array();
         if (self::$catalogIncluded === null) {
             self::$catalogIncluded = Loader::includeModule('catalog');
         }
         if (self::$catalogIncluded) {
             $rsPrice = CCatalogGroup::GetListEx(array("SORT" => "ASC"), array(), false, false, array("ID", "NAME"));
             while ($price = $rsPrice->Fetch()) {
                 self::$catalogPriceCache[] = $price;
             }
         }
     }
     return self::$catalogPriceCache;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:16,代码来源:comp_parameters.php

示例2: getPrices

 protected function getPrices()
 {
     if ($this->arPrices === null) {
         $this->arPrices = array();
         $rsPrice = \CCatalogGroup::GetListEx(array("SORT" => "ASC"), array(), false, false, array("ID", "NAME", "NAME_LANG", "BASE"));
         while ($price = $rsPrice->Fetch()) {
             $this->arPrices[] = $price;
         }
     }
     return $this->arPrices;
 }
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:11,代码来源:class.php

示例3: CAdminResult

 $dbResultList = new CAdminResult($dbResultList, $sTableID);
 $dbResultList->NavStart();
 $lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("sale_prod_search_nav")));
 $balanceTitle = $storeFromId > 0 ? GetMessage("SOPS_BALANCE") : GetMessage("SOPS_BALANCE2");
 $arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("SOPS_ACTIVE"), "sort" => "ACTIVE", "default" => true), array("id" => "DETAIL_PICTURE", "default" => true, "content" => GetMessage("SPS_FIELD_DETAIL_PICTURE"), "align" => "center"), array("id" => "NAME", "content" => GetMessage("SPS_NAME"), "sort" => "name", "default" => true), array("id" => "QUANTITY", "content" => GetMessage("SOPS_QUANTITY"), "default" => true), array("id" => "BALANCE", "content" => $balanceTitle, "sort" => "", "default" => true, "align" => "right"));
 $arHeaders[] = array("id" => "CODE", "content" => GetMessage("SPS_FIELD_CODE"), "sort" => "code");
 $arHeaders[] = array("id" => "EXTERNAL_ID", "content" => GetMessage("SPS_FIELD_XML_ID"), "sort" => "external_id");
 $arHeaders[] = array("id" => "SHOW_COUNTER", "content" => GetMessage("SPS_FIELD_SHOW_COUNTER"), "sort" => "show_counter", "align" => "right");
 $arHeaders[] = array("id" => "SHOW_COUNTER_START", "content" => GetMessage("SPS_FIELD_SHOW_COUNTER_START"), "sort" => "show_counter_start", "align" => "right");
 $arHeaders[] = array("id" => "PREVIEW_PICTURE", "content" => GetMessage("SPS_FIELD_PREVIEW_PICTURE"), "align" => "right");
 $arHeaders[] = array("id" => "PREVIEW_TEXT", "content" => GetMessage("SPS_FIELD_PREVIEW_TEXT"));
 $arHeaders[] = array("id" => "DETAIL_TEXT", "content" => GetMessage("SPS_FIELD_DETAIL_TEXT"));
 foreach ($arProps as $prop) {
     $arHeaders[] = array("id" => "PROPERTY_" . $prop['ID'], "content" => $prop['NAME'], "align" => $prop["PROPERTY_TYPE"] == 'N' ? "right" : "left", "sort" => $prop["MULTIPLE"] != 'Y' ? "PROPERTY_" . $prop['ID'] : "");
 }
 $rsPrice = CCatalogGroup::GetListEx(array("SORT" => "ASC"), array(), false, false, array("ID", "NAME", "NAME_LANG", "BASE"));
 while ($price = $rsPrice->Fetch()) {
     $arPrices[] = $price;
     $arHeaders[] = array("id" => "PRICE" . $price["ID"], "content" => htmlspecialcharsex(!empty($price["NAME_LANG"]) ? $price["NAME_LANG"] : $price["NAME"]), "default" => $price["BASE"] == 'Y' ? true : false);
 }
 $arHeaders[] = array("id" => "ACT", "content" => GetMessage("SPS_FIELD_ACTION"), "default" => true);
 $lAdmin->AddHeaders($arHeaders);
 $arSelectedFields = $lAdmin->GetVisibleHeaderColumns();
 if (!in_array('ACT', $arSelectedFields)) {
     $arSelectedFields[] = 'ACT';
 }
 $arSelectedProps = array();
 foreach ($arProps as $prop) {
     if ($key = array_search("PROPERTY_" . $prop['ID'], $arSelectedFields)) {
         $arSelectedProps[] = $prop;
         $arSelect[$prop['ID']] = array();
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:cat_store_product_search.php

示例4: GetInheritedPropertyTemplateElementMenuItems


//.........这里部分代码省略.........
					"ONCLICK" => "$action_function('{=iblock.Code}', '$menuID', '$inputID')",
				),
				array(
					"TEXT" => GetMessage("IB_COMPLIB_POPUP_IBLOCK_TEXT"),
					"ONCLICK" => "$action_function('{=iblock.PreviewText}', '$menuID', '$inputID')",
				),
			),
		);
		if (\Freetrix\Main\Loader::includeModule('catalog'))
		{
			$arCatalog = \CCatalogSKU::GetInfoByProductIBlock($iblock_id);
			if (is_array($arCatalog))
			{
				$result["sku_properties"] = array(
					"TEXT" => GetMessage("IB_COMPLIB_POPUP_SKU_PROPERTIES"),
					"MENU" => array(
					),
				);
				$rsProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $arCatalog["IBLOCK_ID"]));
				while($property = $rsProperty->fetch())
				{
					if ($property["PROPERTY_TYPE"] != "F")
					{
						$result["sku_properties"]["MENU"][] = array(
							"TEXT" => $property["NAME"],
							"ONCLICK" => "$action_function('{=concat {=distinct this.catalog.sku.property.".($property["CODE"]!=""? $property["CODE"]: $property["ID"])." \", \"}}', '$menuID', '$inputID')",
						);
					}
				}
				$result["sku_price"] = array(
					"TEXT" => GetMessage("IB_COMPLIB_POPUP_SKU_PRICE"),
					"MENU" => array(),
				);
				$rsPrice = CCatalogGroup::GetListEx(array("SORT"=>"ASC"), array(), false, false, array("ID", "NAME"));
				while ($price = $rsPrice->Fetch())
				{
					if (preg_match("/^[a-zA-Z0-9]+\$/", $price["NAME"]))
					{
						$result["sku_price"]["MENU"][] = array(
							"TEXT" => GetMessage("IB_COMPLIB_POPUP_MIN_PRICE")." ".$price["NAME"],
							"ONCLICK" => "$action_function('{=min this.catalog.sku.price.".$price["NAME"]."}', '$menuID', '$inputID')",
						);
						$result["sku_price"]["MENU"][] = array(
							"TEXT" => GetMessage("IB_COMPLIB_POPUP_MAX_PRICE")." ".$price["NAME"],
							"ONCLICK" => "$action_function('{=max this.catalog.sku.price.".$price["NAME"]."}', '$menuID', '$inputID')",
						);
					}
					else
					{
						$result["sku_price"]["MENU"][] = array(
							"TEXT" => GetMessage("IB_COMPLIB_POPUP_MIN_PRICE")." ".$price["NAME"],
							"ONCLICK" => "$action_function('{=min this.catalog.sku.price.".$price["ID"]."}', '$menuID', '$inputID')",
						);
						$result["sku_price"]["MENU"][] = array(
							"TEXT" => GetMessage("IB_COMPLIB_POPUP_MAX_PRICE")." ".$price["NAME"],
							"ONCLICK" => "$action_function('{=max this.catalog.sku.price.".$price["ID"]."}', '$menuID', '$inputID')",
						);
					}
				}
			}

			$result["catalog"] = array(
				"TEXT" => GetMessage("IB_COMPLIB_POPUP_CATALOG"),
				"MENU" => array(
					array(
						"TEXT" => GetMessage("IB_COMPLIB_POPUP_CATALOG_WEIGHT"),
开发者ID:ASDAFF,项目名称:open_bx,代码行数:67,代码来源:comp_parameters.php

示例5: CrmCheckPath

    return;
}
$arResult['PATH_TO_EXCH1C_INDEX'] = CrmCheckPath('PATH_TO_EXCH1C_INDEX', $arParams['PATH_TO_EXCH1C_INDEX'], $APPLICATION->GetCurPage());
$arResult['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
$arResult['BACK_URL'] = $arParams['PATH_TO_EXCH1C_INDEX'];
$arResult['FORM_ID'] = 'CRM_EXCH1C_CONFIG';
$arResult['FIELDS'] = array();
// <editor-fold defaultstate="collapsed" desc="Catalog import options">
// --> Catalog import options
$arUGroupsEx = array();
$arAction = array("N" => GetMessage("CAT_1C_NONE"), "A" => GetMessage("CAT_1C_DEACTIVATE"), "D" => GetMessage("CAT_1C_DELETE"));
$iblockType = CCrmCatalog::GetCatalogTypeID();
$iblockId = CCrmCatalog::EnsureDefaultExists();
$arPriceType = array();
$arGroup = array();
$rsGroup = CCatalogGroup::GetListEx(array('SORT', 'ASC'), array(), false, false, array('ID', 'NAME', 'NAME_LANG', 'XML_ID'));
while ($arGroup = $rsGroup->Fetch()) {
    $arPriceType[intval($arGroup['ID'])] = '[' . $arGroup['ID'] . '] ' . $arGroup['NAME'] . (empty($arGroup['NAME_LANG']) ? '' : ', ' . $arGroup['NAME_LANG']);
}
unset($arGroup, $rsGroup);
$priceTypeId = intval(COption::GetOptionInt('crm', 'selected_catalog_group_id', 0));
if ($priceTypeId < 1) {
    $arBaseCatalogGroup = CCatalogGroup::GetBaseGroup();
    $priceTypeId = intval($arBaseCatalogGroup['ID']);
    unset($arBaseCatalogGroup);
}
$arAllOptions = array(array("1C_IBLOCK_TYPE", GetMessage("CAT_1C_IBLOCK_TYPE"), $iblockType, array("text", 50), "hidden", 1), array("1C_SITE_LIST", GetMessage("CAT_1C_SITE_LIST"), SITE_ID, array("text", 2), "hidden", 1), array("1C_INTERVAL", GetMessage("CAT_1C_INTERVAL"), "30", array("text", 20), "visible", 1), array("1C_GROUP_PERMISSIONS", GetMessage("CAT_1C_GROUP_PERMISSIONS"), "-", array("mlist", 5, $arUGroupsEx), "hidden", 1), array("1C_ELEMENT_ACTION", GetMessage("CAT_1C_ELEMENT_ACTION"), "D", array("list", $arAction), "visible", 1), array("1C_SECTION_ACTION", GetMessage("CAT_1C_SECTION_ACTION"), "D", array("list", $arAction), "visible", 1), array("1C_FILE_SIZE_LIMIT", GetMessage("CAT_1C_FILE_SIZE_LIMIT"), 200 * 1024, array("text", 20), "hidden", 1), array("1C_USE_CRC", GetMessage("CAT_1C_USE_CRC"), "Y", array("checkbox"), "hidden", 1), array("1C_USE_ZIP", GetMessage("CAT_1C_USE_ZIP"), "Y", array("checkbox"), "hidden", 1), array("1C_USE_IBLOCK_PICTURE_SETTINGS", GetMessage("CAT_1C_USE_IBLOCK_PICTURE_SETTINGS"), "N", array("checkbox"), "hidden", 1), array("1C_GENERATE_PREVIEW", GetMessage("CAT_1C_GENERATE_PREVIEW"), "N", array("checkbox"), "hidden", 1), array("1C_PREVIEW_WIDTH", GetMessage("CAT_1C_PREVIEW_WIDTH"), 100, array("text", 20), "hidden", 1), array("1C_PREVIEW_HEIGHT", GetMessage("CAT_1C_PREVIEW_HEIGHT"), 100, array("text", 20), "hidden", 1), array("1C_DETAIL_RESIZE", GetMessage("CAT_1C_DETAIL_RESIZE"), "N", array("checkbox"), "hidden", 1), array("1C_DETAIL_WIDTH", GetMessage("CAT_1C_DETAIL_WIDTH"), 300, array("text", 20), "hidden", 1), array("1C_DETAIL_HEIGHT", GetMessage("CAT_1C_DETAIL_HEIGHT"), 300, array("text", 20), "hidden", 1), array("1C_USE_OFFERS", GetMessage("CAT_1C_USE_OFFERS"), "N", array("checkbox"), "hidden", 1), array("1C_FORCE_OFFERS", GetMessage("CAT_1C_FORCE_OFFERS"), "N", array("checkbox"), "hidden", 1), array("1C_USE_IBLOCK_TYPE_ID", GetMessage("CAT_1C_USE_IBLOCK_TYPE_ID"), "N", array("checkbox"), "hidden", 1), array("1C_SKIP_ROOT_SECTION", GetMessage("CAT_1C_SKIP_ROOT_SECTION"), "N", array("checkbox"), "hidden", 1), array("1C_TRANSLIT_ON_ADD", GetMessage("CAT_1C_TRANSLIT_ON_ADD"), "N", array("checkbox"), "hidden", 1), array("1C_TRANSLIT_ON_UPDATE", GetMessage("CAT_1C_TRANSLIT_ON_UPDATE"), "N", array("checkbox"), "hidden", 1), array("1C_CRM_CAT_XML_ID", GetMessage("CRM_CATALOG_XML_ID"), "", array("text", 20), "visible", 1), array("selected_catalog_group_id", GetMessage("CRM_SELECTED_CATALOG_GROUP_ID"), $priceTypeId, array("list", $arPriceType), "visible", 1), array("1CE_IBLOCK_ID", GetMessage("CAT_1CE_IBLOCK_ID"), $iblockId, array("text", 50), "hidden", 2), array("1CE_ELEMENTS_PER_STEP", GetMessage("CAT_1CE_ELEMENTS_PER_STEP"), 100, array("text", 5), "visible", 2), array("1CE_INTERVAL", GetMessage("CAT_1CE_INTERVAL"), "30", array("text", 20), "visible", 2), array("1CE_GROUP_PERMISSIONS", GetMessage("CAT_1CE_GROUP_PERMISSIONS"), "-", array("mlist", 5, $arUGroupsEx), "hidden", 2), array("1CE_USE_ZIP", GetMessage("CAT_1CE_USE_ZIP"), "Y", array("checkbox"), "hidden", 2));
if ($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['save'] != "" && check_bitrix_sessid()) {
    for ($i = 0, $intCount = count($arAllOptions); $i < $intCount; $i++) {
        $tabNumber = $arAllOptions[$i][5];
        $name = $arAllOptions[$i][0];
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例6: Add2Basket

function Add2Basket($PRICE_ID, $QUANTITY = 1, $arRewriteFields = array(), $arProductParams = array())
{
	global $APPLICATION;

	$PRICE_ID = intval($PRICE_ID);
	if (0 >= $PRICE_ID)
		return false;
	$QUANTITY = doubleval($QUANTITY);
	if (0 >= $QUANTITY)
		$QUANTITY = 1;

	if (!CModule::IncludeModule("sale"))
		return false;
	if (CModule::IncludeModule("statistic") && array_key_exists('SESS_SEARCHER_ID', $_SESSION) && 0 < intval($_SESSION["SESS_SEARCHER_ID"]))
	{
		$APPLICATION->ThrowException(GetMessage('CATALOG_ERR_SESS_SEARCHER'), "SESS_SEARCHER");
		return false;
	}

	$rsPrices = CPrice::GetList(
		array(),
		array('ID' => $PRICE_ID),
		false,
		false,
		array(
			'ID',
			'PRODUCT_ID',
			'PRICE',
			'CURRENCY',
			'CATALOG_GROUP_ID'
		)
	);
	if (!($arPrice = $rsPrices->Fetch()))
	{
		$APPLICATION->ThrowException(GetMessage('CATALOG_PRODUCT_PRICE_NOT_FOUND'), "NO_PRODUCT_PRICE");
		return false;
	}
	$arPrice['CATALOG_GROUP_NAME'] = '';
	$rsCatGroups = CCatalogGroup::GetListEx(
		array(),
		array('ID' => $arPrice['CATALOG_GROUP_ID']),
		false,
		false,
		array(
			'ID',
			'NAME',
			'NAME_LANG'
		)
	);
	if ($arCatGroup = $rsCatGroups->Fetch())
	{
		$arPrice['CATALOG_GROUP_NAME'] = (!empty($arCatGroup['NAME_LANG']) ? $arCatGroup['NAME_LANG'] : $arCatGroup['NAME']);
	}
	$rsProducts = CCatalogProduct::GetList(
		array(),
		array('ID' => $arPrice["PRODUCT_ID"]),
		false,
		false,
		array(
			'ID',
			'CAN_BUY_ZERO',
			'QUANTITY_TRACE',
			'QUANTITY',
			'WEIGHT',
		)
	);
	if (!($arCatalogProduct = $rsProducts->Fetch()))
		return false;

	$dblQuantity = doubleval($arCatalogProduct["QUANTITY"]);
	$intQuantity = intval($arCatalogProduct["QUANTITY"]);
	$boolQuantity = ('Y' != $arCatalogProduct["CAN_BUY_ZERO"] && 'Y' == $arCatalogProduct["QUANTITY_TRACE"]);
	if ($boolQuantity && 0 >= $dblQuantity)
	{
		$APPLICATION->ThrowException(GetMessage('CATALOG_ERR_PRODUCT_RUN_OUT'), "PRODUCT_RUN_OUT");
		return false;
	}

	$rsItems = CIBlockElement::GetList(
		array(),
		array(
			"ID" => $arPrice["PRODUCT_ID"],
			"ACTIVE" => "Y",
			"ACTIVE_DATE" => "Y",
			"CHECK_PERMISSIONS" => "Y",
			"MIN_PERMISSION" => "R"
		),
		false,
		false,
		array(
			'ID',
			'IBLOCK_ID',
			'NAME',
			'XML_ID',
			'DETAIL_PAGE_URL'
		)
	);
	if (!($arProduct = $rsItems->Fetch()))
	{
		$APPLICATION->ThrowException(GetMessage('CATALOG_ERR_NO_PRODUCT'), "NO_PRODUCT");
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:include.php

示例7: array

        if (!CCatalogGroup::Update($ID, $arFields)) {
            if ($ex = $APPLICATION->GetException()) {
                $lAdmin->AddUpdateError($ex->GetString(), $ID);
            } else {
                $lAdmin->AddUpdateError(GetMessage("ERROR_UPDATING_REC") . " (" . $arFields["ID"] . ", " . $arFields["NAME"] . ", " . $arFields["SORT"] . ")", $ID);
            }
            $DB->Rollback();
        } else {
            $DB->Commit();
        }
    }
}
if (($arID = $lAdmin->GroupAction()) && !$bReadOnly) {
    if ($_REQUEST['action_target'] == 'selected') {
        $arID = array();
        $dbResultList = CCatalogGroup::GetListEx(array($by => $order), $arFilter, false, false, array('ID'));
        while ($arResult = $dbResultList->Fetch()) {
            $arID[] = $arResult['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                @set_time_limit(0);
                $DB->StartTransaction();
                if (!CCatalogGroup::Delete($ID)) {
                    $DB->Rollback();
                    if ($ex = $APPLICATION->GetException()) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:cat_group_admin.php

示例8: foreach

 $boolSep = true;
 $priceQuantityFields = CCatalogCSVSettings::getSettingsFields(CCatalogCSVSettings::FIELDS_PRICE_EXT, true);
 foreach ($allowedPriceQuantityFields as &$fieldName) {
     if (isset($priceQuantityFields[$fieldName])) {
         $arAvailFields[$intCount] = $priceQuantityFields[$fieldName];
         $arAvailFields[$intCount]['sort'] = ($intCount + 1) * 10;
         if ($boolSep) {
             $arAvailFields[$intCount]['SEP'] = GetMessage('CAT_ADM_CSV_EXP_SEP_PRICES');
             $boolSep = false;
         }
         $intCount++;
     }
 }
 unset($fieldName, $priceQuantityFields);
 $priceFields = CCatalogCSVSettings::getSettingsFields(CCatalogCSVSettings::FIELDS_PRICE, true);
 $rsPriceTypes = CCatalogGroup::GetListEx(array('SORT' => 'ASC', 'ID' => 'ASC'), array(), false, false, array('ID', 'NAME', 'NAME_LANG'));
 while ($priceType = $rsPriceTypes->Fetch()) {
     $priceType['NAME_LANG'] = (string) $priceType['NAME_LANG'];
     foreach ($allowedPriceFields as &$fieldName) {
         if (isset($priceFields[$fieldName])) {
             $priceName = $priceType['NAME_LANG'] !== '' ? str_replace(array('#TYPE#', '#NAME#'), array($priceType['NAME'], $priceType['NAME_LANG']), GetMessage('EST_PRICE_TYPE2')) : str_replace("#TYPE#", $priceType['NAME'], GetMessage('EST_PRICE_TYPE'));
             $arAvailFields[$intCount] = $priceFields[$fieldName];
             $arAvailFields[$intCount]['value'] .= '_' . $priceType['ID'];
             $arAvailFields[$intCount]['name'] = $priceName . ': ' . $arAvailFields[$intCount]['name'];
             $arAvailFields[$intCount]['sort'] = ($intCount + 1) * 10;
             if ($boolSep) {
                 $arAvailFields[$intCount]['SEP'] = GetMessage('CAT_ADM_CSV_EXP_SEP_PRICES');
                 $boolSep = false;
             }
             $intCount++;
         }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:csv_new_setup.php

示例9: array

 $arProductsTmpA = $arCatalogsParams;
 for ($i = 0, $intOFListCount = count($offerlists); $i < $intOFListCount; $i++) {
     $xOfferListNode = $offerlists[$i];
     $IBLOCK_XML_ID = $xOfferListNode->GetAttribute($nameUTF['CatalogID']);
     $OFFER_LIST_DESC = $xOfferListNode->GetAttribute($nameUTF['Description']);
     $OFFER_LIST_CURRENCY = $arCurrencies[$xOfferListNode->GetAttribute($nameUTF['Currency'])];
     if (strlen($OFFER_LIST_CURRENCY) <= 0) {
         $OFFER_LIST_CURRENCY = "USD";
     }
     //detect "price type" property
     $props = $xOfferListNode->select_nodes("/" . $nameUTF['PropertyValue']);
     if (!is_object($props[0])) {
         continue;
     }
     $PRICE_TYPE = $props[0]->GetAttribute($nameUTF['Value']);
     $res = CCatalogGroup::GetListEx(array(), array("NAME" => $PRICE_TYPE), false, false, array('ID', 'NAME'));
     if ($arr = $res->Fetch()) {
         $PRICE_ID = $arr["ID"];
     } else {
         $PRICE_ID = CCatalogGroup::Add(array("NAME" => $PRICE_TYPE, "USER_LANG" => array("ru" => $PRICE_TYPE)));
     }
     $arProducts = $arCatalogsParams[$IBLOCK_XML_ID]["arProducts"];
     $arOffers = array();
     $offers = $xOfferListNode->select_nodes("/" . $nameUTF['Offer']);
     for ($j = 0, $intOtOFCount = count($offers); $j < $intOtOFCount; $j++) {
         $xOfferNode = $offers[$j];
         $PRODUCT_XML_ID = $xOfferNode->GetAttribute($nameUTF['ProductId']);
         // we sholdn't go to 'continue', but should search product in DB by XML_ID
         // and in array if absent. Then we'll be able to load only prices without products
         $PRODUCT_ID = 0;
         if (!isset($arProducts[$PRODUCT_XML_ID])) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:commerceml_run.php

示例10: GetBaseGroup

 /**
  * <p>Функция возвращает код и внутреннее название базового типа цен. Результат работы функции кэшируется, поэтому повторные вызовы этой функции в рамках одной страницы не приводят к дополнительным запросам базы данных.</p> <p>От цены базового типа расчитываются цены других типов, если они указаны с использованием системы наценок. Понятие базового типа цены используется только в административной части и не оказывает влияния на публичную часть. </p>
  *
  *
  *
  *
  * @return array <p>Функция возвращает ассоциативный массив с ключами:</p> <table
  * class="tnormal" width="100%"> <tr> <th width="15%">Ключ</th> <th>Описание</th> </tr> <tr> <td>ID</td>
  * <td>Код базового типа цен.</td> </tr> <tr> <td>NAME</td> <td>Внутреннее название
  * базового типа цен.</td> </tr> <tr> <td>NAME_LANG</td> <td>Базовая цена.</td> </tr> <tr>
  * <td>XML_ID</td> <td>XML ID базовой цены.</td> </tr> </table> <br><br>
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/catalog/classes/ccataloggroup/ccataloggroup__getbasegroup.e06a3542.php
  * @author Bitrix
  */
 public static function GetBaseGroup()
 {
     if (empty(self::$arBaseGroupCache) && is_array(self::$arBaseGroupCache)) {
         $rsGroups = CCatalogGroup::GetListEx(array(), array('BASE' => 'Y'), false, false, array('ID', 'NAME', 'NAME_LANG', 'XML_ID'));
         if ($arGroup = $rsGroups->Fetch()) {
             $arGroup['ID'] = intval($arGroup['ID']);
             $arGroup['NAME_LANG'] = strval($arGroup['NAME_LANG']);
             $arGroup['XML_ID'] = strval($arGroup['XML_ID']);
             self::$arBaseGroupCache = $arGroup;
         } else {
             self::$arBaseGroupCache = false;
         }
         if (defined('CATALOG_GLOBAL_VARS') && 'Y' == CATALOG_GLOBAL_VARS) {
             global $CATALOG_BASE_GROUP;
             $CATALOG_BASE_GROUP = self::$arBaseGroupCache;
         }
     }
     return self::$arBaseGroupCache;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:35,代码来源:cataloggroup.php

示例11: OrderProduct


//.........这里部分代码省略.........
		{
			CCatalogDiscountSave::ClearDiscountUserID();
		}

		if (empty($arPrice))
		{
			return $arResult;
		}

		$arDiscountList = array();
		$arCouponList = array();

		if (!empty($arPrice["DISCOUNT_LIST"]))
		{
			foreach ($arPrice["DISCOUNT_LIST"] as &$arOneDiscount)
			{
				$arOneList = array(
					'ID' => $arOneDiscount['ID'],
					'NAME' => $arOneDiscount['NAME'],
					'COUPON' => '',
					'COUPON_TYPE' => '',
					'MODULE_ID' => (isset($oneDiscount['MODULE_ID']) ? $oneDiscount['MODULE_ID'] : 'catalog'),
					'TYPE' => $arOneDiscount['TYPE'],
					'VALUE' => $arOneDiscount['VALUE'],
					'VALUE_TYPE' => $arOneDiscount['VALUE_TYPE'],
					'CURRENCY' => $arOneDiscount['CURRENCY'],
					'HANDLERS' => (isset($arOneDiscount['HANDLERS']) ? $arOneDiscount['HANDLERS'] : array())
				);

				if ($arOneDiscount['COUPON'])
				{
					$arOneList['COUPON'] = $arOneDiscount['COUPON'];
					$arOneList['COUPON_TYPE'] = $arOneDiscount['COUPON_ONE_TIME'];
					$arCouponList[] = $arOneDiscount['COUPON'];
				}

				$arDiscountList[] = $arOneList;
			}
			unset($arOneList, $arOneDiscount);
		}

		if (empty($arPrice["PRICE"]["CATALOG_GROUP_NAME"]))
		{
			if (!empty($arPrice["PRICE"]["CATALOG_GROUP_ID"]))
			{
				$rsCatGroups = CCatalogGroup::GetListEx(array(),array('ID' => $arPrice["PRICE"]["CATALOG_GROUP_ID"]),false,false,array('ID','NAME','NAME_LANG'));
				if ($arCatGroup = $rsCatGroups->Fetch())
				{
					$arPrice["PRICE"]["CATALOG_GROUP_NAME"] = (!empty($arCatGroup['NAME_LANG']) ? $arCatGroup['NAME_LANG'] : $arCatGroup['NAME']);
				}
			}
		}

		$arResult = array(
			"PRODUCT_PRICE_ID" => $arPrice["PRICE"]["ID"],
			'BASE_PRICE' => $arPrice['RESULT_PRICE']['BASE_PRICE'],
			"PRICE" => $arPrice['RESULT_PRICE']['DISCOUNT_PRICE'],
			"VAT_RATE" => $arPrice['PRICE']['VAT_RATE'],
			"CURRENCY" => $arPrice['RESULT_PRICE']['CURRENCY'],
			"WEIGHT" => (float)$arCatalogProduct["WEIGHT"],
			"DIMENSIONS" => serialize(array(
				"WIDTH" => $arCatalogProduct["WIDTH"],
				"HEIGHT" => $arCatalogProduct["HEIGHT"],
				"LENGTH" => $arCatalogProduct["LENGTH"]
			)),
			"NAME" => $arProduct["~NAME"],
			"CAN_BUY" => "Y",
			"DETAIL_PAGE_URL" => $arProduct['~DETAIL_PAGE_URL'],
			"NOTES" => $arPrice["PRICE"]["CATALOG_GROUP_NAME"],
			"DISCOUNT_PRICE" => $arPrice['RESULT_PRICE']['DISCOUNT'],
			"TYPE" => ($arCatalogProduct["TYPE"] == CCatalogProduct::TYPE_SET) ? CCatalogProductSet::TYPE_SET : NULL,
			"DISCOUNT_VALUE" => ($arPrice['RESULT_PRICE']['PERCENT'] > 0 ? $arPrice['RESULT_PRICE']['PERCENT'].'%' : 0),
			"DISCOUNT_NAME" => "",
			"DISCOUNT_COUPON" => "",
			"DISCOUNT_LIST" => array()
		);

		if ($arParams["CHECK_QUANTITY"] == "Y")
			$arResult["QUANTITY"] = $quantity;
		else
			$arResult["QUANTITY"] = $arParams["QUANTITY"];

		if (!empty($arPrice["DISCOUNT_LIST"]))
		{
			$arResult['DISCOUNT_LIST'] = $arDiscountList;
			$arResult["DISCOUNT_NAME"] = "[".$arPrice["DISCOUNT"]["ID"]."] ".$arPrice["DISCOUNT"]["NAME"];

			if (!empty($arPrice["DISCOUNT"]["COUPON"]))
			{
				$arResult["DISCOUNT_COUPON"] = $arPrice["DISCOUNT"]["COUPON"];
			}

			if (!empty($arCouponList))
			{
				$mxApply = CCatalogDiscountCoupon::CouponApply($intUserID, $arCouponList);
			}
		}

		return $arResult;
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:101,代码来源:product_provider.php

示例12: array

	return;

$arIBlockType = CIBlockParameters::GetIBlockTypes();

$arIBlock=array();
$rsIBlock = CIBlock::GetList(array("sort" => "asc"), array("TYPE" => $arCurrentValues["IBLOCK_TYPE"], "ACTIVE"=>"Y"));
while($arr=$rsIBlock->Fetch())
{
	$arIBlock[$arr["ID"]] = "[".$arr["ID"]."] ".$arr["NAME"];
}

// Prices
$catalogGroupIterator = CCatalogGroup::GetListEx(
	array("NAME" => "ASC", "SORT" => "ASC"),
	array(),
	false,
	false,
	array('ID', 'NAME', 'NAME_LANG')
);
$catalogGroups = array();
while ($catalogGroup = $catalogGroupIterator->Fetch())
{
	$catalogGroups[$catalogGroup['NAME']] = "[{$catalogGroup['NAME']}] {$catalogGroup['NAME_LANG']}";
}

$arAscDesc = array(
	"asc" => GetMessage("CVP_SORT_ASC"),
	"desc" => GetMessage("CVP_SORT_DESC"),
);

$showFromSection = isset($arCurrentValues['SHOW_FROM_SECTION']) && $arCurrentValues['SHOW_FROM_SECTION'] == 'Y';
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:.parameters.php

示例13: OrderProduct


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

				$arOneList = array(
					'ID' => $arOneDiscount['ID'],
					'NAME' => $arOneDiscount['NAME'],
					'COUPON' => '',
					'COUPON_TYPE' => '',
					'MODULE_ID' => 'catalog',
					'TYPE' => $arOneDiscount['TYPE'],
					'VALUE' => $arOneDiscount['VALUE'],
					'VALUE_TYPE' => $arOneDiscount['VALUE_TYPE'],
					'CURRENCY' => $arOneDiscount['CURRENCY'],
					'HANDLERS' => (isset($arOneDiscount['HANDLERS']) ? $arOneDiscount['HANDLERS'] : array())
				);

				if ($arOneDiscount['COUPON'])
				{
					$arOneList['COUPON'] = $arOneDiscount['COUPON'];
					$arOneList['COUPON_TYPE'] = $arOneDiscount['COUPON_ONE_TIME'];
					$arCouponList[] = $arOneDiscount['COUPON'];
				}

				$arDiscountList[] = $arOneList;
			}
			if (isset($arOneDiscount))
				unset($arOneDiscount);

			$currentDiscount = $dblStartPrice - $currentPrice;
		}

		if (empty($arPrice["PRICE"]["CATALOG_GROUP_NAME"]))
		{
			if (!empty($arPrice["PRICE"]["CATALOG_GROUP_ID"]))
			{
				$rsCatGroups = CCatalogGroup::GetListEx(array(),array('ID' => $arPrice["PRICE"]["CATALOG_GROUP_ID"]),false,false,array('ID','NAME','NAME_LANG'));
				if ($arCatGroup = $rsCatGroups->Fetch())
				{
					$arPrice["PRICE"]["CATALOG_GROUP_NAME"] = (!empty($arCatGroup['NAME_LANG']) ? $arCatGroup['NAME_LANG'] : $arCatGroup['NAME']);
				}
			}
		}

		if (!$boolDiscountVat)
		{
			$currentPrice *= (1 + $arPrice['PRICE']['VAT_RATE']);
			$currentDiscount *= (1 + $arPrice['PRICE']['VAT_RATE']);
			$arPrice['PRICE']['VAT_INCLUDED'] = 'Y';
		}


		$arResult = array(
			"PRODUCT_PRICE_ID" => $arPrice["PRICE"]["ID"],
			"PRICE" => $currentPrice,
			"VAT_RATE" => $arPrice['PRICE']['VAT_RATE'],
			"CURRENCY" => $arPrice["PRICE"]["CURRENCY"],
			"WEIGHT" => floatval($arCatalogProduct["WEIGHT"]),
			"DIMENSIONS" => serialize(array(
				"WIDTH" => $arCatalogProduct["WIDTH"],
				"HEIGHT" => $arCatalogProduct["HEIGHT"],
				"LENGTH" => $arCatalogProduct["LENGTH"]
			)),
			"NAME" => $arProduct["~NAME"],
			"CAN_BUY" => "Y",
			"DETAIL_PAGE_URL" => $arProduct['~DETAIL_PAGE_URL'],
			"NOTES" => $arPrice["PRICE"]["CATALOG_GROUP_NAME"],
			"DISCOUNT_PRICE" => $currentDiscount,
			"TYPE" => ($arCatalogProduct["TYPE"] == CCatalogProduct::TYPE_SET) ? CCatalogProductSet::TYPE_SET : NULL,
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:product_provider.php

示例14: init


//.........这里部分代码省略.........
                 if ($row['DEF'] === 'Y') {
                     self::$defaultSiteId = $row['LID'];
                 }
             }
             self::$weightOptions[$row['LID']] = array('unit' => COption::GetOptionString('sale', 'weight_unit', null, $row['LID']), 'koef' => COption::GetOptionInt('sale', 'weight_koef', null, $row['LID']));
         }
         unset($i, $row, $result);
         // hack, add virtual ID field into StatusLang entity for filtering
         $statusEntity = Entity\Base::getInstance('\\Bitrix\\Sale\\Internals\\StatusLang');
         if ($statusEntity instanceof \Bitrix\Main\Entity\Base) {
             $statusEntity->addField(array('data_type' => 'string', 'expression' => array('%s', 'STATUS_ID')), 'ID');
         }
         unset($statusEntity);
         // hack, add virtual REPS_ORDER field into Shipment entity for filtering system records
         $shipmentEntity = Entity\Base::getInstance('\\Bitrix\\Sale\\Internals\\Shipment');
         if ($shipmentEntity instanceof \Bitrix\Main\Entity\Base) {
             $shipmentEntity->addField(array('data_type' => 'Order', 'reference' => array('=ref.ID' => 'this.ORDER_ID', '!=this.SYSTEM' => array('?', 'Y'))), 'REPS_ORDER');
         }
         unset($shipmentEntity);
         // Initializing list of statuses of orders.
         $result = Bitrix\Sale\Internals\StatusLangTable::getList(array('select' => array('STATUS_ID', 'NAME'), 'filter' => array('=LID' => LANGUAGE_ID)));
         while ($row = $result->fetch()) {
             self::$statuslist[$row['STATUS_ID']] = $row['NAME'];
         }
         unset($row, $result);
         self::$genders = array('M' => GetMessage('USER_MALE'), 'F' => GetMessage('USER_FEMALE'));
         // Initializing list of person types.
         $result = Bitrix\Sale\Internals\PersonTypeTable::getList(array('select' => array('ID', 'LID', 'NAME')));
         while ($row = $result->fetch()) {
             self::$personTypes[$row['ID']] = array('LID' => $row['LID'], 'NAME' => $row['NAME']);
         }
         unset($row, $result);
         // Initializing list of pay systems of orders.
         $result = Bitrix\Sale\PaySystemTable::getList(array('select' => array('ID', 'LID', 'NAME')));
         while ($row = $result->fetch()) {
             self::$paySystemList[$row['ID']] = array('value' => $row['NAME'], 'site_id' => $row['LID']);
         }
         unset($row, $result);
         // Initializing list of services and methods of delivery.
         $result = \Bitrix\Sale\Delivery\Services\Table::getList(array('select' => array('ID', 'NAME')));
         while ($row = $result->fetch()) {
             self::$deliveryList[$row['ID']] = array('value' => $row['NAME'], 'site_id' => '');
         }
         unset($row, $result);
         // Obtaining table of correspondences of iblocks to sites.
         $result = Bitrix\Iblock\IblockSiteTable::getList();
         while ($row = $result->fetch()) {
             self::$iblockSite[$row['SITE_ID']][] = $row['IBLOCK_ID'];
         }
         unset($row, $result);
         // Obtaining the list of iblocks which are directories and filling
         // a property $catalogSections with sections of these units.
         $ent = new CCatalog();
         $result = $ent->GetList();
         while ($ibRow = $result->Fetch()) {
             // Obtaining list of sections of the catalog.
             self::$catalogs[] = $ibRow;
             $path = array();
             $curLevel = $prevLevel = 0;
             $sections = CIBlockSection::GetTreeList(array('=IBLOCK_ID' => $ibRow['IBLOCK_ID']));
             $row = null;
             while ($row = $sections->GetNext()) {
                 // Formation of an array of identifiers of current and parent sections.
                 $curLevel = $row['DEPTH_LEVEL'];
                 for ($i = 0; $i <= $prevLevel - $curLevel; $i++) {
                     array_pop($path);
                 }
                 array_push($path, $row['ID']);
                 $prevLevel = $curLevel;
                 self::$catalogSections[$row['ID']] = array('name' => ltrim(str_repeat(' . ', $curLevel) . $row['NAME']), 'path' => $path, 'catalog' => array('ID' => $ibRow['ID'], 'NAME' => $ibRow['NAME']));
             }
         }
         unset($ent, $ibRow, $row, $sections, $result);
         // Initialization of the list of warehouses.
         $result = Bitrix\Catalog\StoreTable::getList(array('select' => array('ID', 'TITLE')));
         while ($row = $result->fetch()) {
             self::$productStores[$row['ID']] = $row['TITLE'];
         }
         unset($row, $result);
         // Getting currencies
         $obj = new CCurrency();
         $by = '';
         $order = '';
         $result = $obj->GetList($by, $order, LANGUAGE_ID);
         while ($row = $result->Fetch()) {
             self::$currencies[$row['CURRENCY']] = array('name' => $row['FULL_NAME']);
         }
         unset($row, $result, $obj, $by, $order);
         // Getting types of prices
         $obj = new CCatalogGroup();
         $result = $obj->GetListEx(array('SORT'), array(), false, false, array('ID', 'NAME', 'BASE', 'NAME_LANG'));
         while ($row = $result->Fetch()) {
             self::$priceTypes[$row['ID']] = array('name' => empty($row['NAME_LANG']) ? $row['NAME'] : $row['NAME_LANG'], 'base' => $row['BASE'] === 'Y' ? true : false);
         }
         unset($row, $result, $obj);
         // Getting option, which means, it is necessary to display a fractional quantity of goods of no.
         self::$fDecimalQuant = COption::GetOptionString('sale', 'QUANTITY_FACTORIAL') == 'Y';
         self::initOwners();
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:sale_report_helper.php

示例15: GetBaseGroup

	/**
	 * <p>Функция возвращает код и внутреннее название базового типа цен. Результат работы функции кэшируется, поэтому повторные вызовы этой функции в рамках одной страницы не приводят к дополнительным запросам базы данных.</p> <p>От цены базового типа расчитываются цены других типов, если они указаны с использованием системы наценок. Понятие базового типа цены используется только в административной части и не оказывает влияния на публичную часть. </p>
	 *
	 *
	 *
	 *
	 * @return array <p>Функция возвращает ассоциативный массив с ключами:</p><table
	 * class="tnormal" width="100%"> <tr> <th width="15%">Ключ</th> <th>Описание</th> </tr> <tr> <td>ID</td>
	 * <td>Код базового типа цен.</td> </tr> <tr> <td>NAME</td> <td>Внутреннее название
	 * базового типа цен.</td> </tr> </table><br><br>
	 *
	 * @static
	 * @link http://dev.1c-bitrix.ru/api_help/catalog/classes/ccataloggroup/ccataloggroup__getbasegroup.e06a3542.php
	 * @author Bitrix
	 */
	public static function GetBaseGroup()
	{
		global $CATALOG_BASE_GROUP;
		if (!isset($CATALOG_BASE_GROUP) || empty($CATALOG_BASE_GROUP) || !is_array($CATALOG_BASE_GROUP))
		{
			$rsGroups = CCatalogGroup::GetListEx(array(), array('BASE' => 'Y'), false, false, array('ID', 'NAME', 'NAME_LANG', 'XML_ID'));
			if ($arGroup = $rsGroups->Fetch())
			{
				$arGroup['ID'] = intval($arGroup['ID']);
				$arGroup['NAME_LANG'] = strval($arGroup['NAME_LANG']);
				$arGroup['XML_ID'] = strval($arGroup['XML_ID']);

				$CATALOG_BASE_GROUP = $arGroup;
			}
			else
			{
				if (isset($CATALOG_BASE_GROUP))
					unset($CATALOG_BASE_GROUP);
				return false;
			}
		}
		return $CATALOG_BASE_GROUP;
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:38,代码来源:cataloggroup.php


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