// чтобы получить дату в формате сайта (в битриксе)
$date = date('Y-m-d');
$timestamp = MakeTimeStamp($date, 'YYYY-MM-DD');
$convertDateTime = ConvertTimeStamp($timestamp);
$arFilter = Array("IBLOCK_ID"=>16, "PROPERTY_ID_VK" => false, "ACTIVE" => "Y", ">=DATE_ACTIVE_FROM" => $convertDateTime);
...понадобилось мне парсить элементы за текущий день... но почему то выводит все элементы с пустым свойством "PROPERTY_ID_VK"
this.totalInfoBlockNode.appendChild(
BX.create('DIV', {
props: {className: 'total-block__basket-items'},
html: this.totalBlockBasketItemsHtml()
})
);
totalBlockBasketItemsHtml: function() {
var basketItemsHtml = '';
for(var id in this.result.GRID.ROWS) {
var item = this.result.GRID.ROWS[id].data;
basketItemsHtml += this.basketItemHtml(item);
}
return basketItemsHtml;
},
basketItemHtml: function(item) {
return `
<div class="basket-item">
<span class="basket-item__item-name">${item.NAME}</span>
<span class="basket-item__item-sum">${item.SUM}</span>
</div>
`;
},
$GLOBALS['arrFilter] = ['IBLOCK_SECTION_ID' => id раздела];
$sites = [];
$componentsPath = [
'bitrix:catalog.section',
'bitrix:catalog.element',
];
$iterator = \Bitrix\Main\SiteTable::getList([
'select' => ['LID'],
]);
while($row = $iterator->fetch()) {
$sites[] = $row;
}
foreach($componentsPath as $componentPath) {
$componentRelativePath = CComponentEngine::MakeComponentPath($componentPath);
$arComponentDescription = CComponentUtil::GetComponentDescr($componentPath);
if(!strlen($componentRelativePath) || !is_array($arComponentDescription) || !array_key_exists('CACHE_PATH', $arComponentDescription))
continue;
foreach($sites as $site) {
$componentRelativePath = $arComponentDescription['CACHE_PATH'] == 'Y' ? '/'.$site['LID'].$componentRelativePath : $componentRelativePath;
BXClearCache(true, $componentRelativePath);
}
}
$inn = Bitrix\Sale\PropertyValueCollection::getList([
'order' => [],
'select' => ['VALUE', 'COUNT', 'ORDER_ID'],
'filter' => [
'!ORDER_ID' => false,
'=CODE' => 'INN'
],
'runtime' => [
new \Bitrix\Main\Entity\ExpressionField('COUNT', 'COUNT(*)'),
new \Bitrix\Main\Entity\ExpressionField('ORDER_ID', 'SUM(ORDER_ID)'),
]
])->fetchAll();