if( CModule::IncludeModule("iblock") && CModule::IncludeModule("catalog") )
{
$_NewEl = new CIBlockElement;
$arLoadProductArray = Array( /* бла бла бла */ );
if( $_NEW_EL_ID = $_NewEl->Add( $arLoadProductArray ) )
{
if( !CPrice::SetBasePrice( $_NEW_EL_ID, 30000, "RUB" ) )
{ echo "Ошибка!"; }
}
else
{
echo "Ошибка: ".$_NewEl->LAST_ERROR;
}
} |