diff --git a/about/index.php b/about/index.php index 62c9769..cf86532 100644 --- a/about/index.php +++ b/about/index.php @@ -19,12 +19,12 @@ $APPLICATION->SetTitle("О Компании"); "", Array( "TOP" => "ТОП 10", - "DEALS" => "< 10 млн", - "CONTRACTS" => "200 000+", - "CITIES" => "35", + "DEALS" => "> 50 млрд ₽", + "CONTRACTS" => "10 000+", + "CITIES" => "37", "PERIOD" => "10 лет", - "DIVISIONS" => "51", - "CLIENTS" => "200 000+", + "DIVISIONS" => "61", + "CLIENTS" => "6 000+", ) ); ?> diff --git a/images/about/bottom-1.png b/images/about/bottom-1.png index 2059cad..65ad98c 100644 Binary files a/images/about/bottom-1.png and b/images/about/bottom-1.png differ diff --git a/images/about/bottom-2.png b/images/about/bottom-2.png index 64acb75..8fcd17c 100644 Binary files a/images/about/bottom-2.png and b/images/about/bottom-2.png differ diff --git a/images/about/line-left.png b/images/about/line-left.png index 3b6a900..eb6ccfa 100644 Binary files a/images/about/line-left.png and b/images/about/line-left.png differ diff --git a/images/about/line-right.png b/images/about/line-right.png index aac9f13..ec78aad 100644 Binary files a/images/about/line-right.png and b/images/about/line-right.png differ diff --git a/images/about/top-2.png b/images/about/top-2.png index 0b4562e..46afb01 100644 Binary files a/images/about/top-2.png and b/images/about/top-2.png differ diff --git a/images/about/top.png b/images/about/top.png index 526feb5..cc9932b 100644 Binary files a/images/about/top.png and b/images/about/top.png differ diff --git a/images/no_image_380.png b/images/no_image_380.png new file mode 100644 index 0000000..2f00709 Binary files /dev/null and b/images/no_image_380.png differ diff --git a/images/no_image_650.png b/images/no_image_650.png new file mode 100644 index 0000000..ad39dd0 Binary files /dev/null and b/images/no_image_650.png differ diff --git a/local/check_user.php b/local/check_user.php new file mode 100644 index 0000000..b3bf496 --- /dev/null +++ b/local/check_user.php @@ -0,0 +1,28 @@ + 'desc' ], [ 'IBLOCK_ID' => IBLOCK_ID_CLIENTS, 'PROPERTY_USERS' => $user_id ], false, []); +while ($existed_client_element = $existed_client_res->GetNextElement()) +{ + $existed_client_record = $existed_client_element->GetFields(); + $existed_client_record['PROPERTIES'] = $existed_client_element->GetProperties(); + + print_r("existed_client_record"); + print_r($existed_client_record); +} + +die(); + +?> \ No newline at end of file diff --git a/local/components/evolution/about.highlights/templates/.default/template.php b/local/components/evolution/about.highlights/templates/.default/template.php index 2076a1d..f384555 100644 --- a/local/components/evolution/about.highlights/templates/.default/template.php +++ b/local/components/evolution/about.highlights/templates/.default/template.php @@ -58,7 +58,7 @@ $this->setFrameMode(true); stroke="white" stroke-width="2" />

-

по России по лизингу легковых автомобилей по рэнкингу Эксперт РА по результатам 9 месяцев 2021 года

+

В России по лизингу легковых автомобилей по рэнкингу Эксперт РА по результатам 2021 года

@@ -92,7 +92,7 @@ $this->setFrameMode(true);

-

Объем сделок

+

Общая стоимость ПЛ, переданных клиентам

diff --git a/local/components/evolution/about.roadmap/templates/.default/template.php b/local/components/evolution/about.roadmap/templates/.default/template.php index 779d9f0..ac30698 100644 --- a/local/components/evolution/about.roadmap/templates/.default/template.php +++ b/local/components/evolution/about.roadmap/templates/.default/template.php @@ -13,7 +13,7 @@ $this->setFrameMode(true); ?>
-

