GetBasePrice
array CPrice::GetBasePrice( int PRODUCT_ID );
The method GetBasePrice returns the base price description array of the specified product. A base price is the price of the base price type.
Parameters
Parameter | Description |
---|---|
PRODUCT_ID | Product ID. |
Return Values
Associated array with the following keys.
Key | Description |
---|---|
ID | Price ID. |
PRODUCT_ID | Product ID. |
EXTRA_ID | The ID of the applicable discount (or extra). |
CATALOG_GROUP_ID | Price type ID. |
PRICE | Base price value. |
CURRENCY | Currency of the base price. |
Example
<? $ar_res = CPrice::GetBasePrice(11); echo "Base price of the product 11 is ".$ar_res["PRICE"]." ".$ar_res["CURRENCY"]."<br>"; echo "Formatted base price: ".CurrencyFormat($ar_res["PRICE"], $ar_res["CURRENCY"]); ?>
© «Bitrix24», 2001-2024