src/AutomarketBundle/Resources/views/Catalog/catalog.html.twig line 1

Open in your IDE?
  1. {% extends '@Automarket/template.html.twig' %}
  2. {% if pageReload is not defined %}
  3.     {% set pageReload = false %}
  4. {% endif %}
  5. {% set seoParamsString = "" %}
  6. {% if breadcrumbs is defined %}
  7.     {% set seo = breadcrumbs %}
  8.     {% set seo = seo|slice(1) %}
  9.     {% for item in seo %}
  10.         {% set seoParamsString = seoParamsString ~ item.title ~ " " %}
  11.     {% endfor %}
  12. {% endif %}
  13. {% if app.request.get('type') == 'car' %}
  14.     {% set seoTypeVehicle = 'base.seo.catalog_car.h1' %}
  15. {% elseif app.request.get('type') == 'moto' %}
  16.     {% set seoTypeVehicle = 'base.seo.catalog_moto.h1' %}
  17. {% endif %}
  18. {% block head %}
  19.     {% if not pageReload %}
  20.         <meta name="robots" content="noindex">
  21.     {% endif %}
  22.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/automarket/css/automarketCatalog.css?{{ VERSION }}">
  23. {% endblock head %}
  24. {% block seo %}
  25.     {% if modelRangePage is defined and modelRangePage %}
  26.         <title>
  27.             {% if app.request.get('page') %}
  28.                 {{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}
  29.             {% endif %}
  30.             {{ modelRangePage.titleSeo(app.request.locale) }}</title>
  31.         <meta name="description" content="{{ modelRangePage.descriptionSeo(app.request.locale) }}">
  32.     {% elseif seoParamsString != "" %}
  33.         <title>
  34.             {% if app.request.get('page') %}
  35.                 {{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}
  36.             {% endif %}
  37.             {{ 'base.seo.catalog_route.title'|trans({'%params%': seoParamsString}, 'automarket_base') }}</title>
  38.         <meta name="description" content="{{ 'base.seo.catalog_route.description'|trans({'%params%': seoParamsString}, 'automarket_base') }}">
  39.     {% elseif seoTypeVehicle is defined %}
  40.         <title>
  41.             {% if app.request.get('page') %}
  42.                 {{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}
  43.             {% endif %}
  44.             {{ seoTypeVehicle|trans({}, 'automarket_base') }}</title>
  45.         <meta name="description" content="{{ seoTypeVehicle|trans({}, 'automarket_base') }}">
  46.     {% else %}
  47.         <title>{{ 'base.seo.search.title'|trans({}, 'automarket_base') }}</title>
  48.         <meta name="description" content="{{ 'base.seo.search.description'|trans({}, 'automarket_base') }}">
  49.     {% endif %}
  50. {% endblock seo %}
  51. {% block ogtagDynamic %}
  52.     {% if modelRangePage is defined and modelRangePage %}
  53.         <meta property="og:title" content="{% if app.request.get('page') %}{{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}{% endif %}{{ modelRangePage.titleSeo(app.request.locale) }}">
  54.         <meta property="og:description" content="{{ modelRangePage.descriptionSeo(app.request.locale) }}">
  55.     {% elseif seoParamsString != "" %}
  56.         <meta property="og:title" content="{% if app.request.get('page') %}{{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}{% endif %}{{ 'base.seo.catalog_route.title'|trans({'%params%': seoParamsString}, 'automarket_base') }}">
  57.         <meta property="og:description" content="{{ 'base.seo.catalog_route.description'|trans({'%params%': seoParamsString}, 'automarket_base') }}">
  58.     {% else %}
  59.         <meta property="og:title" content="{% if app.request.get('page') %}{{ 'accessories.page'|trans({'%page%':app.request.get('page')}, 'dc_base') }}{% endif %}{{ 'base.seo.catalog_' ~ app.request.get('type') ~'.title'|trans({}, 'automarket_base') }}">
  60.         <meta property="og:description" content="{{ 'base.seo.catalog_' ~ app.request.get('type') ~'.description'|trans({}, 'automarket_base') }}">
  61.     {% endif %}
  62. {% endblock ogtagDynamic %}
  63. {% block content %}
  64.     <!-- Google Tag Manager (noscript) -->
  65.     <noscript>
  66.         <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NG6MLQG" height="0" width="0" style="display:none;visibility:hidden"></iframe>
  67.     </noscript>
  68.     <!-- End Google Tag Manager (noscript) -->
  69.     {% set isCategory = true %}
  70.     <article id="catalog">
  71.         <section class="breadcrumbs__new">
  72.             <div class="container">
  73.                 <ol class="vidi_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  74.                     <li class="marker__none" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  75.                         <a itemprop="item" href="{{ path('automarket_homepage') }}">
  76.                             <span class="breadcrumbs__link" itemprop="name">VIDI</span>
  77.                         </a>
  78.                         <meta itemprop="position" content="1"/>
  79.                     </li>
  80.                     {% if breadcrumbs is defined %}
  81.                         {% for item in breadcrumbs %}
  82.                             {% set title = item.title|split(' ') %}
  83.                             {% if item.title %}
  84.                                 <div class="arrow-bc">
  85.                                     <svg width="7" height="12" viewbox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  86.                                         <path d="M6.53033 6.53033C6.82322 6.23744 6.82322 5.76256 6.53033 5.46967L1.75736 0.696699C1.46447 0.403805 0.989593 0.403805 0.6967 0.696699C0.403806 0.989592 0.403806 1.46447 0.6967 1.75736L4.93934 6L0.696699 10.2426C0.403805 10.5355 0.403805 11.0104 0.696699 11.3033C0.989592 11.5962 1.46447 11.5962 1.75736 11.3033L6.53033 6.53033ZM5 6.75L6 6.75L6 5.25L5 5.25L5 6.75Z" fill="#A2A2A2"/>
  87.                                     </svg>
  88.                                 </div>
  89.                                 <li class="marker__none" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  90.                                     {% if(loop.index < breadcrumbs|length) %}
  91.                                         <a itemprop="item" href="{{ item.url }}">
  92.                                             <span class="breadcrumbs__link {{ title|length == 1 ? 'uppercase' : '' }}" itemprop="name">
  93.                                                 {{ item.title }}</span>
  94.                                         </a>
  95.                                     {% else %}
  96.                                         <a itemprop="item">
  97.                                             <span class="breadcrumbs__link breadcrumbs__link__item {{ title|length == 1 ? 'uppercase' : '' }}" itemprop="name">{{ item.title }}</span>
  98.                                         </a>
  99.                                     {% endif %}
  100.                                     <meta itemprop="position" content="{{ loop.index + 1 }}"/>
  101.                                 </li>
  102.                             {% endif %}
  103.                         {% endfor %}
  104.                     {% else %}
  105.                         <div class="arrow-bc">
  106.                             <svg width="7" height="12" viewbox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  107.                                 <path d="M6.53033 6.53033C6.82322 6.23744 6.82322 5.76256 6.53033 5.46967L1.75736 0.696699C1.46447 0.403805 0.989593 0.403805 0.6967 0.696699C0.403806 0.989592 0.403806 1.46447 0.6967 1.75736L4.93934 6L0.696699 10.2426C0.403805 10.5355 0.403805 11.0104 0.696699 11.3033C0.989592 11.5962 1.46447 11.5962 1.75736 11.3033L6.53033 6.53033ZM5 6.75L6 6.75L6 5.25L5 5.25L5 6.75Z" fill="#A2A2A2"/>
  108.                             </svg>
  109.                         </div>
  110.                         <li class="marker__none" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  111.                             <span class="breadcrumbs__link breadcrumbs__link__item" itemprop="name">{{ 'catalog.search'|trans({},'automarket_base') }}</span>
  112.                             <meta itemprop="position" content="2"/>
  113.                         </li>
  114.                     {% endif %}
  115.                 </ol>
  116.             </div>
  117.         </section>
  118.         <section class="section__title">
  119.             <div class="container">
  120.                 <h1 class="page__title">
  121.                     {% if seoMeta.h1 %}
  122.                         {{ seoMeta.h1 }}
  123.                     {% elseif modelRangePage is defined and modelRangePage %}
  124.                         {{ modelRangePage.title(app.request.locale) }}
  125.                     {% elseif seoParamsString != "" %}
  126.                         {{ 'base.seo.catalog_route.h1'|trans({'%params%': seoParamsString}, 'automarket_base') }}
  127.                     {% elseif seoTypeVehicle is defined %}
  128.                         {{ seoTypeVehicle|trans({}, 'automarket_base') }}
  129.                     {% else %}
  130.                         {{ 'base.seo.search.h1'|trans({},'automarket_base') }}
  131.                     {% endif %}
  132.                 </h1>
  133.             </div>
  134.         </section>
  135.         <section class="section__catalog">
  136.             <div class="catalog__choice__wrapper">
  137.                 <div class="container">
  138.                     <div class="catalog__choice__container">
  139.                         <div class="choice__clear__wrapper">
  140.                             <div class="choice__clear__info">{{ 'catalog.selected'|trans({},'automarket_base') }}
  141.                                 <span v-html="countVehicle"></span>
  142.                                 {{ 'catalog.proposals'|trans({},'automarket_base') }}:</div>
  143.                             {% if not pageReload %}
  144.                                 {% if pageReload %}
  145.                                     <a class="choice__clear__btn" v-if="Object.keys(filterActual).length" href="{{ path('automarket_catalog', {'state': app.request.get('state'), 'type': app.request.get('type')}) }}">{{ 'catalog.cancel'|trans({},'automarket_base') }}</a>
  146.                                 {% else %}
  147.                                     <a class="choice__clear__btn" v-if="Object.keys(filterActual).length" href="{{ path('automarket_catalog_search') }}">{{ 'catalog.cancel'|trans({},'automarket_base') }}</a>
  148.                                 {% endif %}
  149.                             {% endif %}
  150.                         </div>
  151.                         <div class="choice__item__wrapper">
  152.                             {% if not pageReload %}
  153.                                 <template v-for="(items, index) in filterActual">
  154.                                     <template v-if="index === 'characteristic'" v-for="(char, type) in items">
  155.                                         <button class="choice__item__btn" v-for="(title, value) in char" @click="deleteSelectFilter(type, value, index)">
  156.                                             <span v-html="title"></span>
  157.                                             <span>
  158.                                                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  159.                                                     <path d="M1 1L11 11M11 1L1 11" stroke="#E50923" stroke-linecap="round"/>
  160.                                                 </svg>
  161.                                             </span>
  162.                                         </button>
  163.                                     </template>
  164.                                     <template v-if="index === 'range'">
  165.                                         <button class="choice__item__btn" v-for="(title, type) in items" @click="deleteSelectFilter(type, null, index)">
  166.                                             <span v-html="title"></span>
  167.                                             <span>
  168.                                                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  169.                                                     <path d="M1 1L11 11M11 1L1 11" stroke="#E50923" stroke-linecap="round"/>
  170.                                                 </svg>
  171.                                             </span>
  172.                                         </button>
  173.                                     </template>
  174.                                     <template v-if="index === 'brand'" v-for="(title, value) in items">
  175.                                         <button class="choice__item__btn" @click="deleteSelectFilter(index, value)">
  176.                                             <span v-html="value" style="text-transform: uppercase;"></span>
  177.                                             <span>
  178.                                                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  179.                                                     <path d="M1 1L11 11M11 1L1 11" stroke="#E50923" stroke-linecap="round"/>
  180.                                                 </svg>
  181.                                             </span>
  182.                                         </button>
  183.                                     </template>
  184.                                     <template v-if="index === 'model'" v-for="(title, value) in items">
  185.                                         <button class="choice__item__btn" @click="deleteSelectFilter(index, value)">
  186.                                             <span v-html="value" style="text-transform: uppercase;"></span>
  187.                                             <span>
  188.                                                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  189.                                                     <path d="M1 1L11 11M11 1L1 11" stroke="#E50923" stroke-linecap="round"/>
  190.                                                 </svg>
  191.                                             </span>
  192.                                         </button>
  193.                                     </template>
  194.                                     <template v-if="index === 'recommendGroup'" v-for="(title, value) in items">
  195.                                         <button class="choice__item__btn" @click="deleteSelectFilter(index, value)">
  196.                                             <span v-html="title" style="text-transform: uppercase;"></span>
  197.                                             <span>
  198.                                                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  199.                                                     <path d="M1 1L11 11M11 1L1 11" stroke="#E50923" stroke-linecap="round"/>
  200.                                                 </svg>
  201.                                             </span>
  202.                                         </button>
  203.                                     </template>
  204.                                 </template>
  205.                             {% endif %}
  206.                         </div>
  207.                         <div class="choice__sort__wrapper">
  208.                             <span class="choice__sort__title">{{ 'catalog.sorting'|trans({},'automarket_base') }}</span>
  209.                             <select class="choice__sort__select" v-model="selectFilter.sortOrder" @change="changeSort()">
  210.                                 <option :value="'price-ASC'">{{ 'catalog.low_price'|trans({},'automarket_base') }}</option>
  211.                                 <option :value="'price-DESC'">{{ 'catalog.high_price'|trans({},'automarket_base') }}</option>
  212.                                 <option :value="'addVehicle-DESC'">{{ 'catalog.by_date'|trans({},'automarket_base') }}</option>
  213.                                 <option :value="'year-ASC'">{{ 'catalog.by_year_growth'|trans({},'automarket_base') }}</option>
  214.                                 <option :value="'year-DESC'">{{ 'catalog.by_year_wane'|trans({},'automarket_base') }}</option>
  215.                                 <option :value="'mileage-ASC'">{{ 'catalog.by_race_growth'|trans({},'automarket_base') }}</option>
  216.                                 <option :value="'mileage-DESC'">{{ 'catalog.by_race_wane'|trans({},'automarket_base') }}</option>
  217.                             </select>
  218.                         </div>
  219.                     </div>
  220.                 </div>
  221.             </div>
  222.         </section>
  223.         <section class="section__mobile__filter">
  224.             <div class="container">
  225.                 <div class="mobile__filter__wrapper">
  226.                     <div class="mobile__filter__box mobile__filter-btn" @click="toggleFilter()">
  227.                         <svg width="16" height="16" viewbox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  228.                             <path d="M0.5 4.17537H8.64103C8.86559 5.08268 9.68634 5.75747 10.6621 5.75747C11.6378 5.75747 12.4585 5.08268 12.6831 4.17537H15.5C15.7761 4.17537 16 3.9515 16 3.67537C16 3.39925 15.7761 3.17537 15.5 3.17537H12.6831C12.4585 2.26806 11.6378 1.59325 10.662 1.59325C9.68628 1.59325 8.86553 2.26806 8.641 3.17537H0.5C0.223875 3.17537 0 3.39925 0 3.67537C0 3.9515 0.223875 4.17537 0.5 4.17537ZM10.6621 2.59325C11.2587 2.59325 11.7442 3.07868 11.7442 3.67534C11.7442 4.27203 11.2587 4.75747 10.6621 4.75747C10.0654 4.75747 9.57994 4.27203 9.57994 3.67534C9.57994 3.07868 10.0654 2.59325 10.6621 2.59325ZM0.5 8.5H3.31694C3.5415 9.40731 4.36222 10.0821 5.33797 10.0821C6.31372 10.0821 7.13444 9.40731 7.359 8.5H15.5C15.7761 8.5 16 8.27612 16 8C16 7.72387 15.7761 7.5 15.5 7.5H7.35897C7.13441 6.59268 6.31369 5.91787 5.33794 5.91787C4.36219 5.91787 3.54147 6.59268 3.31691 7.5H0.5C0.223875 7.5 0 7.72387 0 8C0 8.27612 0.223844 8.5 0.5 8.5ZM5.33794 6.91787C5.93462 6.91787 6.42006 7.40331 6.42006 8C6.42006 8.59665 5.93462 9.08209 5.33794 9.08209C4.74125 9.08209 4.25581 8.59665 4.25581 8C4.25581 7.40331 4.74125 6.91787 5.33794 6.91787ZM15.5 11.8246H12.6831C12.4585 10.9173 11.6378 10.2425 10.662 10.2425C9.68628 10.2425 8.86556 10.9173 8.641 11.8246H0.5C0.223875 11.8246 0 12.0485 0 12.3246C0 12.6007 0.223875 12.8246 0.5 12.8246H8.64103C8.86559 13.7319 9.68631 14.4067 10.6621 14.4067C11.6378 14.4067 12.4585 13.7319 12.6831 12.8246H15.5C15.7761 12.8246 16 12.6007 16 12.3246C16 12.0485 15.7762 11.8246 15.5 11.8246ZM10.6621 13.4067C10.0654 13.4067 9.57994 12.9213 9.57994 12.3246C9.57994 11.7279 10.0654 11.2425 10.6621 11.2425C11.2587 11.2425 11.7442 11.7279 11.7442 12.3246C11.7442 12.9213 11.2587 13.4067 10.6621 13.4067Z" fill="#E40C25"/>
  229.                         </svg>
  230.                         <p>{{ 'catalog.filter'|trans({},'automarket_base') }}</p>
  231.                     </div>
  232.                     <div class="mobile__filter__box">
  233.                         <svg width="17" height="16" viewbox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  234.                             <path d="M14.2229 6.37537L11.8229 0.615367C11.7483 0.436487 11.5736 0.320007 11.38 0.320007C11.1864 0.320007 11.0115 0.436487 10.937 0.615367L8.53695 6.37537C8.43471 6.62001 8.55055 6.90113 8.79519 7.00305C9.04031 7.10529 9.32063 6.98977 9.42287 6.74481L10.3 4.64001H12.46L13.337 6.74465C13.4138 6.92881 13.592 7.04017 13.78 7.04017C13.8419 7.04017 13.9042 7.02817 13.9646 7.00289C14.2093 6.90097 14.3251 6.62001 14.2229 6.37537ZM10.7 3.68001L11.38 2.04801L12.06 3.68001H10.7ZM13.78 15.2C13.78 15.4651 13.5653 15.68 13.3 15.68H9.45999C9.27535 15.68 9.10751 15.5742 9.02735 15.4078C8.94767 15.2416 8.96975 15.0442 9.08495 14.9002L12.3011 10.88H9.45999C9.19471 10.88 8.97999 10.6651 8.97999 10.4C8.97999 10.1349 9.19471 9.92001 9.45999 9.92001H13.3C13.4846 9.92001 13.6525 10.0258 13.7326 10.1922C13.8123 10.3584 13.7902 10.5558 13.675 10.6998L10.4589 14.72H13.3C13.5653 14.72 13.78 14.9349 13.78 15.2ZM6.43935 12.9406C6.62687 13.1282 6.62687 13.4318 6.43935 13.6194L4.99935 15.0594C4.90559 15.1531 4.78271 15.2 4.65999 15.2C4.53727 15.2 4.41439 15.1531 4.32063 15.0594L2.88063 13.6194C2.69311 13.4318 2.69311 13.1282 2.88063 12.9406C3.06815 12.7531 3.37183 12.7531 3.55935 12.9406L4.17999 13.5613V1.28001C4.17999 1.01489 4.39471 0.800007 4.65999 0.800007C4.92527 0.800007 5.13999 1.01489 5.13999 1.28001V13.5613L5.76063 12.9406C5.94799 12.7531 6.25183 12.7531 6.43935 12.9406Z" fill="#E40C25"/>
  235.                         </svg>
  236.                         <select class="choice__sort__select" v-model="selectFilter.sortOrder" @change="changeSort()">
  237.                             <option :value="'price-ASC'">{{ 'catalog.low_price'|trans({},'automarket_base') }}</option>
  238.                             <option :value="'price-DESC'">{{ 'catalog.high_price'|trans({},'automarket_base') }}</option>
  239.                             <option :value="'addVehicle-DESC'">{{ 'catalog.by_date'|trans({},'automarket_base') }}</option>
  240.                             <option :value="'year-ASC'">{{ 'catalog.by_year_growth'|trans({},'automarket_base') }}</option>
  241.                             <option :value="'year-DESC'">{{ 'catalog.by_year_wane'|trans({},'automarket_base') }}</option>
  242.                             <option :value="'mileage-ASC'">{{ 'catalog.by_race_growth'|trans({},'automarket_base') }}</option>
  243.                             <option :value="'mileage-DESC'">{{ 'catalog.by_race_wane'|trans({},'automarket_base') }}</option>
  244.                         </select>
  245.                     </div>
  246.                 </div>
  247.             </div>
  248.         </section>
  249.         <section class="section__catalog__content">
  250.             <div class="container">
  251.                 <div class="catalog__content__wrapper">
  252.                     <section class="catalog__filter__wrapper">
  253.                         {% include '@Automarket/Modules/catalog-filter.html.twig' %}
  254.                     </section>
  255.                     <section class="catalog__card__col">
  256.                         <div class="catalog__card__wrapper">
  257.                             {% if not pageReload %}
  258.                                 <template v-if="showNoSearchVehicle">
  259.                                     {% include '@Automarket/Catalog/catalog-no-search.html.twig' %}
  260.                                 </template>
  261.                                 <template v-for="(vehicle, index) in vehicles">
  262.                                     {% include '@Automarket/Catalog/catalog-card-vue.html.twig' %}
  263.                                     <template v-if="index === 2">
  264.                                         {% include '@Automarket/Catalog/catalog-support-box.html.twig' %}
  265.                                     </template>
  266.                                     <template v-if="index === 4">
  267.                                         {% include '@Automarket/Catalog/catalog-exchange-car-box.html.twig' %}
  268.                                     </template>
  269.                                 </template>
  270.                             {% else %}
  271.                                 {% if not countVehicle %}
  272.                                     {% include '@Automarket/Catalog/catalog-no-search.html.twig' %}
  273.                                 {% endif %}
  274.                                 {% for vehicle in vehicles %}
  275.                                     {% include '@Automarket/Catalog/catalog-card.html.twig' %}
  276.                                     {% if loop.index == 3 %}
  277.                                         {% include '@Automarket/Catalog/catalog-support-box.html.twig' %}
  278.                                     {% endif %}
  279.                                     {% if loop.index == 5 %}
  280.                                         {% include '@Automarket/Catalog/catalog-exchange-car-box.html.twig' %}
  281.                                     {% endif %}
  282.                                 {% endfor %}
  283.                             {% endif %}
  284.                         </div>
  285.                         <div class="catalog__pagination">
  286.                             {% if pageReload %}
  287.                                 {% if pagination is defined %}
  288.                                     {% include '@DcSite/Modules/pagination/pagination.html.twig' %}
  289.                                 {% endif %}
  290.                             {% else %}
  291.                                 <button class="page__btn__red" v-if="actionShowMore" @click="clickShowMore()">
  292.                                     {{ 'catalog.load_more'|trans({},'automarket_base') }}
  293.                                 </button>
  294.                                 {% include '@Portal/Modules/pagination.html.twig' %}
  295.                             {% endif %}
  296.                         </div>
  297.                     </section>
  298.                 </div>
  299.             </div>
  300.         </section>
  301.         {% if modelRangePage is defined and modelRangePage %}
  302.             <section class="section__catalog__info">
  303.                 <div class="container">
  304.                     {{ modelRangePage.description(app.request.locale)|raw }}
  305.                 </div>
  306.             </section>
  307.         {% endif %}
  308.         {% if seoLinks.blocks is defined %}
  309.             <section class="section__catalog__info">
  310.                 <div class="container">
  311.                     {% if seoParamsString != "" %}
  312.                         <h2 class="catalog__info__title">{{ 'catalog.selection_with_params'|trans({'%params%' : seoParamsString},'automarket_base') }}</h2>
  313.                     {% else %}
  314.                         <h2 class="catalog__info__title">{{ 'catalog.selection'|trans({},'automarket_base') }}</h2>
  315.                     {% endif %}
  316.                     {% set currentUrl = app.request.uri|split('/') %}
  317.                     {% set currentFilterUrl = currentUrl|filter(item => item is not empty)|last %}
  318.                     {% for index, group in seoLinks.blocks %}
  319.                         {% if group is not empty %}
  320.                             <p class="catalog__info__text">
  321.                                 <strong>{{ ('vehicle.characteristic.params.' ~ index) |trans({}, 'automarket_base') }}
  322.                                     :
  323.                                 </strong>
  324.                                 {% for item in group %}
  325.                                     {% if item.url != currentFilterUrl %}
  326.                                         <a class="catalog_info_item" href="{{ item.url }}">{{ item.title }}</a>
  327.                                         {% if not loop.last %}
  328.                                             {{ ' |' }}
  329.                                         {% endif %}
  330.                                     {% else %}
  331.                                         <p>{{ item.title }}</p>
  332.                                         {% if not loop.last %}
  333.                                             {{ ' |' }}
  334.                                         {% endif %}
  335.                                     {% endif %}
  336.                                 {% endfor %}
  337.                             </p>
  338.                         {% endif %}
  339.                     {% endfor %}
  340.                 </div>
  341.             </section>
  342.         {% endif %}
  343.     </article>
  344. {% endblock %}
  345. {% block script %}
  346.     <script src="/dist/{{ MODE }}/automarket/js/automarketCatalog.js?{{ VERSION }}"></script>
  347.     <script>
  348.         $(() => {
  349.             const obj = new automarket.automarketCatalog.Catalog();
  350.             obj.initCatalog({
  351.                 initUrl: '{{ path('automarket_catalog_build_filters') }}',
  352.                 getCountVehicleFilterUrl: '{{ path('automarket_catalog_count_vehicle_filters') }}',
  353.                 getVehicleFilterUrl: '{{ path('automarket_catalog_vehicle_filters') }}',
  354.                 hrefSaleOnline: '{{ path('automarket_sale_online') }}',
  355.                 applyUrl: '{{ app.request.requestUri }}',
  356.                 routeParams: {{ routeParams|json_encode|raw }},
  357.                 countVehicle: {{ countVehicle ?? 0 }},
  358.                 pageReload: '{{ pageReload }}',
  359.                 locale: '{{ app.request.locale }}',
  360.                 state: 'used',
  361.                 type: 'car',
  362.                 kwh: '{{ 'small_words.kwh'|trans({}, 'automarket_base') }}',
  363.             })
  364.         });
  365.     </script>
  366.     {% if not app.request.get('page') and vehicles is defined %}
  367.         {% set nameTranslationKey = seoParamsString != '' ? 'base.seo.catalog_route.h1' : 'base.seo.catalog.title' %}
  368.         {% set descriptionTranslationKey = seoParamsString != '' ? 'base.seo.catalog_route.description' : 'base.seo.catalog.description' %}
  369.         <script type="application/ld+json">
  370.         {
  371.             "@context": "https://schema.org",
  372.             "@type": ["Product", "Vehicle"],
  373.             "name": "{{ nameTranslationKey|trans({'%params%': seoParamsString}, 'automarket_base') }}",
  374.             "description": "{{ descriptionTranslationKey|trans({'%params%': seoParamsString}, 'automarket_base') }}",
  375.             "image": [
  376.                 {% for vehicle in vehicles %}
  377.                     {
  378.                         "@type": "ImageObject",
  379.                         "image": "{{ vehicle.media.image }}",
  380.                         "contentUrl": "{{ vehicle.media.image }}"
  381.                     }{% if not loop.last %}{{ ',' }}{% endif %}
  382.                 {% endfor %}
  383.             ],
  384.             "offers": {
  385.                 "@type": "AggregateOffer",
  386.                 "priceCurrency": "USD",
  387.                 "lowPrice": "{{ dataPriceVehicle.minPriceUsd }}",
  388.                 "highPrice": "{{ dataPriceVehicle.maxPriceUsd }}",
  389.                 "offerCount": "{{ countVehicle }}"
  390.             }
  391.         }
  392.         </script>
  393.     {% endif %}
  394. {% endblock script %}