Created
June 5, 2024 11:52
-
-
Save EscApp2/4f651ec1c99b5b783394f8cbeab2ccb1 to your computer and use it in GitHub Desktop.
В почтовом шаблоне узнать тип события
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<? | |
if(!!$arParams['__CUR_EVENT_TYPE']){ | |
$TEXT = ''; | |
if($arParams['__CUR_EVENT_TYPE'] == "SALE_ORDER_PAID") { | |
$TEXT = ""; | |
}elseif($arParams['__CUR_EVENT_TYPE'] == "SALE_NEW_ORDER"){ | |
$TEXT = " "; | |
}elseif($arParams['__CUR_EVENT_TYPE'] == "SUBSCRIBE_CONFIRM"){ | |
$TEXT = " "; | |
} | |
if($TEXT){ | |
?> | |
<div id="preheader" style="font-size:0;line-height:0;"> | |
<?=$TEXT?> | |
<div id="preheader_indents"> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span> | |
<span>⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ <!-- продублируйте не менее 11 раз строку выше, чтобы скрыть контент письма в прехедере --> | |
</div> | |
</div> | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
AddEventHandler('main', 'OnBeforeEventAdd', "setCurEventType"); | |
function setCurEventType($event, $lid, &$arFields){ | |
$arFields['__CUR_EVENT_TYPE'] = $event; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment