GetProductInfo
Description and parameters
mixed CCatalogSku::GetProductInfo( $intOfferID, $intIBlockID = 0 )
Method allows getting product ID by estimate ID. Static method.
Call parameters
Parameter | Description |
---|---|
$intOfferID | Estimate ID. |
$intIBlockID | Estimate iblock ID. Optional. |
Returned value
- false - on error;
- otherwise, array has the following structure: ID (product ID), IBLOCK_ID (product iblock ID).
Example
$intElementID = 100; // estimate ID $mxResult = CCatalogSku::GetProductInfo( $intElementID ); if (is_array($mxResult)) { echo 'ID товара = '.$mxResult['ID']; } else { ShowError('This is not an estimate'); }
© «Bitrix24», 2001-2024