templates/website/page/hertiage-products.html.twig line 1

  1. {% extends '@web/base.html.twig' %}
  2. {% set metaParams = {
  3.     'title': page.metaTitle,
  4.     'description': page.metaDescription,
  5.     'keywords': page.metaDescription,
  6.     'ogImage': page.metaImage,
  7. } %}
  8. {% block meta %}
  9.     {% include '@web/parts/meta.html.twig' with metaParams %}
  10. {% endblock meta %}
  11. {% block title %}{{ page.metaTitle }}{% endblock title %}
  12. {% block body %}
  13.     <script>
  14.         function toggleFilters() {
  15.             const filters = document.getElementById('filtersContent');
  16.             filters.classList.toggle('active');
  17.         }
  18.     </script>
  19.     <section class="main-products-section">
  20.         <div class="container-fluid">
  21.             <div class="row">
  22.                 <div class="col-lg-10 m-auto">
  23.                     <ul class="wrapper-navigation">
  24.                         <li>
  25.                             <a href="{{ path('page_heritage') }}">
  26.                                 {{ 'Home'|trans }}
  27.                             </a>
  28.                         </li>
  29.                         <li>
  30.                             <span>{{ 'Products'|trans }}</span>
  31.                         </li>
  32.                     </ul>
  33.                     <h2 class="main-title">
  34.                         {{ 'Jewelry shop'|trans }}
  35.                     </h2>
  36.                     <div class="row">
  37.                         <div class="col-lg-3">
  38.                             <div class="filters-wrapper">
  39.                                 <button type="button" class="filter-toggle" onclick="toggleFilters()">
  40.         <span class="filter-toggle__icon">
  41.             <svg width="20" height="20" viewBox="0 0 24 24" fill="none">
  42.                 <path d="M4 7H20" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
  43.                 <path d="M7 12H17" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
  44.                 <path d="M10 17H14" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
  45.             </svg>
  46.         </span>
  47.                                     <span class="filter-toggle__text">{{ 'Filter'|trans }}</span>
  48.                                 </button>
  49.                                 <div class="filters-content" id="filtersContent">
  50.                                     <form action="{{ path('page_heritage_products') }}">
  51.                                         <div class="custom-checkbox">
  52.                                             <h3>{{ 'Collection'|trans }}</h3>
  53.                                             <ul class="checkbox-list">
  54.                                                 {% for item in collection %}
  55.                                                     <li>
  56.                                                         <input
  57.                                                                 {% if collectionId == item.id %}checked{% endif %}
  58.                                                                 type="radio"
  59.                                                                 id="collection_{{ item.id }}"
  60.                                                                 name="collection"
  61.                                                                 value="{{ item.id }}"
  62.                                                                 onchange="this.form.submit()"
  63.                                                         >
  64.                                                         <label for="collection_{{ item.id }}">{{ item.title }}</label>
  65.                                                     </li>
  66.                                                 {% endfor %}
  67.                                             </ul>
  68.                                         </div>
  69.                                         <div class="custom-checkbox">
  70.                                             <h3>{{ 'Category'|trans }}</h3>
  71.                                             <ul class="checkbox-list">
  72.                                                 {% for item in category %}
  73.                                                     <li>
  74.                                                         <input
  75.                                                                 {% if item.id == categoryId %}checked{% endif %}
  76.                                                                 type="radio"
  77.                                                                 id="category_{{ item.id }}"
  78.                                                                 name="category"
  79.                                                                 value="{{ item.id }}"
  80.                                                                 onchange="this.form.submit()"
  81.                                                         >
  82.                                                         <label for="category_{{ item.id }}">{{ item.title }}</label>
  83.                                                     </li>
  84.                                                 {% endfor %}
  85.                                             </ul>
  86.                                         </div>
  87.                                     </form>
  88.                                 </div>
  89.                             </div>
  90.                         </div>
  91.                         <div class="col-lg-9">
  92.                             {% if products %}
  93.                                 <div class="wrapper-products">
  94.                                     {% for item in products %}
  95.                                         <div class="wrapper-item">
  96.                                             <div class="wrapper-image">
  97.                                                 <img src="{{ item.image }}" alt="">
  98.                                             </div>
  99.                                             <div class="wrapper-description">
  100.                                                 <a class="title"
  101.                                                    href="{{ path('page_heritage_product_view',{'id':item.id}) }}">
  102.                                                     {{ item.title }}
  103.                                                 </a>
  104.                                                 <h4>
  105.                                                     {{ item.price|number_format ~ 'դրամ'|trans }}
  106.                                                 </h4>
  107.                                                 <a class="read-btn main-shop-btn"
  108.                                                    href="{{ path('page_heritage_product_view',{'id':item.id}) }}">
  109.                                                     {{ 'ADD TO CARD'|trans }}
  110.                                                 </a>
  111.                                             </div>
  112.                                         </div>
  113.                                     {% endfor %}
  114.                                 </div>
  115.                             {% else %}
  116.                                 <div class="wrapper-empty-data">
  117.                                     <div class="empty-box">
  118.                                         <div class="empty-icon">
  119.                                             <svg width="70" height="70" viewBox="0 0 24 24" fill="none">
  120.                                                 <path d="M21 21L15.5 15.5" stroke="#273869" stroke-width="1.8" stroke-linecap="round"/>
  121.                                                 <circle cx="10" cy="10" r="6" stroke="#273869" stroke-width="1.8"/>
  122.                                                 <path d="M10 7V10L12 12" stroke="#273869" stroke-width="1.8" stroke-linecap="round"/>
  123.                                             </svg>
  124.                                         </div>
  125.                                         <h4>{{ 'Products not found'|trans }}</h4>
  126.                                         <p>{{ 'Try changing the filter or explore other collections.'|trans }}</p>
  127.                                     </div>
  128.                                 </div>
  129.                             {% endif %}
  130.                         </div>
  131.                     </div>
  132.                 </div>
  133.             </div>
  134.         </div>
  135.     </section>
  136. {% endblock %}