GetByID
array CCatalogProduct::GetByID( int ID );
The method GetByID returns an array of the product properties. The returned data pertains to the product itself, these are not the catalog element properties.
Parameters
Parameter | Description |
---|---|
ID | Product ID. |
Return Values
Associated array with the following keys:
Key | Description |
---|---|
ID | Product ID. |
QUANTITY | Quantity of product items in stock. |
QUANTITY_TRACE | "Y" tells the system to keep track of quantity of the product and decrement the counter upon successful order. |
WEIGHT | Product item weight. |
Example
<? $ID = 5; $ar_res = CCatalogProduct::GetByID($ID); echo "<br>Product #".$ID." has the following parameters:<pre>"; print_r($ar_res); echo "</pre>"; ?>
© «Bitrix24», 2001-2024