PriceTable
PriceTable class for handling table with product prices.
Class methods
Method | Description | Available from version |
---|---|---|
getMap | Returns list of fields for table with product prices. | |
getTableName | Returns name for table with product prices. | |
validateCurrency | Returns validator for the field CURRENCY (currency ID). |
|
validateTmpId | Returns validator for the field TMP_ID (temporary symbolic ID used for service purposes). |
Fields for prices
Field | Description | Type | Required |
---|---|---|---|
ID | Price ID. | Int | Yes |
PRODUCT_ID | Product or price ID (iblock element ID). | Int | Yes |
EXTRA_ID | Extra charge type ID. | Int | No |
CATALOG_GROUP_ID | Price type ID. | Int | Yes |
PRICE | Price value. | Decimal(18,2) | Yes |
CURRENCY | Price currency ID. | Char(3) | Yes |
TIMESTAMP_X | Entry update time. | Datetime | Yes |
QUANTITY_FROM | Minimum number of products with a specific price. | Int | No |
QUANTITY_TO | Maximum number of products with a specific price. | Int | No |
TMP_ID | Temporary string ID used for service purposes. | Varchar(40) | No |
PRICE_SCALE | Price in base currency. Field is available for reading only, calculated automatically. | Decimal(26,12) | No |
Example
Printing a price for a single product in the Online Store.
\Bitrix\Main\Loader::includeModule("catalog"); $allProductPrices = \Bitrix\Catalog\PriceTable::getList([ "select" => ["*"] "filter" => [ "=PRODUCT_ID" => $arResult['ID'], ], "order" => ["CATALOG_GROUP_ID" => "ASC"] ])->fetchAll();
© «Bitrix24», 2001-2024