Documentation

getExistOffers

Description and parameters

mixed 
CCatalogSKU::getExistOffers(
 array productID,
 int iblockID = 0
)

Method returns SKU availability for product array from one or several iblocks. Static method.

Call parameters

Parameter Description
productID Array with product IDs.
iblockID Iblock ID. Optional, indicated only when all products belong to a single iblock, it may be skipped, or set as null. If you do not comply with this condition, returned result cannot be deemed as correct.

Returned value

In case of error (incorrect parameters) method returns false, and on success returns array with keys as passed product IDs and values - true/false (product with/without SKUs).

Examples

$productList = array(100, 12, 45);
$offersExist = CCatalogSKU::getExistOffers($productList);
var_dump($offersExist);


© «Bitrix24», 2001-2024
Up