fixes for adv generation
This commit is contained in:
parent
0d001284c2
commit
b7fecc8135
@ -458,6 +458,7 @@ function OnBeforeIBlockElementUpdateHandler(&$arFields)
|
||||
|
||||
case IBLOCK_ID_NEWS:
|
||||
{
|
||||
$payload['code'] = $arFields['CODE'];
|
||||
$payload['url'] = "https://".ADVERTISER_DOMAIN."/news/".$arFields['CODE'];
|
||||
}
|
||||
break;
|
||||
@ -498,6 +499,9 @@ function OnBeforeIBlockElementUpdateHandler(&$arFields)
|
||||
|
||||
if($response['status'] === "success")
|
||||
{
|
||||
// file_put_contents($_SERVER['DOCUMENT_ROOT']."/adv_arfields.txt", var_export($arFields, true));
|
||||
// file_put_contents($_SERVER['DOCUMENT_ROOT']."/adv_properties.txt", var_export($properties, true));
|
||||
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]."" => [ 'VALUE' => $response['erir'] ] ];
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])[0]."" => [ 'VALUE' => $response['sample'] ] ];
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']])[0]."" => [ 'VALUE' => $response['sample_id'] ] ];
|
||||
@ -505,6 +509,7 @@ function OnBeforeIBlockElementUpdateHandler(&$arFields)
|
||||
else
|
||||
{
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING']] = '';
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = '';
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = '';
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_ID']] = '';
|
||||
$arFields['ACTIVE'] = 'N';
|
||||
|
||||
@ -34,7 +34,7 @@ $APPLICATION->AddHeadString('<script type="application/ld+json">'.json_encode($m
|
||||
<section data-page>
|
||||
<div class="container">
|
||||
<p class="section_title">Новость</p>
|
||||
<div class="news_container">
|
||||
<div class="news_container" id="news_article">
|
||||
<div class="image">
|
||||
<div class="advwrapper">
|
||||
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
|
||||
|
||||
@ -24,12 +24,14 @@ $this->setFrameMode(true);
|
||||
<ul class="breadcrumbs">
|
||||
<li></li>
|
||||
</ul>
|
||||
<div class="special_detail">
|
||||
<div class="special_detail" id="special_offer_detail">
|
||||
<div id="special_offer_header">
|
||||
<h1 class="section_title"><?= $arResult['NAME']; ?></h1>
|
||||
<div class="special_offer">
|
||||
<?= isset($arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT'] : ""; ?>
|
||||
<a href="#order" class="button button-blue special_offer_button">Отправить заявку</a>
|
||||
<? if(!isset($_GET['advertise'])): ?>
|
||||
<a href="#order" class="button button-blue special_offer_button">Отправить заявку</a>
|
||||
<? endif; ?>
|
||||
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
|
||||
<? if($arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
|
||||
<div class="advblock adv_button_news">Реклама
|
||||
@ -49,21 +51,23 @@ $this->setFrameMode(true);
|
||||
<div class="left">
|
||||
<h3>Лизинговые предложения</h3>
|
||||
</div>
|
||||
<div class="right leasing_arrows">
|
||||
<button class="prev">
|
||||
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
|
||||
<path d="M7 11L1 6L6.25 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="next">
|
||||
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
|
||||
<path d="M1 1L7 6L1.75 11" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<? if(!isset($_GET['advertise'])): ?>
|
||||
<div class="right leasing_arrows">
|
||||
<button class="prev">
|
||||
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
|
||||
<path d="M7 11L1 6L6.25 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="next">
|
||||
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
|
||||
<path d="M1 1L7 6L1.75 11" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<div id="leasing_slider">
|
||||
<div class="leasing_list swiped">
|
||||
<div class="leasing_list swiped" style="<?= isset($_GET['advertise']) ? "flex-wrap: wrap;" : "" ?>">
|
||||
<? if(is_array($arResult['PROPERTIES']['CARS']['RELATED'])): ?>
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<? $car = $arResult['PROPERTIES']['CARS']['RELATED'][$i]; ?>
|
||||
@ -89,7 +93,7 @@ $this->setFrameMode(true);
|
||||
<a id="leasing_offer_car"></a>
|
||||
<? if(is_array($arResult['PROPERTIES']['CARS']['RELATED'])): ?>
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<div class="leasing_offer-detail car_top_description car_top_description_<?= $i; ?>" style="display: <?= $i == 0 ? "flex" : "none"; ?>;">
|
||||
<div class="leasing_offer-detail car_top_description car_top_description_<?= $i; ?>" style="display: <?= $i == 0 ? "flex" : (isset($_GET['advertise']) ? "flex" : "none"); ?>;">
|
||||
<div id="single_slider" class="image_slider">
|
||||
<div class="slider_list">
|
||||
<? foreach($arResult['PROPERTIES']['CARS']['RELATED'][$i]['PROPERTIES']['PHOTOS']['VALUE'] AS $photo_url): ?>
|
||||
@ -107,7 +111,9 @@ $this->setFrameMode(true);
|
||||
<div class="offer_desc">
|
||||
<p class="offer_name"><?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?></p>
|
||||
<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['PREVIEW_TEXT']; ?>
|
||||
<a href="#order" class="button button-blue">Отправить заявку</a>
|
||||
<? if(!isset($_GET['advertise'])): ?>
|
||||
<a href="#order" class="button button-blue">Отправить заявку</a>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endfor; ?>
|
||||
@ -123,10 +129,12 @@ $this->setFrameMode(true);
|
||||
</div>
|
||||
*/ ?>
|
||||
<div class="dropdown_blocks_list">
|
||||
<div class="dropdown_block">
|
||||
<div class="dropdown_block <?= isset($_GET['advertise']) ? "open" : "" ?>">
|
||||
<div class="block_header">
|
||||
<p>Условия спецпредложения</p>
|
||||
<button class="block_toggle"></button>
|
||||
<? if(!isset($_GET['advertise'])): ?>
|
||||
<button class="block_toggle"></button>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<div class="block_body">
|
||||
<?= $arResult['PROPERTIES']['RULES']['~VALUE']['TEXT']; ?>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?= GTM_SITE_KEY; ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
<? global $USER; ?>
|
||||
<header class="<?= $USER->IsAuthorized() ? "header_with_offset" : ""; ?>">
|
||||
<header class="page_header <?= $USER->IsAuthorized() ? "header_with_offset" : ""; ?>">
|
||||
<? $APPLICATION->IncludeComponent("bitrix:menu", "evolution", Array(
|
||||
"ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно
|
||||
"CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user