50 protected function import(array $items)
54 foreach($items as $item)
56 if($item->getOwnerTypeId() == static::getUserProfileEntityTypeId())
58 $params = $item->getFieldValues();
61 $personalTypeId = $params[
'TRAITS'][
'PERSON_TYPE_ID'] = $item->resolvePersonTypeId(
$fields);
63 $property = $params[
'ORDER_PROPS'];
66 $params[
'ORDER_PROP'] = $item->getPropertyOrdersByConfig($personalTypeId, array(), $property);
69 unset($params[
'ORDER_PROPS']);
70 $item->setFields($params);
74 if(intval($personalTypeId)<=0)
75 $r->addError(
new Error(GetMessage(
"SALE_EXCHANGE_PACKAGE_ERROR_PERSONAL_TYPE_IS_EMPTY", array(
"#DOCUMENT_ID#"=>
$fields[
'XML_ID'])),
"PACKAGE_ERROR_PERSONAL_TYPE_IS_EPMTY"));
81 if(intval($item->getId())<=0)
82 $r->addError(
new Error(GetMessage(
"SALE_EXCHANGE_PACKAGE_ERROR_USER_IS_EMPTY", array(
"#DOCUMENT_ID#"=>
$fields[
'XML_ID'])),
"PACKAGE_ERROR_USER_IS_EPMTY"));
87 $result->addErrors($r->getErrors());