Эволюция – самая динамично развивающаяся автолизинговая компания России. Благодаря огромному опыту в лизинге и лучшим практикам на рынке, за год работы вошли в Топ 10 лизинговых компаний». Возможно, что-то ещё.

+

Эволюция – самая динамично развивающаяся автолизинговая компания России. Благодаря огромному опыту в лизинге и лучшим практикам на рынке, за год работы вошли в Топ 10 лизинговых компаний.

@@ -21,7 +21,7 @@ $this->setFrameMode(true); путь развития

- Скачать презентацию + Скачать презентацию
diff --git a/local/components/evolution/catalog.brands/.description.php b/local/components/evolution/catalog.brands/.description.php new file mode 100644 index 0000000..a20bdf3 --- /dev/null +++ b/local/components/evolution/catalog.brands/.description.php @@ -0,0 +1,8 @@ + GetMessage("DEFAULT_NAME"), + "DESCRIPTION" => GetMessage("DEFAULT_DESC"), +); +?> \ No newline at end of file diff --git a/local/components/evolution/catalog.brands/component.php b/local/components/evolution/catalog.brands/component.php new file mode 100644 index 0000000..2a99013 --- /dev/null +++ b/local/components/evolution/catalog.brands/component.php @@ -0,0 +1,42 @@ +StartResultCache(60*60*24, md5(var_export($_POST, true)))) +//{ + if(CModule::IncludeModule('iblock')) + { + $arResult = [ + 'BRANDS' => [] + ]; + + $brands_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BRANDS ], false, []); + while ($brands_ob_element = $brands_res->GetNextElement()) + { + $brands_ar_res = $brands_ob_element->GetFields(); + $brands_ar_res['PROPERTIES'] = $brands_ob_element->GetProperties(); + + if(isset($brands_ar_res['PREVIEW_PICTURE'])) + { + $brands_ar_res['PREVIEW_PICTURE'] = CFile::GetPath($brands_ar_res['PREVIEW_PICTURE']); + } + + $arResult['BRANDS'][] = $brands_ar_res; + } + + $this->IncludeComponentTemplate(); + } +//} \ No newline at end of file diff --git a/local/components/evolution/catalog.brands/lang/ru/.description.php b/local/components/evolution/catalog.brands/lang/ru/.description.php new file mode 100644 index 0000000..be104ac --- /dev/null +++ b/local/components/evolution/catalog.brands/lang/ru/.description.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/local/components/evolution/catalog.brands/templates/.default/script.js b/local/components/evolution/catalog.brands/templates/.default/script.js new file mode 100644 index 0000000..07342ae --- /dev/null +++ b/local/components/evolution/catalog.brands/templates/.default/script.js @@ -0,0 +1,423 @@ +/* +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/style.css b/local/components/evolution/catalog.brands/templates/.default/style.css new file mode 100644 index 0000000..e69de29 diff --git a/local/components/evolution/catalog.brands/templates/.default/template.php b/local/components/evolution/catalog.brands/templates/.default/template.php new file mode 100644 index 0000000..dd59270 --- /dev/null +++ b/local/components/evolution/catalog.brands/templates/.default/template.php @@ -0,0 +1,26 @@ +setFrameMode(true); +?> + \ No newline at end of file diff --git a/local/components/evolution/catalog.models/.description.php b/local/components/evolution/catalog.models/.description.php new file mode 100644 index 0000000..a20bdf3 --- /dev/null +++ b/local/components/evolution/catalog.models/.description.php @@ -0,0 +1,8 @@ + GetMessage("DEFAULT_NAME"), + "DESCRIPTION" => GetMessage("DEFAULT_DESC"), +); +?> \ No newline at end of file diff --git a/local/components/evolution/catalog.models/component.php b/local/components/evolution/catalog.models/component.php new file mode 100644 index 0000000..e729615 --- /dev/null +++ b/local/components/evolution/catalog.models/component.php @@ -0,0 +1,63 @@ +StartResultCache(60*60*24, md5(var_export($_POST, true)))) +//{ + if(CModule::IncludeModule('iblock')) + { + $arResult = [ + 'BRAND_TITLE' => "", + 'MODELS' => [], + ]; + + $brands = []; + $brands_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BRANDS, ], false, []); + while ($brands_ob_element = $brands_res->GetNextElement()) + { + $brands_ar_res = $brands_ob_element->GetFields(); + $brands_ar_res['PROPERTIES'] = $brands_ob_element->GetProperties(); + $brands[$brands_ar_res['CODE']] = [ + "NAME" => $brands_ar_res['NAME'], + "CODE" => $brands_ar_res['CODE'], + "UID" => $brands_ar_res['PROPERTIES']['UID']['VALUE'], + ]; + } + + //print ""; + + $arResult['TITLE'] = $arParams['RECOMMENDED'] ? "Каталог автомобилей ".$brands[$arParams['BRAND']]['NAME'] : ""; + + $models_res = CIBlockElement::GetList([ "NAME" => "ASC" ], [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_MODELS, "PROPERTY_BRAND_UID" => $brands[$arParams['BRAND']]['UID'] ], false, []); + while ($models_ob_element = $models_res->GetNextElement()) + { + $models_ar_res = $models_ob_element->GetFields(); + $models_ar_res['PROPERTIES'] = $models_ob_element->GetProperties(); + + if(isset($models_ar_res['PREVIEW_PICTURE'])) + { + $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']."/"; + } + + $arResult['MODELS'][] = $models_ar_res; + } + + $this->IncludeComponentTemplate(); + } +//} \ No newline at end of file diff --git a/local/components/evolution/catalog.models/lang/ru/.description.php b/local/components/evolution/catalog.models/lang/ru/.description.php new file mode 100644 index 0000000..be104ac --- /dev/null +++ b/local/components/evolution/catalog.models/lang/ru/.description.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/local/components/evolution/catalog.models/templates/.default/script.js b/local/components/evolution/catalog.models/templates/.default/script.js new file mode 100644 index 0000000..07342ae --- /dev/null +++ b/local/components/evolution/catalog.models/templates/.default/script.js @@ -0,0 +1,423 @@ +/* +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/style.css b/local/components/evolution/catalog.models/templates/.default/style.css new file mode 100644 index 0000000..e69de29 diff --git a/local/components/evolution/catalog.models/templates/.default/template.php b/local/components/evolution/catalog.models/templates/.default/template.php new file mode 100644 index 0000000..abd509b --- /dev/null +++ b/local/components/evolution/catalog.models/templates/.default/template.php @@ -0,0 +1,28 @@ +setFrameMode(true); +?> + + \ 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 9ea38fa..3571d12 100644 --- a/local/components/evolution/catalog.position/templates/.default/template.php +++ b/local/components/evolution/catalog.position/templates/.default/template.php @@ -18,6 +18,9 @@ $this->setFrameMode(true); calculator(); }); +
@@ -35,7 +38,7 @@ $this->setFrameMode(true);

