programs aggregations pages updates with SEO fixes

This commit is contained in:
merelendor 2024-06-10 08:40:30 +03:00
parent 2d7542cbce
commit 91773e4150
6 changed files with 108 additions and 59 deletions

View File

@ -28,7 +28,7 @@ $this->setFrameMode(true);
<div class="calc_body">
<div class="calc_settings">
<div class="settings_box">
<p>Стоимость авто</p>
<p>Стоимость <?= isset($arParams['PRODUCT_TITLE']) ? $arParams['PRODUCT_TITLE'] : "авто"; ?></p>
<?/*<output hidden></output>*/?>
<p id="calculator_car_price_text"><output></output> </p>
<div class="price_custom" id="calculator_car_price_editor" style="display:none;">

View File

@ -44,7 +44,7 @@ $this->setFrameMode(true);
<div class="logos_list">
<? foreach($arResult['ITEMS'] AS $brand): ?>
<div class="list_item">
<a href="<?= $arParams['PATH']; ?>brand-<?= $brand['CODE']; ?>/">
<a href="<?= $arParams['PATH']; ?>brand-<?= $brand['CODE']; ?>/<?= isset($arParams['TYPE_SLUG']) ? $arParams['TYPE_SLUG']."/" : ""; ?>">
<img src="<?= $brand['PREVIEW_PICTURE']; ?>" alt="<?= $brand['NAME']; ?>"/>
</a>
</div>

View File

@ -215,6 +215,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arResult['BRAND_SLUG'] = $brand_slug;
$arResult['TYPE'] = $type;
$arResult['TYPE_SLUG'] = $type_slug;
$arResult['TYPE_PLURAL'] = $type_plural;
$arResult['TYPE_GENITIVE'] = $type_genitive;
$arResult['TYPE_GENITIVE_SINGULAR'] = $type_singular_genitive;

View File

