Bitrix Site Manager

CCatalogGroup::GetByID

array
CCatalogGroup::GetByID(
 int ID, 
 string lang = LANGUAGE_ID
);

The method GetByID returns parameters of the price type identified by the ID. The returned parameters include the language-dependent parameters for the specified language lang.

Parameters

ParameterDescription
ID Price type ID.
lang Language ID. By default, current language is used.

Return Values

Returns the associated array with the following keys.

Key Description
ID Price type ID.
NAME Internal name of the price type.
BASE Indicates that the returned type is the base price type ("Y"). Otherwise, value of this key is "N".
SORT Sort weight.
CAN_ACCESS If "Y", the current user is allowed to view prices of this type. If "N", prices of this type should be hidden.
CAN_BUY If "Y", the current user is allowed to purchase at prices of this type. Otherwise "N".
NAME_LANG Name of the price type in the language lang.

Example



<?
$rn = CCatalogGroup::GetByID($ID);
if ($rn["CAN_ACCESS"]=="Y")
   echo "You can view prices ".$rn["NAME_LANG"]."<br>";
if ($rn["CAN_BUY"]=="Y")
   echo "You can buy at prices ".$rn["NAME_LANG"]."<br>";
?>