Answer the question
In order to leave comments, you need to log in
How to filter ID WHERE IN ARRAY in CIBlockElement::GetList?
There is a self-written table.
I get an array of product IDs from there in the following way:
$subQuery = \Local\Core\Model\Data\ProductStockTable::getList(array( // Bitrix\Main\ORM\Query\Result
'select' => array('PRODUCT_ID') ,
'filter' => \Bitrix\Main\ORM\Query\Query::filter()
->where('AMOUNT', '>', 0)
));
Now we need to pass this array to the CATALOG complex component in advance, so that both the smart filter and all products are displayed taking into account the hit in this array.
That is, I have the values of the balance of goods stored in a separate table. And I need to make the "In stock" filter in the standard Bitrix catalog. How to do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question