<div class="similar-products">
<div class="row">
<div class="col-12 text-center">
{% if editmode %}
{{ pimcore_input('popular-title', {
'placeholder': 'A legnépszerűbb *MODELL* órák',
'class': 'article-edit-title'
}) }}
{% elseif productList is defined and productList|length>0 %}
{% set popularTitle = pimcore_input('popular-title') %}
{% if popularTitle and popularTitle.getText() %}
<h3>{{ popularTitle.render() | raw }}</h3>
{% else %}
<h3>A legnépszerűbb órák ebben a kategóriában</h3>
{% endif %}
{% endif %}
</div>
</div>
{% if editmode %}
{% set options = {
"types": ["object"],
"subtypes": {
"object": ["object"]
},
"classes": ["CoreShopProduct"],
"reload": true
} %}
{% set block = pimcore_block('popularwatchesblock', {
'reload': true,
'limit': 20,
}) %}
{% for i in block.iterator %}
<div class="popular-watch-index">
{% set index = block.current %}
{% set product = pimcore_relation('product', options) %}
Termék {{ index + 1 }}:
{{ product.render() | raw }}
{% if product and product.element is defined and product.element %}
<div class="row">
{{ include('@CoreShopFrontend/Product/_product_item.html.twig', {
'product': product.element
}) }}
</div>
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="row">
{% if productList is defined and productList|length>0 %}
{% for item in productList %}
{{ include('@CoreShopFrontend/Product/_product_item.html.twig', {'product': item}) }}
{% endfor %}
{% endif %}
</div>
{% endif %}
<div class="text-center">
{{ pimcore_link('more', {
'class': 'btn btn-primary'
}) }}
</div>
</div>