Array ( [title] => тест [description] => описание [textone] => текст 1 [font_container] => color:%23dd3333 [source] => media_library [image] => 1368 [custom_src] => [img_size] => full [external_img_size] => [caption] => [alignment] => left [style] => [external_style] => [border_color] => grey [external_border_color] => grey [link] => http://test [css_animation] => [el_id] => [el_class] => [css] => [img_link_large] => )
AddEventHandler("main", "OnBeforeEventAdd", "SendMailSale");
function SendMailSale (&$event, &$lid, &$arFields) {
if ($event == 'SALE_STATUS_CHANGED_IZ'){
// определяем ID заказа
$OrderId = $arFields[ORDER_REAL_ID];
if ($OrderId > 0){
$order_props = CSaleOrderPropsValue::GetOrderProps($OrderId);
$Order = CSaleBasket::GetList(Array(),Array("ORDER_ID"=>$OrderId));
while ($arItems = $Order->Fetch())
{
$arFields['ORDER_LIST'] .= $arItems['NAME'].";<br>\n";
$arFields['PRICE'] += $arItems['PRICE'];
}
while ($arProps = $order_props->Fetch())
{
if ($arProps["CODE"] == "DELIVERY_TIME")
{
$arFields["DELIVERY_TIME"] = $arProps["VALUE"];
}
if ($arProps["CODE"] == "FIO")
{
$arFields["FIO"] = $arProps["VALUE"];
}
if ($arProps["CODE"] == "PHONE")
{
$arFields["PHONE"] = htmlspecialchars($arProps["VALUE"]);
}
if ($arProps["CODE"] == "EMAIL")
{
$arFields["EMAIL"] = $arProps["VALUE"];
}
if ($arProps["CODE"] == "ADDRESS")
{
$arFields["ADDRESS"] = $arProps["VALUE"];
}
}
}
}
}
\Bitrix\Main\EventManager::getInstance()->addEventHandler('sale', 'OnSaleOrderBeforeSaved', 'changeOrder');
function onOrderSave(Event $event) {
// получим объект заказа
$order = $event->getParameter("ENTITY");
file_put_contents('/var/www/www-root/data/www/shop.mercury-market.ru/bitrix/php_interface/log.php', print_r($order, true));
/* $order_id = $order->getID();*/
/* CSaleOrder::StatusOrder($order_id, 'iZ');*/
}
AddEventHandler("main", "OnAfterUserAuthorize", 'openOnAfterUserAuthorize');
function openOnAfterUserAuthorize($arUser) {
/*if (stripos($_SERVER['REQUEST_URI'],'bitrix/admin') === false) {}*/
LocalRedirect('/cabinet/index.php');
}
AddEventHandler("main", "OnAfterUserAuthorize", 'openOnAfterUserAuthorize');
function openOnAfterUserAuthorize($arUser) {
if (stripos($_SERVER['REQUEST_URI'],'bitrix/admin') === false) {
/* LocalRedirect('/cabinet/index.php');*/
}
}
?>
AddEventHandler("main", "OnAfterUserAuthorize", 'openOnAfterUserAuthorize');
function openOnAfterUserAuthorize($arUser) {
if (stripos($_SERVER['REQUEST_URI'],'bitrix/admin') === false) {
LocalRedirect('/cabinet/index.php');
}
}
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
echo "!!!!!!!!!!!!!!!";
print_r($arResult);
?>
<img class="basket-item-image" alt="{{NAME}}" src="{{{IMAGE_URL}}}{{^IMAGE_URL}}<?=$templateFolder?>/images/no_photo.png{{/IMAGE_URL}}">
15 =>
array (
'CONDITION' => '#^={SITE_DIR."personal/"}#',
'RULE' => '',
'ID' => 'bitrix:sale.personal.section',
'PATH' => '/personal/index.php',
'SORT' => 100,
),
13
3 =>
array (
'CONDITION' => '#^/personal/#',
'RULE' => '',
'ID' => 'bitrix:sale.personal.section',
'PATH' => '/personal/index.php',
'SORT' => 100,
),
<?php
$arUrlRewrite=array (
0 =>
array (
'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#',
'RULE' => 'componentName=$1',
'ID' => NULL,
'PATH' => '/bitrix/services/mobileapp/jn.php',
'SORT' => 100,
),
2 =>
array (
'CONDITION' => '#^/bitrix/services/ymarket/#',
'RULE' => '',
'ID' => '',
'PATH' => '/bitrix/services/ymarket/index.php',
'SORT' => 100,
),
15 =>
array (
'CONDITION' => '#^={SITE_DIR."personal/"}#',
'RULE' => '',
'ID' => 'bitrix:sale.personal.section',
'PATH' => '/personal/index.php',
'SORT' => 100,
),
13 =>
array (
'CONDITION' => '#^/skwb_courier/check/#',
'RULE' => '',
'ID' => 'skyweb24:itinerarycourier_user',
'PATH' => '/skwb_courier/check/index.php',
'SORT' => 100,
),
9 =>
array (
'CONDITION' => '#^/courier/check/#',
'RULE' => '',
'ID' => 'skyweb24:itinerarycourier_user',
'PATH' => '/courier/check/index.php',
'SORT' => 100,
),
6 =>
array (
'CONDITION' => '#^/receipts/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/receipts/index.php',
'SORT' => 100,
),
12 =>
array (
'CONDITION' => '#^/catalog/#',
'RULE' => '',
'ID' => 'bitrix:catalog',
'PATH' => '/catalog/index.php',
'SORT' => 100,
),
7 =>
array (
'CONDITION' => '#^/brands/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/brands/index.php',
'SORT' => 100,
),
5 =>
array (
'CONDITION' => '#^/stock/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/stock/index.php',
'SORT' => 100,
),
14 =>
array (
'CONDITION' => '#^\\??(.*)#',
'RULE' => '&$1',
'ID' => 'bitrix:catalog.section',
'PATH' => '/bitrix/templates/retail/components/bitrix/catalog/main/bitrix/catalog.element/bootstrap_v4/template.php',
'SORT' => 100,
),
1 =>
array (
'CONDITION' => '#^/rest/#',
'RULE' => '',
'ID' => NULL,
'PATH' => '/bitrix/services/rest/index.php',
'SORT' => 100,
),
);
<?php
$arUrlRewrite=array (
0 =>
array (
'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#',
'RULE' => 'componentName=$1',
'ID' => NULL,
'PATH' => '/bitrix/services/mobileapp/jn.php',
'SORT' => 100,
),
2 =>
array (
'CONDITION' => '#^/bitrix/services/ymarket/#',
'RULE' => '',
'ID' => '',
'PATH' => '/bitrix/services/ymarket/index.php',
'SORT' => 100,
),
15 =>
array (
'CONDITION' => '#^={SITE_DIR."personal/"}#',
'RULE' => '',
'ID' => 'bitrix:sale.personal.section',
'PATH' => '/personal/index.php',
'SORT' => 100,
),
13 =>
array (
'CONDITION' => '#^/skwb_courier/check/#',
'RULE' => '',
'ID' => 'skyweb24:itinerarycourier_user',
'PATH' => '/skwb_courier/check/index.php',
'SORT' => 100,
),
9 =>
array (
'CONDITION' => '#^/courier/check/#',
'RULE' => '',
'ID' => 'skyweb24:itinerarycourier_user',
'PATH' => '/courier/check/index.php',
'SORT' => 100,
),
6 =>
array (
'CONDITION' => '#^/receipts/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/receipts/index.php',
'SORT' => 100,
),
12 =>
array (
'CONDITION' => '#^/catalog/#',
'RULE' => '',
'ID' => 'bitrix:catalog',
'PATH' => '/catalog/index.php',
'SORT' => 100,
),
7 =>
array (
'CONDITION' => '#^/brands/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/brands/index.php',
'SORT' => 100,
),
5 =>
array (
'CONDITION' => '#^/stock/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/stock/index.php',
'SORT' => 100,
),
14 =>
array (
'CONDITION' => '#^\\??(.*)#',
'RULE' => '&$1',
'ID' => 'bitrix:catalog.section',
'PATH' => '/bitrix/templates/retail/components/bitrix/catalog/main/bitrix/catalog.element/bootstrap_v4/template.php',
'SORT' => 100,
),
1 =>
array (
'CONDITION' => '#^/rest/#',
'RULE' => '',
'ID' => NULL,
'PATH' => '/bitrix/services/rest/index.php',
'SORT' => 100,
),
);