Last active
March 31, 2018 08:36
-
-
Save igoogle/ca6681ae418d114d7f9a80fbfdc969a4 to your computer and use it in GitHub Desktop.
Bitrix help
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 | |
/* $arLog */ | |
$arLog = [ | |
0 => $post_action, | |
1 => $post_file_basket_id | |
]; | |
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/_log.txt"); | |
AddMessage2Log(print_r($arLog, true), "looker"); | |
/* $Request */ | |
$request = \Bitrix\Main\HttpApplication::getInstance()->getContext()->getRequest(); | |
$file_id = (int)$request->getPost('file_id'); | |
/* Basket */ | |
$basket = \Bitrix\Sale\Basket::loadItemsForFUser( | |
\Bitrix\Sale\Fuser::getId(), | |
\Bitrix\Main\Context::getCurrent()->getSite() | |
); | |
/* Prolog / epilog */ | |
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
require($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/epilog_after.php'); | |
/* Замена ID инфоблока в мастере установки готового решения Битрикс: */ | |
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH."/_index.php", array("SLIDER_IBLOCK_ID" => $iblockID)); | |
/* UPD: замена инфоблока в файлах шаблона: */ | |
$templateID = $wizard->GetVar("templateID"); | |
$themeID = $wizard->GetVar($templateID."_themeID"); | |
$bitrixTemplateDir = BX_PERSONAL_ROOT."/templates/".$templateID."_".$themeID; | |
CWizardUtil::ReplaceMacros($_SERVER['DOCUMENT_ROOT'] . $bitrixTemplateDir . '/ajax/form/reviews-form.php', array('REVIEWS_IBLOCK_ID' => $iblockID)); | |
$APPLICATION->IncludeFile( | |
SITE_TEMPLATE_PATH.'/texts/main/text-1.php', | |
Array(), | |
Array( | |
'SHOW_BORDER' => true, | |
'NAME' => 'Заголовок', | |
'MODE' => 'html', | |
'TEMPLATE' => 'block', | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Пожалуйста, пишите в комментарии свои файлы bitrix_help.php! Я дополню!