AddEventHandler("main", "OnEndBufferContent", ['MyEvents', 'OnEndBufferContentHandler']);
class MyEvents {
public static function OnEndBufferContentHandler(&$content) {
preg_match('/href=".*\/css\/resize1280.css/', $content, $match);
if($match)
$content = str_replace($match[0], 'media="all and (max-width: 1280px)" '.$match[0], $content);
}
}
$result = mail($to, $subject, $msg, $headers);
$text = '';
$text .= (!empty($name))?'<p><strong>name:</strong> '.$name.'</p>':'';
$text .= (!empty($phone))?'<p><strong>phone:</strong> '.$phone.'</p>':'';
$text .= (!empty($email))?'<p><strong>email:</strong> '.$email.'</p>':'';
$text .= (!empty($date))?'<p><strong>date:</strong> '.$date.'</p>':'';
$text .= (!empty($time))?'<p><strong>time:</strong> '.$time.'</p>':'';
$text .= (!empty($work))?'<p><strong>usluga:</strong> '.$work.'</p>':'';
$text .= (!empty($message))?'<p><strong>message:</strong> '.$message.'</p>':'';
$text .= (!empty($_SERVER['HTTP_REFERER']))?'<p><strong>url:</strong> '.$_SERVER['HTTP_REFERER'].'</p>':'';
$text .= (!empty($name))?'<p><strong>name:</strong> '.$name.'</p>':'';
$text .= (!empty($name))?'<p><strong>имя:</strong> '.$name.'</p>':'';
'IS_AUTHORIZE' => $GLOBALS['USER']->IsAuthorized()
// а в проверке вместо $GLOBALS['USER']->IsAuthorized() будет $arParams['IS_AUTHORIZE']
$filter = ['IBLOCK_ID' => $iblockId, 'SECTION_ID' => $sectionId, '!TAGS' => false];
\Bitrix\Main\Loader::includeModule('sale');
$productsId = [];
$orderId = 23;
$order = \Bitrix\Sale\Order::load($orderId);
if($order) {
$basket = $order->getBasket();
$basketItems = $basket->getBasketItems();
foreach($basketItems as $item) {
$productsId[] = $item->getField('PRODUCT_ID');
}
}
print_r($productsId);
Шаблон ссылки детальной страницы (подраздел №1), как-то странно что у элемента есть подраздел???