- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/logger.php
- Класс: BitrixSaleTradingPlatformVkLogger
- Вызов: Logger::createItemErrorStringByType
static function createItemErrorStringByType($item, $type)
{
$result = $item;
switch ($type)
{
case 'PRODUCT':
// get iblock id fore create link to edit
$resProduct = CIBlockElement::GetList(array(), array("ID" => $item), false, false, array('IBLOCK_ID', 'NAME'));
$resProduct = $resProduct->Fetch();
$query = array(
"IBLOCK_ID" => $resProduct["IBLOCK_ID"],
"type" => "catalog",
"ID" => $item,
"lang" => LANGUAGE_ID,
);
$href = "/bitrix/admin/cat_product_edit.php";
$result = '' . $resProduct['NAME'] . '';
break;
case 'ALBUM':
// todo: use link create method from ZZ
// get iblock id fore create link to edit
$resSection = CIBlockSection::GetList( array(), array("ID" => $item), false, array('IBLOCK_ID', 'NAME'));
$resSection = $resSection->Fetch();
$query = array(
"IBLOCK_ID" => $resSection["IBLOCK_ID"],
"type" => "catalog",
"ID" => $item,
"lang" => LANGUAGE_ID,
);
$href = "/bitrix/admin/cat_section_edit.php";
$result = '' . $resSection['NAME'] . '';
break;
case 'PHOTO':
$resFile = CFile::GetFileArray($item);
$result = '' . $resFile['ORIGINAL_NAME'] . '';
break;
case 'METHODS':
// do nothing - just print method name
break;
case 'NONE':
// not need items string
return '';
break;
default:
$href = '';
break;
}
return $result;
}