Bitrix Site Manager

CSaleOrderUserPropsValue::GetList

CDBResult
CSaleOrderUserPropsValue::GetList(
 string &by,
 string &order,
 array arFilter = Array()
);

The method GetList returns an optionally sorted and filtered list of customer profile properties.

Parameters

ParameterDescription
by Specifies the name of a customer profile parameter by which the sorting is to be performed. 

The following values are possible:
  • SORT - property sort weight (default);
  • NAME - property name;
  • VALUE - property value
order Sort order. Can be one of the following:
  • ASC - ascending;
  • DESC - descending.
arFilter The filter is an associated array whose keys are the parameter names, and values are the conditions.

The following keys are possible:
  • USER_PROPS_ID - the customer profile ID;
  • ORDER_PROPS_ID - the order property ID;
  • CODE - order property mnemonic code.

Return Values

Returns an instance of CDBResult containing a set of associated arrays with the following keys.

Key Description
ID The customer profile property ID.
USER_PROPS_ID The customer profile ID.
ORDER_PROPS_ID The order property ID.
USER_VALUE_NAME Name of an order property as stored in the customer profile.
VALUE Value of the order property as stored in the customer profile.
TYPE Order property type. 
SORT Order property sort weight.
VARIANT_NAME The name of the order property variant as stored in the customer profile.
CODE Order property mnemonic code.

Example



<?
// Display all properties from the customer profile $ID
$db_propVals = CSaleOrderUserPropsValue::GetList(($b="SORT"), 
                                                 ($o="ASC"), 
                                                 Array("USER_PROPS_ID"=>$ID));
while ($arPropVals = $db_propVals->Fetch())
{
   echo $arPropVals["USER_VALUE_NAME"]."=".$arPropVals["VALUE"]."<br>";
}
?>