Answer the question
In order to leave comments, you need to log in
Why is the email template not working?
<?php
define("NO_KEEP_STATISTIC", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
CModule::IncludeModule("iblock");
$el = new CIBlockElement;
$PROP = [];
$PROP["NAME"] = $_POST["name"];
$PROP["PHONE"] = $_POST["phone"];
$arLoadProductArray = [
"IBLOCK_SECTION_ID" => false,
"IBLOCK_ID" => 3,
"PROPERTY_VALUES"=> $PROP,
"NAME" => "Обратная связь",
"ACTIVE" => "Y",
];
$arEventFields = [
"EMAIL" => $_POST["name"],
"ADMIN" => "[email protected]",
"PHONE" => $_POST["phone"]
];
if($PRODUCT_ID = $el->Add($arLoadProductArray))
if(CEvent::Send("CONSULTATION",1, $arEventFields,"N",29))
echo json_encode(['success'=>true]);
else
echo json_encode(['success'=>false]);
CModule::IncludeModule("iblock");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question