$arSection = Array("0"=>"21", "1"=>"23");
$el = new CIBlockElement;
$arLoadProductArray = Array(
"MODIFIED_BY" => $USER->GetID(),
"IBLOCK_SECTION_ID" => $arSection,
"IBLOCK_ID" => $iblock,
"PROPERTY_VALUES"=> $PROP,
"NAME" => $name,
"CODE" => $code,
"SORT" => $sort,
"ACTIVE" => "Y",
"DETAIL_TEXT" => $desc,
"DETAIL_TEXT_TYPE" => 'html',
"DETAIL_PICTURE" => $mainpic
);
if($el->Update($PRODUCT_ID,$arLoadProductArray)) {} else echo $IDd.'<br>Error: '.$el->LAST_ERROR;
|