This commit is contained in:
merelendor 2023-11-01 19:17:16 +03:00
commit fa12bcad6f
15 changed files with 123 additions and 24 deletions

View File

@ -42,7 +42,12 @@ $APPLICATION->AddHeadString('<script type="application/ld+json">'.json_encode($m
<div class="advblock adv_button_news adv_button_news_article">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $arResult['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>

View File

@ -49,7 +49,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $entry['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>
@ -70,7 +75,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $entry['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>

View File

@ -18,7 +18,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $arResult['BANNER']['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $arResult['BANNER']['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $arResult['BANNER']['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $arResult['BANNER']['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
<div class="banner special">

View File

@ -45,7 +45,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $entry['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>

View File

@ -111,9 +111,8 @@ function preapproval_form_check_errors()
return valid;
}
(function InitAprrove()
(function InitApprove()
{
console.log("OF", window.innerWidth);
if(window.innerWidth > 540)
{
$("#preapproval_block").find(".block_toggle")

View File

@ -26,7 +26,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $banner['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $banner['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $banner['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $banner['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>

View File

@ -22,16 +22,16 @@ $(document).ready(function()
$('.main_slider-image').attr("src", $(item).attr(slideImageAttr)).fadeIn(150);
});
var erir = $(item).data("erir");
if(erir !== "")
var erid = $(item).data("erid");
if(erid !== "")
{
$(".adv_button_slider").css("display", "flex");
$("#main_slider_erir").text("erid: "+erir);
$("#main_slider_erid").text("erid: "+erid);
}
else
{
$(".adv_button_slider").css("display", "none");
$("#main_slider_erir").text("");
$("#main_slider_erid").text("");
}
}

View File

@ -24,13 +24,14 @@ $this->setFrameMode(true);
<? foreach($arResult['SLIDES'] AS $SLIDE): ?>
<div
id="slider_button_<?= $SLIDE['ID']; ?>"
class="slider_item"
class="slider_item erid"
data-title="<?= str_replace("", "<span style='font-family: montserrat; font-weight: 200;'></span>", $SLIDE['NAME']); ?>"
style="color: <?= $colors[$c]; ?>;"
data-image="<?= $SLIDE['DETAIL_PICTURE']; ?>"
data-tb-image="<?= $SLIDE['DETAIL_PICTURE']; ?>"
data-sm-image="<?= $SLIDE['PREVIEW_PICTURE']; ?>"
data-erir="<?= !isset($_GET['advertise']) ? $SLIDE['PROPERTIES']['ADVERTISING_ERIR']['VALUE'] : ""; ?>"
data-erid="<?= !isset($_GET['advertise']) ? $SLIDE['PROPERTIES']['ADVERTISING_ERIR']['VALUE'] : ""; ?>"
data-creative="<?= $SLIDE['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
<p class="item_name"><?= $SLIDE['PROPERTIES']['TAGLINE']['VALUE']; ?></p>
<span href="<?= $SLIDE['PROPERTIES']['URL']['VALUE']; ?>" class="item_link">Подробнее</span>
@ -48,6 +49,6 @@ $this->setFrameMode(true);
<div class="advblock adv_button_slider">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div id="main_slider_erir" class="adv_content"></div>
<div id="main_slider_erid" class="adv_content"></div>
</div>
</section>

View File

@ -31,7 +31,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $car['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</a>

View File

@ -37,7 +37,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $arResult['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</div>
@ -80,7 +85,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $car['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $car['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
</a>

View File

@ -40,7 +40,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $offer['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $offer['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $offer['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $offer['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>
<span class="speacial_text"><?= $offer['PREVIEW_TEXT']; ?></span>

View File

@ -28,7 +28,12 @@ if(!empty($arParams['PROPERTIES']['PARKING_CITY']['VALUE'])) { array_push($descr
<div class="advblock adv_button_news" style="padding: 6px; padding-top: 0px; padding-bottom: 0px;">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $arParams['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $arParams['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $arParams['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $arParams['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
<? endif; ?>

View File

@ -84,7 +84,12 @@ $this->setFrameMode(true);
<div class="advblock adv_button_news">Реклама
<div class="adv_content">ООО "ЛК Эволюция"</div>
<div class="adv_content">ИНН 9724016636</div>
<div class="adv_content">erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
<div class="adv_content erid"
data-erid="<?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
data-creative="<?= $arResult['PROPERTIES']['ADVERTISING_SAMPLE_ID']['VALUE']; ?>"
>
erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>
</div>
</div>
</div>
<? endif; ?>

View File

@ -21,6 +21,9 @@ $(function()
{
$("#catalog_get_more").empty();
}
var event = new Event("creatives");
window.dispatchEvent(event);
});
});
});

View File

@ -24,6 +24,33 @@ $(document).ready(function()
setTimeout(function(){ init(); }, 50);
});
var creatives = new Set([]);
window.addEventListener("creatives", function()
{
var new_creatives = new Set([]);
$(".erid").each(function()
{
var creative_id = $(this).data("creative");
if(creative_id !== undefined && creative_id !== null && creative_id !== "")
{
if(!creatives.has(creative_id))
{
creatives.add(creative_id);
new_creatives.add(creative_id);
}
}
}).promise().done(function()
{
$.ajax({
url: "/advertising/track",
method: "POST",
headers: { "Content-Type": "application/json" },
processData: false,
data: JSON.stringify({ creatives: Array.from(new_creatives), })
});
});
});
function init()
{
$('a[href*="#order"]').each(function() {
@ -301,6 +328,15 @@ function init()
{
comagic_position(false);
});
window.setTimeout(function()
{
if(window.location.href.indexOf("advertise") < 0)
{
var event = new Event("creatives");
window.dispatchEvent(event);
}
}, 500);
}
function comagic_position(init)