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
var ajaxFormSubmit = function (form, event) { | |
var string = $(form).serialize(); | |
$.ajax({ | |
type: "POST", | |
url: "/local/templates/chistikov/assets/libs/php/mail.php", | |
data: string, | |
success: function(html) { | |
$("#answer").html(html); | |
} |
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
<?php | |
use Bitrix\Main\Application; | |
use Bitrix\Main\Diag\Debug; | |
use Bitrix\Main\Loader; | |
use Bitrix\Main\LoaderException; | |
$request = Application::getInstance()->getContext()->getRequest(); | |
function is_ajax() | |
{ |
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
if (!\Bitrix\Main\Loader::includeModule('iblock')) | |
{ | |
ShowError(Loc::getMessage('IBLOCK_MODULE_NOT_INSTALLED')); | |
return; | |
} |
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
<?php | |
/*** | |
* Get info data from Highload block | |
* @param $HighLoadBlockID | |
* @param array $selectArray | |
* @param array $filterArray | |
* @param array $orderArray | |
* @param $limit | |
* @return \Bitrix\Main\ORM\Query\Result | |
* @throws \Bitrix\Main\ArgumentException |
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
<meta http-equiv="Content-Type" content="text/html; charset=<?= LANG_CHARSET;?>" /> |
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
/** | |
* Получить все торговые предложения. | |
* | |
* Get all SKU's properties | |
* | |
* @return array | |
*/ | |
<?php | |
use Bitrix\Main\Loader; |
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
<? | |
$cacheId = 'flowersSKU'; | |
$cacheTtl = '604800000'; // 7 дней срок в миллисекундах. | |
$cache = \Bitrix\Main\Application::getInstance()->getManagedCache(); | |
/*** | |
* Проверка на наличие слуществующего кэша с таким ID, | |
* если есть, то записываем в переменную $resOffers, | |
* иначе cохраняем результат функции в кэш. | |
*/ |
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
<?php | |
/** | |
* Push in end value in associative array. | |
* Добавляет в конец значение в ассоциативный массив. | |
* @return array | |
*/ | |
function array_push_associative($array, $key, $value) | |
{ | |
$array[$key] = $value; | |
return $array; |
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
<?php | |
/** | |
* Beautiful display var_export. | |
* Вывести в отформатированном формате var_export. | |
* | |
* @return mixed | |
*/ | |
function pre_export($value) | |
{ |
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
<?php | |
use \Bitrix\Main\Loader; | |
use \Bitrix\Main\SystemException; | |
use \Bitrix\Sale; | |
use \Bitrix\Main\UserTable; | |
use \Bitrix\Main\EventManager; | |
$eventManager = EventManager::getInstance(); | |
$eventManager->addEventHandler('sale', 'OnOrderNewSendEmail', 'customSaleMails'); |
OlderNewer