GetByID
array CCatalogGroup::GetByID( int ID, string lang = LANGUAGE_ID );
The method returns parameters of the price type identified by ID. The returned parameters include the language-dependent parameters for the specified language lang.
Call parameters
Parameter | Description |
---|---|
ID | Price type code. |
lang | Language code, equals to current language by default. |
Returned values
Returns associative array with the following keys:
Key | Description | Available from version |
---|---|---|
ID | Price type code. | |
NAME | Internal price type name. | |
BASE | Flag (Y/N) sets type as basic. | |
SORT | Sort index. | |
XML_ID | External code. | |
CAN_ACCESS | Flag (Y/N) sets permissions for current user to view prices of this type. | |
CAN_BUY | Flag (Y/N) sets permissions for current user to purchase products by prices of this type. | |
NAME_LANG | Price type name on a specific language (lang). | |
CREATED_BY | User ID who created price type. | |
MODIFIED_BY | Recent user ID who updated the price type. | |
TIMESTAMP_X | Date of the recent price type update. | |
DATE_CREATE | Date when price type is created. |
Example
<? $rn = CCatalogGroup::GetByID($ID); if ($rn["CAN_ACCESS"]=="Y") echo "You can view price type ".$rn["NAME_LANG"]."<br>"; if ($rn["CAN_BUY"]=="Y") echo "You can purchase products by prices of type ".$rn["NAME_LANG"]."<br>"; ?>
© «Bitrix24», 2001-2024