Bitrix Site Manager

CSaleBasket::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

ParameterDescription
byName of the field by which the records are to be sorted. The following values are possible:
  • SORT - sort weight (default);
  • NAME - property name;
  • VALUE - property value;
  • CODE - property mnemonic code.
orderSpecifies the sort order. The following values are possible:
  • ASC - ascending (default);
  • DESC - descending
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:
  • ID - the record ID;
  • BASKET_ID - the ID of the basket element to which this property is bound;
  • CODE - property mnemonic code.

Return 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>";
}
?>