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("ID", "IBLOCK_ID", "NAME"); | |
$arFilter = Array("IBLOCK_ID" => "105", "SECTION_ID" => 401); | |
$res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect); | |
//пробегаемся по всем элементам списка | |
while ($ob = $res->GetNext()) { | |
//тут делаем свои дела | |
} |
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
<?//Функция принимает как параметр ID товара, | |
//возвращает цену со всеми скидками. | |
//Автор - Максим с сайта alittlebit.ru. | |
function getFinalPriceInCurrency($item_id, $sale_currency = 'RUB') { | |
CModule::IncludeModule("iblock"); | |
CModule::IncludeModule("catalog"); | |
CModule::IncludeModule("sale"); | |
global $USER; | |
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 с заданным id и текстом | |
* @return sring | |
* | |
*/ | |
function i($id, $text) | |
{ | |
echo "<input id='{$id}' type='hidden' value='{$text}'>"; | |
} |
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
function dd ($param) | |
{ | |
global $USER; | |
if ($USER->IsAdmin()) { | |
echo "<pre>"; | |
var_dump($param); | |
echo "</pre>"; | |
} | |
} |
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
/* | |
Выводят переменную в консоль браузера. Применяются для отладки | |
*/ | |
function vpr ($var, $label = '') | |
{ | |
$str = json_encode(print_r ($var, true)); | |
echo "<script>console.group('".$label."');console.log('".$str."');console.groupEnd();</script>"; | |
} |
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
$arUrlTemplates = array( | |
"section" => "#SECTION_CODE#/", | |
"element" => "#SECTION_CODE#/#ELEMENT_CODE#/" | |
); | |
$arVariables = array(); | |
$page = CComponentEngine::ParseComponentPath(GetDirPath($_SERVER["REAL_FILE_PATH"]), $arUrlTemplates, $arVariables); |
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="privacy_sring"><a href="/privacy/" target="_blank">Политика конфиденциальности</a><br> | |
<a href="/consent_for_personal_data/" target="_blank">Согласие на обработку персональных данных</a></div> | |
<input id="checkbox_1" name="" value="0" type="checkbox"> | |
<label for="checkbox_1" class="privacy_string">Отправляя персональные данные из данной формы, я даю согласие на <a href="/consent_for_personal_data/" target="_blank">обработку моих персональных данных</a> согласно ч.4.ст.9 152-ФЗ</label> | |
<div class="privacy_string">Отправляя персональные данные из данной формы, я даю согласие на <a href="/consent_for_personal_data/" target="_blank">обработку моих персональных данных</a></div> | |
<h4>Уважаемые посетители!</h4> | |
<ol> | |
<li>При использовании информации, размещаемой на официальном интернет-сайте (далее – Сайт), |
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
/** | |
* функция вида checker("#checkbox_1", "#web_form_apply"); | |
* где checkbox_1 - селектор чекбокса, | |
* web_form_apply - селектор кнопки, которая д.б. неактивна при выключенном чекбоксе | |
*/ | |
var checker = function (checkbox_id, button_id) { | |
if (!$(checkbox_id).is(":checked")) { | |
$(button_id).attr("disabled", true).css({opacity: "0.3"}); | |
} | |
$(checkbox_id).change(function () { |
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
<? | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
$APPLICATION->SetTitle("Соглашение об обработке персональных данных"); | |
$site = CSite::GetByID(SITE_ID)->Fetch(); | |
?> | |
<style> | |
blockquote .consent_for_personal_data li { | |
list-style-type: decimal; | |
} |
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
<? | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
$APPLICATION->SetTitle("Политика конфиденциальности."); | |
$site = CSite::GetByID(SITE_ID)->Fetch(); | |
?> | |
<style> | |
.privacy_style li { | |
list-style-type: decimal; | |
} | |
li.center { |
OlderNewer