This file contains hidden or 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 | |
define('EXTRANET_NO_REDIRECT', true); | |
define('LDAP_NO_PORT_REDIRECTION', true); | |
define("NO_KEEP_STATISTIC", true); | |
define("NOT_CHECK_PERMISSIONS", true); | |
define("SM_SAFE_MODE", true); | |
define("NO_AGENT_CHECK", true); | |
define("NO_AGENT_STATISTIC", true); | |
define("STOP_STATISTICS", true); | |
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); |
This file contains hidden or 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
/** | |
* [Копирует содержимое одного свойства в другое] | |
* @param [int] $ELEMENT_ID [ID элемента инфоблока] | |
* @param [string] $FROM_PROPERTY_CODE [Код свойства источника] | |
* @param [string] $FROM_PROPERTY_VALUE_XML_ID [XML название значения свойства источника] | |
* @param [string] $TO_PROPERTY_CODE [Код свойства приёмника] | |
* @param [string] $TO_PROPERTY_VALUE_XML_ID [XML название значения свойства приёмника] | |
*/ | |
function copyOneElementPropertyValue( | |
$ELEMENT_ID, |
This file contains hidden or 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
А фильтровать элементы так: | |
$arFilter = array( | |
'NAME' => $sRequestLetter.'%' | |
); | |
где $sRequestLetter - это выбранная буква(ы) алфавитного индекса. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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'); |
This file contains hidden or 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\ArgumentException; | |
use Bitrix\Main\Loader; | |
use Bitrix\Main\LoaderException; | |
use Bitrix\Main\ObjectPropertyException; | |
use Bitrix\Main\SystemException; | |
/** | |
* Отформатированный вывод массива |
This file contains hidden or 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
<? require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
use Bitrix\Main\Application; | |
use Bitrix\Main\Loader; | |
use Bitrix\Main\LoaderException; | |
use Bitrix\Sale\Order; | |
use Bitrix\Sale\Delivery; | |
use Bitrix\Sale\PaySystem; | |
use Bitrix\Sale\Basket; | |
use Bitrix\Currency\CurrencyManager; |
NewerOlder