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


PHP CCatalog::GetByIDExt方法代码示例

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


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

示例1: getOfferObject

 public static function getOfferObject(array $offerParams)
 {
     if (!isset($offerParams["IBLOCK_ID"]) || intval($offerParams["IBLOCK_ID"]) <= 0) {
         throw new SystemException("Incorrect iBlock ID  (" . __CLASS__ . "::" . __METHOD__ . ")");
     }
     $arCatalog = \CCatalog::GetByIDExt($offerParams["IBLOCK_ID"]);
     if (empty($arCatalog)) {
         throw new SystemException("IBlock is not catalog. (" . __CLASS__ . "::" . __METHOD__ . ")");
     }
     $catalogType = $arCatalog["CATALOG_TYPE"];
     $catalogTypes = \CCatalogSKU::GetCatalogTypes();
     if (!in_array($catalogType, $catalogTypes)) {
         throw new SystemException("Unknown type of catalog (" . __CLASS__ . "::" . __METHOD__ . ")");
     }
     $result = array();
     switch ($catalogType) {
         case \CCatalogSKU::TYPE_CATALOG:
         case \CCatalogSKU::TYPE_OFFERS:
             $result = new ExportOffer($catalogType, $offerParams);
             break;
         case \CCatalogSKU::TYPE_PRODUCT:
         case \CCatalogSKU::TYPE_FULL:
             $result = new ExportOfferSKU($catalogType, $offerParams);
             break;
     }
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:27,代码来源:exportoffercreator.php

示例2: foreach

     $arWorkflowTemplates = CBPDocument::GetWorkflowTemplatesForDocumentType(array("iblock", "CIBlockDocument", "iblock_" . $ID));
     foreach ($arWorkflowTemplates as $t) {
         $create_bizproc = array_key_exists("create_bizproc_" . $t["ID"], $_REQUEST) && $_REQUEST["create_bizproc_" . $t["ID"]] == "Y";
         $edit_bizproc = array_key_exists("edit_bizproc_" . $t["ID"], $_REQUEST) && $_REQUEST["edit_bizproc_" . $t["ID"]] == "Y";
         $create_bizproc1 = ($t["AUTO_EXECUTE"] & 1) != 0;
         $edit_bizproc1 = ($t["AUTO_EXECUTE"] & 2) != 0;
         if ($create_bizproc != $create_bizproc1 || $edit_bizproc != $edit_bizproc1) {
             CBPDocument::UpdateWorkflowTemplate($t["ID"], array("iblock", "CIBlockDocument", "iblock_" . $ID), array("AUTO_EXECUTE" => ($create_bizproc ? 1 : 0) | ($edit_bizproc ? 2 : 0)), $arErrorsTmp);
         }
     }
 }
 if (!$bVarsFromForm && $bCatalog) {
     $boolNeedAgent = false;
     $boolFlag = true;
     $obCatalog = new CCatalog();
     $arCatalog = $obCatalog->GetByIDExt($ID);
     if (!isset($IS_CATALOG) || 'Y' != $IS_CATALOG && 'N' != $IS_CATALOG) {
         $bVarsFromForm = true;
         $strWarning .= GetMessage('IB_E_OF_ERR_IS_CATALOG') . '<br>';
     }
     if (!isset($SUBSCRIPTION) || 'Y' != $SUBSCRIPTION && 'N' != $SUBSCRIPTION) {
         $bVarsFromForm = true;
         $strWarning .= GetMessage('IB_E_OF_ERR_SUBSCRIPTION') . '<br>';
     }
     if (!$bVarsFromForm) {
         if ('Y' == $IS_CATALOG || 'Y' == $SUBSCRIPTION) {
             if (!isset($YANDEX_EXPORT) || 'Y' != $YANDEX_EXPORT && 'N' != $YANDEX_EXPORT) {
                 $bVarsFromForm = true;
                 $strWarning .= GetMessage('IB_E_OF_ERR_YANDEX_EXPORT') . '<br>';
             }
             if (!isset($VAT_ID)) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.php

示例3: array

 }
 //filter props
 $dbrFProps = CIBlockProperty::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("IBLOCK_ID" => $iblockID, "ACTIVE" => "Y", "FILTRABLE" => "Y", "!PROPERTY_TYPE" => "F", "CHECK_PERMISSIONS" => "N"));
 $arProps = array();
 while ($arProp = $dbrFProps->GetNext()) {
     if (strlen($arProp["USER_TYPE"]) > 0) {
         $arUserType = CIBlockProperty::GetUserType($arProp["USER_TYPE"]);
     } else {
         $arUserType = array();
     }
     $arProp["PROPERTY_USER_TYPE"] = $arUserType;
     $arProps[] = $arProp;
 }
 //filter sku props
 $arSKUProps = array();
 $arCatalog = CCatalog::GetByIDExt($iblockID);
 if ($arCatalog["OFFERS_IBLOCK_ID"] > 0) {
     $dbrFProps = CIBlockProperty::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("IBLOCK_ID" => $arCatalog["OFFERS_IBLOCK_ID"], "ACTIVE" => "Y", "FILTRABLE" => "Y", "!PROPERTY_TYPE" => "F", "CHECK_PERMISSIONS" => "N"));
     while ($arProp = $dbrFProps->GetNext()) {
         if (strlen($arProp["USER_TYPE"]) > 0) {
             $arUserType = CIBlockProperty::GetUserType($arProp["USER_TYPE"]);
         } else {
             $arUserType = array();
         }
         $arProp["PROPERTY_USER_TYPE"] = $arUserType;
         $arSKUProps[] = $arProp;
     }
 }
 $arFilter = array("WF_PARENT_ELEMENT_ID" => false, "IBLOCK_ID" => $IBLOCK_ID, "SECTION_ID" => $filter_section, "ACTIVE" => $filter_active, "%NAME" => $filter_product_name, "%SEARCHABLE_CONTENT" => $filter_intext, "SHOW_NEW" => "Y");
 if (count($arProps) > 0) {
     foreach ($arProps as $arProp) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:product_search.php

示例4: array

$arSelectedPropTypes = array('S','N','L','E','G');
$arOffersSelectKeys = array(
	YANDEX_SKU_EXPORT_ALL,
	YANDEX_SKU_EXPORT_MIN_PRICE,
	YANDEX_SKU_EXPORT_PROP,
);
$arCondSelectProp = array(
	'ZERO',
	'NONZERO',
	'EQUAL',
	'NONEQUAL',
);
$arPropertyMap = array();
$arSKUExport = array();

$arCatalog = CCatalog::GetByIDExt($IBLOCK_ID);
if (empty($arCatalog))
{
	$arRunErrors[] = str_replace('#ID#', $IBLOCK_ID, GetMessage('YANDEX_ERR_NO_IBLOCK_IS_CATALOG'));
}
else
{
	$arOffers = CCatalogSKU::GetInfoByProductIBlock($IBLOCK_ID);
	if (!empty($arOffers['IBLOCK_ID']))
	{
		$intOfferIBlockID = $arOffers['IBLOCK_ID'];
		$rsOfferIBlocks = CIBlock::GetByID($intOfferIBlockID);
		if (($arOfferIBlock = $rsOfferIBlocks->Fetch()))
		{
			$boolOffers = true;
			$rsProps = CIBlockProperty::GetList(array('SORT' => 'ASC'),array('IBLOCK_ID' => $intOfferIBlockID,'ACTIVE' => 'Y'));
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:31,代码来源:yandex_run.php

示例5: define

);

define("MODULE_ID", "iblock");
define("ENTITY", "CIBlockDocument");
define("DOCUMENT_TYPE", "iblock_".$IBLOCK_ID);

$bCatalog = CModule::IncludeModule("catalog");
$arCatalog = false;
$boolSKU = false;
$boolSKUFiltrable = false;
$strSKUName = '';
$uniq_id = 0;

if ($bCatalog)
{
	$arCatalog = CCatalog::GetByIDExt($arIBlock["ID"]);
	if (false == is_array($arCatalog))
	{
		$bCatalog = false;
	}
	else
	{
		if ($arCatalog['CATALOG_TYPE'] == 'P' || $arCatalog['CATALOG_TYPE'] == 'X')
		{
			if (CIBlockRights::UserHasRightTo($arCatalog['OFFERS_IBLOCK_ID'], $arCatalog['OFFERS_IBLOCK_ID'], "iblock_admin_display"))
			{
				$boolSKU = true;
				$strSKUName = GetMessage('IBEL_A_OFFERS');
			}
		}
		if ('P' == $arCatalog['CATALOG_TYPE'])
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:iblock_element_admin.php

示例6: Array

        );

        $hintUnit = Array(
            'length' => 'mm',
            'mass' => 'g'
        );

        $boolAll = false;
        $intCountChecked = 0;
        $intCountAvailIBlock = 0;
        $arIBlockList = array();
        $db_res = CIBlock::GetList(Array("IBLOCK_TYPE"=>"ASC", "NAME"=>"ASC"),array('CHECK_PERMISSIONS' => 'Y','MIN_PERMISSION' => 'W'));

        while ($iblock = $db_res->Fetch())
        {
                if ($arCatalog = CCatalog::GetByIDExt($iblock["ID"]))
                {
                        if($arCatalog['CATALOG_TYPE'] == "D" || $arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
                        {
                            $propertiesSKU = null;
                            if ($arCatalog['CATALOG_TYPE'] == "X" || $arCatalog['CATALOG_TYPE'] == "P")
                            {
                                $iblockOffer = CCatalogSKU::GetInfoByProductIBlock($iblock["ID"]);

                                $db_properties = CIBlock::GetProperties($iblockOffer['IBLOCK_ID'], Array());
                                while($prop = $db_properties->Fetch())
                                    $propertiesSKU[] = $prop;

                                $oldPropertySKU = null;
                                if (isset($IBLOCK_PROPERTY_SKU[$iblock['ID']])) {
                                    foreach ($iblockPropertiesName as $key => $prop) {
开发者ID:Ksenobyte,项目名称:bitrix-module,代码行数:31,代码来源:export_setup.php

示例7: array

		COption::SetOptionString('catalog', 'default_use_store_control', $strUseStoreControl);

/*	$strDiscountVat = (!empty($_REQUEST['discount_vat']) && $_REQUEST['discount_vat'] == 'N' ? 'N' : 'Y');
	COption::SetOptionString('catalog', 'discount_vat', $strDiscountVat); */

		$bNeedAgent = false;

		$boolFlag = true;
		$arCurrentIBlocks = array();
		$arNewIBlocksList = array();
		$rsIBlocks = CIBlock::GetList(array());
		while ($arOneIBlock = $rsIBlocks->Fetch())
		{
			// Current info
			$arIBlockItem = array();
			$arOneCatalog = CCatalog::GetByIDExt($arOneIBlock['ID']);
			$arIBlockSitesList = array();
			$rsIBlockSites = CIBlock::GetSite($arOneIBlock['ID']);
			while ($arIBlockSite = $rsIBlockSites->Fetch())
			{
				$arIBlockSitesList[] = htmlspecialcharsbx($arIBlockSite['SITE_ID']);
			}

			$strInfo = '['.$arOneIBlock['IBLOCK_TYPE_ID'].'] '.htmlspecialcharsbx($arOneIBlock['NAME']).' ('.implode(' ',$arIBlockSitesList).')';

			$arIBlockItem = array(
				'INFO' => $strInfo,
				'ID' => $arOneIBlock['ID'],
				'NAME' => $arOneIBlock['NAME'],
				'SITE_ID' => $arIBlockSitesList,
				'IBLOCK_TYPE_ID' => $arOneIBlock['IBLOCK_TYPE_ID'],
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:31,代码来源:options.php

示例8: while

 $rsIBlocks = CIBlock::GetList(array('IBLOCK_TYPE' => 'ASC', 'NAME' => 'ASC'));
 while ($arIBlock = $rsIBlocks->Fetch()) {
     if (false == array_key_exists($arIBlock['ID'], $arIBlockSitesList)) {
         $arLIDList = array();
         $arWithLinks = array();
         $arWithoutLinks = array();
         $rsIBlockSites = CIBlock::GetSite($arIBlock['ID']);
         while ($arIBlockSite = $rsIBlockSites->Fetch()) {
             $arLIDList[] = $arIBlockSite['LID'];
             $arWithLinks[] = '<a href="/bitrix/admin/site_edit.php?LID=' . urlencode($arIBlockSite['LID']) . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage("CO_SITE_ALT") . '">' . htmlspecialcharsbx($arIBlockSite["LID"]) . '</a>';
             $arWithoutLinks[] = htmlspecialcharsbx($arIBlockSite['LID']);
         }
         $arIBlockSitesList[$arIBlock['ID']] = array('SITE_ID' => $arLIDList, 'WITH_LINKS' => implode('&nbsp;', $arWithLinks), 'WITHOUT_LINKS' => implode(' ', $arWithoutLinks));
     }
     $arIBlockItem = array('ID' => $arIBlock['ID'], 'IBLOCK_TYPE_ID' => $arIBlock['IBLOCK_TYPE_ID'], 'SITE_ID' => $arIBlockSitesList[$arIBlock['ID']]['SITE_ID'], 'NAME' => htmlspecialcharsbx($arIBlock['NAME']), 'ACTIVE' => $arIBlock['ACTIVE'], 'FULL_NAME' => '[' . $arIBlock['IBLOCK_TYPE_ID'] . '] ' . htmlspecialcharsbx($arIBlock['NAME']) . ' (' . $arIBlockSitesList[$arIBlock['ID']]['WITHOUT_LINKS'] . ')', 'IS_CATALOG' => 'N', 'IS_CONTENT' => 'N', 'YANDEX_EXPORT' => 'N', 'VAT_ID' => 0, 'PRODUCT_IBLOCK_ID' => 0, 'SKU_PROPERTY_ID' => 0, 'OFFERS_IBLOCK_ID' => 0, 'IS_OFFERS' => 'N', 'OFFERS_PROPERTY_ID' => 0, 'CATALOG_TYPE' => '');
     $ar_res1 = CCatalog::GetByIDExt($arIBlock['ID']);
     if (true == is_array($ar_res1)) {
         $arIBlockItem['IS_CATALOG'] = $ar_res1['CATALOG'];
         $arIBlockItem['IS_CONTENT'] = CBXFeatures::IsFeatureEnabled('SaleRecurring') ? $ar_res1['SUBSCRIPTION'] : 'N';
         $arIBlockItem['YANDEX_EXPORT'] = $ar_res1['YANDEX_EXPORT'];
         $arIBlockItem['VAT_ID'] = $ar_res1['VAT_ID'];
         $arIBlockItem['PRODUCT_IBLOCK_ID'] = $ar_res1['PRODUCT_IBLOCK_ID'];
         $arIBlockItem['SKU_PROPERTY_ID'] = $ar_res1['SKU_PROPERTY_ID'];
         $arIBlockItem['OFFERS_IBLOCK_ID'] = $ar_res1['OFFERS_IBLOCK_ID'];
         $arIBlockItem['OFFERS_PROPERTY_ID'] = $ar_res1['OFFERS_PROPERTY_ID'];
         if (0 < $ar_res1['PRODUCT_IBLOCK_ID']) {
             $arIBlockItem['IS_OFFERS'] = 'Y';
         }
         $arIBlockItem['CATALOG_TYPE'] = $ar_res1['CATALOG_TYPE'];
         if (!CBXFeatures::IsFeatureEnabled('SaleRecurring') && 'Y' == $ar_res1['SUBSCRIPTION']) {
             $arRecurring[] = '[' . $arIBlockItem['ID'] . '] ' . $arIBlockItem['NAME'];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:options.php

示例9: OnBeforeCatalogDelete

 function OnBeforeCatalogDelete($ID)
 {
     global $DB;
     global $APPLICATION;
     $arMsg = array();
     $ID = intval($ID);
     if (0 >= $ID) {
         return true;
     }
     $arCatalog = CCatalog::GetByIDExt($ID);
     if (false == $arCatalog) {
         return true;
     }
     if (0 < intval($arCatalog['PRODUCT_IBLOCK_ID'])) {
         $arMsg[] = array('id' => 'PRODUCT_IBLOCK_ID', 'text' => GetMessage('BT_MOD_CATALOG_ERR_CANNOT_DELETE_SKU_IBLOCK'));
         $obError = new CAdminException($arMsg);
         $APPLICATION->ThrowException($obError);
         return false;
     }
     if (0 < intval($arCatalog['OFFERS_IBLOCK_ID'])) {
         $arMsg[] = array('id' => 'PRODUCT_IBLOCK_ID', 'text' => GetMessage('BT_MOD_CATALOG_ERR_CANNOT_DELETE_PRODUCT_IBLOCK'));
         $obError = new CAdminException($arMsg);
         $APPLICATION->ThrowException($obError);
         return false;
     }
     $db_events = GetModuleEvents("catalog", "OnBeforeCatalogDelete");
     while ($arEvent = $db_events->Fetch()) {
         if (false === ExecuteModuleEventEx($arEvent, array($ID))) {
             $strError = GetMessage("MAIN_BEFORE_DEL_ERR") . ' ' . $arEvent['TO_NAME'];
             $ex = $APPLICATION->GetException();
             if (is_object($ex)) {
                 $strError .= ': ' . $ex->GetString();
             }
             $APPLICATION->ThrowException($strError);
             return false;
         }
     }
     return true;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:39,代码来源:catalog.php


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