Answer the question
In order to leave comments, you need to log in
Why don't the infoblock values come to the mail?
Hello. A question. I don't receive infoblock properties in the mail.
<?
AddEventHandler("iblock", "OnAfterIBlockElementAdd", Array("MyClass", "OnAfterIBlockElementAddHandler"));
class MyClass
{
function OnAfterIBlockElementAddHandler(&$arFields)
{
if ($arFields["IBLOCK_ID"] == "20") {
global $APPLICATION;
$arSend = array(
"IBLOCK_ID" => "20",
"COMPANY_NAME" => $arFields["NAME"],
"COMPANY_YEAR" => $arFields["PROPERTY_VALUES"]["36"],
"SERVICES" => $arFields["PROPERTY_VALUES"]["37"],
"FAMILYA" => $arFields["PROPERTY_VALUES"]["38"],
"AUTHOR_NAME" => $arFields["PROPERTY_VALUES"]["40"],
"OTCHESTVO" => $arFields["PROPERTY_VALUES"]["42"],
"DOLZNOST" => $arFields["PROPERTY_VALUES"]["39"],
);
CEvent::Send("FEEDBACK_SUP", "s1", "N", $arSend);
}
}
}
?>
Answer the question
In order to leave comments, you need to log in
Of course the array will be empty, did you get the data there?
1) Infoblock property values data must first be obtained - CIBlockElement::GetProperty
2) Element fields must also be obtained - GetIBlockElement
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question