當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCatalogSKU::getInfoByProductIBlock方法代碼示例

本文整理匯總了PHP中CCatalogSKU::getInfoByProductIBlock方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCatalogSKU::getInfoByProductIBlock方法的具體用法?PHP CCatalogSKU::getInfoByProductIBlock怎麽用?PHP CCatalogSKU::getInfoByProductIBlock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCatalogSKU的用法示例。


在下文中一共展示了CCatalogSKU::getInfoByProductIBlock方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param integer $iblockId Information block identifier.
  * @param integer $elementId Element identifier.
  *
  * @throws \Bitrix\Main\LoaderException
  */
 public function __construct($iblockId, $elementId)
 {
     $this->iblockId = intval($iblockId);
     $this->elementId = intval($elementId);
     if (self::$catalog === null) {
         self::$catalog = \Bitrix\Main\Loader::includeModule("catalog");
     }
     if (self::$catalog) {
         $catalog = \CCatalogSKU::getInfoByProductIBlock($this->iblockId);
         if (!empty($catalog) && is_array($catalog)) {
             $this->skuIblockId = $catalog["IBLOCK_ID"];
             $this->skuPropertyId = $catalog["SKU_PROPERTY_ID"];
         }
     }
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:21,代碼來源:element.php

示例2: init

 /**
  * Initializes internal object state. Must be called before usage.
  *
  * @throws \Bitrix\Main\LoaderException
  * @return void
  */
 public function init()
 {
     $this->dictionary = new Dictionary($this->iblockId);
     $this->storage = new Storage($this->iblockId);
     if (self::$catalog === null) {
         self::$catalog = \Bitrix\Main\Loader::includeModule("catalog");
     }
     if (self::$catalog) {
         $catalog = \CCatalogSKU::getInfoByProductIBlock($this->iblockId);
         if (!empty($catalog) && is_array($catalog)) {
             $this->skuIblockId = $catalog["IBLOCK_ID"];
             $this->skuPropertyId = $catalog["SKU_PROPERTY_ID"];
         }
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:21,代碼來源:indexer.php

示例3: __construct

 /**
  * @param integer $iblockId Information block identifier.
  */
 public function __construct($iblockId)
 {
     $this->iblockId = intval($iblockId);
     $this->valid = \CIBlock::getArrayByID($this->iblockId, "PROPERTY_INDEX") === "Y";
     if (Loader::includeModule("catalog")) {
         $catalogInfo = \CCatalogSKU::getInfoByProductIBlock($this->iblockId);
         if (!empty($catalogInfo) && is_array($catalogInfo)) {
             $this->skuIblockId = $catalogInfo["IBLOCK_ID"];
             $this->skuPropertyId = $catalogInfo["SKU_PROPERTY_ID"];
             $this->valid = $this->valid && \CIBlock::getArrayByID($this->skuIblockId, "PROPERTY_INDEX") === "Y";
         }
     }
     $this->dictionary = new \Bitrix\Iblock\PropertyIndex\Dictionary($this->iblockId);
     $this->storage = new \Bitrix\Iblock\PropertyIndex\Storage($this->iblockId);
 }
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:18,代碼來源:querybuilder.php

示例4: __construct

 /**
  * @param integer $iblockId Information block identifier.
  */
 public function __construct($iblockId)
 {
     $this->iblockId = intval($iblockId);
     $this->valid = \CIBlock::getArrayByID($this->iblockId, "PROPERTY_INDEX") === "Y";
     if (self::$catalog === null) {
         self::$catalog = \Bitrix\Main\Loader::includeModule("catalog");
     }
     if (self::$catalog) {
         $catalogInfo = \CCatalogSKU::getInfoByProductIBlock($this->iblockId);
         if (!empty($catalogInfo) && is_array($catalogInfo)) {
             $this->skuIblockId = $catalogInfo["IBLOCK_ID"];
             $this->skuPropertyId = $catalogInfo["SKU_PROPERTY_ID"];
             $this->valid = $this->valid && \CIBlock::getArrayByID($this->skuIblockId, "PROPERTY_INDEX") === "Y";
         }
     }
     $this->dictionary = new Dictionary($this->iblockId);
     $this->storage = new Storage($this->iblockId);
     $this->valid = $this->valid && $this->dictionary->isExists();
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:22,代碼來源:facet.php

示例5: loadFromDatabase

 public function loadFromDatabase()
 {
     if (!isset($this->fields)) {
         $this->fields = array();
         $select = array_values($this->fieldMap);
         $elementList = \Freetrix\Iblock\ElementTable::getList(array("select" => $select, "filter" => array("=ID" => $this->id)));
         $this->elementFields = $elementList->fetch();
         if ($this->elementFields) {
             $arCatalog = \CCatalogSKU::getInfoByProductIBlock($this->elementFields["IBLOCK_ID"]);
             if (is_array($arCatalog)) {
                 $this->skuIblockId = $arCatalog["IBLOCK_ID"];
                 $skuList = \CIBlockElement::getList(array(), array("IBLOCK_ID" => $arCatalog["IBLOCK_ID"], "=PROPERTY_" . $arCatalog["SKU_PROPERTY_ID"] => $this->id), false, false, $select);
                 while ($sku = $skuList->fetch()) {
                     $this->skuList[] = $sku;
                     foreach ($sku as $fieldName => $fieldValue) {
                         $this->fields[$fieldName][] = $fieldValue;
                     }
                 }
             }
         }
     }
     return is_array($this->fields);
 }
開發者ID:ASDAFF,項目名稱:open_bx,代碼行數:23,代碼來源:elementsku.php

示例6: getOffersCatalog

 protected function getOffersCatalog($iblockId)
 {
     if (self::$catalogIncluded === null) {
         self::$catalogIncluded = Main\Loader::includeModule('catalog');
     }
     if (!self::$catalogIncluded) {
         return array();
     }
     if (!isset(static::$offersCatalog[$iblockId])) {
         static::$offersCatalog[$iblockId] = \CCatalogSKU::getInfoByProductIBlock($iblockId);
     }
     return static::$offersCatalog[$iblockId];
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:13,代碼來源:orderbasket.php


注:本文中的CCatalogSKU::getInfoByProductIBlock方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。