<?php
\Bitrix\Main\Loader::includeModule('highloadblock');
$hlBlockId = 1;
$hlObject = \Bitrix\Highloadblock\HighloadBlockTable::getById($hlBlockId)->fetch();
$entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hlObject);
$entity_data_class = $entity->getDataClass();
$newsList = $entity_data_class::getList([
'filter' => $filter,
'offset' => $nav->getOffset(),
'limit' => $nav->getLimit(),
]);
_blank
зашит в классе, без возможности переопределения (пример)$request = Application::getInstance()->getContext()->getRequest();
$productId = intval( $request->getPost("id")
$_POST['id']
$basket = Sale\Basket::loadItemsForFUser(Sale\Fuser::getId(), Bitrix\Main\Context::getCurrent()->getSite());
$request->getPost("id") - как получить это?
if (\Bitrix\Main\Loader::includeModule('sale')) {
$order = \Bitrix\Sale\Order::load($orderId);
$appliedDiscount = $order->getDiscount()->getApplyResult(true);
$discounts = [];
foreach ($appliedDiscount['DISCOUNT_LIST'] as $discount) {
$discounts[] = $discount['REAL_DISCOUNT_ID'];
// Информация о примененной скидке
echo '<pre style="color: red;">', print_r($discount, true), '</pre>';
}
$appliedList = Bitrix\Sale\Internals\DiscountTable::getList([
'filter' => ['=ID' => $discounts]
])->fetchAll();
// Подробная информация о скидке
echo '<pre style="color: red;">', print_r($appliedList, true), '</pre>';
}
/bitrix/admin/settings.php?lang=ru
)'FILTER' => []
должен быть массив массивов (у вас сейчас просто массив)<?php
// например, в /local/components/company/report.list/templates/.default/template.php
$this->SetViewTarget('inside_pagetitle');
$APPLICATION->IncludeComponent('bitrix:main.ui.filter', '', [
'FILTER_ID' => 'report_list',
'GRID_ID' => 'report_list',
'FILTER' => [
['id' => 'IS_SPEND', 'name' => 'Тип операции', 'type' => 'list', 'items' => ['' => 'Любой', 'P' => 'Поступление', 'M' => 'Списание'], 'params' => ['multiple' => 'Y']],
],
'ENABLE_LIVE_SEARCH' => true,
'ENABLE_LABEL' => true
]);
$this->EndViewTarget();?>
gallery_more
компонента bitrix:news.list
. $iblockId = 25;
$sectionId = 37;
\Bitrix\Main\Loader::includeModule('iblock');
// вариант 1
$field = $USER_FIELD_MANAGER->GetUserFields('IBLOCK_25_SECTION', $sectionId);
$value = $field['UF_NEWH1']['VALUE'];
print_r($value);
// вариант 2
$res = CIBlockSection::GetList([], ['IBLOCK_ID' => $iblockId, 'ID' => $sectionId], false, ['IBLOCK_ID', 'ID', 'UF_NEWH1'])->Fetch();
$value = $res['UF_NEWH1'];
print_r($value);