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
$eventName = 'ORDER'; | |
$arFields = Array( | |
"FORM"=>$form, | |
"FIO" => $_REQUEST['name'], | |
"PHONE" => $_REQUEST['phone'], | |
"EMAIL" => $_REQUEST['email'], | |
"ORDER_LIST" => $ORDER, | |
"COMMENT" => $_REQUEST['comment'], | |
"DATE_FROM" => $_REQUEST['date_from'], | |
"DATE_TO" =>$_REQUEST['date_to'], |
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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC] | |
RewriteRule ^([^/]+) $1 [L] | |
RewriteCond %{HTTP_HOST} ^site\.com | |
RewriteRule ^(.*)$ http://site.org/$1 [R=301,L] | |
RewriteCond %{HTTP_HOST} ^www.site\.com | |
RewriteRule ^(.*)$ http://site.org/$1 [R=301,L] |
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
<? | |
$pieces = explode("/", $_SERVER['REQUEST_URI']); | |
$new_array = array_diff($pieces, array('')); | |
end($new_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
input[type=checkbox] { | |
display: none; | |
&+label:before{ | |
content: ""; | |
width: 14px; | |
height: 14px; | |
border-radius: 14px; | |
border: 1px solid #000; | |
display: block; | |
float: left; |
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
var slick = $('.slider').slick({ | |
//Тут параметры | |
}); | |
//Теперь по клику на изображение magnific-popup реинициализируем слайдер | |
$('.img').click(function() { | |
slick.slick('refresh'); | |
}); |
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
$(document).on('click', 'a[href^="#"]', function(e) { | |
// target element id | |
var id = $(this).attr('href'); | |
// target element | |
var $id = $(id); | |
if ($id.length === 0) { | |
return; | |
} |
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
<? | |
//удалаем GET | |
$url = explode('?', $_SERVER['REQUEST_URI']); | |
//получаем ссылку без GET | |
$url = $url[0]; | |
//преобразовываем в массив | |
$pieces = explode("/", $url); | |
$new_array = array_diff($pieces, array('')); | |
//проверяем соответствие кода элемента и последнего элемента массива | |
if(end($new_array)!=$_REQUEST["ELEMENT_CODE"]) |
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
$arSelect = Array();//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше | |
$arFilter = Array("IBLOCK_ID"=>IntVal($IBLOCK_ID), "ELEMENT_ID"=>$ELEMENT_ID); | |
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>1), $arSelect); | |
while($ob = $res->GetNextElement()){ | |
$arFields = $ob->GetFields(); //параметры | |
$arProps = $ob->GetProperties(); //свойства | |
} |
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 | |
define("NO_KEEP_STATISTIC", true); | |
define("NOT_CHECK_PERMISSIONS", true); | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
if($_REQUEST[cupon]!='') { | |
if (CModule::IncludeModule("sale") && CModule::IncludeModule("catalog")) { | |
$number_coupon = $_REQUEST[cupon]; // номер купона | |
\Bitrix\Sale\DiscountCouponsManager::init(); | |
\Bitrix\Sale\DiscountCouponsManager::clear(true); |
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
$('#FORMFEED').on("submit", function(event) { | |
var form = $(this); | |
var form_data = new FormData(this); | |
event.preventDefault(); | |
$.ajax({ | |
type: "POST", | |
async: true, | |
url: $(this).attr('action'), | |
cache: false, | |
contentType: false, |