Compare commits
38 Commits
Author | SHA1 | Date |
---|---|---|
|
4a719ad204 | 2 months ago |
|
94862c9a5d | 2 months ago |
|
db437e7b33 | 2 months ago |
|
8990709ff7 | 2 months ago |
|
43f5dda004 | 2 months ago |
|
cf351d9e0b | 2 months ago |
|
1f8efdeeeb | 2 months ago |
|
272649602b | 2 months ago |
|
0130d4b305 | 2 months ago |
|
a03ba8435a | 2 months ago |
|
da7ebaa3ce | 2 months ago |
|
7559d232ab | 2 months ago |
|
e27282e617 | 2 months ago |
|
8470b2c459 | 2 months ago |
|
f248a44134 | 2 months ago |
|
abd5ac332b | 2 months ago |
|
2bdfeef5d6 | 2 months ago |
|
b150193153 | 2 months ago |
|
389e8036a0 | 2 months ago |
|
3aa877b856 | 2 months ago |
|
356f22f708 | 2 months ago |
|
63c9afabff | 2 months ago |
|
d59b612557 | 2 months ago |
|
a8b8ef7b5b | 2 months ago |
|
877e7527a2 | 2 months ago |
|
28cbcefb7c | 2 months ago |
|
aad8592437 | 2 months ago |
|
1241a054fc | 2 months ago |
|
cbbeee4e97 | 2 months ago |
|
cd78504835 | 2 months ago |
|
446a6d36a5 | 2 months ago |
|
8ec2edfaa5 | 2 months ago |
|
57ff925c03 | 2 months ago |
|
46e8d3d2b0 | 2 months ago |
|
1b7dbff82f | 2 months ago |
|
3fde5a87b7 | 2 months ago |
|
6bd834f5cd | 2 months ago |
|
2a7af95419 | 2 months ago |
@ -0,0 +1,32 @@ |
|||||||
|
<? |
||||||
|
$aMenuLinks = Array( |
||||||
|
Array( |
||||||
|
"Договора", |
||||||
|
"/dokumentatsiya/dogovora/", |
||||||
|
Array(), |
||||||
|
Array(), |
||||||
|
"" |
||||||
|
), |
||||||
|
Array( |
||||||
|
"Реквизиты", |
||||||
|
"/pokupatelyam/yuridicheskie-dannye/", |
||||||
|
Array(), |
||||||
|
Array(), |
||||||
|
"" |
||||||
|
), |
||||||
|
Array( |
||||||
|
"Политика конфиденциальности", |
||||||
|
"/dokumentatsiya/politika-konfidentsialnosti/", |
||||||
|
Array(), |
||||||
|
Array(), |
||||||
|
"" |
||||||
|
), |
||||||
|
Array( |
||||||
|
"Пользовательское соглашение", |
||||||
|
"/dokumentatsiya/polzovatelskoe-soglashenie/", |
||||||
|
Array(), |
||||||
|
Array(), |
||||||
|
"" |
||||||
|
) |
||||||
|
); |
||||||
|
?> |
@ -1,6 +1,7 @@ |
|||||||
<? |
<? |
||||||
$sSectionName = "О компании"; |
$sSectionName = "О компании"; |
||||||
$arDirProperties = Array( |
$arDirProperties = Array( |
||||||
|
"description" => "Компания «Септик Эра» более 10 лет оказывает услуги по производству и установке септиков для дач и загородных домов. За это время накоплен колоссальный опыт, который помогает создавать качественные, надежные, неприхотливые в эксплуатации и доступные по цене изделия.", |
||||||
|
"title" => "Производство септиков Эра | ООО \"Компания Новая Эра\"" |
||||||
); |
); |
||||||
?> |
?> |
@ -0,0 +1,6 @@ |
|||||||
|
<? |
||||||
|
$sSectionName = "Скидка в день рождения"; |
||||||
|
$arDirProperties = array( |
||||||
|
|
||||||
|
); |
||||||
|
?> |
@ -0,0 +1,38 @@ |
|||||||
|
<? |
||||||
|
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); |
||||||
|
$APPLICATION->SetTitle("Покупка Септика в День Рождения"); |
||||||
|
?> |
||||||
|
<?$APPLICATION->IncludeComponent("bitrix:breadcrumb", "breadcrumbs", Array( |
||||||
|
"PATH" => "", |
||||||
|
"SITE_ID" => "s1", |
||||||
|
"START_FROM" => "0", |
||||||
|
), |
||||||
|
false |
||||||
|
);?> |
||||||
|
<section class="text-section section container"> |
||||||
|
<h1 class="text-section__title">День рождения это особенная дата для каждого человека и в этот день <span class="green-text">любой хочет чувствовать себя особенным и получать подарки</span> </h1> |
||||||
|
<p class="text-section__text"> |
||||||
|
Покупка септика в день рождения со скидкой, всегда приятно! Мы решили не оставаться в стороне и тоже хотим сделать Вам приятно. |
||||||
|
</p> |
||||||
|
</section> <section class="stock-card section container"> |
||||||
|
<div class="stock-card-block"> |
||||||
|
<div class="info-block stock-card-text"> |
||||||
|
<div class="info-block__wrapper"> |
||||||
|
<div class="info-block__icon"> |
||||||
|
<img width="26" alt="Иконка ограниченного времени" src="/local/templates/EraSeptik/images/svg/fun.svg" height="26"> |
||||||
|
</div> |
||||||
|
<div class="info-block__content"> |
||||||
|
<p class="info-block__text"> |
||||||
|
Акция действует <b>в день рождения и за 2 дня до него</b> |
||||||
|
</p> |
||||||
|
<p class="info-block__text"> |
||||||
|
На всю линейку для вас будет действовать дополнительная скидка, которую вы можете уточнить по телефону у наших менеджеров |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="promotion__image stock-card-image"> |
||||||
|
<img alt="Септик и подарок на день рождения" src="/local/templates/EraSeptik/images/png/frameseptic&present.png" div=""> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section><?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?> |
@ -0,0 +1,6 @@ |
|||||||
|
<? |
||||||
|
$sSectionName = "Специальное предложение"; |
||||||
|
$arDirProperties = array( |
||||||
|
|
||||||
|
); |
||||||
|
?> |
@ -0,0 +1,40 @@ |
|||||||
|
<? |
||||||
|
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); |
||||||
|
$APPLICATION->SetPageProperty("title", "Скидки на септики Эра | Специальные предложения на септики"); |
||||||
|
$APPLICATION->SetPageProperty("description", "Успей купить по акции септики • Специальные предложения по выгодной цене от компании Септик Эра."); |
||||||
|
$APPLICATION->SetTitle("Сепециальное предложение"); |
||||||
|
?> |
||||||
|
<?$APPLICATION->IncludeComponent("bitrix:breadcrumb", "breadcrumbs", Array( |
||||||
|
"PATH" => "", |
||||||
|
"SITE_ID" => "s1", |
||||||
|
"START_FROM" => "0", |
||||||
|
), |
||||||
|
false |
||||||
|
);?> |
||||||
|
<section class="text-section section container"> |
||||||
|
<h1 class="text-section__title">Специальные предложения на отдельные товары. </h1> |
||||||
|
<p class="text-section__text"> |
||||||
|
ТЕКС ТЕКСТ |
||||||
|
</p> |
||||||
|
</section> <section class="stock-card section container"> |
||||||
|
<div class="stock-card-block"> |
||||||
|
<div class="info-block stock-card-text"> |
||||||
|
<div class="info-block__wrapper"> |
||||||
|
<div class="info-block__icon"> |
||||||
|
<img width="26" alt="Иконка ограниченного времени" src="/local/templates/EraSeptik/images/svg/fun.svg" height="26"> |
||||||
|
</div> |
||||||
|
<div class="info-block__content"> |
||||||
|
<p class="info-block__text"> |
||||||
|
ТЕКСТ |
||||||
|
</p> |
||||||
|
<p class="info-block__text"> |
||||||
|
ТЕКСТ ТЕКС |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="promotion__image stock-card-image"> |
||||||
|
<img width="545" alt="Септик и подарок на день рождения" src="/local/templates/EraSeptik/images/png/framegreen_septic.png" height="234" div=""> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?> |
@ -1,11 +0,0 @@ |
|||||||
<? |
|
||||||
$aMenuLinks = Array( |
|
||||||
Array( |
|
||||||
"Новая страница", |
|
||||||
"/catalog/novaya-stranitsa.php", |
|
||||||
Array(), |
|
||||||
Array(), |
|
||||||
"" |
|
||||||
) |
|
||||||
); |
|
||||||
?> |
|
@ -0,0 +1,20 @@ |
|||||||
|
<? |
||||||
|
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); |
||||||
|
$APPLICATION->SetTitle("Расчет септика"); |
||||||
|
?> |
||||||
|
|
||||||
|
<main class="content" id="content"> |
||||||
|
<div class="container"> |
||||||
|
<?$APPLICATION->IncludeComponent( |
||||||
|
"era:html.map", |
||||||
|
"", |
||||||
|
Array( |
||||||
|
// "IBLOCK_ID" => "4", // ID инфоблока с товарами |
||||||
|
// "CACHE_TYPE" => "A", |
||||||
|
// "CACHE_TIME" => "3600" |
||||||
|
) |
||||||
|
);?> |
||||||
|
</div> |
||||||
|
</main> |
||||||
|
|
||||||
|
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
|
@ -1,11 +1,11 @@ |
|||||||
<div class="cart-page__aside-list"> |
<div class="cart-page__aside-list"> |
||||||
<div> |
<div> |
||||||
Самовывоз из магазина - сегодня |
Самовывоз из магазина - По договоренности |
||||||
</div> |
</div> |
||||||
<div> |
<div> |
||||||
Доставка курьером - завтра |
Доставка курьером - По договоренности |
||||||
</div> |
</div> |
||||||
<div> |
<div> |
||||||
Доставка почтой - 1-2 дня |
Доставка почтой - По договоренности |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
@ -0,0 +1,26 @@ |
|||||||
|
<div class="catalog-page__seo-item"> |
||||||
|
<div class="catalog-page__seo-name"> |
||||||
|
SEO-текст 1 |
||||||
|
</div> |
||||||
|
<p class="catalog-page__seo-text"> |
||||||
|
Редактируется из /include/catalog-seo-text.php |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="catalog-page__seo-item"> |
||||||
|
<div class="catalog-page__seo-name"> |
||||||
|
SEO-текст 2 |
||||||
|
</div> |
||||||
|
<p class="catalog-page__seo-text"> |
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget. |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="catalog-page__seo-item"> |
||||||
|
<div class="catalog-page__seo-name"> |
||||||
|
SEO-текст 3 |
||||||
|
</div> |
||||||
|
<p class="catalog-page__seo-text"> |
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes. |
||||||
|
</p> |
||||||
|
</div> |
@ -0,0 +1,88 @@ |
|||||||
|
<? |
||||||
|
const PUBLIC_AJAX_MODE = true; |
||||||
|
const NO_KEEP_STATISTIC = "Y"; |
||||||
|
const NO_AGENT_STATISTIC = "Y"; |
||||||
|
const NO_AGENT_CHECK = true; |
||||||
|
const DisableEventsCheck = true; |
||||||
|
|
||||||
|
use Bitrix\Main\Application; |
||||||
|
use Bitrix\Main\Rating\Internal\Action; |
||||||
|
use Bitrix\Main\Web\Json; |
||||||
|
use Bitrix\Main\Config\Option; |
||||||
|
|
||||||
|
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); |
||||||
|
|
||||||
|
$request = \Bitrix\Main\Application::getInstance()->getContext()->getRequest(); |
||||||
|
$isHttps = $request->isHttps(); |
||||||
|
$isAjax = $request->isAjaxRequest(); |
||||||
|
$isPost = $request->isPost(); |
||||||
|
|
||||||
|
$protocol = $request->isHttps() ? 'https' : 'http'; |
||||||
|
$site_url= $protocol.'://'.$request->getHttpHost(); |
||||||
|
$recaptcha_response = (string)$request->getPost('recaptcha_response'); |
||||||
|
|
||||||
|
if(!check_bitrix_sessid()) return; |
||||||
|
|
||||||
|
if ($recaptcha_response){ |
||||||
|
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify'; |
||||||
|
$recaptcha_secret_key = '6LcSCXArAAAAAEdhWbATecK4jwMK9WvZbUV2szrY'; |
||||||
|
|
||||||
|
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret_key . '&response=' . $recaptcha_response); |
||||||
|
$recaptcha = json_decode($recaptcha); |
||||||
|
|
||||||
|
//score от 0.1 до 1.0 |
||||||
|
if ($recaptcha->score <= 0.4) return; |
||||||
|
} |
||||||
|
|
||||||
|
if($isPost) { |
||||||
|
$name = (string)$request->getPost('name'); |
||||||
|
$phone = (string)$request->getPost('phone'); |
||||||
|
$page = (string)$request->getPost('page'); |
||||||
|
|
||||||
|
if (empty($name) || empty($phone)) { |
||||||
|
$response = array( |
||||||
|
'success' => false, |
||||||
|
'message' => 'Заполните все поля' |
||||||
|
); |
||||||
|
} else { |
||||||
|
$to = Option::get("main", "email_from"); |
||||||
|
|
||||||
|
|
||||||
|
if (empty($to)) { |
||||||
|
$response = array( |
||||||
|
'success' => false, |
||||||
|
'message' => 'Ошибка конфигурации почты' |
||||||
|
); |
||||||
|
} else { |
||||||
|
// Отправка почты через почтовое событие Битрикс |
||||||
|
CEvent::Send( |
||||||
|
"CALCULATION_REQUEST", |
||||||
|
SITE_ID, |
||||||
|
array( |
||||||
|
"NAME" => $name, |
||||||
|
"PHONE" => $phone, |
||||||
|
"PAGE" => $site_url.$page, |
||||||
|
) |
||||||
|
); |
||||||
|
|
||||||
|
$response = array( |
||||||
|
'success' => true, |
||||||
|
'message' => 'Заявка успешно отправлена' |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
} else { |
||||||
|
$response = array( |
||||||
|
'success' => false, |
||||||
|
'message' => 'Неверный метод запроса' |
||||||
|
); |
||||||
|
} |
||||||
|
$application = Application::getInstance(); |
||||||
|
$response = new \Bitrix\Main\Engine\Response\Json( |
||||||
|
$response, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION |
||||||
|
); |
||||||
|
$application->getContext()->setResponse($response); |
||||||
|
$response->send(); |
||||||
|
$application->terminate(0); |
||||||
|
// header('Content-Type: application/json'); |
||||||
|
// echo json_encode($response); |
@ -0,0 +1,21 @@ |
|||||||
|
<section class="consultation container"> |
||||||
|
<h2 class="consultation__title">Нужна консультация?</h2> |
||||||
|
<?$APPLICATION->IncludeComponent( |
||||||
|
"bitrix:main.feedback", |
||||||
|
"consultation", |
||||||
|
array( |
||||||
|
"EMAIL_TO" => "fl@itbuben.ru", |
||||||
|
"EVENT_MESSAGE_ID" => array( |
||||||
|
0 => "7", |
||||||
|
), |
||||||
|
"OK_TEXT" => "Спасибо, ваше сообщение принято.", |
||||||
|
"REQUIRED_FIELDS" => array( |
||||||
|
0 => "NAME", |
||||||
|
1 => "EMAIL", |
||||||
|
), |
||||||
|
"USE_CAPTCHA" => "Y", |
||||||
|
"COMPONENT_TEMPLATE" => "consultation" |
||||||
|
), |
||||||
|
false |
||||||
|
);?> |
||||||
|
</section> |
@ -0,0 +1,247 @@ |
|||||||
|
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); |
||||||
|
|
||||||
|
use Bitrix\Main\Loader; |
||||||
|
use Bitrix\Main\ModuleManager; |
||||||
|
|
||||||
|
/** |
||||||
|
* @global CMain $APPLICATION |
||||||
|
* @var CBitrixComponent $component |
||||||
|
* @var array $arParams |
||||||
|
* @var array $arResult |
||||||
|
* @var array $arCurSection |
||||||
|
*/ |
||||||
|
//$APPLICATION->IncludeComponent( |
||||||
|
// "bitrix:main.feedback", |
||||||
|
// "order", |
||||||
|
// Array( |
||||||
|
// "EMAIL_TO" => "kepmaku@ya.ru", |
||||||
|
// "EVENT_MESSAGE_ID" => array(), |
||||||
|
// "OK_TEXT" => "Спасибо, ваше сообщение принято.", |
||||||
|
// "REQUIRED_FIELDS" => array(), |
||||||
|
// "USE_CAPTCHA" => "Y" |
||||||
|
// ) |
||||||
|
//); |
||||||
|
|
||||||
|
$APPLICATION->IncludeComponent( |
||||||
|
"bitrix:catalog.smart.filter", |
||||||
|
"cat_filter", |
||||||
|
// "", |
||||||
|
array( |
||||||
|
"PREFILTER_NAME" => "presect", //добавляем префильтр |
||||||
|
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], |
||||||
|
"IBLOCK_ID" => $arParams["IBLOCK_ID"], |
||||||
|
"SECTION_ID" => $arCurSection['ID'], |
||||||
|
"FILTER_NAME" => $arParams["FILTER_NAME"], |
||||||
|
"PRICE_CODE" => $arParams["~PRICE_CODE"], |
||||||
|
"CACHE_TYPE" => $arParams["CACHE_TYPE"], |
||||||
|
"CACHE_TIME" => $arParams["CACHE_TIME"], |
||||||
|
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"], |
||||||
|
"SAVE_IN_SESSION" => "N", |
||||||
|
"FILTER_VIEW_MODE" => $arParams["FILTER_VIEW_MODE"], |
||||||
|
"XML_EXPORT" => "N", |
||||||
|
"SECTION_TITLE" => "NAME", |
||||||
|
"SECTION_DESCRIPTION" => "DESCRIPTION", |
||||||
|
'HIDE_NOT_AVAILABLE' => $arParams["HIDE_NOT_AVAILABLE"], |
||||||
|
"TEMPLATE_THEME" => $arParams["TEMPLATE_THEME"], |
||||||
|
'CONVERT_CURRENCY' => $arParams['CONVERT_CURRENCY'], |
||||||
|
'CURRENCY_ID' => $arParams['CURRENCY_ID'], |
||||||
|
"SEF_MODE" => $arParams["SEF_MODE"], |
||||||
|
"SEF_RULE" => '/'. $arResult["URL_TEMPLATES"]["smart_filter"], |
||||||
|
"SMART_FILTER_PATH" => $arResult["VARIABLES"]["SMART_FILTER_PATH"], |
||||||
|
"PAGER_PARAMS_NAME" => $arParams["PAGER_PARAMS_NAME"], |
||||||
|
// "INSTANT_RELOAD" => $arParams["INSTANT_RELOAD"], |
||||||
|
// "AJAX_MODE" => "Y", |
||||||
|
"AJAX_MODE" => "N", |
||||||
|
"INSTANT_RELOAD" => "Y", |
||||||
|
"AJAX_OPTION_JUMP" => "N", |
||||||
|
"AJAX_OPTION_HISTORY" => "Y", |
||||||
|
), |
||||||
|
$component, |
||||||
|
array('HIDE_ICONS' => 'Y') |
||||||
|
); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?> |
||||||
|
<div class="row"> |
||||||
|
|
||||||
|
<? |
||||||
|
//sotbit seometa component start |
||||||
|
$APPLICATION->IncludeComponent( |
||||||
|
"sotbit:seo.meta", |
||||||
|
".default", |
||||||
|
array( |
||||||
|
"FILTER_NAME" => $arParams["FILTER_NAME"], |
||||||
|
"SECTION_ID" => $arCurSection['ID'], |
||||||
|
"CACHE_TYPE" => $arParams["CACHE_TYPE"], |
||||||
|
"CACHE_TIME" => $arParams["CACHE_TIME"], |
||||||
|
) |
||||||
|
); |
||||||
|
//sotbit seometa component end |
||||||
|
$intSectionID = $APPLICATION->IncludeComponent( |
||||||
|
"bitrix:catalog.section", |
||||||
|
// "cat_section", |
||||||
|
"", |
||||||
|
array( |
||||||
|
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], |
||||||
|
"IBLOCK_ID" => $arParams["IBLOCK_ID"], |
||||||
|
"ELEMENT_SORT_FIELD" => $arParams["ELEMENT_SORT_FIELD"], |
||||||
|
"ELEMENT_SORT_ORDER" => $arParams["ELEMENT_SORT_ORDER"], |
||||||
|
"ELEMENT_SORT_FIELD2" => $arParams["ELEMENT_SORT_FIELD2"], |
||||||
|
"ELEMENT_SORT_ORDER2" => $arParams["ELEMENT_SORT_ORDER2"], |
||||||
|
"PROPERTY_CODE" => (isset($arParams["LIST_PROPERTY_CODE"]) ? $arParams["LIST_PROPERTY_CODE"] : []), |
||||||
|
"PROPERTY_CODE_MOBILE" => $arParams["LIST_PROPERTY_CODE_MOBILE"], |
||||||
|
"META_KEYWORDS" => $arParams["LIST_META_KEYWORDS"], |
||||||
|
"META_DESCRIPTION" => $arParams["LIST_META_DESCRIPTION"], |
||||||
|
"BROWSER_TITLE" => $arParams["LIST_BROWSER_TITLE"], |
||||||
|
"SET_LAST_MODIFIED" => $arParams["SET_LAST_MODIFIED"], |
||||||
|
"INCLUDE_SUBSECTIONS" => $arParams["INCLUDE_SUBSECTIONS"], |
||||||
|
"BASKET_URL" => $arParams["BASKET_URL"], |
||||||
|
"ACTION_VARIABLE" => $arParams["ACTION_VARIABLE"], |
||||||
|
"PRODUCT_ID_VARIABLE" => $arParams["PRODUCT_ID_VARIABLE"], |
||||||
|
"SECTION_ID_VARIABLE" => $arParams["SECTION_ID_VARIABLE"], |
||||||
|
"PRODUCT_QUANTITY_VARIABLE" => $arParams["PRODUCT_QUANTITY_VARIABLE"], |
||||||
|
"PRODUCT_PROPS_VARIABLE" => $arParams["PRODUCT_PROPS_VARIABLE"], |
||||||
|
"FILTER_NAME" => $arParams["FILTER_NAME"], |
||||||
|
"CACHE_TYPE" => $arParams["CACHE_TYPE"], |
||||||
|
"CACHE_TIME" => $arParams["CACHE_TIME"], |
||||||
|
"CACHE_FILTER" => $arParams["CACHE_FILTER"], |
||||||
|
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"], |
||||||
|
"SET_TITLE" => $arParams["SET_TITLE"], |
||||||
|
"MESSAGE_404" => $arParams["~MESSAGE_404"], |
||||||
|
"SET_STATUS_404" => $arParams["SET_STATUS_404"], |
||||||
|
"SHOW_404" => $arParams["SHOW_404"], |
||||||
|
"FILE_404" => $arParams["FILE_404"], |
||||||
|
"DISPLAY_COMPARE" => $arParams["USE_COMPARE"], |
||||||
|
"PAGE_ELEMENT_COUNT" => $arParams["PAGE_ELEMENT_COUNT"], |
||||||
|
"LINE_ELEMENT_COUNT" => $arParams["LINE_ELEMENT_COUNT"], |
||||||
|
"PRICE_CODE" => $arParams["~PRICE_CODE"], |
||||||
|
"USE_PRICE_COUNT" => $arParams["USE_PRICE_COUNT"], |
||||||
|
"SHOW_PRICE_COUNT" => $arParams["SHOW_PRICE_COUNT"], |
||||||
|
|
||||||
|
"PRICE_VAT_INCLUDE" => $arParams["PRICE_VAT_INCLUDE"], |
||||||
|
"USE_PRODUCT_QUANTITY" => $arParams['USE_PRODUCT_QUANTITY'], |
||||||
|
"ADD_PROPERTIES_TO_BASKET" => (isset($arParams["ADD_PROPERTIES_TO_BASKET"]) ? $arParams["ADD_PROPERTIES_TO_BASKET"] : ''), |
||||||
|
"PARTIAL_PRODUCT_PROPERTIES" => (isset($arParams["PARTIAL_PRODUCT_PROPERTIES"]) ? $arParams["PARTIAL_PRODUCT_PROPERTIES"] : ''), |
||||||
|
"PRODUCT_PROPERTIES" => (isset($arParams["PRODUCT_PROPERTIES"]) ? $arParams["PRODUCT_PROPERTIES"] : []), |
||||||
|
|
||||||
|
"DISPLAY_TOP_PAGER" => $arParams["DISPLAY_TOP_PAGER"], |
||||||
|
"DISPLAY_BOTTOM_PAGER" => $arParams["DISPLAY_BOTTOM_PAGER"], |
||||||
|
"PAGER_TITLE" => $arParams["PAGER_TITLE"], |
||||||
|
"PAGER_SHOW_ALWAYS" => $arParams["PAGER_SHOW_ALWAYS"], |
||||||
|
"PAGER_TEMPLATE" => $arParams["PAGER_TEMPLATE"], |
||||||
|
"PAGER_DESC_NUMBERING" => $arParams["PAGER_DESC_NUMBERING"], |
||||||
|
"PAGER_DESC_NUMBERING_CACHE_TIME" => $arParams["PAGER_DESC_NUMBERING_CACHE_TIME"], |
||||||
|
"PAGER_SHOW_ALL" => $arParams["PAGER_SHOW_ALL"], |
||||||
|
"PAGER_BASE_LINK_ENABLE" => $arParams["PAGER_BASE_LINK_ENABLE"], |
||||||
|
"PAGER_BASE_LINK" => $arParams["PAGER_BASE_LINK"], |
||||||
|
"PAGER_PARAMS_NAME" => $arParams["PAGER_PARAMS_NAME"], |
||||||
|
"LAZY_LOAD" => $arParams["LAZY_LOAD"], |
||||||
|
"MESS_BTN_LAZY_LOAD" => $arParams["~MESS_BTN_LAZY_LOAD"], |
||||||
|
"LOAD_ON_SCROLL" => $arParams["LOAD_ON_SCROLL"], |
||||||
|
|
||||||
|
"OFFERS_CART_PROPERTIES" => (isset($arParams["OFFERS_CART_PROPERTIES"]) ? $arParams["OFFERS_CART_PROPERTIES"] : []), |
||||||
|
"OFFERS_FIELD_CODE" => $arParams["LIST_OFFERS_FIELD_CODE"], |
||||||
|
"OFFERS_PROPERTY_CODE" => (isset($arParams["LIST_OFFERS_PROPERTY_CODE"]) ? $arParams["LIST_OFFERS_PROPERTY_CODE"] : []), |
||||||
|
"OFFERS_SORT_FIELD" => $arParams["OFFERS_SORT_FIELD"], |
||||||
|
"OFFERS_SORT_ORDER" => $arParams["OFFERS_SORT_ORDER"], |
||||||
|
"OFFERS_SORT_FIELD2" => $arParams["OFFERS_SORT_FIELD2"], |
||||||
|
"OFFERS_SORT_ORDER2" => $arParams["OFFERS_SORT_ORDER2"], |
||||||
|
"OFFERS_LIMIT" => (isset($arParams["LIST_OFFERS_LIMIT"]) ? $arParams["LIST_OFFERS_LIMIT"] : 0), |
||||||
|
|
||||||
|
"SECTION_ID" => $arResult["VARIABLES"]["SECTION_ID"], |
||||||
|
"SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"], |
||||||
|
"SECTION_URL" => '/' . $arResult["URL_TEMPLATES"]["section"], |
||||||
|
"DETAIL_URL" => '/' . $arResult["URL_TEMPLATES"]["element"], |
||||||
|
"USE_MAIN_ELEMENT_SECTION" => $arParams["USE_MAIN_ELEMENT_SECTION"], |
||||||
|
'CONVERT_CURRENCY' => $arParams['CONVERT_CURRENCY'], |
||||||
|
'CURRENCY_ID' => $arParams['CURRENCY_ID'], |
||||||
|
'HIDE_NOT_AVAILABLE' => $arParams["HIDE_NOT_AVAILABLE"], |
||||||
|
'HIDE_NOT_AVAILABLE_OFFERS' => $arParams["HIDE_NOT_AVAILABLE_OFFERS"], |
||||||
|
|
||||||
|
'LABEL_PROP' => $arParams['LABEL_PROP'], |
||||||
|
'LABEL_PROP_MOBILE' => $arParams['LABEL_PROP_MOBILE'], |
||||||
|
'LABEL_PROP_POSITION' => $arParams['LABEL_PROP_POSITION'] ?? '', |
||||||
|
'ADD_PICT_PROP' => $arParams['ADD_PICT_PROP'], |
||||||
|
'PRODUCT_DISPLAY_MODE' => $arParams['PRODUCT_DISPLAY_MODE'], |
||||||
|
'PRODUCT_BLOCKS_ORDER' => $arParams['LIST_PRODUCT_BLOCKS_ORDER'], |
||||||
|
'PRODUCT_ROW_VARIANTS' => $arParams['LIST_PRODUCT_ROW_VARIANTS'], |
||||||
|
'ENLARGE_PRODUCT' => $arParams['LIST_ENLARGE_PRODUCT'], |
||||||
|
'ENLARGE_PROP' => isset($arParams['LIST_ENLARGE_PROP']) ? $arParams['LIST_ENLARGE_PROP'] : '', |
||||||
|
'SHOW_SLIDER' => $arParams['LIST_SHOW_SLIDER'], |
||||||
|
'SLIDER_INTERVAL' => isset($arParams['LIST_SLIDER_INTERVAL']) ? $arParams['LIST_SLIDER_INTERVAL'] : '', |
||||||
|
'SLIDER_PROGRESS' => isset($arParams['LIST_SLIDER_PROGRESS']) ? $arParams['LIST_SLIDER_PROGRESS'] : '', |
||||||
|
|
||||||
|
'OFFER_ADD_PICT_PROP' => $arParams['OFFER_ADD_PICT_PROP'], |
||||||
|
'OFFER_TREE_PROPS' => (isset($arParams['OFFER_TREE_PROPS']) ? $arParams['OFFER_TREE_PROPS'] : []), |
||||||
|
'PRODUCT_SUBSCRIPTION' => $arParams['PRODUCT_SUBSCRIPTION'], |
||||||
|
'SHOW_DISCOUNT_PERCENT' => $arParams['SHOW_DISCOUNT_PERCENT'], |
||||||
|
'DISCOUNT_PERCENT_POSITION' => $arParams['DISCOUNT_PERCENT_POSITION'], |
||||||
|
'SHOW_OLD_PRICE' => $arParams['SHOW_OLD_PRICE'], |
||||||
|
'SHOW_MAX_QUANTITY' => $arParams['SHOW_MAX_QUANTITY'], |
||||||
|
'MESS_SHOW_MAX_QUANTITY' => (isset($arParams['~MESS_SHOW_MAX_QUANTITY']) ? $arParams['~MESS_SHOW_MAX_QUANTITY'] : ''), |
||||||
|
'RELATIVE_QUANTITY_FACTOR' => (isset($arParams['RELATIVE_QUANTITY_FACTOR']) ? $arParams['RELATIVE_QUANTITY_FACTOR'] : ''), |
||||||
|
'MESS_RELATIVE_QUANTITY_MANY' => (isset($arParams['~MESS_RELATIVE_QUANTITY_MANY']) ? $arParams['~MESS_RELATIVE_QUANTITY_MANY'] : ''), |
||||||
|
'MESS_RELATIVE_QUANTITY_FEW' => (isset($arParams['~MESS_RELATIVE_QUANTITY_FEW']) ? $arParams['~MESS_RELATIVE_QUANTITY_FEW'] : ''), |
||||||
|
'MESS_BTN_BUY' => (isset($arParams['~MESS_BTN_BUY']) ? $arParams['~MESS_BTN_BUY'] : ''), |
||||||
|
'MESS_BTN_ADD_TO_BASKET' => (isset($arParams['~MESS_BTN_ADD_TO_BASKET']) ? $arParams['~MESS_BTN_ADD_TO_BASKET'] : ''), |
||||||
|
'MESS_BTN_SUBSCRIBE' => (isset($arParams['~MESS_BTN_SUBSCRIBE']) ? $arParams['~MESS_BTN_SUBSCRIBE'] : ''), |
||||||
|
'MESS_BTN_DETAIL' => (isset($arParams['~MESS_BTN_DETAIL']) ? $arParams['~MESS_BTN_DETAIL'] : ''), |
||||||
|
'MESS_NOT_AVAILABLE' => $arParams['~MESS_NOT_AVAILABLE'] ?? '', |
||||||
|
'MESS_NOT_AVAILABLE_SERVICE' => $arParams['~MESS_NOT_AVAILABLE_SERVICE'] ?? '', |
||||||
|
'MESS_BTN_COMPARE' => (isset($arParams['~MESS_BTN_COMPARE']) ? $arParams['~MESS_BTN_COMPARE'] : ''), |
||||||
|
|
||||||
|
'USE_ENHANCED_ECOMMERCE' => (isset($arParams['USE_ENHANCED_ECOMMERCE']) ? $arParams['USE_ENHANCED_ECOMMERCE'] : ''), |
||||||
|
'DATA_LAYER_NAME' => (isset($arParams['DATA_LAYER_NAME']) ? $arParams['DATA_LAYER_NAME'] : ''), |
||||||
|
'BRAND_PROPERTY' => (isset($arParams['BRAND_PROPERTY']) ? $arParams['BRAND_PROPERTY'] : ''), |
||||||
|
|
||||||
|
'TEMPLATE_THEME' => (isset($arParams['TEMPLATE_THEME']) ? $arParams['TEMPLATE_THEME'] : ''), |
||||||
|
"ADD_SECTIONS_CHAIN" => "Y", |
||||||
|
'ADD_TO_BASKET_ACTION' => $basketAction, |
||||||
|
'SHOW_CLOSE_POPUP' => isset($arParams['COMMON_SHOW_CLOSE_POPUP']) ? $arParams['COMMON_SHOW_CLOSE_POPUP'] : '', |
||||||
|
'COMPARE_PATH' => $arResult['FOLDER'] . $arResult['URL_TEMPLATES']['compare'], |
||||||
|
'COMPARE_NAME' => $arParams['COMPARE_NAME'], |
||||||
|
'USE_COMPARE_LIST' => 'Y', |
||||||
|
'BACKGROUND_IMAGE' => (isset($arParams['SECTION_BACKGROUND_IMAGE']) ? $arParams['SECTION_BACKGROUND_IMAGE'] : ''), |
||||||
|
'COMPATIBLE_MODE' => (isset($arParams['COMPATIBLE_MODE']) ? $arParams['COMPATIBLE_MODE'] : ''), |
||||||
|
'DISABLE_INIT_JS_IN_COMPONENT' => (isset($arParams['DISABLE_INIT_JS_IN_COMPONENT']) ? $arParams['DISABLE_INIT_JS_IN_COMPONENT'] : '') |
||||||
|
), |
||||||
|
$component |
||||||
|
); |
||||||
|
$GLOBALS['CATALOG_CURRENT_SECTION_ID'] = $intSectionID; |
||||||
|
?> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<? //sotbit seometa meta start |
||||||
|
global $sotbitSeoMetaTitle; |
||||||
|
global $sotbitSeoMetaKeywords; |
||||||
|
global $sotbitSeoMetaDescription; |
||||||
|
global $sotbitSeoMetaBreadcrumbTitle; |
||||||
|
global $sotbitSeoMetaH1; |
||||||
|
if(!empty($sotbitSeoMetaH1)) |
||||||
|
{ |
||||||
|
$APPLICATION->SetTitle($sotbitSeoMetaH1); |
||||||
|
} |
||||||
|
if(!empty($sotbitSeoMetaTitle)) |
||||||
|
{ |
||||||
|
$APPLICATION->SetPageProperty("title", $sotbitSeoMetaTitle); |
||||||
|
} |
||||||
|
if(!empty($sotbitSeoMetaKeywords)) |
||||||
|
{ |
||||||
|
$APPLICATION->SetPageProperty("keywords", $sotbitSeoMetaKeywords); |
||||||
|
} |
||||||
|
if(!empty($sotbitSeoMetaDescription)) |
||||||
|
{ |
||||||
|
$APPLICATION->SetPageProperty("description", $sotbitSeoMetaDescription); |
||||||
|
} |
||||||
|
if(!empty($sotbitSeoMetaBreadcrumbTitle) ) |
||||||
|
{ |
||||||
|
$APPLICATION->AddChainItem($sotbitSeoMetaBreadcrumbTitle ); |
||||||
|
} |
||||||
|
//sotbit seometa meta end ?> |
||||||
|
|
||||||
|
</div> |
@ -0,0 +1,10 @@ |
|||||||
|
<? |
||||||
|
$MESS["nav_all"] = "Alle"; |
||||||
|
$MESS["nav_begin"] = "Erste"; |
||||||
|
$MESS["nav_end"] = "Letzte"; |
||||||
|
$MESS["nav_next"] = "Nächste"; |
||||||
|
$MESS["nav_of"] = "von"; |
||||||
|
$MESS["nav_paged"] = "Seite"; |
||||||
|
$MESS["nav_prev"] = "Vorherige"; |
||||||
|
$MESS ['nav_to'] = "-"; |
||||||
|
?> |
@ -0,0 +1,10 @@ |
|||||||
|
<? |
||||||
|
$MESS ['nav_of'] = "of"; |
||||||
|
$MESS ['nav_begin'] = "First"; |
||||||
|
$MESS ['nav_prev'] = "Prev."; |
||||||
|
$MESS ['nav_next'] = "Next"; |
||||||
|
$MESS ['nav_end'] = "Last"; |
||||||
|
$MESS ['nav_paged'] = "Paged"; |
||||||
|
$MESS ['nav_all'] = "All"; |
||||||
|
$MESS ['nav_to'] = "-"; |
||||||
|
?> |
@ -0,0 +1,10 @@ |
|||||||
|
<? |
||||||
|
$MESS ['nav_of'] = "из"; |
||||||
|
$MESS ['nav_begin'] = "Начало"; |
||||||
|
$MESS ['nav_prev'] = "Пред."; |
||||||
|
$MESS ['nav_next'] = "След."; |
||||||
|
$MESS ['nav_end'] = "Конец"; |
||||||
|
$MESS ['nav_paged'] = "По стр."; |
||||||
|
$MESS ['nav_all'] = "Все"; |
||||||
|
$MESS ['nav_to'] = "-"; |
||||||
|
?> |
@ -0,0 +1,66 @@ |
|||||||
|
<?php |
||||||
|
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); |
||||||
|
if ($arResult["NavPageCount"] > 1): |
||||||
|
// Получаем базовый путь, убирая возможные page-N из текущего URL |
||||||
|
$basePath = preg_replace('#/page-\\d+#', '', $arResult["sUrlPath"]); |
||||||
|
$basePath = rtrim($basePath, '/') . '/'; |
||||||
|
// Если не в корне каталога, добавляем относительный путь раздела |
||||||
|
$isSection = ($APPLICATION->GetCurDir() !== '/catalog/'); |
||||||
|
?> |
||||||
|
<div class="pagination-list"> |
||||||
|
|
||||||
|
<?php if ($arResult["NavPageNomer"] > 1): ?> |
||||||
|
<?php
|
||||||
|
$prevUrl = $arResult["NavPageNomer"] == 2 |
||||||
|
? $basePath |
||||||
|
: $basePath . 'page-' . ($arResult["NavPageNomer"] - 1) . '/'; |
||||||
|
?> |
||||||
|
<a class="pagination-item button button--outline" href="<?= $prevUrl ?>">
|
||||||
|
<img src="<?= DEFAULT_TEMPLATE_PATH ?>/img/svg/arrow-left.svg" alt="Предыдущая страница">
|
||||||
|
</a> |
||||||
|
<?php else: ?> |
||||||
|
<span class="pagination-item button button--outline" style="opacity: .5; pointer-events: none;"> |
||||||
|
<img src="<?= DEFAULT_TEMPLATE_PATH ?>/img/svg/arrow-left.svg" alt="Предыдущая страница">
|
||||||
|
</span> |
||||||
|
<?php endif; ?> |
||||||
|
|
||||||
|
<?php |
||||||
|
$pageWindow = 5; |
||||||
|
$startPage = max(1, $arResult["NavPageNomer"] - floor($pageWindow / 2)); |
||||||
|
$endPage = min($arResult["NavPageCount"], $startPage + $pageWindow - 1); |
||||||
|
|
||||||
|
if ($startPage > 1): |
||||||
|
echo '<a class="pagination-item button button--outline" href="' . $basePath . '">1</a>'; |
||||||
|
if ($startPage > 2): |
||||||
|
echo '<span class="pagination-item is-middle button button--outline">...</span>'; |
||||||
|
endif; |
||||||
|
endif; |
||||||
|
|
||||||
|
for ($i = $startPage; $i <= $endPage; $i++): |
||||||
|
if ($i == $arResult["NavPageNomer"]): |
||||||
|
echo '<span class="pagination-item is-active button button--outline">' . $i . '</span>'; |
||||||
|
else: |
||||||
|
$url = $i == 1 ? $basePath : $basePath . 'page-' . $i . '/'; |
||||||
|
echo '<a class="pagination-item button button--outline" href="' . $url . '">' . $i . '</a>'; |
||||||
|
endif; |
||||||
|
endfor; |
||||||
|
|
||||||
|
if ($endPage < $arResult["NavPageCount"]): |
||||||
|
if ($endPage < $arResult["NavPageCount"] - 1): |
||||||
|
echo '<span class="pagination-item is-middle button button--outline">...</span>'; |
||||||
|
endif; |
||||||
|
echo '<a class="pagination-item button button--outline" href="' . $basePath . 'page-' . $arResult["NavPageCount"] . '/">' . $arResult["NavPageCount"] . '</a>'; |
||||||
|
endif; |
||||||
|
?> |
||||||
|
|
||||||
|
<?php if ($arResult["NavPageNomer"] < $arResult["NavPageCount"]): ?> |
||||||
|
<a class="pagination-item button button--outline" href="<?= $basePath ?>page-<?= ($arResult["NavPageNomer"] + 1) ?>/">
|
||||||
|
<img src="<?= DEFAULT_TEMPLATE_PATH ?>/img/svg/arrow-right.svg" alt="Следующая страница">
|
||||||
|
</a> |
||||||
|
<?php else: ?> |
||||||
|
<span class="pagination-item button button--outline" style="opacity: .5; pointer-events: none;"> |
||||||
|
<img src="<?= DEFAULT_TEMPLATE_PATH ?>/img/svg/arrow-right.svg" alt="Следующая страница">
|
||||||
|
</span> |
||||||
|
<?php endif; ?> |
||||||
|
</div> |
||||||
|
<?php endif; ?> |
After Width: | Height: | Size: 482 KiB |
@ -0,0 +1,814 @@ |
|||||||
|
<?php |
||||||
|
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die(); |
||||||
|
|
||||||
|
/** |
||||||
|
* @var string $componentPath |
||||||
|
* @var string $componentName |
||||||
|
*/ |
||||||
|
|
||||||
|
use Bitrix\Main\Loader; |
||||||
|
use Bitrix\Main\ModuleManager; |
||||||
|
use Bitrix\Main\Web\Json; |
||||||
|
use Bitrix\Iblock; |
||||||
|
|
||||||
|
if (!Loader::includeModule('iblock')) |
||||||
|
return; |
||||||
|
|
||||||
|
$boolCatalog = Loader::includeModule('catalog'); |
||||||
|
CBitrixComponent::includeComponentClass($componentName); |
||||||
|
|
||||||
|
$usePropertyFeatures = Iblock\Model\PropertyFeature::isEnabledFeatures(); |
||||||
|
|
||||||
|
$iblockExists = (!empty($arCurrentValues['IBLOCK_ID']) && (int)$arCurrentValues['IBLOCK_ID'] > 0); |
||||||
|
|
||||||
|
$defaultValue = array('-' => GetMessage('CP_BCE_TPL_PROP_EMPTY')); |
||||||
|
$arSKU = false; |
||||||
|
$boolSKU = false; |
||||||
|
|
||||||
|
if ($boolCatalog && $iblockExists) |
||||||
|
{ |
||||||
|
$arSKU = CCatalogSku::GetInfoByProductIBlock($arCurrentValues['IBLOCK_ID']); |
||||||
|
$boolSKU = !empty($arSKU) && is_array($arSKU); |
||||||
|
} |
||||||
|
|
||||||
|
$arThemes = array(); |
||||||
|
if (ModuleManager::isModuleInstalled('bitrix.eshop')) |
||||||
|
{ |
||||||
|
$arThemes['site'] = GetMessage('CP_BCE_TPL_THEME_SITE'); |
||||||
|
} |
||||||
|
|
||||||
|
$arThemesList = array( |
||||||
|
'blue' => GetMessage('CP_BCE_TPL_THEME_BLUE'), |
||||||
|
'green' => GetMessage('CP_BCE_TPL_THEME_GREEN'), |
||||||
|
'red' => GetMessage('CP_BCE_TPL_THEME_RED'), |
||||||
|
'wood' => GetMessage('CP_BCE_TPL_THEME_WOOD'), |
||||||
|
'yellow' => GetMessage('CP_BCE_TPL_THEME_YELLOW'), |
||||||
|
'black' => GetMessage('CP_BCE_TPL_THEME_BLACK') |
||||||
|
); |
||||||
|
$dir = trim(preg_replace("'[\\\\/]+'", "/", __DIR__.'/themes/')); |
||||||
|
if (is_dir($dir)) |
||||||
|
{ |
||||||
|
foreach ($arThemesList as $themeID => $themeName) |
||||||
|
{ |
||||||
|
if (!is_file($dir.$themeID.'/style.css')) |
||||||
|
continue; |
||||||
|
|
||||||
|
$arThemes[$themeID] = $themeName; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$documentRoot = Loader::getDocumentRoot(); |
||||||
|
|
||||||
|
$arTemplateParameters['TEMPLATE_THEME'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_TEMPLATE_THEME'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'VALUES' => $arThemes, |
||||||
|
'DEFAULT' => 'blue', |
||||||
|
'ADDITIONAL_VALUES' => 'Y' |
||||||
|
); |
||||||
|
$arTemplateParameters['PRODUCT_INFO_BLOCK_ORDER'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_PRODUCT_INFO_BLOCK_ORDER'), |
||||||
|
'TYPE' => 'CUSTOM', |
||||||
|
'JS_FILE' => CatalogElementComponent::getSettingsScript($componentPath, 'dragdrop_order'), |
||||||
|
'JS_EVENT' => 'initDraggableOrderControl', |
||||||
|
'JS_DATA' => Json::encode(array( |
||||||
|
'sku' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_SKU'), |
||||||
|
'props' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_PROPS') |
||||||
|
)), |
||||||
|
'DEFAULT' => 'sku,props' |
||||||
|
); |
||||||
|
$arTemplateParameters['PRODUCT_PAY_BLOCK_ORDER'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_PRODUCT_PAY_BLOCK_ORDER'), |
||||||
|
'TYPE' => 'CUSTOM', |
||||||
|
'JS_FILE' => CatalogElementComponent::getSettingsScript($componentPath, 'dragdrop_order'), |
||||||
|
'JS_EVENT' => 'initDraggableOrderControl', |
||||||
|
'JS_DATA' => Json::encode(array( |
||||||
|
'rating' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_RATING'), |
||||||
|
'price' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_PRICE'), |
||||||
|
'priceRanges' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_PRICE_RANGES'), |
||||||
|
'quantityLimit' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_QUANTITY_LIMIT'), |
||||||
|
'quantity' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_QUANTITY'), |
||||||
|
'buttons' => GetMessage('CP_BCE_TPL_PRODUCT_BLOCK_BUTTONS') |
||||||
|
)), |
||||||
|
'DEFAULT' => 'rating,price,priceRanges,quantityLimit,quantity,buttons' |
||||||
|
); |
||||||
|
|
||||||
|
$arAllPropList = array(); |
||||||
|
$arFilePropList = $defaultValue; |
||||||
|
$arListPropList = array(); |
||||||
|
$arHighloadPropList = array(); |
||||||
|
|
||||||
|
if ($iblockExists) |
||||||
|
{ |
||||||
|
$rsProps = CIBlockProperty::GetList( |
||||||
|
array('SORT' => 'ASC', 'ID' => 'ASC'), |
||||||
|
array('IBLOCK_ID' => $arCurrentValues['IBLOCK_ID'], 'ACTIVE' => 'Y') |
||||||
|
); |
||||||
|
while ($arProp = $rsProps->Fetch()) |
||||||
|
{ |
||||||
|
$strPropName = '['.$arProp['ID'].']'.('' != $arProp['CODE'] ? '['.$arProp['CODE'].']' : '').' '.$arProp['NAME']; |
||||||
|
if ($arProp['CODE'] == '') |
||||||
|
{ |
||||||
|
$arProp['CODE'] = $arProp['ID']; |
||||||
|
} |
||||||
|
|
||||||
|
$arAllPropList[$arProp['CODE']] = $strPropName; |
||||||
|
|
||||||
|
if ($arProp['PROPERTY_TYPE'] === 'F') |
||||||
|
{ |
||||||
|
$arFilePropList[$arProp['CODE']] = $strPropName; |
||||||
|
} |
||||||
|
|
||||||
|
if ($arProp['PROPERTY_TYPE'] === 'L') |
||||||
|
{ |
||||||
|
$arListPropList[$arProp['CODE']] = $strPropName; |
||||||
|
} |
||||||
|
|
||||||
|
if ($arProp['PROPERTY_TYPE'] === 'S' && $arProp['USER_TYPE'] === 'directory' && CIBlockPriceTools::checkPropDirectory($arProp)) |
||||||
|
{ |
||||||
|
$arHighloadPropList[$arProp['CODE']] = $strPropName; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arAllOfferPropList = array(); |
||||||
|
$arTreeOfferPropList = $arFileOfferPropList = $defaultValue; |
||||||
|
|
||||||
|
if ($boolSKU) |
||||||
|
{ |
||||||
|
$rsProps = CIBlockProperty::GetList( |
||||||
|
array('SORT' => 'ASC', 'ID' => 'ASC'), |
||||||
|
array('IBLOCK_ID' => $arSKU['IBLOCK_ID'], 'ACTIVE' => 'Y') |
||||||
|
); |
||||||
|
while ($arProp = $rsProps->Fetch()) |
||||||
|
{ |
||||||
|
if ($arProp['ID'] == $arSKU['SKU_PROPERTY_ID']) |
||||||
|
{ |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
$arProp['USER_TYPE'] = (string)$arProp['USER_TYPE']; |
||||||
|
$strPropName = '['.$arProp['ID'].']'.('' != $arProp['CODE'] ? '['.$arProp['CODE'].']' : '').' '.$arProp['NAME']; |
||||||
|
|
||||||
|
if ($arProp['CODE'] == '') |
||||||
|
{ |
||||||
|
$arProp['CODE'] = $arProp['ID']; |
||||||
|
} |
||||||
|
|
||||||
|
$arAllOfferPropList[$arProp['CODE']] = $strPropName; |
||||||
|
|
||||||
|
if ($arProp['PROPERTY_TYPE'] === 'F') |
||||||
|
{ |
||||||
|
$arFileOfferPropList[$arProp['CODE']] = $strPropName; |
||||||
|
} |
||||||
|
|
||||||
|
if ($arProp['MULTIPLE'] != 'N') |
||||||
|
{ |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
if ( |
||||||
|
$arProp['PROPERTY_TYPE'] === 'L' |
||||||
|
|| $arProp['PROPERTY_TYPE'] === 'E' |
||||||
|
|| ( |
||||||
|
$arProp['PROPERTY_TYPE'] === 'S' |
||||||
|
&& $arProp['USER_TYPE'] === 'directory' |
||||||
|
&& CIBlockPriceTools::checkPropDirectory($arProp) |
||||||
|
) |
||||||
|
) |
||||||
|
{ |
||||||
|
$arTreeOfferPropList[$arProp['CODE']] = $strPropName; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$showedProperties = []; |
||||||
|
if ($usePropertyFeatures) |
||||||
|
{ |
||||||
|
if ($iblockExists) |
||||||
|
{ |
||||||
|
$showedProperties = Iblock\Model\PropertyFeature::getDetailPageShowProperties( |
||||||
|
$arCurrentValues['IBLOCK_ID'], |
||||||
|
['CODE' => 'Y'] |
||||||
|
); |
||||||
|
if ($showedProperties === null) |
||||||
|
$showedProperties = []; |
||||||
|
} |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
if (!empty($arCurrentValues['PROPERTY_CODE']) && is_array($arCurrentValues['PROPERTY_CODE'])) |
||||||
|
{ |
||||||
|
$showedProperties = $arCurrentValues['PROPERTY_CODE']; |
||||||
|
} |
||||||
|
} |
||||||
|
if (!empty($showedProperties)) |
||||||
|
{ |
||||||
|
$selected = array(); |
||||||
|
|
||||||
|
foreach ($showedProperties as $code) |
||||||
|
{ |
||||||
|
if (isset($arAllPropList[$code])) |
||||||
|
{ |
||||||
|
$selected[$code] = $arAllPropList[$code]; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['MAIN_BLOCK_PROPERTY_CODE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MAIN_BLOCK_PROPERTY_CODE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'SIZE' => (count($selected) > 5 ? 8 : 3), |
||||||
|
'VALUES' => $selected |
||||||
|
); |
||||||
|
} |
||||||
|
unset($showedProperties); |
||||||
|
|
||||||
|
if ($boolSKU) |
||||||
|
{ |
||||||
|
$showedProperties = []; |
||||||
|
if ($usePropertyFeatures) |
||||||
|
{ |
||||||
|
$showedProperties = Iblock\Model\PropertyFeature::getDetailPageShowProperties( |
||||||
|
$arSKU['IBLOCK_ID'], |
||||||
|
['CODE' => 'Y'] |
||||||
|
); |
||||||
|
if ($showedProperties === null) |
||||||
|
$showedProperties = []; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
if (!empty($arCurrentValues['OFFERS_PROPERTY_CODE']) && is_array($arCurrentValues['OFFERS_PROPERTY_CODE'])) |
||||||
|
{ |
||||||
|
$showedProperties = $arCurrentValues['OFFERS_PROPERTY_CODE']; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (!empty($showedProperties)) |
||||||
|
{ |
||||||
|
$selected = array(); |
||||||
|
|
||||||
|
foreach ($showedProperties as $code) |
||||||
|
{ |
||||||
|
if (isset($arAllOfferPropList[$code])) |
||||||
|
{ |
||||||
|
$selected[$code] = $arAllOfferPropList[$code]; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['MAIN_BLOCK_OFFERS_PROPERTY_CODE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MAIN_BLOCK_OFFERS_PROPERTY_CODE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'SIZE' => (count($selected) > 5 ? 8 : 3), |
||||||
|
'VALUES' => $selected |
||||||
|
); |
||||||
|
} |
||||||
|
unset($showedProperties); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['ADD_PICT_PROP'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_ADD_PICT_PROP'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'ADDITIONAL_VALUES' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'DEFAULT' => '-', |
||||||
|
'VALUES' => $arFilePropList |
||||||
|
); |
||||||
|
|
||||||
|
$arTemplateParameters['LABEL_PROP'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_LABEL_PROP'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'ADDITIONAL_VALUES' => 'N', |
||||||
|
'REFRESH' => 'Y', |
||||||
|
'VALUES' => $arListPropList |
||||||
|
); |
||||||
|
|
||||||
|
if (!empty($arCurrentValues['LABEL_PROP'])) |
||||||
|
{ |
||||||
|
if (!is_array($arCurrentValues['LABEL_PROP'])) |
||||||
|
{ |
||||||
|
$arCurrentValues['LABEL_PROP'] = array($arCurrentValues['LABEL_PROP']); |
||||||
|
} |
||||||
|
|
||||||
|
$selected = array(); |
||||||
|
foreach ($arCurrentValues['LABEL_PROP'] as $name) |
||||||
|
{ |
||||||
|
if (isset($arListPropList[$name])) |
||||||
|
{ |
||||||
|
$selected[$name] = $arListPropList[$name]; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['LABEL_PROP_MOBILE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_LABEL_PROP_MOBILE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'ADDITIONAL_VALUES' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'SIZE' => (count($selected) > 5 ? 8 : 3), |
||||||
|
'VALUES' => $selected |
||||||
|
); |
||||||
|
unset($selected); |
||||||
|
|
||||||
|
$arTemplateParameters['LABEL_PROP_POSITION'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_LABEL_PROP_POSITION'), |
||||||
|
'TYPE' => 'CUSTOM', |
||||||
|
'JS_FILE' => CatalogElementComponent::getSettingsScript($componentPath, 'position'), |
||||||
|
'JS_EVENT' => 'initPositionControl', |
||||||
|
'JS_DATA' => Json::encode( |
||||||
|
array( |
||||||
|
'positions' => array( |
||||||
|
'top-left', 'top-center', 'top-right', |
||||||
|
'middle-left', 'middle-center', 'middle-right', |
||||||
|
'bottom-left', 'bottom-center', 'bottom-right' |
||||||
|
), |
||||||
|
'className' => '' |
||||||
|
) |
||||||
|
), |
||||||
|
'DEFAULT' => 'top-left' |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
if ($boolSKU) |
||||||
|
{ |
||||||
|
$arTemplateParameters['OFFER_ADD_PICT_PROP'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_OFFER_ADD_PICT_PROP'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'ADDITIONAL_VALUES' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'DEFAULT' => '-', |
||||||
|
'VALUES' => $arFileOfferPropList |
||||||
|
); |
||||||
|
if (!$usePropertyFeatures) |
||||||
|
{ |
||||||
|
$arTemplateParameters['OFFER_TREE_PROPS'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_OFFER_TREE_PROPS'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'ADDITIONAL_VALUES' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'DEFAULT' => '-', |
||||||
|
'VALUES' => $arTreeOfferPropList |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['DISPLAY_NAME'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_DISPLAY_NAME'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'Y' |
||||||
|
); |
||||||
|
$arTemplateParameters['IMAGE_RESOLUTION'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_IMAGE_RESOLUTION'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'VALUES' => array( |
||||||
|
'16by9' => GetMessage('CP_BCE_TPL_IMAGE_RESOLUTION_16_BY_9'), |
||||||
|
'1by1' => GetMessage('CP_BCE_TPL_IMAGE_RESOLUTION_1_BY_1') |
||||||
|
), |
||||||
|
'DEFAULT' => '16by9' |
||||||
|
); |
||||||
|
$arTemplateParameters['SHOW_SLIDER'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SHOW_SLIDER'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'REFRESH' => 'Y', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['SHOW_SLIDER']) && $arCurrentValues['SHOW_SLIDER'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['SLIDER_INTERVAL'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SLIDER_INTERVAL'), |
||||||
|
'TYPE' => 'TEXT', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'DEFAULT' => '5000' |
||||||
|
); |
||||||
|
$arTemplateParameters['SLIDER_PROGRESS'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SLIDER_PROGRESS'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'REFRESH' => 'N', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['DETAIL_PICTURE_MODE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_DETAIL_PICTURE_MODE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'DEFAULT' => array('POPUP', 'MAGNIFIER'), |
||||||
|
'VALUES' => array( |
||||||
|
'POPUP' => GetMessage('DETAIL_PICTURE_MODE_POPUP'), |
||||||
|
'MAGNIFIER' => GetMessage('DETAIL_PICTURE_MODE_MAGNIFIER') |
||||||
|
) |
||||||
|
); |
||||||
|
$arTemplateParameters['ADD_DETAIL_TO_SLIDER'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_ADD_DETAIL_TO_SLIDER'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
$arTemplateParameters['DISPLAY_PREVIEW_TEXT_MODE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_DISPLAY_PREVIEW_TEXT_MODE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'VALUES' => array( |
||||||
|
'H' => GetMessage('CP_BCE_TPL_DISPLAY_PREVIEW_TEXT_MODE_HIDE'), |
||||||
|
'E' => GetMessage('CP_BCE_TPL_DISPLAY_PREVIEW_TEXT_MODE_EMPTY_DETAIL'), |
||||||
|
'S' => GetMessage('CP_BCE_TPL_DISPLAY_PREVIEW_TEXT_MODE_SHOW') |
||||||
|
), |
||||||
|
'DEFAULT' => 'E' |
||||||
|
); |
||||||
|
|
||||||
|
if ($boolCatalog) |
||||||
|
{ |
||||||
|
$arTemplateParameters['PRODUCT_SUBSCRIPTION'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_PRODUCT_SUBSCRIPTION'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'Y' |
||||||
|
); |
||||||
|
$arTemplateParameters['SHOW_DISCOUNT_PERCENT'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SHOW_DISCOUNT_PERCENT'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'REFRESH' => 'Y', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['SHOW_DISCOUNT_PERCENT']) && $arCurrentValues['SHOW_DISCOUNT_PERCENT'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['DISCOUNT_PERCENT_POSITION'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_DISCOUNT_PERCENT_POSITION'), |
||||||
|
'TYPE' => 'CUSTOM', |
||||||
|
'JS_FILE' => CatalogElementComponent::getSettingsScript($componentPath, 'position'), |
||||||
|
'JS_EVENT' => 'initPositionControl', |
||||||
|
'JS_DATA' => Json::encode( |
||||||
|
array( |
||||||
|
'positions' => array( |
||||||
|
'top-left', 'top-center', 'top-right', |
||||||
|
'middle-left', 'middle-center', 'middle-right', |
||||||
|
'bottom-left', 'bottom-center', 'bottom-right' |
||||||
|
), |
||||||
|
'className' => 'bx-pos-parameter-block-circle' |
||||||
|
) |
||||||
|
), |
||||||
|
'DEFAULT' => 'bottom-right' |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['SHOW_OLD_PRICE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SHOW_OLD_PRICE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
$arTemplateParameters['SHOW_MAX_QUANTITY'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SHOW_MAX_QUANTITY'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'REFRESH' => 'Y', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'VALUES' => array( |
||||||
|
'N' => GetMessage('CP_BCE_TPL_SHOW_MAX_QUANTITY_N'), |
||||||
|
'Y' => GetMessage('CP_BCE_TPL_SHOW_MAX_QUANTITY_Y'), |
||||||
|
'M' => GetMessage('CP_BCE_TPL_SHOW_MAX_QUANTITY_M') |
||||||
|
), |
||||||
|
'DEFAULT' => array('N'), |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['SHOW_MAX_QUANTITY'])) |
||||||
|
{ |
||||||
|
if ($arCurrentValues['SHOW_MAX_QUANTITY'] !== 'N') |
||||||
|
{ |
||||||
|
$arTemplateParameters['MESS_SHOW_MAX_QUANTITY'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_SHOW_MAX_QUANTITY'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_SHOW_MAX_QUANTITY_DEFAULT') |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
if ($arCurrentValues['SHOW_MAX_QUANTITY'] === 'M') |
||||||
|
{ |
||||||
|
$arTemplateParameters['RELATIVE_QUANTITY_FACTOR'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_RELATIVE_QUANTITY_FACTOR'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => '5' |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_RELATIVE_QUANTITY_MANY'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_RELATIVE_QUANTITY_MANY'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_RELATIVE_QUANTITY_MANY_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_RELATIVE_QUANTITY_FEW'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_RELATIVE_QUANTITY_FEW'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_RELATIVE_QUANTITY_FEW_DEFAULT') |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$basketActions = array( |
||||||
|
'BUY' => GetMessage('ADD_TO_BASKET_ACTION_BUY'), |
||||||
|
'ADD' => GetMessage('ADD_TO_BASKET_ACTION_ADD') |
||||||
|
); |
||||||
|
$arTemplateParameters['ADD_TO_BASKET_ACTION'] = array( |
||||||
|
'PARENT' => 'BASKET', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_ADD_TO_BASKET_ACTION'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'VALUES' => $basketActions, |
||||||
|
'DEFAULT' => array('BUY'), |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (!empty($arCurrentValues['ADD_TO_BASKET_ACTION'])) |
||||||
|
{ |
||||||
|
$selected = array(); |
||||||
|
|
||||||
|
if (!is_array($arCurrentValues['ADD_TO_BASKET_ACTION'])) |
||||||
|
{ |
||||||
|
$arCurrentValues['ADD_TO_BASKET_ACTION'] = array($arCurrentValues['ADD_TO_BASKET_ACTION']); |
||||||
|
} |
||||||
|
|
||||||
|
foreach ($arCurrentValues['ADD_TO_BASKET_ACTION'] as $action) |
||||||
|
{ |
||||||
|
if (isset($basketActions[$action])) |
||||||
|
{ |
||||||
|
$selected[$action] = $basketActions[$action]; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['ADD_TO_BASKET_ACTION_PRIMARY'] = array( |
||||||
|
'PARENT' => 'BASKET', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_ADD_TO_BASKET_ACTION_PRIMARY'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'VALUES' => $selected, |
||||||
|
'DEFAULT' => 'BUY', |
||||||
|
'REFRESH' => 'N' |
||||||
|
); |
||||||
|
unset($selected); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['SHOW_CLOSE_POPUP'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_SHOW_CLOSE_POPUP'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['MESS_BTN_BUY'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_BTN_BUY'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_BTN_BUY_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_BTN_ADD_TO_BASKET'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_BTN_ADD_TO_BASKET'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_BTN_ADD_TO_BASKET_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_BTN_SUBSCRIBE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_BTN_SUBSCRIBE'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_BTN_SUBSCRIBE_DEFAULT') |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['DISPLAY_COMPARE']) && $arCurrentValues['DISPLAY_COMPARE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['MESS_BTN_COMPARE'] = array( |
||||||
|
'PARENT' => 'COMPARE', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_BTN_COMPARE'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_BTN_COMPARE_DEFAULT') |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['MESS_NOT_AVAILABLE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_NOT_AVAILABLE'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_NOT_AVAILABLE_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_NOT_AVAILABLE_SERVICE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_NOT_AVAILABLE_SERVICE'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_NOT_AVAILABLE_SERVICE_DEFAULT') |
||||||
|
); |
||||||
|
|
||||||
|
$arTemplateParameters['USE_VOTE_RATING'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_USE_VOTE_RATING'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
if (isset($arCurrentValues['USE_VOTE_RATING']) && $arCurrentValues['USE_VOTE_RATING'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['VOTE_DISPLAY_AS_RATING'] = array( |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_VOTE_DISPLAY_AS_RATING'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'VALUES' => array( |
||||||
|
'rating' => GetMessage('CP_BCE_TPL_VDAR_RATING'), |
||||||
|
'vote_avg' => GetMessage('CP_BCE_TPL_VDAR_AVERAGE'), |
||||||
|
), |
||||||
|
'DEFAULT' => 'rating' |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['USE_COMMENTS'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_USE_COMMENTS'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['USE_COMMENTS']) && $arCurrentValues['USE_COMMENTS'] === 'Y') |
||||||
|
{ |
||||||
|
if (ModuleManager::isModuleInstalled('blog')) |
||||||
|
{ |
||||||
|
$arTemplateParameters['BLOG_USE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BLOG_USE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['BLOG_USE']) && $arCurrentValues['BLOG_USE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['BLOG_URL'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BLOG_URL'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => 'catalog_comments' |
||||||
|
); |
||||||
|
$arTemplateParameters['BLOG_EMAIL_NOTIFY'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BLOG_EMAIL_NOTIFY'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$boolRus = false; |
||||||
|
$rsLangs = CLanguage::GetList('id', 'asc', array('ID' => 'ru','ACTIVE' => 'Y')); |
||||||
|
if ($arLang = $rsLangs->Fetch()) |
||||||
|
{ |
||||||
|
$boolRus = true; |
||||||
|
} |
||||||
|
|
||||||
|
if ($boolRus) |
||||||
|
{ |
||||||
|
$arTemplateParameters['VK_USE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_VK_USE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['VK_USE']) && $arCurrentValues['VK_USE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['VK_API_ID'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_VK_API_ID'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => 'API_ID' |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['FB_USE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_FB_USE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['FB_USE']) && $arCurrentValues['FB_USE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['FB_APP_ID'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_FB_APP_ID'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => '' |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (ModuleManager::isModuleInstalled('highloadblock')) |
||||||
|
{ |
||||||
|
$arTemplateParameters['BRAND_USE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BRAND_USE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'DEFAULT' => 'N', |
||||||
|
'REFRESH' => 'Y' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['BRAND_USE']) && $arCurrentValues['BRAND_USE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['BRAND_PROP_CODE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BRAND_PROP_CODE'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'VALUES' => $arHighloadPropList, |
||||||
|
'MULTIPLE' => 'Y', |
||||||
|
'ADDITIONAL_VALUES' => 'Y' |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['MESS_PRICE_RANGES_TITLE'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_PRICE_RANGES_TITLE'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_PRICE_RANGES_TITLE_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_DESCRIPTION_TAB'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_DESCRIPTION_TAB'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_DESCRIPTION_TAB_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_PROPERTIES_TAB'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_PROPERTIES_TAB'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_PROPERTIES_TAB_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['MESS_COMMENTS_TAB'] = array( |
||||||
|
'PARENT' => 'VISUAL', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_MESS_COMMENTS_TAB'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => GetMessage('CP_BCE_TPL_MESS_COMMENTS_TAB_DEFAULT') |
||||||
|
); |
||||||
|
$arTemplateParameters['USE_ENHANCED_ECOMMERCE'] = array( |
||||||
|
'PARENT' => 'ANALYTICS_SETTINGS', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_USE_ENHANCED_ECOMMERCE'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'REFRESH' => 'Y', |
||||||
|
'DEFAULT' => 'N' |
||||||
|
); |
||||||
|
|
||||||
|
if (isset($arCurrentValues['USE_ENHANCED_ECOMMERCE']) && $arCurrentValues['USE_ENHANCED_ECOMMERCE'] === 'Y') |
||||||
|
{ |
||||||
|
$arTemplateParameters['DATA_LAYER_NAME'] = array( |
||||||
|
'PARENT' => 'ANALYTICS_SETTINGS', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_DATA_LAYER_NAME'), |
||||||
|
'TYPE' => 'STRING', |
||||||
|
'DEFAULT' => 'dataLayer' |
||||||
|
); |
||||||
|
$arTemplateParameters['BRAND_PROPERTY'] = array( |
||||||
|
'PARENT' => 'ANALYTICS_SETTINGS', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_BRAND_PROPERTY'), |
||||||
|
'TYPE' => 'LIST', |
||||||
|
'MULTIPLE' => 'N', |
||||||
|
'DEFAULT' => '', |
||||||
|
'VALUES' => $defaultValue + $arAllPropList |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
$arTemplateParameters['USE_RATIO_IN_RANGES'] = array( |
||||||
|
'PARENT' => 'PRICES', |
||||||
|
'NAME' => GetMessage('CP_BCE_TPL_USE_RATIO_IN_RANGES'), |
||||||
|
'TYPE' => 'CHECKBOX', |
||||||
|
'HIDDEN' => isset($arCurrentValues['USE_PRICE_COUNT']) && $arCurrentValues['USE_PRICE_COUNT'] === 'Y' ? 'N' : 'Y', |
||||||
|
'DEFAULT' => 'Y' |
||||||
|
); |
@ -0,0 +1,137 @@ |
|||||||
|
<?php |
||||||
|
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) |
||||||
|
{ |
||||||
|
die(); |
||||||
|
} |
||||||
|
|
||||||
|
use Bitrix\Main\Loader; |
||||||
|
|
||||||
|
/** |
||||||
|
* @var array $templateData |
||||||
|
* @var array $arParams |
||||||
|
* @var string $templateFolder |
||||||
|
* @global CMain $APPLICATION |
||||||
|
*/ |
||||||
|
|
||||||
|
global $APPLICATION; |
||||||
|
|
||||||
|
if (isset($templateData['TEMPLATE_THEME'])) |
||||||
|
{ |
||||||
|
$APPLICATION->SetAdditionalCSS($templateFolder.'/themes/'.$templateData['TEMPLATE_THEME'].'/style.css'); |
||||||
|
$APPLICATION->SetAdditionalCSS('/bitrix/css/main/themes/'.$templateData['TEMPLATE_THEME'].'/style.css', true); |
||||||
|
} |
||||||
|
|
||||||
|
if (!empty($templateData['TEMPLATE_LIBRARY'])) |
||||||
|
{ |
||||||
|
$loadCurrency = false; |
||||||
|
|
||||||
|
if (!empty($templateData['CURRENCIES'])) |
||||||
|
{ |
||||||
|
$loadCurrency = Loader::includeModule('currency'); |
||||||
|
} |
||||||
|
|
||||||
|
CJSCore::Init($templateData['TEMPLATE_LIBRARY']); |
||||||
|
if ($loadCurrency) |
||||||
|
{ |
||||||
|
?> |
||||||
|
<script> |
||||||
|
BX.Currency.setCurrencies(<?=$templateData['CURRENCIES']?>);
|
||||||
|
</script> |
||||||
|
<?php |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (isset($templateData['JS_OBJ'])) |
||||||
|
{ |
||||||
|
?> |
||||||
|
<script> |
||||||
|
BX.ready(BX.defer(function(){ |
||||||
|
if (!!window.<?=$templateData['JS_OBJ']?>)
|
||||||
|
{ |
||||||
|
window.<?=$templateData['JS_OBJ']?>.allowViewedCount(true);
|
||||||
|
} |
||||||
|
})); |
||||||
|
</script> |
||||||
|
<?php |
||||||
|
// check compared state |
||||||
|
if ($arParams['DISPLAY_COMPARE']) |
||||||
|
{ |
||||||
|
$compared = false; |
||||||
|
$comparedIds = array(); |
||||||
|
$item = $templateData['ITEM']; |
||||||
|
|
||||||
|
if (!empty($_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']])) |
||||||
|
{ |
||||||
|
if (!empty($item['JS_OFFERS']) && is_array($item['JS_OFFERS'])) |
||||||
|
{ |
||||||
|
foreach ($item['JS_OFFERS'] as $key => $offer) |
||||||
|
{ |
||||||
|
if (array_key_exists($offer['ID'], $_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']]['ITEMS'])) |
||||||
|
{ |
||||||
|
if ($key == $item['OFFERS_SELECTED']) |
||||||
|
{ |
||||||
|
$compared = true; |
||||||
|
} |
||||||
|
|
||||||
|
$comparedIds[] = $offer['ID']; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
elseif (array_key_exists($item['ID'], $_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']]['ITEMS'])) |
||||||
|
{ |
||||||
|
$compared = true; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if ($templateData['JS_OBJ']) |
||||||
|
{ |
||||||
|
?> |
||||||
|
<script> |
||||||
|
BX.ready(BX.defer(function(){ |
||||||
|
if (!!window.<?=$templateData['JS_OBJ']?>)
|
||||||
|
{ |
||||||
|
window.<?=$templateData['JS_OBJ']?>.setCompared('<?=$compared?>');
|
||||||
|
|
||||||
|
<?php |
||||||
|
if (!empty($comparedIds)): |
||||||
|
?> |
||||||
|
window.<?=$templateData['JS_OBJ']?>.setCompareInfo(<?=CUtil::PhpToJSObject($comparedIds, false, true)?>);
|
||||||
|
<?php |
||||||
|
endif; |
||||||
|
?> |
||||||
|
} |
||||||
|
})); |
||||||
|
</script> |
||||||
|
<?php |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// select target offer |
||||||
|
$request = Bitrix\Main\Application::getInstance()->getContext()->getRequest(); |
||||||
|
$offerNum = false; |
||||||
|
$offerId = (int)$this->request->get('OFFER_ID'); |
||||||
|
$offerCode = $this->request->get('OFFER_CODE'); |
||||||
|
|
||||||
|
if ($offerId > 0 && !empty($templateData['OFFER_IDS']) && is_array($templateData['OFFER_IDS'])) |
||||||
|
{ |
||||||
|
$offerNum = array_search($offerId, $templateData['OFFER_IDS']); |
||||||
|
} |
||||||
|
elseif (!empty($offerCode) && !empty($templateData['OFFER_CODES']) && is_array($templateData['OFFER_CODES'])) |
||||||
|
{ |
||||||
|
$offerNum = array_search($offerCode, $templateData['OFFER_CODES']); |
||||||
|
} |
||||||
|
|
||||||
|
if (!empty($offerNum)) |
||||||
|
{ |
||||||
|
?> |
||||||
|
<script> |
||||||
|
BX.ready(function(){ |
||||||
|
if (!!window.<?=$templateData['JS_OBJ']?>)
|
||||||
|
{ |
||||||
|
window.<?=$templateData['JS_OBJ']?>.setOffer(<?=$offerNum?>);
|
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
||||||
|
<?php |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,103 @@ |
|||||||
|
<? |
||||||
|
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED!==true) die(); |
||||||
|
|
||||||
|
if (!function_exists('getSliderForItem')) |
||||||
|
{ |
||||||
|
function getSliderForItem(&$item, $propertyCode, $addDetailToSlider) |
||||||
|
{ |
||||||
|
$result = array(); |
||||||
|
|
||||||
|
if (!empty($item) && is_array($item)) |
||||||
|
{ |
||||||
|
if ( |
||||||
|
'' != $propertyCode && |
||||||
|
isset($item['PROPERTIES'][$propertyCode]) && |
||||||
|
'F' == $item['PROPERTIES'][$propertyCode]['PROPERTY_TYPE'] |
||||||
|
) |
||||||
|
{ |
||||||
|
if ('MORE_PHOTO' == $propertyCode && isset($item['MORE_PHOTO']) && !empty($item['MORE_PHOTO'])) |
||||||
|
{ |
||||||
|
foreach ($item['MORE_PHOTO'] as &$onePhoto) |
||||||
|
{ |
||||||
|
$result[] = array( |
||||||
|
'ID' => intval($onePhoto['ID']), |
||||||
|
'SRC' => $onePhoto['SRC'], |
||||||
|
'WIDTH' => intval($onePhoto['WIDTH']), |
||||||
|
'HEIGHT' => intval($onePhoto['HEIGHT']) |
||||||
|
); |
||||||
|
} |
||||||
|
unset($onePhoto); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
if ( |
||||||
|
isset($item['DISPLAY_PROPERTIES'][$propertyCode]['FILE_VALUE']) && |
||||||
|
!empty($item['DISPLAY_PROPERTIES'][$propertyCode]['FILE_VALUE']) |
||||||
|
) |
||||||
|
{ |
||||||
|
$fileValues = ( |
||||||
|
isset($item['DISPLAY_PROPERTIES'][$propertyCode]['FILE_VALUE']['ID']) ? |
||||||
|
array(0 => $item['DISPLAY_PROPERTIES'][$propertyCode]['FILE_VALUE']) : |
||||||
|
$item['DISPLAY_PROPERTIES'][$propertyCode]['FILE_VALUE'] |
||||||
|
); |
||||||
|
foreach ($fileValues as &$oneFileValue) |
||||||
|
{ |
||||||
|
$result[] = array( |
||||||
|
'ID' => intval($oneFileValue['ID']), |
||||||
|
'SRC' => $oneFileValue['SRC'], |
||||||
|
'WIDTH' => intval($oneFileValue['WIDTH']), |
||||||
|
'HEIGHT' => intval($oneFileValue['HEIGHT']) |
||||||
|
); |
||||||
|
} |
||||||
|
if (isset($oneFileValue)) |
||||||
|
unset($oneFileValue); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
$propValues = $item['PROPERTIES'][$propertyCode]['VALUE']; |
||||||
|
if (!is_array($propValues)) |
||||||
|
$propValues = array($propValues); |
||||||
|
|
||||||
|
foreach ($propValues as &$oneValue) |
||||||
|
{ |
||||||
|
$oneFileValue = CFile::GetFileArray($oneValue); |
||||||
|
if (isset($oneFileValue['ID'])) |
||||||
|
{ |
||||||
|
$result[] = array( |
||||||
|
'ID' => intval($oneFileValue['ID']), |
||||||
|
'SRC' => $oneFileValue['SRC'], |
||||||
|
'WIDTH' => intval($oneFileValue['WIDTH']), |
||||||
|
'HEIGHT' => intval($oneFileValue['HEIGHT']) |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
if (isset($oneValue)) |
||||||
|
unset($oneValue); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
if ($addDetailToSlider || empty($result)) |
||||||
|
{ |
||||||
|
if (!empty($item['DETAIL_PICTURE'])) |
||||||
|
{ |
||||||
|
if (!is_array($item['DETAIL_PICTURE'])) |
||||||
|
$item['DETAIL_PICTURE'] = CFile::GetFileArray($item['DETAIL_PICTURE']); |
||||||
|
if (isset($item['DETAIL_PICTURE']['ID'])) |
||||||
|
{ |
||||||
|
array_unshift( |
||||||
|
$result, |
||||||
|
array( |
||||||
|
'ID' => intval($item['DETAIL_PICTURE']['ID']), |
||||||
|
'SRC' => $item['DETAIL_PICTURE']['SRC'], |
||||||
|
'WIDTH' => intval($item['DETAIL_PICTURE']['WIDTH']), |
||||||
|
'HEIGHT' => intval($item['DETAIL_PICTURE']['HEIGHT']) |
||||||
|
) |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return $result; |
||||||
|
} |
||||||
|
} |
||||||
|
?> |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 959 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 2.7 KiB |