templates/areas/popular-watches/view.html.twig line 1

Open in your IDE?
  1. <div class="similar-products">
  2.     <div class="row">
  3.         <div class="col-12 text-center">
  4.             {% if editmode %}
  5.                 {{ pimcore_input('popular-title', {
  6.                     'placeholder': 'A legnépszerűbb *MODELL* órák',
  7.                     'class': 'article-edit-title'
  8.                 }) }}
  9.             {% elseif productList is defined and productList|length>0 %}
  10.                 {% set popularTitle = pimcore_input('popular-title') %}
  11.                 {% if popularTitle and popularTitle.getText() %}
  12.                     <h3>{{ popularTitle.render() | raw }}</h3>
  13.                 {% else %}
  14.                     <h3>A legnépszerűbb órák ebben a kategóriában</h3>
  15.                 {% endif %}
  16.             {% endif %}
  17.         </div>
  18.     </div>
  19.     {% if editmode %}
  20.         {% set options = {
  21.             "types": ["object"],
  22.             "subtypes": {
  23.                 "object": ["object"]
  24.             },
  25.             "classes": ["CoreShopProduct"],
  26.             "reload": true
  27.         } %}
  28.         {% set block = pimcore_block('popularwatchesblock', {
  29.             'reload': true,
  30.             'limit': 20,
  31.         }) %}
  32.         {% for i in block.iterator %}
  33.             <div class="popular-watch-index">
  34.                 {% set index = block.current %}
  35.                 {% set product = pimcore_relation('product', options) %}
  36.                 Termék {{ index + 1 }}:
  37.                 {{ product.render() | raw }}
  38.                 {% if product and product.element is defined and product.element %}
  39.                     <div class="row">
  40.                         {{ include('@CoreShopFrontend/Product/_product_item.html.twig', {
  41.                             'product': product.element
  42.                         }) }}
  43.                     </div>
  44.                 {% endif %}
  45.             </div>
  46.         {% endfor %}
  47.     {% else %}
  48.         <div class="row">
  49.             {% if productList is defined and productList|length>0 %}
  50.                 {% for item in productList %}
  51.                     {{ include('@CoreShopFrontend/Product/_product_item.html.twig', {'product': item}) }}
  52.                 {% endfor %}
  53.             {% endif %}
  54.         </div>
  55.     {% endif %}
  56.     <div class="text-center">
  57.         {{ pimcore_link('more', {
  58.             'class': 'btn btn-primary'
  59.         }) }}
  60.     </div>
  61. </div>