GetPropsList
CDBResult CSaleBasket::GetPropsList( string &by, string &order, array arFilter = array() );
The method GetPropsList returns a set of basket properties. The property set returned is filtered by arFilter, sorted by by in the direction order.
Parameters
Parameter | Description |
---|---|
by | Name of the field by which the records are to be sorted. The
following values are possible:
|
order | Specifies the sort order. The following values are
possible:
|
arFilter | The filter in the form of associated array whose keys are property names
and values are the filter conditions. The following keys are possible:
|
Returned values
Returns an instance of CDBResult, containing a set of associated array with the following keys.
Key | Description |
---|---|
ID | The record ID. |
BASKET_ID | The ID of the basket element to which this property is bound. |
NAME | Property name. |
VALUE | Property value. |
CODE | Property mnemonic code. |
SORT | Property sort weight. |
Example
<? // Print all properties of the basket element with $ID $db_res = CSaleBasket::GetPropsList(($b="SORT"), ($o="ASC"), Array("BASKET_ID" => $ID)); while ($ar_res = $db_res->Fetch()) { echo $ar_res["NAME"]."=".$ar_res["VALUE"]."<br>"; } ?>
© «Bitrix24», 2001-2024