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
cd ~/www | |
find . -type d -exec chmod 775 {} \; | |
find . -type f -exec chmod 664 {} \; | |
find . -type d -exec chown bitrix:bitrix {} \; | |
find . -type f -exec chown bitrix:bitrix {} \; |
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
<?$APPLICATION->ShowViewContent('sidebar'); // для вывода результата ?> | |
<?$this->SetViewTarget('sidebar');?> | |
<?//your content for show?> | |
<?$this->EndViewTarget();?> |
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
BX.Sale.BasketComponent.sendRequest('refreshAjax', {fullRecalculation: 'Y'}); |
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
<?CModule::IncludeModule("catalog"); | |
$arSelect = Array("ID", "IBLOCK_ID", "CATALOG_PRICE_1"); | |
$arFilter = Array("IBLOCK_ID"=>17); | |
//ID инфоблока с ТП, а не с простыми товарами | |
$resw = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>1000000), $arSelect); | |
while($ob = $resw->GetNextElement()){ | |
$arFields = $ob->GetFields(); | |
$arProps = $ob->GetProperties(); | |
{ | |
echo $arFields[ID].' - '.$arFields['CATALOG_PRICE_1'].'</br>'; |
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
<? | |
$em = Bitrix\Main\EventManager::getInstance(); | |
$em->addEventHandler('iblock', 'OnBeforeIBlockElementAdd', [ | |
EventHandlers::class, | |
'on1CUserAddElement' | |
]); | |
$em->addEventHandler('iblock', 'OnBeforeIBlockElementUpdate', [ | |
EventHandlers::class, |
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
use Bitrix\Main\Loader; | |
Loader::includeModule("highloadblock"); | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; | |
$hlbl = 1; // Указываем ID нашего highloadblock блока к которому будет делать запросы. | |
$hlblock = HL\HighloadBlockTable::getById($hlbl)->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
$url = 'https://domain.pr/anything'; | |
$headers = ['Content-Type: application/json']; // заголовки нашего запроса | |
$post_data = [ // поля нашего запроса | |
'field1' => 'val_1', | |
'field2' => 'val_2', | |
]; | |
$data_json = json_encode($post_data); // переводим поля в формат JSON |
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
#html | |
<a class="toTop hidden" href="#top"><i class="fas fa-chevron-up"></i></a> | |
#style | |
.toTop{ | |
position: fixed; | |
right: 50px; | |
bottom: 20px; | |
} | |
.toTop.hidden{ |
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
<div class="loader">Loade...</div> | |
<div class="step"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function func(i) | |
{ | |
var form_data = new FormData(); | |
form_data.append('ITER', i); | |
$.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
<?//обновление свойства элемента | |
$result = \Bitrix\Iblock\ElementPropertyTable::update( | |
$arProp[ID],// ID в таблице | |
[ | |
'IBLOCK_PROPERTY_ID'=>50, // ID свойства | |
'VALUE'=>$arProp['VALUE'] // новое значение свойства | |
]); | |
?> |
NewerOlder