1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
exportoffercreator.php
См. документацию.
1<?php
2namespace Bitrix\Catalog\Ebay;
3use Bitrix\Main\SystemException;
4
6{
7 public static function getOfferObject(array $offerParams)
8 {
9 if(!isset($offerParams["IBLOCK_ID"]) || intval($offerParams["IBLOCK_ID"]) <= 0)
10 throw new SystemException("Incorrect iBlock ID (".__CLASS__."::".__METHOD__.")");
11
12 $arCatalog = \CCatalogSku::GetInfoByIBlock($offerParams["IBLOCK_ID"]);
13
14 if (empty($arCatalog))
15 throw new SystemException("IBlock is not catalog. (".__CLASS__."::".__METHOD__.")");
16
17 $catalogType = $arCatalog["CATALOG_TYPE"];
18 if (!in_array($catalogType, \CCatalogSku::GetCatalogTypes()))
19 throw new SystemException("Unknown type of catalog (".__CLASS__."::".__METHOD__.")");
20
21 $result = array();
22
23 switch($catalogType)
24 {
25 case \CCatalogSku::TYPE_CATALOG:
26 case \CCatalogSku::TYPE_OFFERS:
27 $result = new ExportOffer($catalogType, $offerParams);
28 break;
29
30 case \CCatalogSku::TYPE_PRODUCT:
31 case \CCatalogSku::TYPE_FULL:
32 $result = new ExportOfferSKU($catalogType, $offerParams);
33 break;
34 }
35
36 return $result;
37 }
38}
static getOfferObject(array $offerParams)
Определения exportoffercreator.php:7
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$arCatalog
Определения yandex_run.php:674