This file contains hidden or 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
//404 add statys | |
if(count($arSectionCurrent) === 0){ | |
@define('ERROR_404', 'Y'); | |
CHTTP::SetStatus('404 Not Found'); | |
} | |
//404 show error page | |
global $APPLICATION; | |
if ((defined('ERROR_404')) && (ERROR_404=='Y')) | |
{ |
This file contains hidden or 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
function sliderIndex() { | |
$('.items_slider_kitchen_line').not('.slick-initialized').slick({ | |
infinite: false, | |
slidesToShow: 3, | |
slidesToScroll: 1 | |
}); | |
} | |
//ajax success | |
sliderIndex(); |
This file contains hidden or 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
//install global | |
npm install --global gulp-cli | |
//in project | |
npm init /* create package.json */ | |
npm install gulp --save-dev |
This file contains hidden or 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
//add video youtube channel | |
if ($('.video_slider_youtube').length) { | |
$.ajax({ | |
type: 'GET', | |
url: 'https://www.googleapis.com/youtube/v3/search', | |
data: { | |
order: 'date', | |
part: 'snippet', | |
channelId: 'UCBvF9cRoyNHM7AH6gJx2ZYQ', |
This file contains hidden or 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
//event sensitive scroll | |
window.scrollPage = false; | |
var ts; | |
$(document).bind('touchstart', function (e){ | |
ts = e.originalEvent.touches[0].clientY; | |
}); | |
$(document).bind('touchmove', function (e){ | |
var te = e.originalEvent.changedTouches[0].clientY; |
This file contains hidden or 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 href="#" class="call_back">Call me</a> | |
<div id="callback" class="item_popup mfp-hide"> | |
<p class="name_item_popup">name popup</p> | |
</div> | |
//js | |
$('body').on('click', 'a.call_back', function () { | |
$.magnificPopup.open({ |
This file contains hidden or 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
JCSmartFilter.prototype.postHandler = function (result, fromCache) | |
{ | |
var hrefFILTER, url, curProp; | |
var modef = BX('modef'); | |
var modef_num = BX('modef_num'); | |
if (!!result && !!result.ITEMS) | |
{ | |
//---------------------------------------------------------------- |
This file contains hidden or 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 | |
<form enctype="multipart/form-data" method="post"> | |
<input type="file" name="place_file[]" multiple> | |
</fotm> | |
//php | |
$obContext = Context::getCurrent(); | |
$obRequest = $obContext->getRequest(); | |
$arFileAll = array(); |
This file contains hidden or 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; | |
use Bitrix\Main\Diag\Debug; | |
Loader::includeModule('iblock'); | |
Loader::includeModule('catalog'); | |
AddEventHandler('iblock', 'OnAfterIBlockElementAdd', 'setProductMinPrice'); | |
AddEventHandler('iblock', 'OnAfterIBlockElementUpdate', 'setProductMinPrice'); |
OlderNewer