<?
$productsAmount = [];
$rsStoreProduct = \Bitrix\Catalog\StoreProductTable::getList(array(
'filter' => array('PRODUCT_ID' => $arData, 'STORE_ID' => array(31, 33)),
'select' => array('PRODUCT_ID', 'AMOUNT', 'STORE_ID', 'STORE_TITLE' => 'STORE.TITLE', 'PRODUCT_NAME' => 'PRODUCT.IBLOCK_ELEMENT.NAME'),
));
while ($arStoreProduct = $rsStoreProduct->fetch()) {
if (is_null($productsAmount[$arStoreProduct["PRODUCT_ID"]])) {
$productsAmount[$arStoreProduct["PRODUCT_ID"]] = 0;
}
$productsAmount[$arStoreProduct["PRODUCT_ID"]] += $arStoreProduct["AMOUNT"]
}
return array_search(0, $productsAmount) === false;
$this->randString()