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
Основной домен domain.ru | |
Зеркало domain2.ru | |
Настройка конфигов для сайта: | |
1. /etc/nginx/bx/site_avaliable/ | |
bx_ext_domain.ru.conf | |
bx_ext_ssl_domain.ru.conf | |
server_name domain.ru www.domain.ru domain2.ru www.domain2.ru; |
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
Create /etc/mercurial/hgrc.d/trust.rc | |
[trusted] | |
groups = bitrix | |
users = 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
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine On | |
# Редирект с www на без www | |
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
# Удаляем index.php из адреса | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] | |
# Не применяем к админке, иначе перестает работать страница Highload-блоки | |
RewriteCond %{REQUEST_URI} !/bitrix/admin/.* [NC] |
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
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$ | |
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L] | |
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] | |
</IfModule> |
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
/* ReCRM Redirect */ | |
AddEventHandler('main', 'OnBeforeProlog', 'ReCRM_redirect',1); | |
function ReCRM_redirect() | |
{ | |
CModule::IncludeModule("pr.recrm"); | |
$prReCrmData = new prReCrmData; | |
$prReCrmData->redirect(); | |
} |
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
AddEventHandler("pr.recrm", "OnBeforeGetSettings", "prOnBeforeGetSettings"); | |
function prOnBeforeGetSettings($arData = array()) | |
{ | |
$arResult = $arData; | |
$arResult['PARAMS']['pr_recrm_key'] = 'demo'; // определяем новый ключ | |
return $arResult; | |
} |
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
AddEventHandler("pr.recrm", "OnAfterImport", "prOnAfterImport"); | |
function prOnAfterImport() | |
{ | |
BXClearCache(true, "/s1/pr/"); | |
} |
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
AddEventHandler("pr.recrm", "OnBeforeImport", "MyReCRMOnBeforeImport"); | |
function MyReCRMOnBeforeImport($arData = array()) | |
{ | |
$arResult = $arData; | |
if($arResult['TYPE'] == 'estate') | |
{ | |
/* Добавим в свойство MyCustomField стоимость price_total + 18% */ | |
$arResult['PROP']['MyCustomField'] = $arResult['PROP']['price_total'] * 1.18; | |
} |
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
//in console | |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
... wait 5 sec ... | |
jQuery(document).ready(function($) { | |
$('.dga').each(function(){ | |
$(this).click(); | |
}); |
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("iblock"); | |
$arParams = array(); | |
$res = CIBlock::GetList(array(), array()); | |
while($arF = $res->Fetch()) | |
{ | |
$PROPS = CIBlock::GetProperties($arF['ID'], array('SORT'=>'ASC'), array('PROPERTY_TYPE' => 'E')); | |
while ($PROP = $PROPS->Fetch()) | |
{ | |
$arParams[] = array( | |
'd' => 'Y', |