array arFilter = Array(),
string lang = LANGUAGE_ID
The method GetList returns a set of price types satisfying the
specified filter arFilter. The returned records are sorted by the
parameter by in the order order.
||Field by which the list entries are to be sorted. Can be one of the
- SORT - by the field "Sort weight"
- BASE - by the flag denoting the base price type;
- NAME - by the field "Name" (internal
- ID - by the field "ID".
||Sort order. Can be one of the following:
- ASC - ascending (default);
- DESC - descending.
||Array with fields by which the returned records are to be filtered. Keys
are the field names; values are conditions. The array can have the
- BASE - flag "base price type";
- NAME - internal name of the price type.
||Language ID. By default, current language is used.
An instance of the class CDBResult containing a set of the associated arrays
with the following keys.
||Price type ID.
||Internal name of the price type.
||Indicates that the returned type is the base price type ("Y").
Otherwise, value of this key is "N".
||If "Y", the current user is allowed to view prices of
this type. If "N", prices of this type should be
||If "Y", the current user is allowed to purchase at
prices of this type. Otherwise "N".
||Name of the price type in the language lang.
// Select all price types with the internal name "retail"
$dbPriceType = CCatalogGroup::GetList(($v1="SORT"),
array("NAME" => "retail"));
while ($arPriceType = $dbPriceType->Fetch())
echo $arPriceType["NAME_LANG"]." - ".$arPriceType["CAN_ACCESS"]."<br>";