- <?= $arResult['NAME']; ?> + " alt="" width="650px" >
@@ -50,16 +53,17 @@ $this->setFrameMode(true);
  • Топливо:
  • +
    +
    +

    Оформите автомбиль Audi A3 в лизинг на выгодных условиях

    +

    + Цена + 2 300 250₽ +

    -
    -

    Оформите автомбиль Audi A3 в лизинг на выгодных условиях

    -

    - Цена - 2 300 250₽ -

    - - - + + +
    diff --git a/local/components/evolution/catalog/templates/.default/template.php b/local/components/evolution/catalog/templates/.default/template.php index 405ed96..def478e 100644 --- a/local/components/evolution/catalog/templates/.default/template.php +++ b/local/components/evolution/catalog/templates/.default/template.php @@ -12,269 +12,278 @@ /** @var CBitrixComponent $component */ $this->setFrameMode(true); ?> +
    -

    Каталог автомобилей

    -
    - - -
    -

    СКИДКИ ДО 1,5% + СПЕЦТАРИФ НА КАСКО

    -
      -
    • Скидки до 1,5% при покупке
    • -
    • Land Rover в лизинг
    • -
    • Специальный тариф на каско
    • -
    - - -
    - -
    "> -
    -
    -
    - -
    -
    - -
    - - +

    Каталог автомобилей

    +
    + + +
    +

    СКИДКИ ДО 1,5% + СПЕЦТАРИФ НА КАСКО

    +
      +
    • Скидки до 1,5% при покупке
    • +
    • Land Rover в лизинг
    • +
    • Специальный тариф на каско
    • +
    + +
    - -
    -
    "> -
    + +
    "> +
    +
    +
    + +
    +
    + +
    + + +
    +
    +
    +
    "> +
    + IncludeComponent( + "evolution:form.catalog.filter", + "", + Array( + "SELECTED" => $arResult['SELECTED'], + "PATH" => $arParams['PATH'], + "SORTING" => true, + "PROGRAM" => $arParams['PROGRAM'], + "SCROLL" => $arResult['SCROLL'], + ) + ); ?> +
    +
    + IncludeComponent( + "evolution:catalog.sort", + "", + Array( + "SORT" => $arParams['SORT'], + "FILTER" => $arResult['FILTER_SMALL'], + ) + ); ?> + 0): ?> +
    + +
    + + <?= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['BODY']['VALUE']; ?> +

    +

    + + , , л.с. +

    +
      +
    • +

      Ежемесячный платёж (от)

      +

      р.

      +
    • +
    • +

      Стоимость автомобиля (от)

      +

      р.

      +
    • +
    • +

      Экономия по налогу на прибыль (до)

      +

      р.

      +
    • +
    • +

      НДС к возмещению из бюджета (до)

      +

      р.

      +
    • +
    + +

    +
    + +
    + + + +

    Рекомендуемые модели Audi для вас

    + + + + + + + + + + +
    + */ ?> + + + + + + IncludeComponent( - "evolution:form.catalog.filter", - "", + "evolution:catalog.brands", + "", Array( - "SELECTED" => $arResult['SELECTED'], - "PATH" => $arParams['PATH'], - "SORTING" => true, - "PROGRAM" => $arParams['PROGRAM'], - "SCROLL" => $arResult['SCROLL'], + "TITLE" => "Каталог автомобилей", + "SORT" => $arParams['SORT'], + "FILTER" => $arResult['FILTER_SMALL'], ) ); ?> -
    -
    - IncludeComponent( - "evolution:catalog.sort", - "", - Array( - "SORT" => $arParams['SORT'], - "FILTER" => $arResult['FILTER_SMALL'], - ) - ); ?> - 0): ?> -
    - -
    - - <?= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['BODY']['VALUE']; ?> -

    -

    - - , , л.с. -

    -
      -
    • -

      Ежемесячный платёж (от)

      -

      р.

      -
    • -
    • -

      Стоимость автомобиля (от)

      -

      р.

      -
    • -
    • -

      Экономия по налогу на прибыль (до)

      -

      р.

      -
    • -
    • -

      НДС к возмещению из бюджета (до)

      -

      р.

      -
    • -
    - -

    + + + IncludeComponent( + "evolution:catalog.models", + "", + Array( + "BRAND" => $_REQUEST['BRAND'], + "RECOMMENDED" => true, + ) + ); ?> + + + + + +

    Седаны в лизинг

    + - -
    - - -
    -

    Рекомендуемые модели Audi для вас

    + + + + + + + + + +
    + + */ ?> - - - - - - - - - - - - - - - - - - - +
    - -
    -

    Седаны в лизинг

    - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - -
    - -