$el = new CIBlockElement;
$fields = array(
'IBLOCK_ID' => 10,
'NAME' => $arFields['NAME'],
'ACTIVE' => "Y",
'SEARCHABLE_CONTENT' => $arFields['NAME'],
'CREATED_BY' => '1',
'MODIFIED_BY' => '1',
'DATE_CREATE' => $arFields['DATE_CREATE'],
'CODE' => $arFields['ID'],
'PROPERTY_VALUES' => $PROP
);
if ($PRODUCT_ID = $el->Add($fields)) {
echo 'Добавлен элемент, ID: ' . $PRODUCT_ID;
} else {
echo "Error[" . $PRODUCT_ID . "]: " . $el->LAST_ERROR . '<br />';
}
|