{# <pre>
{{ dump(content) }}
</pre> #}
<script>
const slides = {{ content.aboutProduct.about_photos|length }};
const productId = "{{ app.request.get('id') ~ "-" ~ app.request.get('hash') }}";
</script>
{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
<section class="product-preview">
<div class="product-preview-image">
<div class="product-preview-image-bubbles app-imagesBubblesList" {% if content.aboutProduct.about_photos|length < 2 %}style="opacity:0.2;user-select:none;pointer-events:none;"{% endif %}>
<div class="product-preview-image-view-arrow app-imageBubbleController" data-control='-1' onclick="changeProductPhoto(null, this)"></div>
{% for itmco in 0 .. min(content.aboutProduct.about_photos|length, 5) - 1 %}
<div class="product-preview-image-view-bubble app-imageBubble" {% if itmco == 0 %} data-active='1' {% endif %} data-control='{{ itmco }}'></div>
{% endfor %}
<div class="product-preview-image-view-arrow app-imageBubbleController" data-control='{% if content.aboutProduct.about_photos|length >= 1 %}1{% else %}-1{% endif %}' onclick="changeProductPhoto(null, this)"></div>
</div>
<label class="product-preview-image-wishlist">
<input autocomplete="off" type="checkbox" value="1" {% if content.wish.status %}checked{% endif %} onchange="this.checked = !this.checked; {% if acc.if %}changeWishStatus(!this.checked, '{{ content.wish.hash }}', this);{% else %} window.location.href = '{{ path('auth_site', {log_type: 'login'}) }}?routeTo={{ currentPath|url_encode }}'; {% endif %}">
<div class="product-preview-image-wishlist-group">
<div class="on">
<svg style="height:37px;width:37px;fill:#101010;" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart-fill" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/>
</svg>
</div>
<div class="off">
<svg style="height:37px;width:37px;fill:#101010;" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart" viewBox="0 0 16 16">
<path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/>
</svg>
</div>
</div>
</label>
<div class="product-preview-image-window app-imagePreview">
{% if content.aboutProduct.about_photos|length > 0 %}
{% for itmco in 1 .. content.aboutProduct.about_photos|length %}
<img {% if itmco == 1 %} data-active='1' {% endif %} class="app-imgePreviewImage" src="{{ content.aboutProduct.about_photos[itmco - 1].url }}" alt="prekes-nuotrauka">
{% endfor %}
{% else %}
<img data-active='1' class="app-imgePreviewImage" src="https://srv1.cnts.venderes.com/resources/uploads/items/@default.png" alt="nera-nuotraukos">
{% endif %}
</div>
</div>
<div class="product-preview-info">
<div class="product-preview-info-window">
{# <div class="product-preview-info-window-stickers-container">
<div data-sticker="danger">Pardavėjas ilgai neatnaujino duomenų</div>
</div> #}
<div class="product-preview-info-window-name">{{ content.aboutProduct.a_name }}</div>
<div class="product-preview-info-window-price-container"><span class="regular-price">{{ '%.2f'|format((content.aboutProduct.price_mode == 1 ? content.aboutProduct.price_discount : content.aboutProduct.price_normal) / 100) }} EUR</span>
{% if content.aboutProduct.price_mode == 1 %}<span class="discount-price">{{ '%.2f'|format(content.aboutProduct.price_normal / 100) }} EUR</span>{% endif %}</div>
<div class="product-preview-info-window-seller-container">
<span>Pardavėjas: </span><span class="sellernm">{{ content.aboutSeller.name }}</span><br>
{# <img src="/data/assets/swedbank.png"> #}
</div>
<a target="_blank" href="{{ path('productredirect_site', {id: app.request.get('id'), hash: app.request.get('hash')}) }}"><button class="product-preview-info-window-visit">Apsilankyti</button></a>
<hr class="product-preview-info-window-hr">
<div class="product-preview-info-window-description-container">
<span class="header">Apie prekę:</span><br>
<p>{% if content.aboutProduct.a_description == '' %}<i>Pardavėjas nepateikė aprašymo</i>{% endif %}{{ content.aboutProduct.a_description }}</p>
<br><span style="font-size:80%;">„Venderes“ prekės ID: <b>{{ app.request.get('id') ~ "-" ~ app.request.get('hash')|upper }}</b></span>
</div>
</div>
</div>
</section>
<section class="product-stats">
<p style="color:#4d4d4d;font-size:80%;">Pateikiama konkrečios paros intervalo prekės didžiausia kaina. Kainos fiksuojamos {{ "now"|date("T") }} laiko zonoje. Demonstruojami tik pasikeitusių reikšmių duomenys.</p>
<div><div id="main" style="width:100%;height:300px;"></div></div>
</section>
<section class="app-recommendations" data-blocksnames="{{ ['Panašios prekės']|json_encode()|escape('html_attr') }}">
</section>
{# <!-- REKOMENDACIJA -->
<section class="goods-list">
<div class="goods-list-header">
<span class="goods-list-header-name">Panašios prekės</span>
</div>
<div class="goods-list-group"></div>
</section>
<section class="goods-list">
<div class="goods-list-header">
<span class="goods-list-header-name">Populiaru</span>
</div>
<div class="goods-list-group"></div>
</section> #}
<template id="template_item_0">
<div class="goods-card-sizebox">
<a data-temp style="text-decoration: none;">
<div class="good-card">
<div class="good-card-image" data-temp></div>
<div class="good-card-price-container"><span class="regular-price" data-temp></span><span class="discount-price" data-temp></span></div>
<div class="good-card-name-container" data-temp></div>
</div>
</a>
</div>
</template>
<template id="template_itemContainer_0">
<div class="goods-list">
<div class="goods-list-header">
<span class="goods-list-header-name" data-temp>Panašios prekės</span>
</div>
<div class="goods-list-group" data-temp></div>
</div>
</template>
<script src="/data/js/product_page__imageprev.js"></script>
<script src="/data/js/product_page__recommendations.js"></script>
<script type="text/javascript">
var myChart = echarts.init(document.getElementById('main'));
var option = {
color: [
'#EF7B00'
],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
formatter: '{b0}: <b>{c0} €</b>',
},
xAxis: {
type: 'category',
data: {{ content.stats.days|json_encode()|raw }}
},
yAxis: {
axisLabel: {
formatter: '{value} EUR'
},
min: {{ content.stats.yax[0] }},
max: {{ content.stats.yax[1] }}
},
series: [
{
data: {{ content.stats.vals|json_encode()|raw }},
type: 'line'
}
],
grid: {
left: 0,
right: 0,
bottom: 0,
containLabel: true
}
};
myChart.setOption(option);
window.addEventListener('resize', myChart.resize);
</script>