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\Context; | |
use Bitrix\Main\Application; | |
//$context = Context::getCurrent(); | |
//$request = $context->getRequest(); | |
$context = Application::getInstance()->getContext(); | |
$request = Application::getInstance()->getContext()->getRequest(); | |
$request = Bitrix\Main\Application::getInstance()->getContext()->getRequest(); |
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 | |
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include.php'; | |
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/classes/general/csv_data.php'; | |
$strFilePath = $_SERVER['DOCUMENT_ROOT'] . '/upload/catalog.csv'; | |
$obCsvFile = new CCSVData('R', false); | |
$obCsvFile->LoadFile($strFilePath); | |
$obCsvFile->SetDelimiter(';'); | |
$arCatalog = 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 | |
use Bitrix\Main\Loader; | |
function OnPriceUpdateHandler($ID, $arFields) { | |
Loader::includeModule('iblock'); | |
Loader::includeModule('catalog'); | |
$arItem = \CCatalogSku::GetProductInfo($arFields['PRODUCT_ID']); |
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 | |
/** @global CUser $USER */ | |
/** @global CMain $APPLICATION */ | |
/** @var int $IBLOCK_ID */ | |
/** @var string $SETUP_SERVER_NAME */ | |
/** @var string $SETUP_FILE_NAME */ | |
/** @var array $V */ | |
/** @var array|string $XML_DATA */ | |
/** @var bool $firstStep */ | |
/** @var int $CUR_ELEMENT_ID */ |
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; | |
Loader::includeModule('iblock'); | |
$element = new CIBlockElement; | |
$arFields = array( | |
'NAME' => '', | |
'IBLOCK_ID' => '', |
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
<? | |
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php'); | |
$APPLICATION->SetTitle('Title'); | |
?> | |
... | |
<? require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php'); ?> |
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\Highloadblock\HighloadBlockTable; | |
use Bitrix\Main\Loader; | |
Loader::includeModule('highloadblock'); | |
// comment | |
// $intIblockID = 96; | |
// $arHLBlock = HighloadBlockTable::getById($intIblockID)->fetch(); |
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
<? | |
$this->AddEditAction( | |
'bla', | |
'/bitrix/admin/public_file_edit.php?site=s1&bxpublic=Y&from=includefile&templateID=main&path='. SITE_TEMPLATE_PATH . '/include/phone.html&back_url=%2Fcatalog%2F&lang=ru&siteTemplateId=main&bxsender=core_window_cadmindialog', | |
'Редактировать верхний текст'); | |
?> | |
<span id="<?= $this->GetEditAreaId('bla') ?>"> | |
<? $APPLICATION->IncludeFile( | |
SITE_TEMPLATE_PATH . '/include/phone.html', | |
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 | |
use Bitrix\Main\Context; | |
use Bitrix\Main\Loader; | |
use Bitrix\Sale\Basket; | |
use Bitrix\Sale\Fuser; | |
Loader::includeModule('sale'); | |
$obRequest = Context::getCurrent()->getRequest(); | |
$intItemID = 51;// id basket intres |
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\Currency\CurrencyManager; | |
use Bitrix\Main\Loader; | |
Loader::includeModule('currency'); | |
CCurrencyLang::CurrencyFormat($flPrice, CurrencyManager::getBaseCurrency()); |
OlderNewer