
+ 
- 2% - субсидия на авансовый платёж для клиентов МКБ
+ Специальные условия по лизингу для клиентов МКБ
Лучшие условия финансирования среди лизинговых компаний за счет собственного фондирования
- Рассмотрение заявки по 2-м документам (анкета и паспорт).
diff --git a/cron/yasprav.log b/cron/yasprav.log
deleted file mode 100644
index fde1937..0000000
--- a/cron/yasprav.log
+++ /dev/null
@@ -1 +0,0 @@
-
1 => MO1
2 => SP1
3 => BN1
4 => BG1
5 => VL1
6 => VR1
7 => EK1
8 => IR1
9 => KZ1
10 => KG1
11 => KL1
12 => KM1
13 => KR1
14 => KS2
15 => KS1
16 => LP1
17 => NC1
18 => NN1
19 => NV1
20 => NR1
21 => NS1
22 => OM1
23 => OR1
24 => PR1
25 => RD1
26 => RZ1
27 => SM1
28 => SR1
29 => SC1
30 => SK1
31 => ST1
32 => SG1
33 => TL1
34 => TM1
35 => UF1
36 => CB1
37 => CL1
38 => YR1
Ok! Сохранено по ссылке! 24.06.2022
\ No newline at end of file
diff --git a/images/icons/icon-header-phone.svg b/images/icons/icon-header-phone.svg
index 444cea6..c95733e 100644
--- a/images/icons/icon-header-phone.svg
+++ b/images/icons/icon-header-phone.svg
@@ -1,6 +1,13 @@
diff --git a/images/icons/icon-header-recall.svg b/images/icons/icon-header-recall.svg
new file mode 100644
index 0000000..e34954b
--- /dev/null
+++ b/images/icons/icon-header-recall.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/manager.png b/images/manager.png
new file mode 100644
index 0000000..5137edd
Binary files /dev/null and b/images/manager.png differ
diff --git a/images/no_car_photo_380.png b/images/no_car_photo_380.png
new file mode 100644
index 0000000..266444d
Binary files /dev/null and b/images/no_car_photo_380.png differ
diff --git a/images/programs_faq.png b/images/programs_faq.png
new file mode 100644
index 0000000..d5ef4b2
Binary files /dev/null and b/images/programs_faq.png differ
diff --git a/index.php b/index.php
index 447f6c6..c799440 100644
--- a/index.php
+++ b/index.php
@@ -1,13 +1,14 @@
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
-$APPLICATION->SetTitle("Эволюция автолизинга. Лизинг автомобилей");
+$APPLICATION->SetTitle("Лизинг для юридических лиц и ИП в Москве и других городах России | Лизинговая компания Эволюция");
+$APPLICATION->SetPageProperty("description", "Лизинговая компания Эволюция предлагает быстрое оформление авто в лизинг для юридических лиц и ИП в Москве и других городах России. Выгодные цены, спецпредложения, простое оформление, консультирование и сопровождение.");
+$APPLICATION->AddHeadString('');
?>
$APPLICATION->IncludeComponent(
"evolution:slider.main",
"",
Array()
); ?>
-
$APPLICATION->IncludeComponent(
@@ -22,7 +23,7 @@ $APPLICATION->SetTitle("Эволюция автолизинга. Лизинг а
); ?>
-
+[= date('w'); ?>]
$APPLICATION->IncludeComponent(
"evolution:calculator",
"",
diff --git a/local/catalog_sitemap_generation.php b/local/catalog_sitemap_generation.php
new file mode 100644
index 0000000..0b9c543
--- /dev/null
+++ b/local/catalog_sitemap_generation.php
@@ -0,0 +1,75 @@
+
+//$_SERVER["DOCUMENT_ROOT"] = __DIR__;
+define('STOP_STATISTICS', true);
+define('NO_KEEP_STATISTIC', 'Y');
+define('NO_AGENT_STATISTIC', 'Y');
+define('DisableEventsCheck', true);
+define('BX_SECURITY_SHOW_MESSAGE', true);
+define('NOT_CHECK_PERMISSIONS', true);
+
+$_SERVER['DOCUMENT_ROOT'] = dirname(__DIR__, 1);
+require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');
+CModule::IncludeModule('iblock');
+
+$catalog = [];
+
+$all_brands_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "ACTIVE" => "Y" ], false, false, [ "CODE", "PROPERTY_UID" ] );
+while($all_brands_search_ob = $all_brands_search_res->GetNextElement())
+{
+ $brand = $all_brands_search_ob->GetFields();
+ $brand['MODELS'] = [];
+
+ $catalog[$brand['PROPERTY_UID_VALUE']] = $brand;
+}
+
+$all_models_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "ACTIVE" => "Y" ], false, false, [ "CODE", "PROPERTY_BRAND_UID"] );
+while($all_models_search_ob = $all_models_search_res->GetNextElement())
+{
+ $model = $all_models_search_ob->GetFields();
+ $model['PROPERTIES'] = $all_models_search_ob->GetProperties();
+
+ array_push($catalog[$model['PROPERTY_BRAND_UID_VALUE']]['MODELS'], $model);
+
+ //print_r($model);
+ //array_push( $bitrix_existed_models, $model_search['PROPERTIES']['UID']['VALUE'] );
+}
+
+//print_r($catalog);
+
+//7f7534ad-5382-469c-8e40-f77267fb5644
+
+$url = "https://".SITE_SERVER_NAME."/catalog";
+$lastmod = date(DATE_W3C);
+
+$strBegin = "\n\n";
+
+foreach($catalog AS $brand)
+{
+ //print ;
+ //print "\n";
+ //"\t".
+ $strBegin .= "".$url."/".$brand['CODE']."/"." ".$lastmod." "."\n";
+
+ foreach($brand['MODELS'] AS $model)
+ {
+ //print "\t";
+ //print $url."/".$brand['CODE']."/".$model['CODE']."/";
+ //print "\n";
+ //"\t"."\t".
+ $strBegin .= "".$url."/".$brand['CODE']."/".$model['CODE']."/"." ".$lastmod." "."\n";
+ }
+
+ /*
+
+
+ https://evo.quickcode.ru/ 2022-03-29T15:01:44+03:00
+ */
+}
+$strBegin .= " "."\n";
+
+file_put_contents("../sitemap-catalog.xml", $strBegin);
+//print $strBegin;
+
+die();
+
+?>
\ No newline at end of file
diff --git a/local/components/evolution/footer/component.php b/local/components/evolution/__footer/component.php
similarity index 100%
rename from local/components/evolution/footer/component.php
rename to local/components/evolution/__footer/component.php
diff --git a/local/components/evolution/footer/templates/.default/style.css b/local/components/evolution/__footer/templates/.default/style.css
similarity index 100%
rename from local/components/evolution/footer/templates/.default/style.css
rename to local/components/evolution/__footer/templates/.default/style.css
diff --git a/local/components/evolution/footer/templates/.default/template.php b/local/components/evolution/__footer/templates/.default/template.php
similarity index 100%
rename from local/components/evolution/footer/templates/.default/template.php
rename to local/components/evolution/__footer/templates/.default/template.php
diff --git a/local/components/evolution/top/component.php b/local/components/evolution/__top/component.php
similarity index 100%
rename from local/components/evolution/top/component.php
rename to local/components/evolution/__top/component.php
diff --git a/local/components/evolution/top/templates/.default/style.css b/local/components/evolution/__top/templates/.default/style.css
similarity index 100%
rename from local/components/evolution/top/templates/.default/style.css
rename to local/components/evolution/__top/templates/.default/style.css
diff --git a/local/components/evolution/top/templates/.default/template.php b/local/components/evolution/__top/templates/.default/template.php
similarity index 100%
rename from local/components/evolution/top/templates/.default/template.php
rename to local/components/evolution/__top/templates/.default/template.php
diff --git a/local/components/evolution/about.career.vacancy/component.php b/local/components/evolution/about.career.vacancy/component.php
index 3f85473..18da80f 100644
--- a/local/components/evolution/about.career.vacancy/component.php
+++ b/local/components/evolution/about.career.vacancy/component.php
@@ -52,6 +52,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
+
+ $APPLICATION->AddHeadString('');
}
$this->IncludeComponentTemplate();
diff --git a/local/components/evolution/about.contacts.list/templates/.default/script.js b/local/components/evolution/about.contacts.list/templates/.default/script.js
index cc28db8..9a5b1d8 100644
--- a/local/components/evolution/about.contacts.list/templates/.default/script.js
+++ b/local/components/evolution/about.contacts.list/templates/.default/script.js
@@ -1,5 +1,44 @@
$(function()
{
+ var hash = document.location.hash.replace("#", "");
+
+ if(hash !== "")
+ {
+ var agency = null;
+ var region = null;
+
+ $(".agency_item").each(function()
+ {
+ if($(this).data('agency') == hash)
+ {
+ agency = $(this).data('agency');
+ region = $(this).data('region');
+
+ console.log("agency", $(this).data('agency'), "region", $(this).data('region'));
+
+ /*
+ faq_section_index = $(this).data('section');
+ faq_item_index = $(this).data('index');
+
+ $(".faq_section_button").removeClass("active");
+ $(".faq_section_button_"+faq_section_index).addClass("active");
+ $(".faq_items_list").css("display", "none");
+ $(".faq_items_list_"+faq_section_index).css("display", "block");
+
+ $(".faq_item").removeClass("open");
+ $(".faq_item_"+faq_item_index).addClass("open");
+ */
+
+
+ $(".tab").last().click();
+ $(".regions_select").val(region);
+ onRegionChange(region);
+
+ return false;
+ }
+ });
+ }
+
$(".regions_select").on("change", function()
{
if($(this).val() === "")
@@ -30,35 +69,7 @@ $(function()
}, 200);
}
- $(".region_selected").remove();
- $(".region_block").css("display", "none");
-
- var text_blocks = $(".column_desktop").find(".region_"+parseInt($(this).val(), 10));
-
- text_blocks.map(function(index, item)
- {
- var n = $(item).clone();
- $(n).addClass("open").addClass("region_selected").css("display", "block");
-
- if(index % 2 == 0)
- {
- $(".column_left").append(n);
- }
- else
- {
- $(".column_right").append(n);
- }
- });
-
- var text_blocks = $(".column_mobile").find(".region_"+parseInt($(this).val(), 10));
-
- text_blocks.map(function(index, item)
- {
- var n = $(item).clone();
- $(n).addClass("open").addClass("region_selected").css("display", "block");
-
- $(".column_all").append(n);
- });
+ onRegionChange($(this).val());
}
});
@@ -73,4 +84,39 @@ $(function()
scrollTop: $("#contacts_top").offset().top - 100
}, 100);
});
-});
\ No newline at end of file
+});
+
+function onRegionChange(region)
+{
+ console.log("region", region);
+
+ $(".region_selected").remove();
+ $(".region_block").css("display", "none");
+
+ var text_blocks = $(".column_desktop").find(".region_"+parseInt(region, 10));
+
+ text_blocks.map(function(index, item)
+ {
+ var n = $(item).clone();
+ $(n).addClass("open").addClass("region_selected").css("display", "block");
+
+ if(index % 2 == 0)
+ {
+ $(".column_left").append(n);
+ }
+ else
+ {
+ $(".column_right").append(n);
+ }
+ });
+
+ var text_blocks = $(".column_mobile").find(".region_"+parseInt(region, 10));
+
+ text_blocks.map(function(index, item)
+ {
+ var n = $(item).clone();
+ $(n).addClass("open").addClass("region_selected").css("display", "block");
+
+ $(".column_all").append(n);
+ });
+}
\ No newline at end of file
diff --git a/local/components/evolution/about.contacts.list/templates/.default/template.php b/local/components/evolution/about.contacts.list/templates/.default/template.php
index 4274671..257da59 100644
--- a/local/components/evolution/about.contacts.list/templates/.default/template.php
+++ b/local/components/evolution/about.contacts.list/templates/.default/template.php
@@ -12,6 +12,71 @@
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
+
+$main_office_markup_content = [
+ "@context" => "https://schema.org",
+ "@type" => "FinancialService",
+ "image" => [
+ "https://avatars.mds.yandex.net/get-altay/2389272/2a000001749629d635959647ec27834f22be/XXXL",
+ ],
+ "name" => "Эволюция Автолизинга",
+ "address" => [
+ "@type" => "PostalAddress",
+ "streetAddress" => "Котляковская ул., 8",
+ "addressLocality" => "Москва",
+ "addressRegion" => "Москва",
+ "postalCode" => "115201",
+ "addressCountry" => "Россия",
+ ],
+ //"review" => [
+ // "@type" => "Review",
+ // "reviewRating" => [
+ // "@type" => "Rating",
+ // "ratingValue" => "4",
+ // "bestRating" => "5"
+ // ],
+ // "author" => [
+ // "@type" => "Person",
+ // "name" => "Lillian Ruiz",
+ // ]
+ //],
+ "geo" => [
+ "@type" => "GeoCoordinates",
+ "latitude" => 55.643978,
+ "longitude" => 37.640452,
+ ],
+ "url" => "https://".SITE_SERVER_NAME."/about/contacts/",
+ "telephone" => "+74951466767",
+ "openingHoursSpecification" => [
+ [
+ "@type" => "OpeningHoursSpecification",
+ "dayOfWeek" => [
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ ],
+ "opens" => "09:00",
+ "closes" => "18:00",
+ ],
+ [
+ "@type" => "OpeningHoursSpecification",
+ "dayOfWeek" => "Saturday",
+ "opens" => "00:00",
+ "closes" => "00:00",
+ ],
+ [
+ "@type" => "OpeningHoursSpecification",
+ "dayOfWeek" => "Sunday",
+ "opens" => "00:00",
+ "closes" => "00:00",
+ ],
+ ],
+];
+
+$APPLICATION->AddHeadString('', false, "AFTER_JS");
+?>
$placemarks = [];
foreach($arResult['AGENCIES'] AS $agency)
@@ -346,9 +411,9 @@ $this->setFrameMode(true);
$c = 1; ?>
foreach($arResult['AGENCIES'] AS $agency): ?>
- foreach($agency['PROPERTIES']['REGION']['VALUE'] AS $r): ?>region_= $r; ?> endforeach; ?>">
+ foreach($agency['PROPERTIES']['REGION']['VALUE'] AS $r): ?>region_= $r; ?> endforeach; ?>" data-region="= $agency['PROPERTIES']['REGION']['VALUE'][0]; ?>" data-agency="= $agency['ID']; ?>">
- = $agency['NAME']; ?>
+ = $agency['NAME']; ?> [= $agency['ID']; ?>]
diff --git a/local/components/evolution/about.highlights/.description.php b/local/components/evolution/about.highlights/.description.php
index a20bdf3..18b8c14 100644
--- a/local/components/evolution/about.highlights/.description.php
+++ b/local/components/evolution/about.highlights/.description.php
@@ -1,8 +1,8 @@
-
-if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
-
-$arTemplateDescription = array(
- "NAME" => GetMessage("DEFAULT_NAME"),
- "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
-);
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
?>
\ No newline at end of file
diff --git a/local/components/evolution/about.leaders/.description.php b/local/components/evolution/about.leaders/.description.php
index a20bdf3..18b8c14 100644
--- a/local/components/evolution/about.leaders/.description.php
+++ b/local/components/evolution/about.leaders/.description.php
@@ -1,8 +1,8 @@
-
-if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
-
-$arTemplateDescription = array(
- "NAME" => GetMessage("DEFAULT_NAME"),
- "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
-);
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
?>
\ No newline at end of file
diff --git a/local/components/evolution/about.leaders/component.php b/local/components/evolution/about.leaders/component.php
index 0a2b17c..1c1126d 100644
--- a/local/components/evolution/about.leaders/component.php
+++ b/local/components/evolution/about.leaders/component.php
@@ -21,7 +21,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
{
$arResult = [];
$sort = Array("SORT" => "ASC", "NAME" => "ASC");
- $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 23);
+ $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_ABOUTCOMPANY_LEADERS);
$options = Array("nPageSize" => 1000);
$res = CIBlockElement::GetList($sort, $filter, false, $options);
diff --git a/local/components/evolution/about.leaders/templates/.default/template.php b/local/components/evolution/about.leaders/templates/.default/template.php
index 55e49a7..1144323 100644
--- a/local/components/evolution/about.leaders/templates/.default/template.php
+++ b/local/components/evolution/about.leaders/templates/.default/template.php
@@ -12,13 +12,15 @@
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
-Руководство
-
- foreach($arResult['LEADERS'] AS $leader): ?>
-
-
- = $leader['NAME']; ?>
- = $leader['PREVIEW_TEXT']; ?>
+ if(count($arResult['LEADERS']) > 0): ?>
+ Руководство
+
+ foreach($arResult['LEADERS'] AS $leader): ?>
+
+
+ = $leader['NAME']; ?>
+ = $leader['PREVIEW_TEXT']; ?>
+
+ endforeach; ?>
- endforeach; ?>
-
\ No newline at end of file
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/about.news.article/component.php b/local/components/evolution/about.news.article/component.php
index a602c21..0d78dc1 100644
--- a/local/components/evolution/about.news.article/component.php
+++ b/local/components/evolution/about.news.article/component.php
@@ -46,6 +46,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
+
+ $APPLICATION->AddHeadString('');
}
$this->IncludeComponentTemplate();
diff --git a/local/components/evolution/about.news.article/templates/.default/template.php b/local/components/evolution/about.news.article/templates/.default/template.php
index 214d9de..5c2879f 100644
--- a/local/components/evolution/about.news.article/templates/.default/template.php
+++ b/local/components/evolution/about.news.article/templates/.default/template.php
@@ -11,8 +11,26 @@
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
-?>
+$markup_content = [
+ "@context" => "https://schema.org",
+ "@type" => "NewsArticle",
+ "headline" => $arResult['NAME'],
+ "image" => [
+ "https://".SITE_SERVER_NAME.$arResult['DETAIL_PICTURE'],
+ ],
+ "datePublished" => FormatDate(DATE_W3C, MakeTimeStamp($arResult['ACTIVE_FROM'])),
+ "dateModified" => FormatDate(DATE_W3C, MakeTimeStamp($arResult['ACTIVE_FROM'])),
+ "author" => [
+ [
+ "@type" => "Organization",
+ "name" => "Эволюция Автолизинга",
+ "url" => "https://".SITE_SERVER_NAME."/",
+ ],
+ ],
+];
+$APPLICATION->AddHeadString('', false, "AFTER_JS");
+?>
Новость
diff --git a/local/components/evolution/about.roadmap/.description.php b/local/components/evolution/about.roadmap/.description.php
index a20bdf3..18b8c14 100644
--- a/local/components/evolution/about.roadmap/.description.php
+++ b/local/components/evolution/about.roadmap/.description.php
@@ -1,8 +1,8 @@
-
-if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
-
-$arTemplateDescription = array(
- "NAME" => GetMessage("DEFAULT_NAME"),
- "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
-);
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
?>
\ No newline at end of file
diff --git a/local/components/evolution/about.roadmap/component.php b/local/components/evolution/about.roadmap/component.php
index fab34e4..780de97 100644
--- a/local/components/evolution/about.roadmap/component.php
+++ b/local/components/evolution/about.roadmap/component.php
@@ -21,7 +21,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
{
$arResult = [];
$sort = Array("PROPERTY_YEAR" => "DESC", "SORT" => "DESC",);
- $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 22);
+ $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_ABOUTCOMPANY_ROADMAP);
$options = Array("nPageSize" => 1000);
$res = CIBlockElement::GetList($sort, $filter, false, $options);
diff --git a/local/components/evolution/about.roadmap/templates/.default/template.php b/local/components/evolution/about.roadmap/templates/.default/template.php
index ac30698..73649d6 100644
--- a/local/components/evolution/about.roadmap/templates/.default/template.php
+++ b/local/components/evolution/about.roadmap/templates/.default/template.php
@@ -21,7 +21,7 @@ $this->setFrameMode(true);
путь развития
if(!empty($arParams['PRESENTATION_URL'])): ?>
- Скачать презентацию
+ Скачать презентацию
endif; ?>
@@ -31,7 +31,7 @@ $this->setFrameMode(true);
foreach($periods AS $period): ?>
= $period['PROPERTIES']['MONTH']['VALUE']; ?>
- = $period['PREVIEW_TEXT']; ?>
+ = str_replace(["
", "
"], ["", "
"], $period['PREVIEW_TEXT']); ?>
endforeach; ?>
diff --git a/local/components/evolution/banner.ask/.description.php b/local/components/evolution/banner.ask/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/banner.ask/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/banner.ask/component.php b/local/components/evolution/banner.ask/component.php
new file mode 100644
index 0000000..81e8d0e
--- /dev/null
+++ b/local/components/evolution/banner.ask/component.php
@@ -0,0 +1,13 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+$this->IncludeComponentTemplate();
\ No newline at end of file
diff --git a/local/components/evolution/banner.ask/lang/ru/.description.php b/local/components/evolution/banner.ask/lang/ru/.description.php
new file mode 100644
index 0000000..d303aa0
--- /dev/null
+++ b/local/components/evolution/banner.ask/lang/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Баннер в каталоге 'Спросить у консультанта'";
+$MESS ['DEFAULT_DESC'] = "Баннер в каталоге 'Спросить у консультанта'";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/banner.ask/templates/.default/script.js b/local/components/evolution/banner.ask/templates/.default/script.js
new file mode 100644
index 0000000..bb0d340
--- /dev/null
+++ b/local/components/evolution/banner.ask/templates/.default/script.js
@@ -0,0 +1,9 @@
+$(function()
+{
+ $("#to_form_button").on("click", function(event)
+ {
+ $('html, body').animate({
+ scrollTop: $("#order").offset().top - 100
+ }, 200);
+ });
+});
\ No newline at end of file
diff --git a/local/components/evolution/banner.ask/templates/.default/style.css b/local/components/evolution/banner.ask/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/banner.ask/templates/.default/template.php b/local/components/evolution/banner.ask/templates/.default/template.php
new file mode 100644
index 0000000..a93ab12
--- /dev/null
+++ b/local/components/evolution/banner.ask/templates/.default/template.php
@@ -0,0 +1,22 @@
+setFrameMode(true);
+?>
+
\ No newline at end of file
diff --git a/local/components/evolution/banner.inner/.description.php b/local/components/evolution/banner.inner/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/banner.inner/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/banner.inner/component.php b/local/components/evolution/banner.inner/component.php
new file mode 100644
index 0000000..782af07
--- /dev/null
+++ b/local/components/evolution/banner.inner/component.php
@@ -0,0 +1,40 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
+{
+ if(CModule::IncludeModule('iblock'))
+ {
+ $filter = ["ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BANNERS_INNER];
+ $banner_res = CIBlockElement::GetList(["RAND" => "ASC", ], $filter, false, [ "nPageSize" => 1 ]);
+
+ while ($banner_ob_element = $banner_res->GetNextElement())
+ {
+ $banner_ar_res = $banner_ob_element->GetFields();
+ $banner_ar_res['PROPERTIES'] = $banner_ob_element->GetProperties();
+
+ if(isset($banner_ar_res['PREVIEW_PICTURE']))
+ {
+ $banner_ar_res['PREVIEW_PICTURE'] = CFile::GetPath($banner_ar_res['PREVIEW_PICTURE']);
+ }
+
+ $arResult['BANNER'] = $banner_ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+ }
+}
\ No newline at end of file
diff --git a/local/components/evolution/banner.inner/ru/.description.php b/local/components/evolution/banner.inner/ru/.description.php
new file mode 100644
index 0000000..1986cb3
--- /dev/null
+++ b/local/components/evolution/banner.inner/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Внутренний баннер";
+$MESS ['DEFAULT_DESC'] = "Внутренний баннер";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/banner.inner/templates/.default/script.js b/local/components/evolution/banner.inner/templates/.default/script.js
new file mode 100644
index 0000000..bb0d340
--- /dev/null
+++ b/local/components/evolution/banner.inner/templates/.default/script.js
@@ -0,0 +1,9 @@
+$(function()
+{
+ $("#to_form_button").on("click", function(event)
+ {
+ $('html, body').animate({
+ scrollTop: $("#order").offset().top - 100
+ }, 200);
+ });
+});
\ No newline at end of file
diff --git a/local/components/evolution/banner.inner/templates/.default/style.css b/local/components/evolution/banner.inner/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/banner.inner/templates/.default/template.php b/local/components/evolution/banner.inner/templates/.default/template.php
new file mode 100644
index 0000000..5268f85
--- /dev/null
+++ b/local/components/evolution/banner.inner/templates/.default/template.php
@@ -0,0 +1,22 @@
+setFrameMode(true);
+?>
+
+
\ No newline at end of file
diff --git a/local/components/evolution/callback.button/.description.php b/local/components/evolution/callback.button/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/callback.button/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/callback.button/component.php b/local/components/evolution/callback.button/component.php
new file mode 100644
index 0000000..5dcd3ce
--- /dev/null
+++ b/local/components/evolution/callback.button/component.php
@@ -0,0 +1,60 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
+{
+ if(CModule::IncludeModule('iblock'))
+ {
+ $arResult['ALLOW'] = false;
+ $arResult['SEARCH'] = $_REQUEST['search'];
+
+ print "\n";
+
+ $sort = Array("ID" => "DESC");
+ $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CALLBACK_SCHEDULE);
+ $options = Array("nPageSize" => 1);
+
+ $schedule_res = CIBlockElement::GetList($sort, $filter, false, $options);
+ while ($schedule_element = $schedule_res->GetNextElement())
+ {
+ $schedule = $schedule_element->GetFields();
+ $schedule['PROPERTIES'] = $schedule_element->GetProperties();
+
+ $day = date("w");
+ $time = date("H:i");
+
+ if($schedule['PROPERTIES']['WEEKDAY_'.$day.'_ENABLED']['VALUE_XML_ID'] === "YES")
+ {
+ if(!empty($schedule['PROPERTIES']['WEEKDAY_'.$day.'_FROM']['VALUE']) && $schedule['PROPERTIES']['WEEKDAY_'.$day.'_TO']['VALUE'])
+ {
+ $from = mktime($schedule['PROPERTIES']['WEEKDAY_'.$day.'_FROM']['VALUE'].":00");
+ $now = mktime( $time.":00" );
+ $to = mktime($schedule['PROPERTIES']['WEEKDAY_'.$day.'_TO']['VALUE'].":00");
+
+ if($now >= $from && $now < $to)
+ {
+ $arResult['ALLOW'] = true;
+ print "\n";
+ print "\n";
+ }
+ }
+ }
+ }
+
+ $this->IncludeComponentTemplate();
+ }
+}
\ No newline at end of file
diff --git a/local/components/evolution/callback.button/lang/ru/.description.php b/local/components/evolution/callback.button/lang/ru/.description.php
new file mode 100644
index 0000000..f0bce42
--- /dev/null
+++ b/local/components/evolution/callback.button/lang/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Кнопка \"Обратный звонок\"";
+$MESS ['DEFAULT_DESC'] = "Кнопка \"Обратный звонок\"";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/callback.button/templates/.default/script.js b/local/components/evolution/callback.button/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/callback.button/templates/.default/style.css b/local/components/evolution/callback.button/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/callback.button/templates/.default/template.php b/local/components/evolution/callback.button/templates/.default/template.php
new file mode 100644
index 0000000..22e6ec9
--- /dev/null
+++ b/local/components/evolution/callback.button/templates/.default/template.php
@@ -0,0 +1,17 @@
+setFrameMode(true);
+?>
+ if($arResult['ALLOW']): ?>
+
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.brands/component.php b/local/components/evolution/catalog.brands/component.php
index 2a99013..c49519c 100644
--- a/local/components/evolution/catalog.brands/component.php
+++ b/local/components/evolution/catalog.brands/component.php
@@ -33,6 +33,18 @@ use Bitrix\Main\Context,
{
$brands_ar_res['PREVIEW_PICTURE'] = CFile::GetPath($brands_ar_res['PREVIEW_PICTURE']);
}
+ else
+ {
+ $cars_res = CIBlockElement::GetList([ "PROPERTY_PRICE" => "DESC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CATALOG_CARS_NEW, "PROPERTY_BRAND" => $brands_ar_res['ID'] ], false, [ "nPageSize" => 1 ]);
+ while ($cars_ob_element = $cars_res->GetNextElement())
+ {
+ $cars_ar_res = $cars_ob_element->GetFields();
+ $cars_ar_res['PROPERTIES'] = $cars_ob_element->GetProperties();
+
+ $brands_ar_res['PREVIEW_PICTURE'] = $cars_ar_res['PROPERTIES']['IMAGE_URL']['VALUE'];
+ }
+
+ }
$arResult['BRANDS'][] = $brands_ar_res;
}
diff --git a/local/components/evolution/catalog.brands/templates/.default/script.js b/local/components/evolution/catalog.brands/templates/.default/script.js
index 07342ae..e69de29 100644
--- a/local/components/evolution/catalog.brands/templates/.default/script.js
+++ b/local/components/evolution/catalog.brands/templates/.default/script.js
@@ -1,423 +0,0 @@
-/*
-var selected = {};
-var inputs = {};
-
-function formCatalogFilter(props)
-{
- console.log("props???");
- console.log(props);
- selected = props;
- $(".filter_header .tabs .tab").on("click", function()
- {
- $(".filter_header .tabs .tab").removeClass("active");
- $(this).addClass("active");
- });
-}
-
-function updateCounter(parameters)
-{
- console.log("updateCounter", parameters);
-
- $("#catalog_filter_spinner").show();
- $("#catalog_filter_search_button_counter").hide();
-
- var params = {};
- for(let i in parameters)
- {
- if(parameters[i] !== undefined) { params[i] = parameters[i]; }
- }
-
- $.get("/api/catalog/count/", params, function(response)
- {
- $("#catalog_filter_spinner").hide();
- $("#catalog_filter_search_button_counter").text("Показать "+response.total+" вариантов").show();
- }, "json");
-}
-
-function loadModels(uid)
-{
- $.post("/api/catalog/models/",
- {
- BRAND_UID: uid
- }, function(response)
- {
- console.log("loadModels", selected['MODEL_ID'], selected['MODEL']);
-
- $("#small_filter_models").empty();
- $("#filter_models").empty();
-
- if(selected['MODEL_ID'] !== undefined)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- else
- {
- if(selected['MODEL'] !== undefined)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- else
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- }
- $("#small_filter_models")[0].selectedIndex = 0;
- $("#filter_models")[0].selectedIndex = 0;
-
- for(let i in response.models)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
-
- if(selected['MODEL'] !== undefined)
- {
- $("#small_filter_models").val(selected['MODEL']);
- $("#filter_models").val(selected['MODEL']);
-
- let id = $("#filter_models").find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- updateCounter(selected);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-}
-
-$(function()
-{
- $.get("/api/catalog/brands/",
- {
- params: {},
- }, function(response)
- {
- console.log("selected", selected);
- //$("#small_filter_brands").empty();
- //$("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- //$("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- for(let i in response.brands)
- {
- $("#small_filter_brands").append("");
- $("#filter_brands").append("");
- }
-
- if(selected['BRAND'] !== undefined)
- {
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
-
- $("#small_filter_brands").val(selected['BRAND']);
- $("#filter_brands").val(selected['BRAND']);
-
- let uid = $("#filter_brands").find(':selected').data('uid');
- let id = $("#filter_brands").find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- loadModels(uid);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-
- $("#small_filter_brands").on("change", function(event)
- {
- $("#filter_brands").val(event.target.value);
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- if($(this).val() === "")
- {
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
- }
- else
- {
- let uid = $(this).find(':selected').data('uid');
- let id = $(this).find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
- });
-
- $("#small_filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- $("#filter_models").val();
-
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- $("#filter_models").val(event.target.value);
-
- selected['MODEL'] = id;
- selected['MODEL_ID'] = id;
-
- $("#small_filter_models").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
- });
-
- $("#filter_brands").on("change", function(event)
- {
- console.log("BBBBB", $(this).val());
- if($(this).val() === '')
- {
- selected['BRAND'] = undefined;
- selected['BRAND_ID'] = undefined;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
-
- updateCounter(selected);
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- let uid = $(this).find(':selected').data('uid');
- selected['BRAND'] = $(this).val();
- selected['BRAND_ID'] = id;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
- });
-
- $("#filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
-
- updateCounter(selected);
- });
-
- $("#catalog_small_form").on("submit", function(e)
- {
- e.preventDefault();
- });
-
- $("#catalog_small_find").on("click", function()
- {
- var path = "/catalog";
-
- if($("#small_filter_brands").val() !== "")
- {
- path = path+"/"+$("#small_filter_brands").val();
- }
- if($("#small_filter_models").val() !== "")
- {
- path = path+"/"+$("#small_filter_models").val();
- }
-
- path = path+"/";
-
- window.location.href = path;
- //$("#catalog_small_form").submit();
- });
-
- $("#rich_filter_toggle").on("click", function()
- {
- updateCounter(selected);
- $("#filter").addClass("visible");
- $("#catalog_small_filter").addClass("hidden");
- });
-
- $.get("/api/catalog/parameters/",
- {
- params: {},
- }, function(response)
- {
- for(let i in response.bodies)
- {
- $("#filter_bodies").append("");
- }
- if(selected['BODY'] !== undefined && selected['BODY'] !== null && selected['BODY'] !== "")
- {
- $("#filter_bodies").val(selected['BODY']);
- $("#filter_bodies").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.gears)
- {
- $("#filter_gears").append("");
- }
- if(selected['GEAR'] !== undefined && selected['GEAR'] !== null && selected['GEAR'] !== "")
- {
- $("#filter_gears").val(selected['GEAR']);
- $("#filter_gears").find("option").first().text("Любая").attr("disabled", false);
- }
-
- for(let i in response.engine_fuels)
- {
- $("#filter_engine_fuels").append("");
- }
- if(selected['ENGINE_FUEL'] !== undefined && selected['ENGINE_FUEL'] !== null && selected['ENGINE_FUEL'] !== "")
- {
- $("#filter_engine_fuels").val(selected['ENGINE_FUEL']);
- $("#filter_engine_fuels").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.drives)
- {
- $("#filter_drives").append("");
- }
- if(selected['DRIVE'] !== undefined && selected['DRIVE'] !== null && selected['DRIVE'] !== "")
- {
- $("#filter_drives").val(selected['DRIVE']);
- $("#filter_drives").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_FROM'] !== undefined && selected['ENGINE_VOLUME_FROM'] !== null && selected['ENGINE_VOLUME_FROM'] !== "")
- {
- $("#filter_engine_volume_from").val(selected['ENGINE_VOLUME_FROM']);
- $("#filter_engine_volume_from").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_TO'] !== undefined && selected['ENGINE_VOLUME_TO'] !== null && selected['ENGINE_VOLUME_TO'] !== "")
- {
- $("#filter_engine_volume_to").val(selected['ENGINE_VOLUME_TO']);
- $("#filter_engine_volume_to").find("option").first().text("Любой").attr("disabled", false);
- }
-
- console.log("response", response);
- }, "json");
-
- $("#filter_bodies").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Кузов").attr("disabled", "disabled"); }
-
- selected['BODY'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_drives").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Привод").attr("disabled", "disabled"); }
-
- selected['DRIVE'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_fuels").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Двигатель").attr("disabled", "disabled"); }
-
- selected['ENGINE_FUEL'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_gears").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любая").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Коробка").attr("disabled", "disabled"); }
-
- selected['GEAR'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#catalog_filter_search_button").on("click", function(e)
- {
- e.preventDefault();
- var path = "/catalog";
-
- if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
- {
- path = path+"/"+$("#filter_brands").val();
- }
- if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
- {
- path = path+"/"+$("#filter_models").val();
- }
-
- var p = {};
- for(let i in selected)
- {
- if(i !== "BRAND" && i !== "BRAND_ID" && i !== "MODEL" && i !== "MODEL_ID")
- {
- p[i] = selected[i];
- }
- }
-
- path = path+"/?"+$.param(p);
- window.location.href = path;
- });
-
- $("#filter_engine_volume_from").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, от").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_FROM'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_volume_to").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, до").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_TO'] = $(this).val();;
- updateCounter(selected);
- });
-});
-*/
\ No newline at end of file
diff --git a/local/components/evolution/catalog.brands/templates/.default/template.php b/local/components/evolution/catalog.brands/templates/.default/template.php
index dd59270..fc9bda8 100644
--- a/local/components/evolution/catalog.brands/templates/.default/template.php
+++ b/local/components/evolution/catalog.brands/templates/.default/template.php
@@ -12,14 +12,13 @@
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
-
- = $arParams['TITLE']; ?>
+
+ = $arParams['TITLE']; ?>
foreach($arResult['BRANDS'] AS $brand): ?>
-
+
endforeach; ?>
diff --git a/local/components/evolution/catalog.list.item/.description.php b/local/components/evolution/catalog.list.item/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.list.item/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.list.item/component.php b/local/components/evolution/catalog.list.item/component.php
new file mode 100644
index 0000000..81e8d0e
--- /dev/null
+++ b/local/components/evolution/catalog.list.item/component.php
@@ -0,0 +1,13 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+$this->IncludeComponentTemplate();
\ No newline at end of file
diff --git a/local/components/evolution/catalog.list.item/ru/.description.php b/local/components/evolution/catalog.list.item/ru/.description.php
new file mode 100644
index 0000000..32021ae
--- /dev/null
+++ b/local/components/evolution/catalog.list.item/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Позиция в каталоге ЛКТ";
+$MESS ['DEFAULT_DESC'] = "Позиция в каталоге ЛКТ";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.list.item/templates/.default/template.php b/local/components/evolution/catalog.list.item/templates/.default/template.php
new file mode 100644
index 0000000..43541f6
--- /dev/null
+++ b/local/components/evolution/catalog.list.item/templates/.default/template.php
@@ -0,0 +1,46 @@
+setFrameMode(true);
+?>
+
+
+
+
+ = $arParams['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arParams['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arParams['PROPERTIES']['BODY']['VALUE']; ?>
+
+ = $arParams['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?>
+ = $arParams['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arParams['PROPERTIES']['GEAR']['VALUE']; ?>, = $arParams['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с.
+
+
+ -
+
Ежемесячный платёж (от)
+ = $arParams['CALCULATION']['MONTHLY']; ?> р.
+
+ -
+
Стоимость автомобиля (от)
+ = number_format($arParams['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
+
+ -
+
Экономия по налогу на прибыль (до)
+ = $arParams['CALCULATION']['SAVINGS_TAX']; ?> р.
+
+ -
+
НДС к возмещению из бюджета (до)
+ = $arParams['CALCULATION']['SAVINGS_VAT']; ?> р.
+
+
+
+
+
\ No newline at end of file
diff --git a/local/components/evolution/catalog.models/component.php b/local/components/evolution/catalog.models/component.php
index e729615..98b08ad 100644
--- a/local/components/evolution/catalog.models/component.php
+++ b/local/components/evolution/catalog.models/component.php
@@ -49,11 +49,25 @@ use Bitrix\Main\Context,
$models_ar_res = $models_ob_element->GetFields();
$models_ar_res['PROPERTIES'] = $models_ob_element->GetProperties();
- if(isset($models_ar_res['PREVIEW_PICTURE']))
+ if(!empty($models_ar_res['PREVIEW_PICTURE']))
{
+ $models_ar_res['IMAGE_PREPARED'] = true;
$models_ar_res['PREVIEW_PICTURE'] = CFile::GetPath($models_ar_res['PREVIEW_PICTURE']);
- $models_ar_res['URL'] = "/catalog/".$brands[$arParams['BRAND']]['CODE']."/".$models_ar_res['CODE']."/";
}
+ else
+ {
+ $cars_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CATALOG_CARS_NEW, "PROPERTY_MODEL" => $models_ar_res['ID'] ], false, [ "nPageSize" => 1 ]);
+ while ($cars_ob_element = $cars_res->GetNextElement())
+ {
+ $cars_ar_res = $cars_ob_element->GetFields();
+ $cars_ar_res['PROPERTIES'] = $cars_ob_element->GetProperties();
+
+ $models_ar_res['IMAGE_PREPARED'] = false;
+ $models_ar_res['PREVIEW_PICTURE'] = $cars_ar_res['PROPERTIES']['IMAGE_URL']['VALUE'];
+ }
+ }
+
+ $models_ar_res['URL'] = "/catalog/".$brands[$arParams['BRAND']]['CODE']."/".$models_ar_res['CODE']."/";
$arResult['MODELS'][] = $models_ar_res;
}
diff --git a/local/components/evolution/catalog.models/templates/.default/script.js b/local/components/evolution/catalog.models/templates/.default/script.js
index 07342ae..e69de29 100644
--- a/local/components/evolution/catalog.models/templates/.default/script.js
+++ b/local/components/evolution/catalog.models/templates/.default/script.js
@@ -1,423 +0,0 @@
-/*
-var selected = {};
-var inputs = {};
-
-function formCatalogFilter(props)
-{
- console.log("props???");
- console.log(props);
- selected = props;
- $(".filter_header .tabs .tab").on("click", function()
- {
- $(".filter_header .tabs .tab").removeClass("active");
- $(this).addClass("active");
- });
-}
-
-function updateCounter(parameters)
-{
- console.log("updateCounter", parameters);
-
- $("#catalog_filter_spinner").show();
- $("#catalog_filter_search_button_counter").hide();
-
- var params = {};
- for(let i in parameters)
- {
- if(parameters[i] !== undefined) { params[i] = parameters[i]; }
- }
-
- $.get("/api/catalog/count/", params, function(response)
- {
- $("#catalog_filter_spinner").hide();
- $("#catalog_filter_search_button_counter").text("Показать "+response.total+" вариантов").show();
- }, "json");
-}
-
-function loadModels(uid)
-{
- $.post("/api/catalog/models/",
- {
- BRAND_UID: uid
- }, function(response)
- {
- console.log("loadModels", selected['MODEL_ID'], selected['MODEL']);
-
- $("#small_filter_models").empty();
- $("#filter_models").empty();
-
- if(selected['MODEL_ID'] !== undefined)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- else
- {
- if(selected['MODEL'] !== undefined)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- else
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- }
- $("#small_filter_models")[0].selectedIndex = 0;
- $("#filter_models")[0].selectedIndex = 0;
-
- for(let i in response.models)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
-
- if(selected['MODEL'] !== undefined)
- {
- $("#small_filter_models").val(selected['MODEL']);
- $("#filter_models").val(selected['MODEL']);
-
- let id = $("#filter_models").find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- updateCounter(selected);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-}
-
-$(function()
-{
- $.get("/api/catalog/brands/",
- {
- params: {},
- }, function(response)
- {
- console.log("selected", selected);
- //$("#small_filter_brands").empty();
- //$("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- //$("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- for(let i in response.brands)
- {
- $("#small_filter_brands").append("");
- $("#filter_brands").append("");
- }
-
- if(selected['BRAND'] !== undefined)
- {
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
-
- $("#small_filter_brands").val(selected['BRAND']);
- $("#filter_brands").val(selected['BRAND']);
-
- let uid = $("#filter_brands").find(':selected').data('uid');
- let id = $("#filter_brands").find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- loadModels(uid);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-
- $("#small_filter_brands").on("change", function(event)
- {
- $("#filter_brands").val(event.target.value);
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- if($(this).val() === "")
- {
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
- }
- else
- {
- let uid = $(this).find(':selected').data('uid');
- let id = $(this).find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
- });
-
- $("#small_filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- $("#filter_models").val();
-
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- $("#filter_models").val(event.target.value);
-
- selected['MODEL'] = id;
- selected['MODEL_ID'] = id;
-
- $("#small_filter_models").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
- });
-
- $("#filter_brands").on("change", function(event)
- {
- console.log("BBBBB", $(this).val());
- if($(this).val() === '')
- {
- selected['BRAND'] = undefined;
- selected['BRAND_ID'] = undefined;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
-
- updateCounter(selected);
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- let uid = $(this).find(':selected').data('uid');
- selected['BRAND'] = $(this).val();
- selected['BRAND_ID'] = id;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
- });
-
- $("#filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
-
- updateCounter(selected);
- });
-
- $("#catalog_small_form").on("submit", function(e)
- {
- e.preventDefault();
- });
-
- $("#catalog_small_find").on("click", function()
- {
- var path = "/catalog";
-
- if($("#small_filter_brands").val() !== "")
- {
- path = path+"/"+$("#small_filter_brands").val();
- }
- if($("#small_filter_models").val() !== "")
- {
- path = path+"/"+$("#small_filter_models").val();
- }
-
- path = path+"/";
-
- window.location.href = path;
- //$("#catalog_small_form").submit();
- });
-
- $("#rich_filter_toggle").on("click", function()
- {
- updateCounter(selected);
- $("#filter").addClass("visible");
- $("#catalog_small_filter").addClass("hidden");
- });
-
- $.get("/api/catalog/parameters/",
- {
- params: {},
- }, function(response)
- {
- for(let i in response.bodies)
- {
- $("#filter_bodies").append("");
- }
- if(selected['BODY'] !== undefined && selected['BODY'] !== null && selected['BODY'] !== "")
- {
- $("#filter_bodies").val(selected['BODY']);
- $("#filter_bodies").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.gears)
- {
- $("#filter_gears").append("");
- }
- if(selected['GEAR'] !== undefined && selected['GEAR'] !== null && selected['GEAR'] !== "")
- {
- $("#filter_gears").val(selected['GEAR']);
- $("#filter_gears").find("option").first().text("Любая").attr("disabled", false);
- }
-
- for(let i in response.engine_fuels)
- {
- $("#filter_engine_fuels").append("");
- }
- if(selected['ENGINE_FUEL'] !== undefined && selected['ENGINE_FUEL'] !== null && selected['ENGINE_FUEL'] !== "")
- {
- $("#filter_engine_fuels").val(selected['ENGINE_FUEL']);
- $("#filter_engine_fuels").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.drives)
- {
- $("#filter_drives").append("");
- }
- if(selected['DRIVE'] !== undefined && selected['DRIVE'] !== null && selected['DRIVE'] !== "")
- {
- $("#filter_drives").val(selected['DRIVE']);
- $("#filter_drives").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_FROM'] !== undefined && selected['ENGINE_VOLUME_FROM'] !== null && selected['ENGINE_VOLUME_FROM'] !== "")
- {
- $("#filter_engine_volume_from").val(selected['ENGINE_VOLUME_FROM']);
- $("#filter_engine_volume_from").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_TO'] !== undefined && selected['ENGINE_VOLUME_TO'] !== null && selected['ENGINE_VOLUME_TO'] !== "")
- {
- $("#filter_engine_volume_to").val(selected['ENGINE_VOLUME_TO']);
- $("#filter_engine_volume_to").find("option").first().text("Любой").attr("disabled", false);
- }
-
- console.log("response", response);
- }, "json");
-
- $("#filter_bodies").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Кузов").attr("disabled", "disabled"); }
-
- selected['BODY'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_drives").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Привод").attr("disabled", "disabled"); }
-
- selected['DRIVE'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_fuels").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Двигатель").attr("disabled", "disabled"); }
-
- selected['ENGINE_FUEL'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_gears").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любая").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Коробка").attr("disabled", "disabled"); }
-
- selected['GEAR'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#catalog_filter_search_button").on("click", function(e)
- {
- e.preventDefault();
- var path = "/catalog";
-
- if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
- {
- path = path+"/"+$("#filter_brands").val();
- }
- if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
- {
- path = path+"/"+$("#filter_models").val();
- }
-
- var p = {};
- for(let i in selected)
- {
- if(i !== "BRAND" && i !== "BRAND_ID" && i !== "MODEL" && i !== "MODEL_ID")
- {
- p[i] = selected[i];
- }
- }
-
- path = path+"/?"+$.param(p);
- window.location.href = path;
- });
-
- $("#filter_engine_volume_from").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, от").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_FROM'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_volume_to").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, до").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_TO'] = $(this).val();;
- updateCounter(selected);
- });
-});
-*/
\ No newline at end of file
diff --git a/local/components/evolution/catalog.models/templates/.default/template.php b/local/components/evolution/catalog.models/templates/.default/template.php
index abd509b..4439413 100644
--- a/local/components/evolution/catalog.models/templates/.default/template.php
+++ b/local/components/evolution/catalog.models/templates/.default/template.php
@@ -12,16 +12,13 @@
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
-
= isset($arParams['TITLE']) ? $arParams['TITLE'] : $arResult['TITLE']; ?>
foreach($arResult['MODELS'] AS $model): ?>
-
+
endforeach; ?>
diff --git a/local/components/evolution/catalog.other.positions/.description.php b/local/components/evolution/catalog.other.positions/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.other.positions/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.other.positions/component.php b/local/components/evolution/catalog.other.positions/component.php
new file mode 100644
index 0000000..8dd3af7
--- /dev/null
+++ b/local/components/evolution/catalog.other.positions/component.php
@@ -0,0 +1,61 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+global $NavNum;
+$NavNum = 0;
+
+if(CModule::IncludeModule('iblock'))
+{
+ $arResult = [
+ 'ITEMS' => [],
+ 'LINK' => "/catalog/",
+ ];
+
+ $query = null;
+ $query_arr = [];
+
+ $sort = Array( "RAND" => "ASC" );
+ $filter = Array( "ACTIVE" => "Y", "IBLOCK_ID" => 1, "!ID" => $arParams['EXCEPT'] );
+ $options = Array( "nPageSize" => 6 );
+
+ if(!empty($arParams['BRAND_ID']))
+ {
+ $filter['PROPERTY_BRAND'] = $arParams['BRAND_ID'];
+ $arResult['LINK'] .= $arParams['BRAND_CODE']."/";
+ }
+
+ if(!empty($arParams['MODEL_ID']))
+ {
+ $filter['PROPERTY_MODEL'] = $arParams['MODEL_ID'];
+ $arResult['LINK'] .= $arParams['MODEL_CODE']."/";
+ }
+
+ $res = CIBlockElement::GetList($sort, $filter, false, $options);
+
+ while ($obElement = $res->GetNextElement())
+ {
+ $ar_res = $obElement->GetFields();
+ $ar_res['PROPERTIES'] = $obElement->GetProperties();
+ $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(IBLOCK_ID_BRANDS, $ar_res['PROPERTIES']['BRAND']['VALUE']);
+ $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(IBLOCK_ID_MODELS, $ar_res['PROPERTIES']['MODEL']['VALUE']);
+ $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(IBLOCK_ID_MODIFICATIONS, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
+
+ $arResult['ITEMS'][] = $ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+}
\ No newline at end of file
diff --git a/local/components/evolution/catalog.other.positions/ru/.description.php b/local/components/evolution/catalog.other.positions/ru/.description.php
new file mode 100644
index 0000000..48f4a9e
--- /dev/null
+++ b/local/components/evolution/catalog.other.positions/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Другие ЛКТ из каталога для позциии";
+$MESS ['DEFAULT_DESC'] = "Другие ЛКТ из каталога для позциии";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.other.positions/templates/.default/script.js b/local/components/evolution/catalog.other.positions/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.other.positions/templates/.default/style.css b/local/components/evolution/catalog.other.positions/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.other.positions/templates/.default/template.php b/local/components/evolution/catalog.other.positions/templates/.default/template.php
new file mode 100644
index 0000000..2bace59
--- /dev/null
+++ b/local/components/evolution/catalog.other.positions/templates/.default/template.php
@@ -0,0 +1,33 @@
+setFrameMode(true);
+?>
+ if(count($arResult['ITEMS']) > 0): ?>
+
+
+ Другие предложения = $arParams['BRAND_NAME']; ?> = $arParams['MODEL_NAME']; ?>
+ /*Показать все*/?>
+
+ foreach($arResult['ITEMS'] AS $arItem): ?>
+
+ endforeach; ?>
+
+ Показать все
+
+
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.position/component.php b/local/components/evolution/catalog.position/component.php
index ffd4f80..b238cee 100644
--- a/local/components/evolution/catalog.position/component.php
+++ b/local/components/evolution/catalog.position/component.php
@@ -43,12 +43,18 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
."&redemption_payment=".$arParams['redemption_payment'].""));
$arResult = $ar_res;
+
+ $APPLICATION->AddHeadString('');
+ //$APPLICATION->AddHeadString('');
}
if(empty($ar_res['NAME'])) { define('ERROR_404', 'Y'); }
else
{
+ $APPLICATION->AddChainItem($ar_res['PROPERTIES']['BRAND']['RELATED']['NAME'], "/catalog/".$ar_res['PROPERTIES']['BRAND']['RELATED']['CODE']."/");
+ $APPLICATION->AddChainItem($ar_res['PROPERTIES']['MODEL']['RELATED']['NAME'], "/catalog/".$ar_res['PROPERTIES']['BRAND']['RELATED']['CODE']."/".$ar_res['PROPERTIES']['MODEL']['RELATED']['CODE']."/");
$APPLICATION->AddChainItem($ar_res["NAME"]);
+
$ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($ar_res['IBLOCK_ID'], $ar_res["ID"]);
$meta = $ipropValues->getValues();
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
diff --git a/local/components/evolution/catalog.position/templates/.default/script.js b/local/components/evolution/catalog.position/templates/.default/script.js
index 7f573f8..bdc3da7 100644
--- a/local/components/evolution/catalog.position/templates/.default/script.js
+++ b/local/components/evolution/catalog.position/templates/.default/script.js
@@ -210,4 +210,18 @@ $(function()
calculator_car_price_save();
}
});
+
+ $("#to_calculator_button").on("click", function(event)
+ {
+ $('html, body').animate({
+ scrollTop: $("#calc").offset().top - 100
+ }, 200);
+ });
+
+ $("#to_form_button").on("click", function(event)
+ {
+ $('html, body').animate({
+ scrollTop: $("#order").offset().top - 100
+ }, 200);
+ });
});
\ No newline at end of file
diff --git a/local/components/evolution/catalog.position/templates/.default/template.php b/local/components/evolution/catalog.position/templates/.default/template.php
index 3571d12..eab9120 100644
--- a/local/components/evolution/catalog.position/templates/.default/template.php
+++ b/local/components/evolution/catalog.position/templates/.default/template.php
@@ -29,13 +29,11 @@ $this->setFrameMode(true);
-
- = $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?>
- = $arResult['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?>
+ = $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?>
= $arResult['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?> в лизинг
" alt="= $arResult['NAME']; ?>" width="650px" >
@@ -53,16 +51,15 @@ $this->setFrameMode(true);
Топливо: = $arResult['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>
-
+
- Оформите автомбиль Audi A3 в лизинг на выгодных условиях
+ Оформите автомобиль = $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> в лизинг на выгодных условиях
- Цена
- 2 300 250₽
+ Стоимость авто (от)
+ ">= number_format($arParams['car_price'], 0, ".", " "); ?> ₽
-
-
-
+
+
@@ -70,13 +67,13 @@ $this->setFrameMode(true);
@@ -85,7 +82,7 @@ $this->setFrameMode(true);
- Комплектация
+ Комплектация
Основная информация
@@ -120,7 +117,7 @@ $this->setFrameMode(true);
- Характеристики
+ Характеристики
Технические характеристики
@@ -145,7 +142,7 @@ $this->setFrameMode(true);
- Обслуживание
+ Обслуживание
$APPLICATION->IncludeComponent(
"evolution:catalog.position.info",
"",
@@ -166,7 +163,6 @@ $this->setFrameMode(true);
Банкротство лизингодателя
Банкротство лизинговой компании не является поводом для изъятия у лизингополучателя объекта лизинга, при условии, что последний не нарушил условия договора лизинга.
-
Внутренний лизинг
Лизинг, при котором всё стороны договора лизинга являются резиденты Республики Беларусь.
@@ -222,131 +218,150 @@ $this->setFrameMode(true);
-
- Калькулятор расчета лизинга
-
-
- Стоимость авто
-
-
- = number_format($arResult['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> ₽
-
-
-
-
-
-
-
- = $arParams['CAR_PRICE_MIN'] / 1000000; ?> млн
- = $arParams['CAR_PRICE_MAX'] / 1000000; ?> млн
+
+ Калькулятор расчета лизинга
+
+
+ Стоимость авто
+
+
+ = number_format($arResult['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> ₽
+
+
+
+
-
- Первоначальный взнос
- %
-
-
-
- = $arParams['INITIAL_PAYMENT_MIN'];?>%
- = $arParams['INITIAL_PAYMENT_MAX'];?>%
-
-
- Срок договора
- мес.
-
-
-
- = $arParams['LEASE_PERIOD_MIN']; ?> мес.
- = $arParams['LEASE_PERIOD_MAX']; ?> мес.
-
-
- Выкупной платеж
- %
-
-
-
- = $arParams['REDEMPTION_PAYMENT_MIN']; ?>%
- = $arParams['REDEMPTION_PAYMENT_MAX']; ?>%
+
+
+ = $arParams['CAR_PRICE_MIN'] / 1000000; ?> млн
+ = $arParams['CAR_PRICE_MAX'] / 1000000; ?> млн
-
-
- Ежемесячный платеж
- = number_format($arResult['CALCULATION']['monthly_payment'], 0, '.', ' '); ?> ₽
+
+ Первоначальный взнос
+ %
+
+
-
- Экономия по налогу на прибыль (до)
- = number_format($arResult['CALCULATION']['tax_savings'], 0, '.', ' '); ?> ₽
-
-
- НДС к возмещению из бюджета (до)
- = number_format($arResult['CALCULATION']['vat_reimbursement'], 0, '.', ' '); ?> ₽
+ = $arParams['INITIAL_PAYMENT_MIN'];?>%
+ = $arParams['INITIAL_PAYMENT_MAX'];?>%
+
+
+ Срок договора
+ мес.
+
+
-
+
+ Выкупной платеж
+ %
+
+
+ = $arParams['REDEMPTION_PAYMENT_MIN']; ?>%
+ = $arParams['REDEMPTION_PAYMENT_MAX']; ?>%
+
+
+
+
+ Ежемесячный платеж
+ = number_format($arResult['CALCULATION']['monthly_payment'], 0, '.', ' '); ?> ₽
+
+
+ Экономия по налогу на прибыль (до)
+ = number_format($arResult['CALCULATION']['tax_savings'], 0, '.', ' '); ?> ₽
+
+
+ НДС к возмещению из бюджета (до)
+ = number_format($arResult['CALCULATION']['vat_reimbursement'], 0, '.', ' '); ?> ₽
+
+
-
-
-
-
- Другие модели Audi A3 Sedan
- Показать все
+
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.other.positions",
+ "",
+ Array(
+ "EXCEPT" => $arResult['ID'],
+ "BRAND_ID" => $arResult['PROPERTIES']['BRAND']['RELATED']['ID'],
+ "BRAND_CODE" => $arResult['PROPERTIES']['BRAND']['RELATED']['CODE'],
+ "BRAND_NAME" => $arResult['PROPERTIES']['BRAND']['RELATED']['NAME'],
+ "MODEL_ID" => $arResult['PROPERTIES']['MODEL']['RELATED']['ID'],
+ "MODEL_CODE" => $arResult['PROPERTIES']['MODEL']['RELATED']['CODE'],
+ "MODEL_NAME" => $arResult['PROPERTIES']['MODEL']['RELATED']['NAME'],
+ )
+ ); ?>
+ /*
+
+
+ Другие модели Audi A3 Sedan
+ Показать все
+
+
+
+ Haval
+
+
+
+
+
+ Haval
+
+
+
+
+
+ Haval
+
+
+
-
-
- Haval
-
-
+ */?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.recommended.models",
+ "",
+ Array(
+ "EXCEPT" => $arResult['PROPERTIES']['MODEL']['RELATED']['ID'],
+ "BRAND_UID" => $arResult['PROPERTIES']['BRAND']['RELATED']['PROPERTIES']['UID']['VALUE'],
+ "BRAND_CODE" => $arResult['PROPERTIES']['BRAND']['RELATED']['CODE'],
+ "BRAND_NAME" => $arResult['PROPERTIES']['BRAND']['RELATED']['NAME'],
+ )
+ ); ?>
+ /*
+
+
+ Рекомендуемые модели Audi для вас
+ Показать все
+
+
+
+ Haval
+
+
+
+
+
+ Haval
+
+
+
+
+
+ Haval
+
+
+
-
-
-
- Haval
-
-
-
-
-
-
- Haval
-
-
-
-
-
-
-
- Рекомендуемые модели Audi для вас
- Показать все
-
-
-
-
- Haval
-
-
-
-
-
-
- Haval
-
-
-
-
-
-
- Haval
-
-
-
-
-
+ */?>
+
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.brand/.description.php b/local/components/evolution/catalog.promo.brand/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.promo.brand/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.brand/component.php b/local/components/evolution/catalog.promo.brand/component.php
new file mode 100644
index 0000000..c882488
--- /dev/null
+++ b/local/components/evolution/catalog.promo.brand/component.php
@@ -0,0 +1,58 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+global $NavNum;
+$NavNum = 0;
+
+if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
+{
+ if(CModule::IncludeModule('iblock'))
+ {
+ $arResult = [
+ 'BRANDS' => [],
+ ];
+
+ $brands_res = CIBlockElement::GetList([ "SORT" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BRANDS, "PROPERTY_PROMO_VALUE" => "Да" ], false, []);
+ while ($brands_element = $brands_res->GetNextElement())
+ {
+ $brands_ar_res = $brands_element->GetFields();
+ $brands_ar_res['ITEMS'] = [];
+
+ $position_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => 1, "PROPERTY_BRAND" => $brands_ar_res['ID'], ], false, [ "nPageSize" => 3 ]);
+
+ while ($position_element = $position_res->GetNextElement())
+ {
+ $ar_res = $position_element->GetFields();
+ $ar_res['PROPERTIES'] = $position_element->GetProperties();
+ $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(8, $ar_res['PROPERTIES']['BRAND']['VALUE']);
+ $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(9, $ar_res['PROPERTIES']['MODEL']['VALUE']);
+ $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(10, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
+
+ $ar_res['CALCULATION'] = [];
+ $ar_res['CALCULATION']['MONTHLY'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 10), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_TAX'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_VAT'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+
+ $brands_ar_res['ITEMS'][] = $ar_res;
+ }
+
+ $arResult['BRANDS'][] = $brands_ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+ }
+}
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.brand/ru/.description.php b/local/components/evolution/catalog.promo.brand/ru/.description.php
new file mode 100644
index 0000000..3c24bdd
--- /dev/null
+++ b/local/components/evolution/catalog.promo.brand/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Промо марки в каталоге";
+$MESS ['DEFAULT_DESC'] = "Промо марки в каталоге";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.brand/templates/.default/script.js b/local/components/evolution/catalog.promo.brand/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.promo.brand/templates/.default/style.css b/local/components/evolution/catalog.promo.brand/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.promo.brand/templates/.default/template.php b/local/components/evolution/catalog.promo.brand/templates/.default/template.php
new file mode 100644
index 0000000..6175100
--- /dev/null
+++ b/local/components/evolution/catalog.promo.brand/templates/.default/template.php
@@ -0,0 +1,57 @@
+setFrameMode(true);
+?>
+ if(count($arResult['BRANDS']) > 0): ?>
+ foreach($arResult['BRANDS'] AS $brand): ?>
+ = $brand['NAME']; ?>
+
+ foreach($brand['ITEMS'] AS $arItem): ?>
+
+ endforeach; ?>
+
+
+ Показать еще
+
+ endforeach; ?>
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.model/.description.php b/local/components/evolution/catalog.promo.model/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.promo.model/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.model/component.php b/local/components/evolution/catalog.promo.model/component.php
new file mode 100644
index 0000000..6074ea6
--- /dev/null
+++ b/local/components/evolution/catalog.promo.model/component.php
@@ -0,0 +1,58 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+global $NavNum;
+$NavNum = 0;
+
+if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
+{
+ if(CModule::IncludeModule('iblock'))
+ {
+ $arResult = [
+ 'MODELS' => [],
+ ];
+
+ $models_res = CIBlockElement::GetList([ "SORT" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_MODELS, "PROPERTY_BRAND_UID" => $arParams['BRAND_UID'], "PROPERTY_PROMO_VALUE" => "Да" ], false, []);
+ while ($models_element = $models_res->GetNextElement())
+ {
+ $models_ar_res = $models_element->GetFields();
+ $models_ar_res['ITEMS'] = [];
+
+ $position_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => 1, "PROPERTY_MODEL" => $models_ar_res['ID'], ], false, [ "nPageSize" => 3 ]);
+
+ while ($position_element = $position_res->GetNextElement())
+ {
+ $ar_res = $position_element->GetFields();
+ $ar_res['PROPERTIES'] = $position_element->GetProperties();
+ $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(8, $ar_res['PROPERTIES']['BRAND']['VALUE']);
+ $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(9, $ar_res['PROPERTIES']['MODEL']['VALUE']);
+ $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(10, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
+
+ $ar_res['CALCULATION'] = [];
+ $ar_res['CALCULATION']['MONTHLY'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 10), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_TAX'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_VAT'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+
+ $models_ar_res['ITEMS'][] = $ar_res;
+ }
+
+ $arResult['MODELS'][] = $models_ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+ }
+}
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.model/ru/.description.php b/local/components/evolution/catalog.promo.model/ru/.description.php
new file mode 100644
index 0000000..f07de75
--- /dev/null
+++ b/local/components/evolution/catalog.promo.model/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Промо модели для марки в каталоге";
+$MESS ['DEFAULT_DESC'] = "Промо модели для марки в каталоге";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.promo.model/templates/.default/script.js b/local/components/evolution/catalog.promo.model/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.promo.model/templates/.default/style.css b/local/components/evolution/catalog.promo.model/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.promo.model/templates/.default/template.php b/local/components/evolution/catalog.promo.model/templates/.default/template.php
new file mode 100644
index 0000000..9e80cee
--- /dev/null
+++ b/local/components/evolution/catalog.promo.model/templates/.default/template.php
@@ -0,0 +1,57 @@
+setFrameMode(true);
+?>
+ if(count($arResult['MODELS']) > 0): ?>
+ foreach($arResult['MODELS'] AS $model): ?>
+ = $arParams['BRAND_NAME']; ?> = $model['NAME']; ?>
+
+ foreach($model['ITEMS'] AS $arItem): ?>
+
+ endforeach; ?>
+
+
+ Показать еще
+
+ endforeach; ?>
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.recommended.models/.description.php b/local/components/evolution/catalog.recommended.models/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.recommended.models/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.recommended.models/component.php b/local/components/evolution/catalog.recommended.models/component.php
new file mode 100644
index 0000000..e74efb2
--- /dev/null
+++ b/local/components/evolution/catalog.recommended.models/component.php
@@ -0,0 +1,58 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+global $NavNum;
+$NavNum = 0;
+
+if(CModule::IncludeModule('iblock'))
+{
+ $arResult = [
+ 'MODELS' => [],
+ ];
+ $options = Array( "nPageSize" => 6 );
+
+ $models_res = CIBlockElement::GetList([ "RAND" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_MODELS, "PROPERTY_BRAND_UID" => $arParams['BRAND_UID'], "!ID" => $arParams['EXCEPT'] ], false, $options);
+ while ($models_ob_element = $models_res->GetNextElement())
+ {
+ $models_ar_res = $models_ob_element->GetFields();
+ $models_ar_res['PROPERTIES'] = $models_ob_element->GetProperties();
+
+ if(!empty($models_ar_res['PREVIEW_PICTURE']))
+ {
+ $models_ar_res['IMAGE_PREPARED'] = true;
+ $models_ar_res['PREVIEW_PICTURE'] = CFile::GetPath($models_ar_res['PREVIEW_PICTURE']);
+ }
+ else
+ {
+ $cars_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CATALOG_CARS_NEW, "PROPERTY_MODEL" => $models_ar_res['ID'] ], false, [ "nPageSize" => 1 ]);
+ while ($cars_ob_element = $cars_res->GetNextElement())
+ {
+ $cars_ar_res = $cars_ob_element->GetFields();
+ $cars_ar_res['PROPERTIES'] = $cars_ob_element->GetProperties();
+
+ $models_ar_res['IMAGE_PREPARED'] = false;
+ $models_ar_res['PREVIEW_PICTURE'] = $cars_ar_res['PROPERTIES']['IMAGE_URL']['VALUE'];
+ }
+ }
+
+ $models_ar_res['URL'] = "/catalog/".$arParams['BRAND_CODE']."/".$models_ar_res['CODE']."/";
+
+ $arResult['MODELS'][] = $models_ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+}
\ No newline at end of file
diff --git a/local/components/evolution/catalog.recommended.models/ru/.description.php b/local/components/evolution/catalog.recommended.models/ru/.description.php
new file mode 100644
index 0000000..5248df0
--- /dev/null
+++ b/local/components/evolution/catalog.recommended.models/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Рекомендуемые модели для позиции";
+$MESS ['DEFAULT_DESC'] = "Рекомендуемые модели для позиции";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.recommended.models/templates/.default/script.js b/local/components/evolution/catalog.recommended.models/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.recommended.models/templates/.default/style.css b/local/components/evolution/catalog.recommended.models/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.recommended.models/templates/.default/template.php b/local/components/evolution/catalog.recommended.models/templates/.default/template.php
new file mode 100644
index 0000000..1317dbe
--- /dev/null
+++ b/local/components/evolution/catalog.recommended.models/templates/.default/template.php
@@ -0,0 +1,33 @@
+setFrameMode(true);
+?>
+ if(count($arResult['MODELS']) > 0): ?>
+
+
+ Рекомендуемые модели = $arParams['BRAND_NAME']; ?> для Вас
+ /*Показать все*/?>
+
+ foreach($arResult['MODELS'] AS $model): ?>
+
+ endforeach; ?>
+
+ Показать все
+
+
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.special.offers/.description.php b/local/components/evolution/catalog.special.offers/.description.php
new file mode 100644
index 0000000..a20bdf3
--- /dev/null
+++ b/local/components/evolution/catalog.special.offers/.description.php
@@ -0,0 +1,8 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arTemplateDescription = array(
+ "NAME" => GetMessage("DEFAULT_NAME"),
+ "DESCRIPTION" => GetMessage("DEFAULT_DESC"),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.special.offers/component.php b/local/components/evolution/catalog.special.offers/component.php
new file mode 100644
index 0000000..c0ac8e1
--- /dev/null
+++ b/local/components/evolution/catalog.special.offers/component.php
@@ -0,0 +1,63 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+global $NavNum;
+$NavNum = 0;
+
+if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
+{
+ if(CModule::IncludeModule('iblock'))
+ {
+ $arResult = [
+ 'ITEMS' => []
+ ];
+
+ $query = null;
+ $query_arr = [];
+
+ $sort = [ "RAND" => "ASC" ];
+ $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 1);
+ $options = Array("nPageSize" => $arParams['COUNT']);
+
+ $filter['PROPERTY_SPECIAL_OFFER_VALUE'] = "Да";
+
+ if(!empty($arParams['BRAND_ID']))
+ {
+ $filter['PROPERTY_BRAND'] = $arParams['BRAND_ID'];
+ }
+
+ $res = CIBlockElement::GetList($sort, $filter, false, $options);
+
+ while ($obElement = $res->GetNextElement())
+ {
+ $ar_res = $obElement->GetFields();
+ $ar_res['PROPERTIES'] = $obElement->GetProperties();
+ $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(8, $ar_res['PROPERTIES']['BRAND']['VALUE']);
+ $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(9, $ar_res['PROPERTIES']['MODEL']['VALUE']);
+ $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(10, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
+
+ $ar_res['CALCULATION'] = [];
+ $ar_res['CALCULATION']['MONTHLY'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 10), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_TAX'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_VAT'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+
+ $arResult['ITEMS'][] = $ar_res;
+ }
+
+ $this->IncludeComponentTemplate();
+ }
+}
\ No newline at end of file
diff --git a/local/components/evolution/catalog.special.offers/ru/.description.php b/local/components/evolution/catalog.special.offers/ru/.description.php
new file mode 100644
index 0000000..bea98aa
--- /dev/null
+++ b/local/components/evolution/catalog.special.offers/ru/.description.php
@@ -0,0 +1,4 @@
+
+$MESS ['DEFAULT_NAME'] = "Список специальных предложений из каталога ЛКТ";
+$MESS ['DEFAULT_DESC'] = "Список специальных предложений из каталога ЛКТ ";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.special.offers/ru/.parameters.php b/local/components/evolution/catalog.special.offers/ru/.parameters.php
new file mode 100644
index 0000000..e99d130
--- /dev/null
+++ b/local/components/evolution/catalog.special.offers/ru/.parameters.php
@@ -0,0 +1,3 @@
+
+$MESS ['COUNT'] = "Количество специальных предложений";
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog.special.offers/templates/.default/script.js b/local/components/evolution/catalog.special.offers/templates/.default/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.special.offers/templates/.default/style.css b/local/components/evolution/catalog.special.offers/templates/.default/style.css
new file mode 100644
index 0000000..e69de29
diff --git a/local/components/evolution/catalog.special.offers/templates/.default/template.php b/local/components/evolution/catalog.special.offers/templates/.default/template.php
new file mode 100644
index 0000000..fea5f53
--- /dev/null
+++ b/local/components/evolution/catalog.special.offers/templates/.default/template.php
@@ -0,0 +1,52 @@
+setFrameMode(true);
+?>
+ if(count($arResult['ITEMS']) > 0): ?>
+ " id="catalog_special_h2">Спецпредложения
+
+ foreach($arResult['ITEMS'] AS $arItem): ?>
+
+
+
+ = $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['BODY']['VALUE']; ?>
+
+ = $arItem['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?>
+ = $arItem['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arItem['PROPERTIES']['GEAR']['VALUE']; ?>, = $arItem['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с.
+
+
+ -
+
Ежемесячный платёж (от)
+ = $arItem['CALCULATION']['MONTHLY']; ?> р.
+
+ -
+
Стоимость автомобиля (от)
+ = number_format($arItem['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
+
+ -
+
Экономия по налогу на прибыль (до)
+ = $arItem['CALCULATION']['SAVINGS_TAX']; ?> р.
+
+ -
+
НДС к возмещению из бюджета (до)
+ = $arItem['CALCULATION']['SAVINGS_VAT']; ?> р.
+
+
+
+
+
+ endforeach; ?>
+
+ endif; ?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog/.parameters.php b/local/components/evolution/catalog/.parameters.php
new file mode 100644
index 0000000..0597273
--- /dev/null
+++ b/local/components/evolution/catalog/.parameters.php
@@ -0,0 +1,14 @@
+
+if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+
+$arComponentParameters = array(
+ 'PARAMETERS' => array(
+ 'MAP_WIDTH' => array(
+ 'NAME' => GetMessage('COUNT_PER_PAGE'),
+ 'TYPE' => 'STRING',
+ 'DEFAULT' => '3',
+ 'PARENT' => 'BASE',
+ ),
+ ),
+);
+?>
\ No newline at end of file
diff --git a/local/components/evolution/catalog/component.php b/local/components/evolution/catalog/component.php
index 8b3d623..5162b25 100644
--- a/local/components/evolution/catalog/component.php
+++ b/local/components/evolution/catalog/component.php
@@ -24,6 +24,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
{
$arResult = [
'SELECTED' => [],
+ 'TITLES' => [],
'ITEMS' => []
];
@@ -54,11 +55,12 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arResult['SELECTED']['SORT'] = $arParams['SORT'];
}
$filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 1);
- $options = Array("nPageSize" => 6);
+ $options = Array("nPageSize" => !empty($arParams['COUNT_PER_PAGE']) ? $arParams['COUNT_PER_PAGE'] : 15);
$pages_url = $arParams['PATH'];
$arResult['EXTENDED'] = false;
+ $arResult['BY_OPTIONS'] = false;
$arResult['FILTER_SMALL'] = $arParams['FILTER_SMALL'] ? true : false;
if(!empty($arParams['BRAND']))
@@ -67,14 +69,27 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
while ($brands_ob_element = $brands_res->GetNextElement())
{
$brands_ar_res = $brands_ob_element->GetFields();
+ $brands_ar_res['PROPERTIES'] = $brands_ob_element->GetProperties();
+
$filter['PROPERTY_BRAND'] = $brands_ar_res['ID'];
$pages_url = $pages_url.$brands_ar_res['CODE']."/";
$arResult['SELECTED']['BRAND'] = $brands_ar_res['CODE'];
+ $arResult['SELECTED']['BRAND_ID'] = $brands_ar_res['ID'];
+ $arResult['SELECTED']['BRAND_UID'] = $brands_ar_res['PROPERTIES']['UID']['VALUE'];
+ $arResult['TITLES']['BRAND'] = $brands_ar_res['NAME'];
+ $arResult['TITLES']['TRANSCRIPTION'] = $brands_ar_res['PROPERTIES']['TRANSCRIPTION']['VALUE'];
+
+ $APPLICATION->AddChainItem($brands_ar_res['NAME'], "https://".SITE_SERVER_NAME."/catalog/".$arResult['SELECTED']['BRAND']."/");
}
$arResult['EXTENDED'] = true;
$arResult['FILTER_SMALL'] = false;
$arResult['SCROLL'] = true;
+
+ if(empty($arResult['SELECTED']['BRAND']))
+ {
+ define('ERROR_404', 'Y');
+ }
}
if(!empty($arParams['MODEL']))
@@ -86,66 +101,114 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$filter['PROPERTY_MODEL'] = $models_ar_res['ID'];
$pages_url = $pages_url.$models_ar_res['CODE']."/";
$arResult['SELECTED']['MODEL'] = $models_ar_res['CODE'];
+ $arResult['TITLES']['MODEL'] = $models_ar_res['NAME'];
+
+ $APPLICATION->AddChainItem($models_ar_res['NAME'], "https://".SITE_SERVER_NAME."/catalog/".$arResult['SELECTED']['BRAND']."/".$arResult['SELECTED']['MODEL']."/");
}
$arResult['EXTENDED'] = true;
$arResult['SCROLL'] = true;
+
+ if(empty($arResult['SELECTED']['MODEL']))
+ {
+ define('ERROR_404', 'Y');
+ }
}
- if(!empty($arParams['MODIFICATION']))
+ if(!isset($arParams['PROGRAM']))
{
- $arResult['EXTENDED'] = true;
- $arResult['SELECTED']['MODIFICATION'] = $arParams['MODIFICATION'];
+ if(isset($arResult['SELECTED']['BRAND']))
+ {
+ if(isset($arResult['SELECTED']['MODEL']))
+ {
+ $APPLICATION->AddHeadString('');
+ }
+ else
+ {
+ $APPLICATION->AddHeadString('');
+ }
+ }
+ else
+ {
+ $APPLICATION->AddHeadString('');
+ }
+ }
- $filter['PROPERTY_MODIFICATION'] = $arParams['MODIFICATION'];
- $query_arr['MODIFICATION'] = $arParams['MODIFICATION'];
- $arResult['SCROLL'] = true;
+ //$APPLICATION->AddHeadString('');
+
+ if(isset($arParams['MODIFICATION']))
+ {
+ if(!empty($arParams['MODIFICATION']))
+ {
+ $arResult['EXTENDED'] = true;
+ $arResult['SELECTED']['MODIFICATION'] = $arParams['MODIFICATION'];
+ $arResult['SCROLL'] = true;
+
+ $filter['PROPERTY_MODIFICATION'] = $arParams['MODIFICATION'];
+ $query_arr['MODIFICATION'] = $arParams['MODIFICATION'];
+ }
+ else
+ {
+ LocalRedirect("https://".SITE_SERVER_NAME."/catalog/".$arResult['SELECTED']['BRAND']."/".$arResult['SELECTED']['MODEL']."/", true, "301 Moved permanently");
+ }
}
if(!empty($arParams['DRIVE']))
{
$arResult['EXTENDED'] = true;
+ $arResult['BY_OPTIONS'] = true;
+ $arResult['SCROLL'] = true;
+
$arResult['SELECTED']['DRIVE'] = $arParams['DRIVE'];
$filter['=PROPERTY_DRIVE'] = $arParams['DRIVE'];
$query_arr['DRIVE'] = $arParams['DRIVE'];
- $arResult['SCROLL'] = true;
}
if(!empty($arParams['BODY']))
{
$arResult['EXTENDED'] = true;
+ $arResult['BY_OPTIONS'] = true;
+ $arResult['SCROLL'] = true;
+
$arResult['SELECTED']['BODY'] = $arParams['BODY'];
$filter['=PROPERTY_BODY'] = $arParams['BODY'];
$query_arr['BODY'] = $arParams['BODY'];
- $arResult['SCROLL'] = true;
}
if(!empty($arParams['GEAR']))
{
$arResult['EXTENDED'] = true;
+ $arResult['BY_OPTIONS'] = true;
+ $arResult['SCROLL'] = true;
+
$arResult['SELECTED']['GEAR'] = $arParams['GEAR'];
$filter['=PROPERTY_GEAR'] = $arParams['GEAR'];
$query_arr['GEAR'] = $arParams['GEAR'];
- $arResult['SCROLL'] = true;
}
if(!empty($arParams['ENGINE_FUEL']))
{
- $filter['=PROPERTY_ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
$arResult['EXTENDED'] = true;
+ $arResult['BY_OPTIONS'] = true;
+ $arResult['SCROLL'] = true;
+
$arResult['SELECTED']['ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
+ $filter['=PROPERTY_ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
$query_arr['ENGINE_FUEL'] = $arParams['ENGINE_FUEL'];
- $arResult['SCROLL'] = true;
}
if(!empty($arParams['ENGINE_POWER_FROM']) || !empty($arParams['ENGINE_POWER_TO']))
{
- $filter['>StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arResult['SELECTED']['ENGINE_POWER_TO'] = $arParams['ENGINE_POWER_TO'];
$query_arr['ENGINE_POWER_TO'] = $arParams['ENGINE_POWER_TO'];
}
- $arResult['SCROLL'] = true;
}
if(!empty($arParams['ENGINE_VOLUME_FROM']) || !empty($arParams['ENGINE_VOLUME_TO']))
{
- $filter['>StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arResult['SELECTED']['ENGINE_VOLUME_TO'] = $arParams['ENGINE_VOLUME_TO'];
$query_arr['ENGINE_VOLUME_TO'] = $arParams['ENGINE_VOLUME_TO'];
}
- $arResult['SCROLL'] = true;
}
//$pages_url = $pages_url."/";
@@ -229,49 +294,72 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$filter['PROPERTY_LEASING_PROGRAMS'] = $arParams["leasing_program"];
}
- $res = CIBlockElement::GetList($sort, $filter, false, $options);
-
- while ($obElement = $res->GetNextElement())
+ if(empty($arParams['PROGRAM']))
{
- $ar_res = $obElement->GetFields();
- $ar_res['PROPERTIES'] = $obElement->GetProperties();
- $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(8, $ar_res['PROPERTIES']['BRAND']['VALUE']);
- $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(9, $ar_res['PROPERTIES']['MODEL']['VALUE']);
- $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(10, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
+ $arResult['SHOW_SPECIAL_OFFERS'] = true;
+ $arResult['SHOW_PROMO_BRANDS'] = true;
+ }
- $ar_res['CALCULATION'] = [];
- $ar_res['CALCULATION']['MONTHLY'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 10), 0, ".", " ");
- $ar_res['CALCULATION']['SAVINGS_TAX'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
- $ar_res['CALCULATION']['SAVINGS_VAT'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+ if(!empty($arParams['BRAND']))
+ {
+ $arResult['SHOW_PROMO_BRANDS'] = false;
+ }
- //print "\n";
- //print "\n\n\n";
+ if(!empty($arParams['BRAND']) && empty($arParams['MODEL']))
+ {
+ $arResult['SHOW_PROMO_MODELS'] = true;
+ }
- /*
- if(isset($ar_res['PREVIEW_PICTURE']))
+ if(!empty($arParams['MODEL']) || !empty($arParams['PROGRAM']) || $arResult['BY_OPTIONS'])
+ {
+ $arResult['SHOW_SPECIAL_OFFERS'] = false;
+ $arResult['SHOW_PROMO_BRANDS'] = false;
+ $arResult['SHOW_PROMO_MODELS'] = false;
+
+ $res = CIBlockElement::GetList($sort, $filter, false, $options);
+
+ while ($obElement = $res->GetNextElement())
{
- $ar_res['PREVIEW_PICTURE_SRC'] = get_image_path($ar_res['PREVIEW_PICTURE']);
- }
+ $ar_res = $obElement->GetFields();
+ $ar_res['PROPERTIES'] = $obElement->GetProperties();
+ $ar_res['PROPERTIES']['BRAND']['RELATED'] = get_related(8, $ar_res['PROPERTIES']['BRAND']['VALUE']);
+ $ar_res['PROPERTIES']['MODEL']['RELATED'] = get_related(9, $ar_res['PROPERTIES']['MODEL']['VALUE']);
+ $ar_res['PROPERTIES']['MODIFICATION']['RELATED'] = get_related(10, $ar_res['PROPERTIES']['MODIFICATION']['VALUE']);
- if(!empty($ar_res['PROPERTIES']['PHOTO_ICON']['VALUE']))
- {
- $ar_res['PROPERTIES']['PHOTO_ICON']['SRC'] = get_image_path($ar_res['PROPERTIES']['PHOTO_ICON']['VALUE']);
- }
+ $ar_res['CALCULATION'] = [];
+ $ar_res['CALCULATION']['MONTHLY'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 10), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_TAX'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
+ $ar_res['CALCULATION']['SAVINGS_VAT'] = number_format((($ar_res['PROPERTIES']['PRICE']['VALUE'] / 100) * 4), 0, ".", " ");
- if(!empty($ar_res['PROPERTIES']['CITY']['VALUE']))
- {
- $ar_res['PROPERTIES']['CITY']['RELATED'] = get_related_array(10, $ar_res['PROPERTIES']['CITY']['VALUE']);
- }
+ //print "\n";
+ //print "\n\n\n";
- if(!empty($ar_res['PROPERTIES']['SUBWAY']['VALUE']))
- {
- $ar_res['PROPERTIES']['SUBWAY']['RELATED'] = get_related_array(12, $ar_res['PROPERTIES']['SUBWAY']['VALUE']);
- }
- */
+ /*
+ if(isset($ar_res['PREVIEW_PICTURE']))
+ {
+ $ar_res['PREVIEW_PICTURE_SRC'] = get_image_path($ar_res['PREVIEW_PICTURE']);
+ }
- $arResult['ITEMS'][] = $ar_res;
+ if(!empty($ar_res['PROPERTIES']['PHOTO_ICON']['VALUE']))
+ {
+ $ar_res['PROPERTIES']['PHOTO_ICON']['SRC'] = get_image_path($ar_res['PROPERTIES']['PHOTO_ICON']['VALUE']);
+ }
+
+ if(!empty($ar_res['PROPERTIES']['CITY']['VALUE']))
+ {
+ $ar_res['PROPERTIES']['CITY']['RELATED'] = get_related_array(10, $ar_res['PROPERTIES']['CITY']['VALUE']);
+ }
+
+ if(!empty($ar_res['PROPERTIES']['SUBWAY']['VALUE']))
+ {
+ $ar_res['PROPERTIES']['SUBWAY']['RELATED'] = get_related_array(12, $ar_res['PROPERTIES']['SUBWAY']['VALUE']);
+ }
+ */
+
+ $arResult['ITEMS'][] = $ar_res;
+ }
}
if($_REQUEST['PAGEN_1'] > 1)
@@ -279,7 +367,24 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arResult['SCROLL'] = true;
}
- if($arParams["PAGINATION"] == "Y")
+ if(!empty($arResult['TITLES']['BRAND']))
+ {
+ if(!empty($arResult['TITLES']['MODEL']))
+ {
+ $APPLICATION->SetPageProperty("title", $arResult['TITLES']['BRAND']." ".$arResult['TITLES']['MODEL']." в лизинг для юридических лиц и ИП в Москве - купить новый автомобиль ".$arResult['TITLES']['TRANSCRIPTION']." ".$arResult['TITLES']['MODEL']." в лизинг | Эволюция");
+ $APPLICATION->SetPageProperty("description", "Новые автомобили ".$arResult['TITLES']['BRAND']." ".$arResult['TITLES']['MODEL']." в лизинг для юридических лиц и ИП в Москве и в других регионах России. Вы можете купить ".$arResult['TITLES']['BRAND']." ".$arResult['TITLES']['MODEL']." в лизинг от официальных дилеров, автосалонов на выгодных условиях со скидкой. Телефон горячей линии ".CENTRAL_PHONE_FORMATTED." - звонок по России бесплатный.");
+ }
+ else
+ {
+ $APPLICATION->SetPageProperty("title", $arResult['TITLES']['BRAND']." в лизинг для юридических лиц и ИП в Москве - купить новый автомобиль ".$arResult['TITLES']['TRANSCRIPTION']." в лизинг | Эволюция");
+ $APPLICATION->SetPageProperty("description", "Новые автомобили ".$arResult['TITLES']['BRAND']." в лизинг для юридических лиц и ИП в Москве и в других регионах России. Вы можете купить ".$arResult['TITLES']['BRAND']." в лизинг от официальных дилеров, автосалонов на выгодных условиях со скидкой. Телефон горячей линии ".CENTRAL_PHONE_FORMATTED." - звонок по России бесплатный.");
+ }
+ }
+
+ $arResult['SECTION_CODE'] = !empty($arParams['section_code']) ? $arParams['section_code'] : $pages_url;
+ $arResult['QUERY'] = $query;
+
+ if(count($arResult['ITEMS']) > 0 && $arParams["PAGINATION"] == "Y")
{
$arResult["NAV_STRING"] = $res->GetPageNavStringEx(
$navComponentObject,
@@ -288,12 +393,57 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
"N",
null,
[
- "section_code" => !empty($arParams['section_code']) ? $arParams['section_code'] : $pages_url,
- "query" => $query,
+ "section_code" => $arResult['SECTION_CODE'],
+ "query" => $arResult['QUERY'],
]
);
}
- $this->IncludeComponentTemplate();
+ $arResult['PAGE_CURRENT'] = $res->NavPageNomer;
+ $arResult['PAGE_COUNT'] = $res->NavPageCount;
+
+ if(isset($_REQUEST['ajax']))
+ {
+ $GLOBALS['APPLICATION']->RestartBuffer();
+ /*header('Content-Type: application/json; charset=utf-8');
+ $response = [
+ 'PAGE_CURRENT' => $arResult['PAGE_CURRENT'],
+ 'PAGE_COUNT' => $arResult['PAGE_COUNT'],
+ 'PAGINATION' => $arResult['NAV_STRING'],
+ 'ITEMS' => [],
+ ];
+
+ foreach($arResult['ITEMS'] AS $item)
+ {
+ $position = [
+ $item
+ ];
+
+ array_push($response['ITEMS'], $position);
+ }
+ print json_encode($arResult);
+ */
+
+ $this->IncludeComponentTemplate();
+ $items = ob_get_contents();
+ ob_end_clean();
+
+ header('Content-Type: application/json; charset=utf-8');
+
+ $response = [
+ 'ITEMS' => json_encode(str_replace(["\t","\r","\n"], ["","",""], $items), JSON_UNESCAPED_SLASHES),
+ 'PAGE_CURRENT' => $arResult['PAGE_CURRENT'],
+ 'PAGE_COUNT' => $arResult['PAGE_COUNT'],
+ 'PAGINATION' => json_encode(str_replace(["\t","\r","\n"], ["","",""], $arResult['NAV_STRING']), JSON_UNESCAPED_SLASHES),
+ ];
+
+ print json_encode($response, JSON_UNESCAPED_SLASHES);
+
+ die();
+ }
+ else
+ {
+ $this->IncludeComponentTemplate();
+ }
}
}
\ No newline at end of file
diff --git a/local/components/evolution/catalog/lang/ru/.parameters.php b/local/components/evolution/catalog/lang/ru/.parameters.php
new file mode 100644
index 0000000..f1b414e
--- /dev/null
+++ b/local/components/evolution/catalog/lang/ru/.parameters.php
@@ -0,0 +1,2 @@
+Любая");
- $("#filter_models").append("");
- }
- else
- {
- if(selected['MODEL'] !== undefined)
+ page++;
+ $(".pagination").replaceWith(JSON.parse(response['PAGINATION']));
+ $("#catalog_positions_list").append(JSON.parse(response['ITEMS']));
+
+ if(parseInt(response['PAGE_COUNT'], 10) === parseInt(response['PAGE_CURRENT'], 10))
{
- $("#small_filter_models").append("");
- $("#filter_models").append("");
+ $("#catalog_get_more").empty();
}
- else
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
- }
- $("#small_filter_models")[0].selectedIndex = 0;
- $("#filter_models")[0].selectedIndex = 0;
-
- for(let i in response.models)
- {
- $("#small_filter_models").append("");
- $("#filter_models").append("");
- }
-
- if(selected['MODEL'] !== undefined)
- {
- $("#small_filter_models").val(selected['MODEL']);
- $("#filter_models").val(selected['MODEL']);
-
- let id = $("#filter_models").find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- updateCounter(selected);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-}
-
-$(function()
-{
- $.get("/api/catalog/brands/",
- {
- params: {},
- }, function(response)
- {
- console.log("selected", selected);
- //$("#small_filter_brands").empty();
- //$("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- //$("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- for(let i in response.brands)
- {
- $("#small_filter_brands").append("");
- $("#filter_brands").append("");
- }
-
- if(selected['BRAND'] !== undefined)
- {
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false).val('');
-
- $("#small_filter_brands").val(selected['BRAND']);
- $("#filter_brands").val(selected['BRAND']);
-
- let uid = $("#filter_brands").find(':selected').data('uid');
- let id = $("#filter_brands").find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- loadModels(uid);
- }
- else
- {
- updateCounter(selected);
- }
- }, "json");
-
- $("#small_filter_brands").on("change", function(event)
- {
- $("#filter_brands").val(event.target.value);
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- if($(this).val() === "")
- {
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
- }
- else
- {
- let uid = $(this).find(':selected').data('uid');
- let id = $(this).find(':selected').data('id');
- selected['BRAND_ID'] = id;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
+ });
});
-
- $("#small_filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- $("#filter_models").val();
-
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- $("#filter_models").val(event.target.value);
-
- selected['MODEL'] = id;
- selected['MODEL_ID'] = id;
-
- $("#small_filter_models").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
- });
-
- $("#filter_brands").on("change", function(event)
- {
- console.log("BBBBB", $(this).val());
- if($(this).val() === '')
- {
- selected['BRAND'] = undefined;
- selected['BRAND_ID'] = undefined;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#small_filter_models").empty();
- $("#small_filter_models").append("");
- $("#filter_brands").find("option").first().text("Марка").attr("disabled", "disabled");
- $("#filter_models").empty();
- $("#filter_models").append("");
-
- updateCounter(selected);
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- let uid = $(this).find(':selected').data('uid');
- selected['BRAND'] = $(this).val();
- selected['BRAND_ID'] = id;
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#small_filter_brands").find("option").first().text("Любая").attr("disabled", false);
- $("#filter_brands").find("option").first().text("Любая").attr("disabled", false);
-
- loadModels(uid);
- }
- });
-
- $("#filter_models").on("change", function(event)
- {
- if($(this).val() === "")
- {
- selected['MODEL'] = undefined;
- selected['MODEL_ID'] = undefined;
-
- $("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
- }
- else
- {
- let id = $(this).find(':selected').data('id');
- selected['MODEL_ID'] = id;
-
- $("#filter_models").find("option").first().text("Любая").attr("disabled", false);
- }
-
- updateCounter(selected);
- });
-
- $("#catalog_small_form").on("submit", function(e)
- {
- e.preventDefault();
- });
-
- $("#catalog_small_find").on("click", function()
- {
- var path = "/catalog";
-
- if($("#small_filter_brands").val() !== "")
- {
- path = path+"/"+$("#small_filter_brands").val();
- }
- if($("#small_filter_models").val() !== "")
- {
- path = path+"/"+$("#small_filter_models").val();
- }
-
- path = path+"/";
-
- window.location.href = path;
- //$("#catalog_small_form").submit();
- });
-
- $("#rich_filter_toggle").on("click", function()
- {
- updateCounter(selected);
- $("#filter").addClass("visible");
- $("#catalog_small_filter").addClass("hidden");
- });
-
- $.get("/api/catalog/parameters/",
- {
- params: {},
- }, function(response)
- {
- for(let i in response.bodies)
- {
- $("#filter_bodies").append("");
- }
- if(selected['BODY'] !== undefined && selected['BODY'] !== null && selected['BODY'] !== "")
- {
- $("#filter_bodies").val(selected['BODY']);
- $("#filter_bodies").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.gears)
- {
- $("#filter_gears").append("");
- }
- if(selected['GEAR'] !== undefined && selected['GEAR'] !== null && selected['GEAR'] !== "")
- {
- $("#filter_gears").val(selected['GEAR']);
- $("#filter_gears").find("option").first().text("Любая").attr("disabled", false);
- }
-
- for(let i in response.engine_fuels)
- {
- $("#filter_engine_fuels").append("");
- }
- if(selected['ENGINE_FUEL'] !== undefined && selected['ENGINE_FUEL'] !== null && selected['ENGINE_FUEL'] !== "")
- {
- $("#filter_engine_fuels").val(selected['ENGINE_FUEL']);
- $("#filter_engine_fuels").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.drives)
- {
- $("#filter_drives").append("");
- }
- if(selected['DRIVE'] !== undefined && selected['DRIVE'] !== null && selected['DRIVE'] !== "")
- {
- $("#filter_drives").val(selected['DRIVE']);
- $("#filter_drives").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_FROM'] !== undefined && selected['ENGINE_VOLUME_FROM'] !== null && selected['ENGINE_VOLUME_FROM'] !== "")
- {
- $("#filter_engine_volume_from").val(selected['ENGINE_VOLUME_FROM']);
- $("#filter_engine_volume_from").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_TO'] !== undefined && selected['ENGINE_VOLUME_TO'] !== null && selected['ENGINE_VOLUME_TO'] !== "")
- {
- $("#filter_engine_volume_to").val(selected['ENGINE_VOLUME_TO']);
- $("#filter_engine_volume_to").find("option").first().text("Любой").attr("disabled", false);
- }
-
- console.log("response", response);
- }, "json");
-
- $("#filter_bodies").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Кузов").attr("disabled", "disabled"); }
-
- selected['BODY'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_drives").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Привод").attr("disabled", "disabled"); }
-
- selected['DRIVE'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_fuels").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Двигатель").attr("disabled", "disabled"); }
-
- selected['ENGINE_FUEL'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_gears").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любая").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Коробка").attr("disabled", "disabled"); }
-
- selected['GEAR'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#catalog_filter_search_button").on("click", function(e)
- {
- e.preventDefault();
- var path = "/catalog";
-
- if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
- {
- path = path+"/"+$("#filter_brands").val();
- }
- if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
- {
- path = path+"/"+$("#filter_models").val();
- }
-
- var p = {};
- for(let i in selected)
- {
- if(i !== "BRAND" && i !== "BRAND_ID" && i !== "MODEL" && i !== "MODEL_ID")
- {
- p[i] = selected[i];
- }
- }
-
- path = path+"/?"+$.param(p);
- window.location.href = path;
- });
-
- $("#filter_engine_volume_from").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, от").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_FROM'] = $(this).val();;
- updateCounter(selected);
- });
-
- $("#filter_engine_volume_to").on("change", function()
- {
- if($(this).val() !== "")
- { $(this).find("option").first().text("Любой").attr("disabled", false); }
- else
- { $(this).find("option").first().text("Объем, до").attr("disabled", "disabled"); }
-
- selected['ENGINE_VOLUME_TO'] = $(this).val();;
- updateCounter(selected);
- });
-});
-*/
\ No newline at end of file
+});
\ No newline at end of file
diff --git a/local/components/evolution/catalog/templates/.default/template.php b/local/components/evolution/catalog/templates/.default/template.php
index def478e..ba8ec6b 100644
--- a/local/components/evolution/catalog/templates/.default/template.php
+++ b/local/components/evolution/catalog/templates/.default/template.php
@@ -11,7 +11,25 @@
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
+
+$title = "";
+if(!empty($arResult['TITLES']['BRAND']))
+{
+ $title .= "Новые автомобили ".$arResult['TITLES']['BRAND'];
+}
+
+if(!empty($arResult['TITLES']['MODEL']))
+{
+ $title = $arResult['TITLES']['BRAND']." ".$arResult['TITLES']['MODEL'];
+}
?>
+
@@ -20,7 +38,7 @@ $this->setFrameMode(true);
- Каталог автомобилей
+ = !empty($title) ? $title." в лизинг" : "Новые автомобили в лизинг"; ?>
if(!$arParams['top_banners']): ?>
else: ?>
@@ -53,7 +71,6 @@ $this->setFrameMode(true);
-
Фильтр
@@ -74,110 +91,133 @@ $this->setFrameMode(true);
); ?>
- $APPLICATION->IncludeComponent(
- "evolution:catalog.sort",
- "",
- Array(
- "SORT" => $arParams['SORT'],
- "FILTER" => $arResult['FILTER_SMALL'],
- )
- ); ?>
if(count($arResult['ITEMS']) > 0): ?>
-
- foreach($arResult['ITEMS'] AS $arItem): ?>
-
-
-
- = $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['BODY']['VALUE']; ?>
-
- = $arItem['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?>
- = $arItem['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arItem['PROPERTIES']['GEAR']['VALUE']; ?>, = $arItem['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с.
-
-
- -
-
Ежемесячный платёж (от)
- = $arItem['CALCULATION']['MONTHLY']; ?> р.
-
- -
-
Стоимость автомобиля (от)
- = number_format($arItem['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
-
- -
-
Экономия по налогу на прибыль (до)
- = $arItem['CALCULATION']['SAVINGS_TAX']; ?> р.
-
- -
-
НДС к возмещению из бюджета (до)
- = $arItem['CALCULATION']['SAVINGS_VAT']; ?> р.
-
-
-
-
-
- endforeach; ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.sort",
+ "",
+ Array(
+ "SORT" => $arParams['SORT'],
+ "FILTER" => $arResult['FILTER_SMALL'],
+ )
+ ); ?>
+ else: ?>
+
+
+
endif; ?>
+ if($arResult['SHOW_SPECIAL_OFFERS']): ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.special.offers",
+ "",
+ Array(
+ "COUNT" => 3,
+ "EXTENDED" => $arResult['EXTENDED'],
+ "BRAND_ID" => $arResult['SELECTED']['BRAND_ID'],
+ )
+ ); ?>
+ endif; ?>
+
+ if($arResult['SHOW_PROMO_BRANDS']): ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.promo.brand",
+ "",
+ Array(
+ "COUNT" => 3,
+ )
+ ); ?>
+ endif; ?>
+
+ if($arResult['SHOW_PROMO_MODELS']): ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.promo.model",
+ "",
+ Array(
+ "COUNT" => 3,
+ "BRAND_NAME" => $arResult['TITLES']['BRAND'],
+ "BRAND_CODE" => $arResult['SELECTED']['BRAND'],
+ "BRAND_UID" => $arResult['SELECTED']['BRAND_UID'],
+ )
+ ); ?>
+ endif; ?>
+
+ if(count($arResult['ITEMS']) > 0): ?>
+
+ foreach($arResult['ITEMS'] AS $arItem): ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.list.item",
+ "",
+ $arItem
+ ); ?>
+ endforeach; ?>
+
+ if($arResult['PAGE_COUNT'] > 1 && $arResult['PAGE_CURRENT'] != $arResult['PAGE_COUNT']): ?>
+
+
+ Показать еще
+
+ endif; ?>
+ = $arResult['NAV_STRING']; ?>
+ endif; ?>
/*
Рекомендуемые модели Audi для вас
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
*/ ?>
-
-
-
-
-
if(!isset($_REQUEST['BRAND'])): ?>
$APPLICATION->IncludeComponent(
"evolution:catalog.brands",
@@ -211,67 +246,65 @@ $this->setFrameMode(true);
)
); ?>
endif; ?>
- if($_SERVER['HTTP_CF_CONNECTING_IP'] == "79.139.204.178" || $_SERVER['HTTP_CF_CONNECTING_IP'] == "2a00:1370:8196:3923:71ab:2da3:93b8:9286"): ?>
- endif; ?>
/*
Седаны в лизинг
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
*/ ?>
-
- = $arResult['NAV_STRING']; ?>
diff --git a/local/components/evolution/catalog/templates/ajax/template.php b/local/components/evolution/catalog/templates/ajax/template.php
new file mode 100644
index 0000000..d76618e
--- /dev/null
+++ b/local/components/evolution/catalog/templates/ajax/template.php
@@ -0,0 +1,22 @@
+setFrameMode(true);
+
+?>
+ foreach($arResult['ITEMS'] AS $arItem): ?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.list.item",
+ "",
+ $arItem
+ ); ?>
+ endforeach; ?>
\ No newline at end of file
diff --git a/local/components/evolution/form.catalog.filter/templates/.default/script.js b/local/components/evolution/form.catalog.filter/templates/.default/script.js
index e0464da..be3c694 100644
--- a/local/components/evolution/form.catalog.filter/templates/.default/script.js
+++ b/local/components/evolution/form.catalog.filter/templates/.default/script.js
@@ -1,17 +1,19 @@
-var current = {};
+var current_params = {};
var selected = {};
var inputs = {};
var path = "";
var program = null;
var updating = false;
var counter_params = undefined;
+var loaded = false;
+var total = undefined;
function formCatalogFilter(p, pr, props)
{
console.log("FILTER", "program", pr);
path = p;
selected = props;
- current = props;
+ current_params = props;
program = pr;
$(".filter_header .tabs .tab").on("click", function()
@@ -21,14 +23,17 @@ function formCatalogFilter(p, pr, props)
});
}
-function updateCounter(parameters)
+function updateCounter(parameters, reset = false)
{
- console.log("updateCounter", parameters);
+ $(".catalog_filter_select").attr("disabled", true);
+
+ console.log("updateCounter", "parameters (selected)", parameters);
if(!updating)
{
updating = true;
+ $("#catalog_filter_spinner").show();
$("#catalog_filter_spinner").show();
$("#catalog_filter_search_button_counter").hide();
@@ -37,23 +42,330 @@ function updateCounter(parameters)
{
params['PROGRAM'] = program;
}
+
for(let i in parameters)
{
if(parameters[i] !== undefined) { params[i] = parameters[i]; }
}
-
+
counter_params = params;
setTimeout(function()
{
- console.log("sending");
-
- $.get("/api/catalog/count/", counter_params, function(response)
+ $.get("/api/catalog/parameters/", counter_params, function(response)
{
+ $(".catalog_filter_select").attr("disabled", false);
+
+ if(response.brands !== undefined)
+ {
+ if(response.brands.length > 0)
+ {
+ var current = $("#filter_brands").val();
+
+ $("#filter_brands").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_brands").append('');
+ }
+ else
+ {
+ $("#filter_brands").append('');
+ }
+
+ for(let i in response.brands)
+ {
+ var brand = response.brands[i];
+ $("#filter_brands").append('');
+ }
+
+ $("#filter_brands").val(reset ? "" : current);
+ }
+ }
+
+ if(response.models !== undefined)
+ {
+ var current = $("#filter_models").val();
+
+ $("#filter_models").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_models").append('');
+ }
+ else
+ {
+ $("#filter_models").append('');
+ }
+
+ for(let i in response.models)
+ {
+ var model = response.models[i];
+ $("#filter_models").append('');
+ }
+
+ $("#filter_models").val(reset ? "" : current);
+ }
+
+ if(response.modifications !== undefined)
+ {
+ var current = $("#filter_modifications").val();
+
+ $("#filter_modifications").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_modifications").append('');
+ }
+ else
+ {
+ $("#filter_modifications").append('');
+ }
+
+ for(let i in response.modifications)
+ {
+ var modification = response.modifications[i];
+ $("#filter_modifications").append('');
+ }
+
+ $("#filter_modifications").val(reset ? "" : current);
+ }
+
+ if(response.bodies !== undefined)
+ {
+ console.log("BODY FROM RESPONSE");
+ if(response.bodies.length > 0)
+ {
+ var current = $("#filter_bodies").val();
+ console.log("BODY FROM RESPONSE", "current", current);
+ $("#filter_bodies").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_bodies").append('');
+ }
+ else
+ {
+ $("#filter_bodies").append('');
+ }
+
+ for(let i in response.bodies)
+ {
+ $("#filter_bodies").append('');
+ }
+
+ if(!loaded)
+ {
+ if(selected['BODY'] !== undefined && selected['BODY'] !== null && selected['BODY'] !== "")
+ {
+ $("#filter_bodies").val(selected['BODY']);
+ $("#filter_bodies").find("option").first().text("Любой").attr("disabled", false);
+ }
+ }
+ else
+ {
+ $("#filter_bodies").val(reset ? "" : current);
+ }
+ }
+ }
+
+ if(response.gears !== undefined)
+ {
+ if(response.gears.length > 0)
+ {
+ var current = $("#filter_gears").val();
+ $("#filter_gears").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_gears").append('');
+ }
+ else
+ {
+ $("#filter_gears").append('');
+ }
+
+ for(let i in response.gears)
+ {
+ $("#filter_gears").append('');
+ }
+
+ if(!loaded)
+ {
+ if(selected['GEAR'] !== undefined && selected['GEAR'] !== null && selected['GEAR'] !== "")
+ {
+ $("#filter_gears").val(selected['GEAR']);
+ $("#filter_gears").find("option").first().text("Любая").attr("disabled", false);
+ }
+ }
+ else
+ {
+ $("#filter_gears").val(reset ? "" : current);
+ }
+ }
+ }
+
+ if(response.engine_fuels !== undefined)
+ {
+ if(response.engine_fuels.length > 0)
+ {
+ var current = $("#filter_engine_fuels").val();
+ $("#filter_engine_fuels").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_engine_fuels").append('');
+ }
+ else
+ {
+ $("#filter_engine_fuels").append('');
+ }
+
+ for(let i in response.engine_fuels)
+ {
+ $("#filter_engine_fuels").append('');
+ }
+
+ if(!loaded)
+ {
+ if(selected['ENGINE_FUEL'] !== undefined && selected['ENGINE_FUEL'] !== null && selected['ENGINE_FUEL'] !== "")
+ {
+ $("#filter_engine_fuels").val(selected['ENGINE_FUEL']);
+ $("#filter_engine_fuels").find("option").first().text("Любой").attr("disabled", false);
+ }
+ }
+ else
+ {
+ $("#filter_engine_fuels").val(reset ? "" : current);
+ }
+ }
+ }
+
+ if(response.drives !== undefined)
+ {
+ if(response.drives.length > 0)
+ {
+ var current = $("#filter_drives").val();
+ $("#filter_drives").empty();
+
+ if(!reset && current !== "" && current !== null)
+ {
+ $("#filter_drives").append('');
+ }
+ else
+ {
+ $("#filter_drives").append('');
+ }
+
+ for(let i in response.drives)
+ {
+ $("#filter_drives").append('');
+ }
+
+ if(!loaded)
+ {
+ if(selected['DRIVE'] !== undefined && selected['DRIVE'] !== null && selected['DRIVE'] !== "")
+ {
+ $("#filter_drives").val(selected['DRIVE']);
+ $("#filter_drives").find("option").first().text("Любой").attr("disabled", false);
+ }
+ }
+ else
+ {
+ $("#filter_drives").val(reset ? "" : current);
+ }
+ }
+ }
+
+ if(response.engine_volumes !== undefined)
+ {
+ if(response.engine_volumes.length > 0)
+ {
+ var current_from = parameters['ENGINE_VOLUME_FROM'] !== undefined ? parameters['ENGINE_VOLUME_FROM'] : "";
+ var current_to = parameters['ENGINE_VOLUME_TO'] !== undefined ? parameters['ENGINE_VOLUME_TO'] : "";
+
+ $("#filter_engine_volume_from").empty();
+ $("#filter_engine_volume_to").empty();
+
+ if(!reset && current_from !== "" && current_from !== null)
+ {
+ $("#filter_engine_volume_from").append('');
+ }
+ else
+ {
+ $("#filter_engine_volume_from").append('');
+ }
+
+ if(!reset && current_to !== "" && current_to !== null)
+ {
+ $("#filter_engine_volume_to").append('');
+ }
+ else
+ {
+ $("#filter_engine_volume_to").append('');
+ }
+
+ var c = 0;
+ for(let i in response.engine_volumes)
+ {
+ var v = (response.engine_volumes[i] / 1000);
+ if(v.toString().length === 1)
+ {
+ v = v+".0";
+ }
+
+ if(c < response.engine_volumes.length - 1)
+ {
+ $("#filter_engine_volume_from").append('');
+ }
+
+ if(c > 0)
+ {
+ $("#filter_engine_volume_to").append('');
+ }
+ c++;
+ }
+
+ if(!loaded)
+ {
+ if(selected['ENGINE_VOLUME_FROM'] !== undefined && selected['ENGINE_VOLUME_FROM'] !== null && selected['ENGINE_VOLUME_FROM'] !== "")
+ {
+ $("#filter_engine_volume_from").val(selected['ENGINE_VOLUME_FROM']);
+ $("#filter_engine_volume_from").find("option").first().text("Любой").attr("disabled", false);
+ }
+
+ if(selected['ENGINE_VOLUME_TO'] !== undefined && selected['ENGINE_VOLUME_TO'] !== null && selected['ENGINE_VOLUME_TO'] !== "")
+ {
+ $("#filter_engine_volume_to").val(selected['ENGINE_VOLUME_TO']);
+ $("#filter_engine_volume_to").find("option").first().text("Любой").attr("disabled", false);
+ }
+ }
+ else
+ {
+ $("#filter_engine_volume_from").val(reset ? "" : current_from);
+ $("#filter_engine_volume_to").val(reset ? "" : current_to);
+ }
+ }
+ }
+
$("#catalog_filter_spinner").hide();
$("#catalog_filter_search_button_counter").text("Показать "+response.total+" вариантов").show();
$("#catalog_small_find").text("Показать "+response.total+" вариантов");
+ total = response.total;
+
+ if(response.total == 0)
+ {
+ $("#catalog_filter_search_button").attr("disabled", true);
+ $("#catalog_small_find").attr("disabled", true);
+ }
+ else
+ {
+ $("#catalog_filter_search_button").attr("disabled", false);
+ $("#catalog_small_find").attr("disabled", false);
+ }
+
updating = false;
+ loaded = true;
}, "json");
}, 100);
}
@@ -75,13 +387,13 @@ function updateCounter(parameters)
function loadModels(uid)
{
+ console.log("loadModels()", "uid", uid);
+
$.post("/api/catalog/models/",
{
BRAND_UID: uid
}, function(response)
{
- console.log("loadModels", selected['MODEL_ID'], selected['MODEL']);
-
$("#small_filter_models").empty();
$("#filter_models").empty();
@@ -125,7 +437,6 @@ function loadModels(uid)
selected['MODEL_ID'] = id;
loadModifications(uid);
- updateCounter(selected);
}
else
{
@@ -142,9 +453,6 @@ function loadModifications(uid)
MODEL_UID: uid
}, function(response)
{
- console.log(response);
- console.log("loadModifications", selected['MODIFICATION']);
-
$("#filter_modifications").empty();
if(selected['MODIFICATION'] !== undefined)
@@ -163,20 +471,19 @@ function loadModifications(uid)
$("#filter_modifications").append("");
}
- updateCounter(selected);
if(selected['MODIFICATION'] !== undefined)
{
$("#filter_modifications").val(selected['MODIFICATION']);
}
- else
- {
- updateCounter(selected);
- }
+
+ updateCounter(selected);
}, "json");
}
$(function()
{
+ $(".catalog_filter_select").attr("disabled", true);
+
$("#catalog_filter_form").on("submit", function(event)
{
event.preventDefault();
@@ -270,6 +577,8 @@ $(function()
$("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
$("#filter_modifications").empty();
$("#filter_modifications").append("");
+
+ updateCounter(selected);
}
else
{
@@ -288,13 +597,10 @@ $(function()
loadModifications(uid);
}
-
- updateCounter(selected);
});
$("#filter_brands").on("change", function(event)
{
- console.log("BBBBB", $(this).val());
if($(this).val() === '')
{
selected['BRAND'] = undefined;
@@ -342,6 +648,8 @@ $(function()
selected['MODIFICATION'] = undefined;
$("#filter_models").find("option").first().text("Модель").attr("disabled", "disabled");
+
+ updateCounter(selected);
}
else
{
@@ -353,8 +661,6 @@ $(function()
$("#filter_models").find("option").first().text("Любая").attr("disabled", false);
loadModifications(uid);
}
-
- updateCounter(selected);
});
$("#filter_modifications").on("change", function(event)
@@ -393,76 +699,22 @@ $(function()
}
window.location.href = p;
- //$("#catalog_small_form").submit();
+ });
+
+ $("#catalog_filter_reset_button").on("click", function()
+ {
+ selected = {};
+ updateCounter({}, true);
});
$("#rich_filter_toggle").on("click", function()
{
+ $("#catalog_special_h2").addClass("catalog_h2_title_with_filter");
updateCounter(selected);
$("#filter").addClass("visible").css("display", "block");
$("#catalog_small_filter").addClass("hidden").css("display", "none");
});
- $.get("/api/catalog/parameters/",
- {
- params: {},
- }, function(response)
- {
- for(let i in response.bodies)
- {
- $("#filter_bodies").append("");
- }
- if(selected['BODY'] !== undefined && selected['BODY'] !== null && selected['BODY'] !== "")
- {
- $("#filter_bodies").val(selected['BODY']);
- $("#filter_bodies").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.gears)
- {
- $("#filter_gears").append("");
- }
- if(selected['GEAR'] !== undefined && selected['GEAR'] !== null && selected['GEAR'] !== "")
- {
- $("#filter_gears").val(selected['GEAR']);
- $("#filter_gears").find("option").first().text("Любая").attr("disabled", false);
- }
-
- for(let i in response.engine_fuels)
- {
- $("#filter_engine_fuels").append("");
- }
- if(selected['ENGINE_FUEL'] !== undefined && selected['ENGINE_FUEL'] !== null && selected['ENGINE_FUEL'] !== "")
- {
- $("#filter_engine_fuels").val(selected['ENGINE_FUEL']);
- $("#filter_engine_fuels").find("option").first().text("Любой").attr("disabled", false);
- }
-
- for(let i in response.drives)
- {
- $("#filter_drives").append("");
- }
- if(selected['DRIVE'] !== undefined && selected['DRIVE'] !== null && selected['DRIVE'] !== "")
- {
- $("#filter_drives").val(selected['DRIVE']);
- $("#filter_drives").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_FROM'] !== undefined && selected['ENGINE_VOLUME_FROM'] !== null && selected['ENGINE_VOLUME_FROM'] !== "")
- {
- $("#filter_engine_volume_from").val(selected['ENGINE_VOLUME_FROM']);
- $("#filter_engine_volume_from").find("option").first().text("Любой").attr("disabled", false);
- }
-
- if(selected['ENGINE_VOLUME_TO'] !== undefined && selected['ENGINE_VOLUME_TO'] !== null && selected['ENGINE_VOLUME_TO'] !== "")
- {
- $("#filter_engine_volume_to").val(selected['ENGINE_VOLUME_TO']);
- $("#filter_engine_volume_to").find("option").first().text("Любой").attr("disabled", false);
- }
-
- console.log("response", response);
- }, "json");
-
$("#filter_bodies").on("change", function()
{
if($(this).val() !== "")
@@ -510,33 +762,37 @@ $(function()
$("#catalog_filter_search_button").on("click", function(e)
{
e.preventDefault();
- var p = path;
- if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
+ if(total > 0)
{
- p = p + $("#filter_brands").val()+"/";
- }
- if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
- {
- p = p + $("#filter_models").val()+"/";
- }
+ var p = path;
- var pa = {};
- var pa_count = 0;
- for(let i in selected)
- {
- if(i !== "BRAND" && i !== "BRAND_ID" && i !== "MODEL" && i !== "MODEL_ID")
+ if($("#filter_brands").val() !== undefined && $("#filter_brands").val() !== null && $("#filter_brands").val() !== "")
{
- if(selected[i] !== undefined && selected[i] !== null && selected[i] !== "")
+ p = p + $("#filter_brands").val()+"/";
+ }
+ if($("#filter_models").val() !== undefined && $("#filter_models").val() !== null && $("#filter_models").val() !== "")
+ {
+ p = p + $("#filter_models").val()+"/";
+ }
+
+ var pa = {};
+ var pa_count = 0;
+ for(let i in selected)
+ {
+ if(i !== "BRAND" && i !== "BRAND_ID" && i !== "BRAND_UID" && i !== "MODEL" && i !== "MODEL_ID")
{
- pa[i] = selected[i];
- pa_count++;
+ if(selected[i] !== undefined && selected[i] !== null && selected[i] !== "")
+ {
+ pa[i] = selected[i];
+ pa_count++;
+ }
}
}
- }
- if(pa_count > 0) { p = p + "?"+$.param(pa); }
- window.location.href = p;
+ if(pa_count > 0) { p = p + "?"+$.param(pa); }
+ window.location.href = p;
+ }
});
$("#filter_engine_volume_from").on("change", function()
@@ -561,49 +817,33 @@ $(function()
updateCounter(selected);
});
- /*
- $("#engine_power_from").on("change", function(event)
- {
- inputs['engine_power_from'] = event.target.value;
- });
-
- $("#engine_power_to").on("change", function(event)
- {
- inputs['engine_power_to'] = event.target.value;
- });
-
- $("#engine_volume_from").on("change", function(event)
- {
- inputs['engine_volume_from'] = event.target.value;
- });
-
- $("#engine_volume_to").on("change", function(event)
- {
- inputs['engine_volume_to'] = event.target.value;
- });
- */
-
$(".sort_option").on("click", function()
{
console.log("path", path);
+ console.log("current_params", current_params);
+
var value = $(this).data("value");
var p = path;
var o = {};
- for(let i in current)
+
+ for(let i in current_params)
{
- if(i !== "SORT" && i !== "BRAND" && i !== "MODEL" && i !== "BRAND_ID" && i !== "MODEL_ID")
+ if(i !== "SORT" && i !== "BRAND" && i !== "MODEL" && i !== "BRAND_ID" && i !== "BRAND_UID" && i !== "MODEL_ID")
{
- o[i] = current[i];
+ o[i] = current_params[i];
}
}
- if(current['BRAND'] !== undefined)
+
+ if(current_params['BRAND'] !== undefined)
{
- p = p + current['BRAND']+"/";
+ p = p + current_params['BRAND']+"/";
}
- if(current['MODEL'] !== undefined)
+
+ if(current_params['MODEL'] !== undefined)
{
- p = p + current['MODEL']+"/";
+ p = p + current_params['MODEL']+"/";
}
+
p = p+"?";
//if(value !== "name")
//{
@@ -613,9 +853,10 @@ $(function()
var params = $.param(o);
if(params.length > 0)
{
- p = "&"+params;
+ p += "&"+params;
}
+ //console.log("p", p);
document.location.href = p;
});
diff --git a/local/components/evolution/form.catalog.filter/templates/.default/template.php b/local/components/evolution/form.catalog.filter/templates/.default/template.php
index 6c7c30e..cec3110 100644
--- a/local/components/evolution/form.catalog.filter/templates/.default/template.php
+++ b/local/components/evolution/form.catalog.filter/templates/.default/template.php
@@ -62,18 +62,18 @@ $this->setFrameMode(true);
-
-
+
-
+
@@ -81,18 +81,18 @@ $this->setFrameMode(true);
-
+
-
+
-
+
@@ -100,13 +100,13 @@ $this->setFrameMode(true);
-
+
-
+
$i = 100; ?>
while($i < 7100): ?>
@@ -116,7 +116,7 @@ $this->setFrameMode(true);
-
+
$i = 100; ?>
while($i < 7100): ?>
@@ -150,13 +150,16 @@ $this->setFrameMode(true);
*/
?>
-
-
-
-
+
-
-
+
+
+
\ No newline at end of file
diff --git a/local/components/evolution/form.leasing.nomail/templates/.default/script.js b/local/components/evolution/form.leasing.nomail/templates/.default/script.js
index 96ca06f..3fabcc0 100644
--- a/local/components/evolution/form.leasing.nomail/templates/.default/script.js
+++ b/local/components/evolution/form.leasing.nomail/templates/.default/script.js
@@ -74,8 +74,17 @@ function form_leasing_request_submit()
$("#send_button_text").css("display", "block");
$("#send_button_spinner").css("display", "none");
-
+
leasing_form_submitting = false;
+
+ try
+ {
+ ym(66905533,'reachGoal','leasingform')
+ }
+ catch(e)
+ {
+ console.error(e);
+ }
}
else if(response.status === "error")
{
diff --git a/local/components/evolution/form.leasing/templates/.default/script.js b/local/components/evolution/form.leasing/templates/.default/script.js
index 30e54fc..3fabcc0 100644
--- a/local/components/evolution/form.leasing/templates/.default/script.js
+++ b/local/components/evolution/form.leasing/templates/.default/script.js
@@ -76,6 +76,15 @@ function form_leasing_request_submit()
$("#send_button_spinner").css("display", "none");
leasing_form_submitting = false;
+
+ try
+ {
+ ym(66905533,'reachGoal','leasingform')
+ }
+ catch(e)
+ {
+ console.error(e);
+ }
}
else if(response.status === "error")
{
diff --git a/local/components/evolution/leasing.programs.entry/component.php b/local/components/evolution/leasing.programs.entry/component.php
index 6d02824..d4e6ea4 100644
--- a/local/components/evolution/leasing.programs.entry/component.php
+++ b/local/components/evolution/leasing.programs.entry/component.php
@@ -64,6 +64,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
+
+ $APPLICATION->AddHeadString('');
}
$this->IncludeComponentTemplate();
diff --git a/local/components/evolution/leasing.programs.faq/templates/.default/script.js b/local/components/evolution/leasing.programs.faq/templates/.default/script.js
index e9260b5..bbf8117 100644
--- a/local/components/evolution/leasing.programs.faq/templates/.default/script.js
+++ b/local/components/evolution/leasing.programs.faq/templates/.default/script.js
@@ -3,10 +3,34 @@ var faq_item_index = 0;
$(function()
{
+ var hash = document.location.hash.replace("#", "");
+
+ if(hash !== "")
+ {
+ $(".faq_item_title").each(function()
+ {
+ if($(this).data('id') == hash)
+ {
+ faq_section_index = $(this).data('section');
+ faq_item_index = $(this).data('index');
+
+ $(".faq_section_button").removeClass("active");
+ $(".faq_section_button_"+faq_section_index).addClass("active");
+ $(".faq_items_list").css("display", "none");
+ $(".faq_items_list_"+faq_section_index).css("display", "block");
+
+ $(".faq_item").removeClass("open");
+ $(".faq_item_"+faq_item_index).addClass("open");
+
+ return false;
+ }
+ });
+ }
+
$(".faq_item_title").on("click", function()
{
- let id = $(this).data('id');
- faq_item_index = id;
+ let index = $(this).data('index');
+ faq_item_index = index;
});
$("#faq_search_form_field").on("keydown", function(event)
@@ -45,10 +69,14 @@ $(function()
let section = $(this).data('section');
faq_section_index = section;
+ faq_item_index = 0;
$(".faq_section_button").removeClass("active");
$(".faq_section_button_"+section).addClass("active");
$(".faq_items_list").css("display", "none");
$(".faq_items_list_"+section).css("display", "block");
+
+ $(".faq_item").removeClass("open");
+ $(".faq_item_"+faq_item_index).addClass("open");
});
});
\ No newline at end of file
diff --git a/local/components/evolution/leasing.programs.faq/templates/.default/template.php b/local/components/evolution/leasing.programs.faq/templates/.default/template.php
index 61b1284..461b072 100644
--- a/local/components/evolution/leasing.programs.faq/templates/.default/template.php
+++ b/local/components/evolution/leasing.programs.faq/templates/.default/template.php
@@ -48,8 +48,8 @@ $this->setFrameMode(true);
">
$e = 0; ?>
foreach($section['ITEMS'] AS $entry): ?>
- ">
-
+ faq_item faq_item_= $e; ?>">
+
= $entry['NAME']; ?>
diff --git a/local/components/evolution/services.entry/component.php b/local/components/evolution/services.entry/component.php
index 0e9d36a..226bd9d 100644
--- a/local/components/evolution/services.entry/component.php
+++ b/local/components/evolution/services.entry/component.php
@@ -64,6 +64,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
+
+ $APPLICATION->AddHeadString('');
}
$this->IncludeComponentTemplate();
diff --git a/local/components/evolution/special.offers.offer/component.php b/local/components/evolution/special.offers.offer/component.php
index 7a558f1..6ba66cb 100644
--- a/local/components/evolution/special.offers.offer/component.php
+++ b/local/components/evolution/special.offers.offer/component.php
@@ -75,6 +75,8 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$APPLICATION->SetPageProperty("title", $meta['ELEMENT_META_TITLE']);
$APPLICATION->SetPageProperty("keywords", $meta['ELEMENT_META_KEYWORDS']);
$APPLICATION->SetPageProperty("description", $meta['ELEMENT_META_DESCRIPTION']);
+
+ $APPLICATION->AddHeadString('');
}
$this->IncludeComponentTemplate();
diff --git a/local/components/evolution/vizitka/component.php b/local/components/evolution/vizitka/component.php
new file mode 100644
index 0000000..afac3f4
--- /dev/null
+++ b/local/components/evolution/vizitka/component.php
@@ -0,0 +1,116 @@
+
+if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
+/** @var CBitrixComponent $this */
+/** @var array $arParams */
+/** @var array $arResult */
+/** @var string $componentPath */
+/** @var string $componentName */
+/** @var string $componentTemplate */
+/** @global CDatabase $DB */
+/** @global CUser $USER */
+/** @global CMain $APPLICATION */
+
+use Bitrix\Main\Context,
+ Bitrix\Main\Type\DateTime,
+ Bitrix\Main\Loader,
+ Bitrix\Iblock;
+
+require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/php_interface/phpqrcode/qrlib.php');
+
+
+$object = json_decode(file_get_contents("https://evoleasing.ru/api/vizitka/?guid=".$arParams['guid']));
+
+ //define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/vizitka/tmp/log2.txt");
+ //AddMessage2Log("object => ".print_r($object, true)."\narParams => ".print_r($arParams, true), "my_module_id");
+
+ //$ourData = file_get_contents($_SERVER["DOCUMENT_ROOT"]."/vizitka/data.json");
+ //$object = json_decode($ourData);
+
+ //Очищаем временную директорию от файлоы старше 2 дней
+ $tmpfolders = $_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/';
+ $fileSystemIterator = new FilesystemIterator($tmpfolders);
+ $now = time();
+ foreach ($fileSystemIterator as $file) {
+ if ($now - $file->getCTime() >= 60 * 60 * 24 * 2) // 2 days
+ unlink($tmpfolders.$file->getFilename());
+ }
+
+ //Разбираем данные из json
+ //if ($arParams["guid"] & $object->firstName) {
+ if ($object->firstName) {
+ $arParams["name"] = $object->firstName;
+ $arParams["family"] = $object->secondName;
+ $arParams["post"] = $object->post;
+ $arParams["dept"] = $object->department;
+ $arParams["company"] = "Эволюция Автолизинга";
+ $arParams["mob"] = $object->mobilePhone;
+ $arParams["mobcl"] = preg_replace('/[^0-9]/', '', $arParams["mob"]);
+ $arParams["tel"] = $object->workPhone;
+ $arParams["telcl"] = preg_replace('/[^0-9]/', '', $arParams["tel"]);
+ $arParams["teladd"] = $object->workPhoneCode;
+ $arParams["mail"] = $object->email;
+ $arParams["address"] = $object->address;
+ $arParams["whatsapp"] = $object->whatsAppOn;
+ $arParams["telegram"] = $object->telegram;
+ $arParams["www"] = "https://www.evoleasing.ru";
+ $arParams["image"] = $object->image;
+
+//VCF для QR кода
+$qrtext = 'BEGIN:VCARD
+VERSION:4.0
+N;CHARSET=UTF-8:'.$arParams["family"].';'.$arParams["name"].';;;
+FN;CHARSET=UTF-8:'.$arParams["name"].' '.$arParams["family"].'
+TITLE;CHARSET=UTF-8:'.$arParams["post"].'
+EMAIL:'.$arParams["mail"].'
+ORG;CHARSET=UTF-8:'.$arParams["company"].';'.$arParams["dept"].'
+TEL;type=CELL:'.$arParams["mob"].'
+URL;type=PREF:'.$arParams["www"].'
+LANG:ru-RU
+END:VCARD';
+
+$qrimg = QRcode::png($qrtext, $_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/'.$arParams["guid"].'.png', 'L', 3, 2);
+//$im = imagecreatefrompng($_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/'.$arParams["guid"].'.png');
+
+//Формируем vcf файл визитки для телефонов
+$arParams["vcarddata"] = 'BEGIN:VCARD
+VERSION:4.0
+N;CHARSET=UTF-8:'.$arParams["family"].';'.$arParams["name"].';;;
+FN;CHARSET=UTF-8:'.$arParams["name"].' '.$arParams["family"].'
+TITLE;CHARSET=UTF-8:'.$arParams["post"].'
+EMAIL:'.$arParams["mail"].'
+ORG;CHARSET=UTF-8:'.$arParams["company"].';'.$arParams["dept"].'
+TEL;type=CELL:'.$arParams["mob"].'
+URL;type=PREF:'.$arParams["www"].'
+PHOTO;ENCODING=BASE64;TYPE=JPEG:'.$arParams["image"].'
+LANG:ru-RU
+END:VCARD';
+$arParams["vcarddata"] = mb_convert_encoding($arParams["vcarddata"], "UTF-8");
+
+ $arParams["vcffile"] = './tmp/'.$arParams["guid"].'.vcf';
+ $fp = fopen($arParams["vcffile"], "w");
+ fwrite($fp, $arParams["vcarddata"]);
+ fclose($fp);
+
+//Формируем vcf файл визитки для компьютера
+$arParams["vcarddatawin"] = 'BEGIN:VCARD
+VERSION:4.0
+N;CHARSET=windows-1252:'.$arParams["family"].';'.$arParams["name"].';;;
+FN;CHARSET=windows-1252:'.$arParams["name"].' '.$arParams["family"].'
+TITLE;CHARSET=windows-1252:'.$arParams["post"].'
+EMAIL:'.$arParams["mail"].'
+ORG;CHARSET=windows-1252:'.$arParams["company"].';'.$arParams["dept"].'
+TEL;type=CELL:'.$arParams["mob"].'
+URL;type=PREF:'.$arParams["www"].'
+PHOTO;ENCODING=BASE64;TYPE=JPEG:'.$arParams["image"] .'
+LANG:ru-RU
+END:VCARD';
+
+$arParams["vcarddatawin"] = iconv("utf-8", "windows-1251", $arParams["vcarddatawin"]);
+
+ $arParams["vcffilewin"] = './tmp/'.$arParams["guid"].'-win.vcf';
+ $fp = fopen($arParams["vcffilewin"], "w");
+ fwrite($fp, $arParams["vcarddatawin"]);
+ fclose($fp);
+
+}
+$this->IncludeComponentTemplate();
\ No newline at end of file
diff --git a/local/components/evolution/vizitka/templates/.default/script.js b/local/components/evolution/vizitka/templates/.default/script.js
new file mode 100644
index 0000000..4f9d9d4
--- /dev/null
+++ b/local/components/evolution/vizitka/templates/.default/script.js
@@ -0,0 +1,186 @@
+var calculation = { car_price: 0, CAR_PRICE_MIN: 0, CAR_PRICE_MAX:0, initial_payment: 0, lease_period: 0, monthly_payment: 0, redemption_payment: 0, tax_savings: 0, vat_reimbursement: 0 };
+
+function calculator(props)
+{
+ for(let i in calculation)
+ {
+ calculation[i] = parseInt(props[i], 10);
+ }
+
+ $("#FORM_FIELD_PRICE").val(calculation.car_price);
+ $("#FORM_FIELD_PREPAID").val(calculation.initial_payment);
+ $("#FORM_FIELD_TERM").val(calculation.lease_period);
+ $("#FORM_FIELD_REDEMPTION").val(calculation.redemption_payment);
+}
+
+function calculate(param, value)
+{
+ if(param !== undefined)
+ {
+ calculation[param] = value;
+ }
+
+ $("#FORM_FIELD_PRICE").val(calculation.car_price);
+ $("#FORM_FIELD_PREPAID").val(calculation.initial_payment);
+ $("#FORM_FIELD_TERM").val(calculation.lease_period);
+ $("#FORM_FIELD_REDEMPTION").val(calculation.redemption_payment);
+
+ $.post("/api/calculation/",
+ {
+ car_price: calculation.car_price,
+ initial_payment: calculation.initial_payment,
+ lease_period: calculation.lease_period,
+ redemption_payment: calculation.redemption_payment,
+ }, function(response)
+ {
+ for(let i in response)
+ { calculation[i] = parseInt(response[i], 10); }
+
+ $("#calculator_monthly_payment_value").text(calculation['monthly_payment'].toLocaleString());
+ $("#calculator_tax_savings_value").text((calculation['tax_savings'] + calculation['vat_reimbursement']).toLocaleString());
+ $("#calculator_tax_savings_percent").text(Math.round((calculation['tax_savings']+calculation['vat_reimbursement']) / (calculation['car_price'] / 100)));
+ }, "json");
+}
+
+function calculator_car_price_save()
+{
+ var v = parseInt($("#calculator_car_price_input").val(), 10);
+ console.log(v, calculation['CAR_PRICE_MIN'], calculation['CAR_PRICE_MAX']);
+ if(v >= calculation['CAR_PRICE_MIN'] && v <= calculation['CAR_PRICE_MAX'])
+ {
+ var $input_range_car_price = $(`#calculation_car_price`);
+ $input_range_car_price.val(v).change();
+ calculate('car_price', v);
+
+ $("#calculator_car_price_text").show();
+ $("#calculator_car_price_editor").hide();
+ }
+ else
+ {
+ $("#calculator_car_price_text").show();
+ $("#calculator_car_price_editor").hide();
+ }
+}
+
+$(function()
+{
+ var $document = $(document);
+ var selector = '[data-rangeslider]';
+ var $element = $(selector);
+
+ // For ie8 support
+ var textContent = ('textContent' in document) ? 'textContent' : 'innerText';
+
+ // Example functionality to demonstrate a value feedback
+ function valueOutput(element)
+ {
+ var value = element.value;
+ var output = element.parentNode.getElementsByTagName('output')[0] || element.parentNode.parentNode.getElementsByTagName('output')[0];
+ if($(element).data('slider-name') === "car_price")
+ {
+ output[textContent] = parseInt(value, 10).toLocaleString();
+ }
+ else
+ {
+ output[textContent] = value;
+ }
+ }
+
+ $document.on('input', 'input[type="range"], ' + selector, function(e)
+ {
+ valueOutput(e.target);
+ });
+
+ // Example functionality to demonstrate disabled functionality
+ $document.on('click', '#js-example-disabled button[data-behaviour="toggle"]', function(e)
+ {
+ var $inputRange = $(selector, e.target.parentNode);
+
+ if ($inputRange[0].disabled) {
+ $inputRange.prop("disabled", false);
+ }
+ else {
+ $inputRange.prop("disabled", true);
+ }
+ $inputRange.rangeslider('update');
+ });
+
+ // Example functionality to demonstrate programmatic value changes
+ $document.on('click', '#js-example-change-value button', function(e) {
+ var $inputRange = $(selector, e.target.parentNode);
+ var value = $('input[type="number"]', e.target.parentNode)[0].value;
+
+ $inputRange.val(value).change();
+ });
+
+ // Example functionality to demonstrate programmatic attribute changes
+ $document.on('click', '#js-example-change-attributes button', function(e)
+ {
+ var $inputRange = $(selector, e.target.parentNode);
+ var attributes = {
+ min: $('input[name="min"]', e.target.parentNode)[0].value,
+ max: $('input[name="max"]', e.target.parentNode)[0].value,
+ step: $('input[name="step"]', e.target.parentNode)[0].value
+ };
+
+ $inputRange.attr(attributes);
+ $inputRange.rangeslider('update', true);
+ });
+
+ // Example functionality to demonstrate destroy functionality
+ $document
+ .on('click', '#js-example-destroy button[data-behaviour="destroy"]', function(e) {
+ $(selector, e.target.parentNode).rangeslider('destroy');
+ })
+ .on('click', '#js-example-destroy button[data-behaviour="initialize"]', function(e) {
+ $(selector, e.target.parentNode).rangeslider({ polyfill: false });
+ });
+
+ // Example functionality to test initialisation on hidden elements
+ $document.on('click', '#js-example-hidden button[data-behaviour="toggle"]', function(e) {
+ var $container = $(e.target.previousElementSibling);
+ $container.toggle();
+ });
+
+ // Basic rangeslider initialization
+ $element.rangeslider({
+ // Deactivate the feature detection
+ polyfill: false,
+ // Callback function
+ onInit: function() {
+ valueOutput(this.$element[0]);
+ },
+ // Callback function
+ onSlide: function(position, value) {
+ //console.log('onSlide');
+ //console.log('position: ' + position, 'value: ' + value);
+ },
+ // Callback function
+ onSlideEnd: function(position, value)
+ {
+ calculate(this.$element.attr('data-slider-name'), value);
+ //console.log('position: ' + position, 'value: ' + value);
+ }
+ });
+
+ $("#calculator_car_price_text").on("click", function()
+ {
+ $("#calculator_car_price_input").val(parseInt(calculation.car_price, 10));
+ $("#calculator_car_price_text").hide();
+ $("#calculator_car_price_editor").show();
+ });
+
+ $("#calculator_car_price_save").on("click", function()
+ {
+ calculator_car_price_save();
+ });
+
+ $("#calculator_car_price_input").on("keydown", function(event)
+ {
+ if(event.keyCode === 13)
+ {
+ event.preventDefault();
+ calculator_car_price_save();
+ }
+ });
+});
\ No newline at end of file
diff --git a/local/components/evolution/vizitka/templates/.default/style.css b/local/components/evolution/vizitka/templates/.default/style.css
new file mode 100644
index 0000000..fc32ba4
--- /dev/null
+++ b/local/components/evolution/vizitka/templates/.default/style.css
@@ -0,0 +1,37 @@
+.offer_item_boston {
+ width: auto !important;
+ padding-bottom: 30px;
+ position: relative;
+}
+.offer_item_boston img{
+ border-radius: 50%;
+}
+.offer_item {
+ width: auto !important;
+ padding-left: 0 !important;
+ padding-right: 20px;
+}
+.leasing_offers_list {
+ margin-top: 30px !important;
+}
+.offer_item .qrimage {
+ position: relative !important;
+ width: auto !important;
+ height: auto !important;
+}
+.offer_item .vcfbutton {
+ background-color: #1c01a9;
+ color: #fff;
+ padding: 5px 15px;
+ width: fit-content;
+ font-weight: bold;
+}
+.messenger {
+ position: relative !important;
+ width: 30px;
+ height: 30px;
+ vertical-align: bottom;
+}
+.withoutform {
+ margin-top: 40px;
+}
\ No newline at end of file
diff --git a/local/components/evolution/vizitka/templates/.default/template.php b/local/components/evolution/vizitka/templates/.default/template.php
new file mode 100644
index 0000000..ecb2383
--- /dev/null
+++ b/local/components/evolution/vizitka/templates/.default/template.php
@@ -0,0 +1,84 @@
+setFrameMode(true);
+?>
+//print_r($arResult);?>
+//print_r($arParams);?>
+
+
+
+ =$arParams["name"]?> =$arParams["family"]?>
+ =$arParams["post"]?>
+ =$arParams["dept"]?>
+
+
+
+
" alt="" />
+ }else{?>
+
+ }?>
+
+
+
+
+ Свяжитесь со мной
+
+
+
+ ">=$arParams["mob"];?> }?>
+ " target="_blank">
}?>
+ " target="_blank">
}?>
+
+ ">=$arParams["tel"];?> доб. =$arParams["teladd"];?>
}}?>
+ }?>
+ =$arParams["address"];?>
}?>
+
+ >
+
+
+ >
+
+
+
+
+
+ Сохраните контакт на телефон
+
+
.png" />
+
+
+
+ } else {?>
+
+
+
+
+
+ Упс! Такой
визитки
не существует
+
+
+
+
+ Просто позвоните
по номеру
8 800 333 75 75
+
+
+
+
+ или отправьте
заявку на лизинг
из формы ниже
+
+
+
+
+
+
+ }?>
\ No newline at end of file
diff --git a/local/ilsa_update.php b/local/ilsa_update.php
index db3aa33..ef79316 100644
--- a/local/ilsa_update.php
+++ b/local/ilsa_update.php
@@ -130,19 +130,27 @@ foreach($brands_and_models AS $brand_uid => $brand)
//{
//добавляем новую марку
$brand_existed = null;
- $brand_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "PROPERTY_UID" => $brand_uid ], false, ["nPageSize" => 1], ["ID"] );
+ $brand_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 8, "PROPERTY_UID" => $brand_uid ], false, ["nPageSize" => 1], [] );
while($brand_search_ob = $brand_search_res->GetNextElement())
{
$brand_existed = $brand_search_ob->GetFields();
+ $brand_existed['PROPERTIES'] = $brand_search_ob->GetProperties();
+
$bitrix_brands[$brand_uid] = $brand_existed['ID'];
}
$code = CUtil::translit( $brand['name'], "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );
if($brand_existed !== null)
{
- $brand_update_element = new CIBlockElement;
- $brand_update_payload = [ "IBLOCK_SECTION" => false, "PROPERTY_VALUES" => [ "UID" => $brand_uid ], "NAME" => $brand['name'], "CODE" => $code, "ACTIVE" => "Y", ];
- $brand_update_result = $brand_update_element->Update($brand_existed['ID'], $brand_update_payload);
+ $brand_update_payload = [
+ "ACTIVE" => "Y",
+ "CODE" => $code,
+ "UID" => $brand_uid,
+ "NAME" => $brand['name'],
+ "TRANSCRIPTION" => $brand_existed['PROPERTIES']['TRANSCRIPTION']['VALUE'],
+ "PROMO" => $brand_existed['PROPERTIES']['PROMO']['VALUE_ENUM_ID'],
+ ];
+ CIBlockElement::SetPropertyValuesEx($brand_existed['ID'], IBLOCK_ID_BRANDS, $brand_update_payload, []);
$result = models_check($bitrix_models, $bitrix_modifications, $bitrix_modifications_codes, $brand_uid, $brand);
@@ -153,7 +161,17 @@ foreach($brands_and_models AS $brand_uid => $brand)
else
{
$brand_element = new CIBlockElement;
- $brand_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 8, "PROPERTY_VALUES" => [ "UID" => $brand_uid ], "NAME" => $brand['name'], "CODE" => $code, "ACTIVE" => "Y", ];
+ $brand_payload = [
+ "IBLOCK_SECTION_ID" => false,
+ "IBLOCK_ID" => 8,
+ "PROPERTY_VALUES" => [
+ "UID" => $brand_uid,
+ "TRANSCRIPTION" => $brand['name'],
+ ],
+ "NAME" => $brand['name'],
+ "CODE" => $code,
+ "ACTIVE" => "Y",
+ ];
if($new_brand_id = $brand_element->Add($brand_payload))
{
@@ -195,9 +213,7 @@ function set_brand_activity($brand_uid, $active = "N")
if($brand_id !== null)
{
- $brand_update_element = new CIBlockElement;
- $brand_update_payload = [ "ACTIVE" => $active, ];
- $brand_update_result = $brand_update_element->Update($brand_id, $brand_update_payload);
+ CIBlockElement::SetPropertyValuesEx($brand_id, IBLOCK_ID_BRANDS, [ "ACTIVE" => $active, ], []);
}
}
@@ -214,9 +230,7 @@ function set_model_activity($model_uid, $active = "N")
if($model_id !== null)
{
- $model_update_element = new CIBlockElement;
- $model_update_payload = [ "ACTIVE" => $active, ];
- $model_update_result = $model_update_element->Update($model_id, $model_update_payload);
+ CIBlockElement::SetPropertyValuesEx($model_id, IBLOCK_ID_MODELS, [ "ACTIVE" => $active, ], []);
}
}
@@ -233,16 +247,14 @@ function set_modification_activity($modification_code, $active = "N")
if($modification_id !== null)
{
- $modification_update_element = new CIBlockElement;
- $modification_update_payload = [ "ACTIVE" => $active, ];
- $modification_update_result = $modification_update_element->Update($modification_id, $modification_update_payload);
+ CIBlockElement::SetPropertyValuesEx($modification_id, IBLOCK_ID_MODIFICATIONS, [ "ACTIVE" => $active, ], []);
}
}
function set_car_activity($car_uid, $active = "N")
{
$car_id = null;
- $car_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 1, "PROPERTY_UID" => $car_uid ], false, false, [] );
+ $car_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => IBLOCK_ID_CATALOG_CARS_NEW, "PROPERTY_UID" => $car_uid ], false, false, [] );
while($car_search_ob = $car_search_res->GetNextElement())
{
@@ -252,9 +264,7 @@ function set_car_activity($car_uid, $active = "N")
if($car_id !== null)
{
- $car_update_element = new CIBlockElement;
- $car_update_payload = [ "ACTIVE" => $active, ];
- $car_update_result = $car_update_element->Update($car_id, $car_update_payload);
+ CIBlockElement::SetPropertyValuesEx($car_id, IBLOCK_ID_CATALOG_CARS_NEW, [ "ACTIVE" => $active, ], []);
}
}
@@ -265,10 +275,12 @@ function models_check($bitrix_models, $bitrix_modifications, $bitrix_modificatio
$model_name = $model['name'];
$model_existed = null;
- $model_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "PROPERTY_UID" => $model_uid ], false, ["nPageSize" => 1], ["ID"] );
+ $model_search_res = CIBlockElement::GetList( [], [ "IBLOCK_ID" => 9, "PROPERTY_UID" => $model_uid ], false, ["nPageSize" => 1], [] );
while($model_search_ob = $model_search_res->GetNextElement())
{
$model_existed = $model_search_ob->GetFields();
+ $model_existed['PROPERTIES'] = $model_search_ob->GetProperties();
+
$bitrix_models[$model_uid] = $model_existed['ID'];
}
@@ -278,14 +290,31 @@ function models_check($bitrix_models, $bitrix_modifications, $bitrix_modificatio
{
//print "MODEL ".$model_uid." EXISTED";
- $model_update_element = new CIBlockElement;
- $model_update_payload = [ "IBLOCK_SECTION" => false, "PROPERTY_VALUES" => [ "BRAND_UID" => $brand_uid, "UID" => $model_uid, ], "NAME" => $model_name, "CODE" => $code, "ACTIVE" => "Y", ];
- $model_update_result = $model_update_element->Update($model_existed['ID'], $model_update_payload);
+ $model_update_payload = [
+ "BRAND_UID" => $brand_uid,
+ "UID" => $model_uid,
+ "PROMO" => $model_existed['PROPERTIES']['PROMO']['VALUE_ENUM_ID'],
+ "NAME" => $model_name,
+ "CODE" => $code,
+ "ACTIVE" => "Y",
+ ];
+
+ CIBlockElement::SetPropertyValuesEx($model_existed['ID'], IBLOCK_ID_MODELS, $model_update_payload, []);
}
else
{
$model_element = new CIBlockElement;
- $model_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 9, "PROPERTY_VALUES" => [ "BRAND_UID" => $brand_uid, "UID" => $model_uid, ], "NAME" => $model_name, "CODE" => $code, "ACTIVE" => "Y", ];
+ $model_payload = [
+ "IBLOCK_SECTION_ID" => false,
+ "IBLOCK_ID" => 9,
+ "PROPERTY_VALUES" => [
+ "BRAND_UID" => $brand_uid,
+ "UID" => $model_uid,
+ ],
+ "NAME" => $model_name,
+ "CODE" => $code,
+ "ACTIVE" => "Y",
+ ];
if($new_model_id = $model_element->Add($model_payload))
{
@@ -409,9 +438,7 @@ foreach($json AS $car)
if($car_existed !== null)
{
- $car_update_element = new CIBlockElement;
- $car_update_payload = [ "IBLOCK_SECTION" => false, "NAME" => $name, "CODE" => $code, "PROPERTY_VALUES" => $PROPERTY_VALUES, "ACTIVE" => "Y", ];
- $car_update_result = $car_update_element->Update($car_existed['ID'], $car_update_payload);
+ CIBlockElement::SetPropertyValuesEx($model_existed['ID'], IBLOCK_ID_MODELS, array_merge($car_update_payload, $PROPERTY_VALUES), []);
}
else
{
diff --git a/local/templates/.default/components/bitrix/breadcrumb/evolution/template.php b/local/templates/.default/components/bitrix/breadcrumb/evolution/template.php
index bcb83c1..b937707 100644
--- a/local/templates/.default/components/bitrix/breadcrumb/evolution/template.php
+++ b/local/templates/.default/components/bitrix/breadcrumb/evolution/template.php
@@ -10,7 +10,7 @@ if(empty($arResult))
$strReturn = '';
-$strReturn .= '

= $agency['NAME']; ?>
+= $agency['NAME']; ?> [= $agency['ID']; ?>]
Руководство
-= $leader['NAME']; ?>
-= $leader['PREVIEW_TEXT']; ?>
+ if(count($arResult['LEADERS']) > 0): ?> +Руководство
+= $leader['NAME']; ?>
+= $leader['PREVIEW_TEXT']; ?>
+Новость
diff --git a/local/components/evolution/about.roadmap/.description.php b/local/components/evolution/about.roadmap/.description.php index a20bdf3..18b8c14 100644 --- a/local/components/evolution/about.roadmap/.description.php +++ b/local/components/evolution/about.roadmap/.description.php @@ -1,8 +1,8 @@ - -if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); - -$arTemplateDescription = array( - "NAME" => GetMessage("DEFAULT_NAME"), - "DESCRIPTION" => GetMessage("DEFAULT_DESC"), -); + +if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); + +$arTemplateDescription = array( + "NAME" => GetMessage("DEFAULT_NAME"), + "DESCRIPTION" => GetMessage("DEFAULT_DESC"), +); ?> \ No newline at end of file diff --git a/local/components/evolution/about.roadmap/component.php b/local/components/evolution/about.roadmap/component.php index fab34e4..780de97 100644 --- a/local/components/evolution/about.roadmap/component.php +++ b/local/components/evolution/about.roadmap/component.php @@ -21,7 +21,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) { $arResult = []; $sort = Array("PROPERTY_YEAR" => "DESC", "SORT" => "DESC",); - $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 22); + $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_ABOUTCOMPANY_ROADMAP); $options = Array("nPageSize" => 1000); $res = CIBlockElement::GetList($sort, $filter, false, $options); diff --git a/local/components/evolution/about.roadmap/templates/.default/template.php b/local/components/evolution/about.roadmap/templates/.default/template.php index ac30698..73649d6 100644 --- a/local/components/evolution/about.roadmap/templates/.default/template.php +++ b/local/components/evolution/about.roadmap/templates/.default/template.php @@ -21,7 +21,7 @@ $this->setFrameMode(true); путь развития if(!empty($arParams['PRESENTATION_URL'])): ?> - Скачать презентацию + Скачать презентацию endif; ?>= $period['PROPERTIES']['MONTH']['VALUE']; ?>
-= $period['PREVIEW_TEXT']; ?>
+= str_replace(["
", "
"], ["", ""], $period['PREVIEW_TEXT']); ?>
= $arParams['TITLE']; ?>
+= $arParams['TITLE']; ?>
foreach($arResult['BRANDS'] AS $brand): ?> -= $arParams['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arParams['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arParams['PROPERTIES']['BODY']['VALUE']; ?>
++ = $arParams['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?> + = $arParams['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arParams['PROPERTIES']['GEAR']['VALUE']; ?>, = $arParams['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с. +
+-
+
-
+
Ежемесячный платёж (от)
+= $arParams['CALCULATION']['MONTHLY']; ?> р.
+
+ -
+
Стоимость автомобиля (от)
+= number_format($arParams['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
+
+ -
+
Экономия по налогу на прибыль (до)
+= $arParams['CALCULATION']['SAVINGS_TAX']; ?> р.
+
+ -
+
НДС к возмещению из бюджета (до)
+= $arParams['CALCULATION']['SAVINGS_VAT']; ?> р.
+
+
= isset($arParams['TITLE']) ? $arParams['TITLE'] : $arResult['TITLE']; ?>
foreach($arResult['MODELS'] AS $model): ?> -Другие предложения = $arParams['BRAND_NAME']; ?> = $arParams['MODEL_NAME']; ?>
+ /*Показать все*/?> += $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?>
-= $arResult['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?>
+= $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?>
= $arResult['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?> в лизинг
Оформите автомбиль Audi A3 в лизинг на выгодных условиях
+Оформите автомобиль = $arResult['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arResult['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> в лизинг на выгодных условиях
- Цена - 2 300 250₽ + Стоимость авто (от) + ">= number_format($arParams['car_price'], 0, ".", " "); ?> ₽
- - - + +Комплектация
Основная информация
-
@@ -120,7 +117,7 @@ $this->setFrameMode(true);
Характеристики
Технические характеристики
-
@@ -145,7 +142,7 @@ $this->setFrameMode(true);
Обслуживание
Банкротство лизингодателя
Банкротство лизинговой компании не является поводом для изъятия у лизингополучателя объекта лизинга, при условии, что последний не нарушил условия договора лизинга.
Внутренний лизинг
Лизинг, при котором всё стороны договора лизинга являются резиденты Республики Беларусь.
Калькулятор расчета лизинга
-Стоимость авто
-- - = number_format($arResult['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> ₽ - - -
- -= $arParams['CAR_PRICE_MIN'] / 1000000; ?> млн
-= $arParams['CAR_PRICE_MAX'] / 1000000; ?> млн
+Калькулятор расчета лизинга
+Стоимость авто
++ + = number_format($arResult['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> ₽ + + +
+ -Первоначальный взнос
-%
-= $arParams['INITIAL_PAYMENT_MIN'];?>%
-= $arParams['INITIAL_PAYMENT_MAX'];?>%
-Срок договора
-мес.
-= $arParams['LEASE_PERIOD_MIN']; ?> мес.
-= $arParams['LEASE_PERIOD_MAX']; ?> мес.
-Выкупной платеж
-%
-= $arParams['REDEMPTION_PAYMENT_MIN']; ?>%
-= $arParams['REDEMPTION_PAYMENT_MAX']; ?>%
+= $arParams['CAR_PRICE_MIN'] / 1000000; ?> млн
+= $arParams['CAR_PRICE_MAX'] / 1000000; ?> млн
Ежемесячный платеж
-= number_format($arResult['CALCULATION']['monthly_payment'], 0, '.', ' '); ?> ₽
+Первоначальный взнос
+%
+Экономия по налогу на прибыль (до)
-= number_format($arResult['CALCULATION']['tax_savings'], 0, '.', ' '); ?> ₽
-НДС к возмещению из бюджета (до)
-= number_format($arResult['CALCULATION']['vat_reimbursement'], 0, '.', ' '); ?> ₽
+= $arParams['INITIAL_PAYMENT_MIN'];?>%
+= $arParams['INITIAL_PAYMENT_MAX'];?>%
+Срок договора
+мес.
+Выкупной платеж
+%
+= $arParams['REDEMPTION_PAYMENT_MIN']; ?>%
+= $arParams['REDEMPTION_PAYMENT_MAX']; ?>%
+Ежемесячный платеж
+= number_format($arResult['CALCULATION']['monthly_payment'], 0, '.', ' '); ?> ₽
+Экономия по налогу на прибыль (до)
+= number_format($arResult['CALCULATION']['tax_savings'], 0, '.', ' '); ?> ₽
+НДС к возмещению из бюджета (до)
+= number_format($arResult['CALCULATION']['vat_reimbursement'], 0, '.', ' '); ?> ₽
+Другие модели Audi A3 Sedan
- Показать все +Другие модели Audi A3 Sedan
+ Показать все +
+
+
+
+
+
+
-
+ */?>
+ $APPLICATION->IncludeComponent(
+ "evolution:catalog.recommended.models",
+ "",
+ Array(
+ "EXCEPT" => $arResult['PROPERTIES']['MODEL']['RELATED']['ID'],
+ "BRAND_UID" => $arResult['PROPERTIES']['BRAND']['RELATED']['PROPERTIES']['UID']['VALUE'],
+ "BRAND_CODE" => $arResult['PROPERTIES']['BRAND']['RELATED']['CODE'],
+ "BRAND_NAME" => $arResult['PROPERTIES']['BRAND']['RELATED']['NAME'],
+ )
+ ); ?>
+ /*
+ Рекомендуемые модели Audi для вас
+ Показать все +
+
+
+
+
+
+
-
-
-
- Рекомендуемые модели Audi для вас
- Показать все -
-
-
-
-
-
- = $brand['NAME']; ?>
+= $arParams['BRAND_NAME']; ?> = $model['NAME']; ?>
+Рекомендуемые модели = $arParams['BRAND_NAME']; ?> для Вас
+ /*Показать все*/?> +" id="catalog_special_h2">Спецпредложения
+= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['BODY']['VALUE']; ?>
++ = $arItem['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?> + = $arItem['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arItem['PROPERTIES']['GEAR']['VALUE']; ?>, = $arItem['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с. +
+-
+
-
+
Ежемесячный платёж (от)
+= $arItem['CALCULATION']['MONTHLY']; ?> р.
+
+ -
+
Стоимость автомобиля (от)
+= number_format($arItem['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
+
+ -
+
Экономия по налогу на прибыль (до)
+= $arItem['CALCULATION']['SAVINGS_TAX']; ?> р.
+
+ -
+
НДС к возмещению из бюджета (до)
+= $arItem['CALCULATION']['SAVINGS_VAT']; ?> р.
+
+
Каталог автомобилей
+= !empty($title) ? $title." в лизинг" : "Новые автомобили в лизинг"; ?>
= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> = $arItem['PROPERTIES']['BODY']['VALUE']; ?>
-- = $arItem['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?> - = $arItem['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, = $arItem['PROPERTIES']['GEAR']['VALUE']; ?>, = $arItem['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с. -
--
-
-
-
Ежемесячный платёж (от)
-= $arItem['CALCULATION']['MONTHLY']; ?> р.
-
- -
-
Стоимость автомобиля (от)
-= number_format($arItem['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.
-
- -
-
Экономия по налогу на прибыль (до)
-= $arItem['CALCULATION']['SAVINGS_TAX']; ?> р.
-
- -
-
НДС к возмещению из бюджета (до)
-= $arItem['CALCULATION']['SAVINGS_VAT']; ?> р.
-
-
Рекомендуемые модели Audi для вас
-Седаны в лизинг
-= $entry['NAME']; ?>
//print_r($arResult);?>+
//print_r($arParams);?>+ +
=$arParams["name"]?> =$arParams["family"]?>
+=$arParams["post"]?>
+=$arParams["dept"]?>
+
+ }?>
+ + Свяжитесь со мной +
+ +
+ ">=$arParams["mob"];?> }?>
+ " target="_blank">}?>
+ " target="_blank">
}?>
+
">=$arParams["tel"];?> доб. =$arParams["teladd"];?>
}}?> + }?> +=$arParams["address"];?>
}?> + + > + + + > + + ++ Сохраните контакт на телефон +
+
+ Упс! Такой
визитки
не существует
+
+ Просто позвоните
по номеру
8 800 333 75 75
+
+ или отправьте
заявку на лизинг
из формы ниже
+
+