@ -307,66 +307,112 @@ $this->setFrameMode(true);
<? endif; ?>
<?
$APPLICATION->IncludeComponent(
"evolution:programs.aggregations.brands.list",
"",
[
"IBLOCK_ID" => $arParams['IBLOCK_ID_PROGRAMS_AGGREGATION_BRANDS'],
"TYPE" => $arResult['TYPE'],
"TYPE_GENITIVE" => $arResult['TYPE_GENITIVE'],
"PATH" => "/programs/".$arParams['PATH']."/",
"SHORT_TITLE_GENITIVE" => $arParams['SHORT_TITLE_GENITIVE'],
"GROUP" => $arResult['GROUP'],
"GROUP_GENITIVE" => $arResult['GROUP_GENITIVE'],
"BRAND" => $arResult['BRAND'],
]
);
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arParams['SHORT_TITLE_GENITIVE']);
if(isset($arResult['BRAND']))
{
if(isset($arResult['TYPE']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['TYPE_GENITIVE'])." ".$arResult['BRAND_NAME'];
}
else
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arParams['SHORT_TITLE_GENITIVE'])." ".$arResult['BRAND_NAME'];
}
}
elseif(isset($arResult['TYPE']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['TYPE_GENITIVE_SINGULAR']);
}
elseif(isset($arResult['GROUP']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['GROUP_GENITIVE']);
}
?>
<?
$calculator_title = "Калькулятор расчета лизинга";
<? if(isset($arResult['TYPE']) || isset($arResult['BRAND'])): ?>
<?
$APPLICATION->IncludeComponent(
"evolution:calculator",
"",
Array(
"car_price" => 2500000,
"initial_payment" => 20,
"lease_period" => 36,
"redemption_payment" => 5,
"CAR_PRICE_MIN" => 500000,
"CAR_PRICE_MAX" => 30000000,
"INITIAL_PAYMENT_MIN" => 5,
"INITIAL_PAYMENT_MAX" => 50,
"LEASE_PERIOD_MIN" => 13,
"LEASE_PERIOD_MAX" => 60,
"REDEMPTION_PAYMENT_MIN" => 1,
"REDEMPTION_PAYMENT_MAX" => 5,
"TITLE" => $calculator_title,
"PRODUCT_TITLE" => "техники",
)
); ?>
<?
$APPLICATION->IncludeComponent(
"evolution:programs.aggregations.brands.list",
"",
[
"IBLOCK_ID" => $arParams['IBLOCK_ID_PROGRAMS_AGGREGATION_BRANDS'],
"TYPE" => $arResult['TYPE'],
"TYPE_SLUG" => $arResult['TYPE_SLUG'],
"TYPE_GENITIVE" => $arResult['TYPE_GENITIVE'],
"PATH" => "/programs/".$arParams['PATH']."/",
"SHORT_TITLE_GENITIVE" => $arParams['SHORT_TITLE_GENITIVE'],
"GROUP" => $arResult['GROUP'],
"GROUP_GENITIVE" => $arResult['GROUP_GENITIVE'],
"BRAND" => $arResult['BRAND'],
]
);
?>
<? else: ?>
<?
$APPLICATION->IncludeComponent(
"evolution:programs.aggregations.brands.list",
"",
[
"IBLOCK_ID" => $arParams['IBLOCK_ID_PROGRAMS_AGGREGATION_BRANDS'],
"TYPE" => $arResult['TYPE'],
"TYPE_SLUG" => $arResult['TYPE_SLUG'],
"TYPE_GENITIVE" => $arResult['TYPE_GENITIVE'],
"PATH" => "/programs/".$arParams['PATH']."/",
"SHORT_TITLE_GENITIVE" => $arParams['SHORT_TITLE_GENITIVE'],
"GROUP" => $arResult['GROUP'],
"GROUP_GENITIVE" => $arResult['GROUP_GENITIVE'],
"BRAND" => $arResult['BRAND'],
]
);
?>
<?
$APPLICATION->IncludeComponent(
"evolution:calculator",
"",
Array(
"car_price" => 2500000,
"initial_payment" => 20,
"lease_period" => 36,
"redemption_payment" => 5,
"CAR_PRICE_MIN" => 500000,
"CAR_PRICE_MAX" => 30000000,
"INITIAL_PAYMENT_MIN" => 5,
"INITIAL_PAYMENT_MAX" => 50,
"LEASE_PERIOD_MIN" => 13,
"LEASE_PERIOD_MAX" => 60,
"REDEMPTION_PAYMENT_MIN" => 1,
"REDEMPTION_PAYMENT_MAX" => 5,
"TITLE" => $calculator_title,
"PRODUCT_TITLE" => "техники",
)
); ?>
<? endif; ?>
if(isset($arResult['BRAND']))
{
if(isset($arResult['TYPE']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['TYPE_GENITIVE'])." ".$arResult['BRAND_NAME'];
}
else
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arParams['SHORT_TITLE_GENITIVE'])." ".$arResult['BRAND_NAME'];
}
}
elseif(isset($arResult['TYPE']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['TYPE_GENITIVE_SINGULAR']);
}
elseif(isset($arResult['GROUP']))
{
$calculator_title = "Калькулятор расчета лизинга ".mb_strtolower($arResult['GROUP_GENITIVE']);
}
$APPLICATION->IncludeComponent(
"evolution:calculator",
"",
Array(
"car_price" => 2500000,
"initial_payment" => 20,
"lease_period" => 36,
"redemption_payment" => 5,
"CAR_PRICE_MIN" => 500000,
"CAR_PRICE_MAX" => 30000000,
"INITIAL_PAYMENT_MIN" => 5,
"INITIAL_PAYMENT_MAX" => 50,
"LEASE_PERIOD_MIN" => 13,
"LEASE_PERIOD_MAX" => 60,
"REDEMPTION_PAYMENT_MIN" => 1,
"REDEMPTION_PAYMENT_MAX" => 5,
"TITLE" => $calculator_title
)
); ?>
<? if(!empty($arResult['DETAIL_TEXT'])): ?>
<? if(!empty(strip_tags($arResult['DETAIL_TEXT']))): ?>
<? if(!isset($arResult['TYPE']) || !isset(($arResult['BRAND']))): ?>
<section>

View File

@ -1424,6 +1424,7 @@ main .special_list .special_item a .speacial_text {
main .special_list .special_item a .speacial_text .special_desc {
margin-top: 0;
margin-bottom: 0;
width: fit-content;
}
main .special_list .special_item a .special_desc {
font-size: 15px;

View File

@ -1299,6 +1299,7 @@ main {
.special_desc {
margin-top: 0;
margin-bottom: 0;
width: fit-content;
}
}