fix for catalog brand section, main office markup component
This commit is contained in:
parent
5754f8257d
commit
f566f21529
@ -12,71 +12,6 @@
|
|||||||
/** @var CBitrixComponent $component */
|
/** @var CBitrixComponent $component */
|
||||||
$this->setFrameMode(true);
|
$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('<script type="application/ld+json">'.json_encode($main_office_markup_content).'</script>', false, "AFTER_JS");
|
|
||||||
?>
|
|
||||||
<?
|
<?
|
||||||
$placemarks = [];
|
$placemarks = [];
|
||||||
foreach($arResult['AGENCIES'] AS $agency)
|
foreach($arResult['AGENCIES'] AS $agency)
|
||||||
|
|||||||
@ -334,8 +334,6 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
|||||||
|
|
||||||
if(!empty($arParams['BRAND']))
|
if(!empty($arParams['BRAND']))
|
||||||
{
|
{
|
||||||
$arResult['SHOW_PROMO_BRANDS'] = true;
|
|
||||||
|
|
||||||
if($arResult['BRAND_DISABLED'])
|
if($arResult['BRAND_DISABLED'])
|
||||||
{
|
{
|
||||||
$arResult['SHOW_PROMO_BRANDS'] = false;
|
$arResult['SHOW_PROMO_BRANDS'] = false;
|
||||||
|
|||||||
@ -112,7 +112,7 @@ if(!empty($arResult['TITLES']['MODEL']))
|
|||||||
<? else: ?>
|
<? else: ?>
|
||||||
<? if($arResult['MODEL_DISABLED']): ?>
|
<? if($arResult['MODEL_DISABLED']): ?>
|
||||||
<p style="font-size: 18px; line-height: 24px; padding: 10px 40px 40px 0px; border-left: solid 1px white;">Модель <b><?= $arResult['TITLES']['BRAND']; ?> <?= $arResult['TITLES']['MODEL']; ?></b> на данный момент отсутствует в каталоге, но это не означает, что мы не сможем её для Вас найти. Оставьте <a href="#order">заявку</a> или позвоните по номеру горячей линии <a href="tel:88003337575">8 800 333 75 75</a> и мы найдём Вам автомобиль!</p>
|
<p style="font-size: 18px; line-height: 24px; padding: 10px 40px 40px 0px; border-left: solid 1px white;">Модель <b><?= $arResult['TITLES']['BRAND']; ?> <?= $arResult['TITLES']['MODEL']; ?></b> на данный момент отсутствует в каталоге, но это не означает, что мы не сможем её для Вас найти. Оставьте <a href="#order">заявку</a> или позвоните по номеру горячей линии <a href="tel:88003337575">8 800 333 75 75</a> и мы найдём Вам автомобиль!</p>
|
||||||
<p style="font-size: 18px; line-height: 24px; padding: 0px 40px 40px 0px; border-left: solid 1px white;">Посмотрите другие модели Bentley:</p>
|
<p style="font-size: 18px; line-height: 24px; padding: 0px 40px 40px 0px; border-left: solid 1px white;">Посмотрите другие модели <?= $arResult['TITLES']['BRAND']; ?>:</p>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?
|
||||||
|
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
|
||||||
|
|
||||||
|
$arTemplateDescription = array(
|
||||||
|
"NAME" => GetMessage("DEFAULT_NAME"),
|
||||||
|
"DESCRIPTION" => GetMessage("DEFAULT_DESC"),
|
||||||
|
);
|
||||||
|
?>
|
||||||
13
local/components/evolution/mainoffice.markup/component.php
Normal file
13
local/components/evolution/mainoffice.markup/component.php
Normal file
@ -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();
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
<?
|
||||||
|
$MESS ['DEFAULT_NAME'] = "Микроразметка основного офиса";
|
||||||
|
$MESS ['DEFAULT_DESC'] = "Микроразметка основного офиса";
|
||||||
|
?>
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||||
|
/** @var array $arParams */
|
||||||
|
/** @var array $arResult */
|
||||||
|
/** @global CMain $APPLICATION */
|
||||||
|
/** @global CUser $USER */
|
||||||
|
/** @global CDatabase $DB */
|
||||||
|
/** @var CBitrixComponentTemplate $this */
|
||||||
|
/** @var string $templateName */
|
||||||
|
/** @var string $templateFile */
|
||||||
|
/** @var string $templateFolder */
|
||||||
|
/** @var string $componentPath */
|
||||||
|
/** @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('<script type="application/ld+json">'.json_encode($main_office_markup_content).'</script>', false, "AFTER_JS");
|
||||||
|
?>
|
||||||
@ -72,5 +72,12 @@
|
|||||||
<script src="/local/templates/evolution/js/embla-carousel.umd.min.js"></script>
|
<script src="/local/templates/evolution/js/embla-carousel.umd.min.js"></script>
|
||||||
<script src="/local/templates/evolution/js/rangeslider.min.js"></script>
|
<script src="/local/templates/evolution/js/rangeslider.min.js"></script>
|
||||||
<script src="/local/templates/evolution/js/main.js"></script>
|
<script src="/local/templates/evolution/js/main.js"></script>
|
||||||
|
<?
|
||||||
|
$APPLICATION->IncludeComponent(
|
||||||
|
"evolution:mainoffice.markup",
|
||||||
|
"",
|
||||||
|
Array()
|
||||||
|
);
|
||||||
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -86,5 +86,12 @@
|
|||||||
<script src="/local/templates/evolution/js/embla-carousel.umd.min.js"></script>
|
<script src="/local/templates/evolution/js/embla-carousel.umd.min.js"></script>
|
||||||
<script src="/local/templates/evolution/js/rangeslider.min.js"></script>
|
<script src="/local/templates/evolution/js/rangeslider.min.js"></script>
|
||||||
<script src="/local/templates/evolution/js/main.js"></script>
|
<script src="/local/templates/evolution/js/main.js"></script>
|
||||||
|
<?
|
||||||
|
$APPLICATION->IncludeComponent(
|
||||||
|
"evolution:mainoffice.markup",
|
||||||
|
"",
|
||||||
|
Array()
|
||||||
|
);
|
||||||
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user