templates/AtechNetCoreBundle/Product/category.html.twig line 1

Open in your IDE?
  1. {% extends 'AtechNetCoreBundle/base.html.twig' %}
  2. {% import 'AtechNetCoreBundle/macros.html.twig' as macros %}
  3. {% import 'AtechNetCoreBundle/input-macros.html.twig' as inputMacros %}
  4. {# block headScript %}
  5.     {% if app.environment == 'prod' %}
  6.         <!-- Google Optimize -->
  7.         <script src="https://www.googleoptimize.com/optimize.js?id=OPT-56ZWLQ2"></script>
  8.     {% endif %}
  9. {% endblock #}
  10. {% block content %}
  11.     {%- import _self as self -%}
  12.     {% set defaultLocale = app.request.session.get('defaultLocale') %}
  13.     <div id="page-spinner">
  14.         <div class="page-spinner-background"></div>
  15.         <div class="spinner-border" role="status"></div>
  16.     </div>
  17.     <div class="main-content{% if isBlackFriday %} black-friday-main-content{% endif %}">
  18.         <div class="container">
  19.             <ul class="breadcrumb{% if isBlackFriday %} black-friday-breadcrumb{% endif %}">
  20.                 {% for breadcrumb in breadcrumbs %}
  21.                     <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
  22.                 {% endfor %}
  23.             </ul>
  24.             <div class="row">
  25.                 <div class="col-md-3 left-filter{% if isBlackFriday %} black-friday-filter{% endif %}">
  26.                     {% if filters %}
  27.                         <div id="filter-desktop">
  28.                         </div>
  29.                         <div id="accordion" class="filter-accordion filter-button">
  30.                             <button class="btn btn-filter" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
  31.                                 <span>{{ 'Filter' | trans }}</span><i class="fas fa-sliders-h"></i>
  32.                             </button>
  33.                             <div id="collapseOne" class="collapse dont-collapse-sm px-2" aria-labelledby="headingOne" data-parent="#accordion">
  34.                                 <div class="filter">
  35.                                     {% if filters.priceMin >= 0 and filters.priceMax >= 0 %}
  36.                                         <a class="collapse-header" href="#priceFilter" data-collapse-content-id="priceFilter">
  37.                                             <span>{{ 'Price filter' | trans }}</span><i class="far fa-angle-down"></i>
  38.                                         </a>
  39.                                         <div class="collapse-content {% if isBlackFriday %} black-friday-price-filter {% endif %}" style="margin-bottom: 12px;" id="priceFilter">
  40.                                             <div id="range" class="mt-5 mx-3 align-items-center"></div>
  41.                                             <div class="row flex-nowrap">
  42.                                                 <div class="col-4">
  43.                                                     <input type="text" min="{{ filters.priceMin }}" max="{{ filters.priceMax }}"
  44.                                                            step="1"
  45.                                                            id="input-price-min"
  46.                                                            class="select-bg{{ filterPriceMin or filterPriceMax ? ' filtered' : '' }} {% if isBlackFriday %} black-friday-price-filter {% endif %}"
  47.                                                            aria-label="{{ 'Minimum price'|trans }}"
  48.                                                     >
  49.                                                 </div>
  50.                                                 <div class="col-1 filter-line text-center"> - </div>
  51.                                                 <div class="col-4">
  52.                                                     <input type="text" min="{{ filters.priceMin }}" max="{{ filters.priceMax }}"
  53.                                                            step="1"
  54.                                                            id="input-price-max"
  55.                                                            class="select-bg{{ filterPriceMin or filterPriceMax ? ' filtered' : '' }} {% if isBlackFriday %} black-friday-price-filter {% endif %}"
  56.                                                            aria-label="{{ 'Maximum price'|trans }}"
  57.                                                     >
  58.                                                 </div>
  59.                                                 <div class="col-3 filter-line-currency text-start">
  60.                                                     {{ currency }}
  61.                                                 </div>
  62.                                             </div>
  63.                                         </div>
  64.                                     {% endif %}
  65.                                     <div class="collapse collapse-content show" id="otherFilter">
  66.                                         {% if categoryId not in [659, 669, 674, 675] %}
  67.                                             <div class="filter-row checkbox-line">
  68.                                                 <label for="discounted">
  69.                                                     <input type="checkbox" value="1" name="discounted" id="discounted"{{ (( filterDiscounted ) ? ' checked' : '' ) }}>
  70.                                                     <span{% if showOnlyDiscounted is defined and showOnlyDiscounted == 1 %} onclick="return false;"{% endif %} class="checkmark"></span>
  71.                                                     <span class="option-title">{{ 'Show products on sale' | trans }}</span>
  72.                                                 </label>
  73.                                             </div>
  74.                                         {% endif %}
  75.                                         <div class="filter-row checkbox-line">
  76.                                             <label for="lastPiece">
  77.                                                 <input type="checkbox" value="1" name="lastPiece" id="lastPiece"{{ (( filterLastPieces ) ? ' checked' : '' ) }}>
  78.                                                 <span class="checkmark"></span>
  79.                                                 <span class="option-title">{{ 'Show last piece products' | trans }}</span>
  80.                                             </label>
  81.                                         </div>
  82.                                     </div>
  83.                                     {% for filterList in filters.list.main %}
  84.                                         {% if filterList.filters|length > 0 %}
  85.                                             {% if filterList.inputName == "vendor" and filters.notebookShow %}
  86.                                                 {{- inputMacros.filterGroupVendor(filterList) -}}
  87.                                             {% elseif filterList.collapseTitle in ["Screen size", "RAM size", "SSD"] %}
  88.                                                 {{- inputMacros.filterGroupSmallerBetweenBigger(filterList) -}}
  89.                                             {% else %}
  90.                                                 {{- inputMacros.filterGroup(filterList) -}}
  91.                                             {% endif %}
  92.                                         {% elseif filterList.inputName == 'CPU mark' %}
  93.                                             <a class="collapse-header {{ filterList.isCollapsed ? 'collapsed' : '' }}" href="#cpuMark" data-collapse-content-id="cpuMark">
  94.                                                 <span>{{ 'CPU mark' | trans }}</span><i class="far fa-angle-down"></i>
  95.                                             </a>
  96.                                             <div class="collapse-content" style="margin-bottom: 12px; {{ filterList.isCollapsed ? 'display: none;' : '' }}" id="cpuMark">
  97.                                                 <div id="power" class="mt-5 mx-5 mx-lg-3 align-items-center"></div>
  98.                                                 <input type="hidden" id="cpuMarkInputLower" value="{{ filters.cpuMarkMin }}">
  99.                                                 <input type="hidden" id="cpuMarkInputUpper" value="{{ filters.cpuMarkMax }}">
  100.                                             </div>
  101.                                             {% if filterList.extraInfo %}
  102.                                                 {{ (filterList.extraInfo.transKey|trans({ 'url': filterList.extraInfo.url }))|raw }}
  103.                                             {% endif %}
  104.                                         {% elseif filterList.extraInfo is defined and  filterList.extraInfo|length > 0 %}
  105.                                             {{- inputMacros.filterGroupWithoutOptionWithExtraInfo(filterList) -}}
  106.                                         {% endif %}
  107.                                     {% endfor %}
  108.                                     {% if filters.qualityStatuses is defined %}
  109.                                         {{- inputMacros.filterGroup(filters.qualityStatuses, filterQuality, 'qualityFilter', 'quality', 'Quality grading'|trans) -}}
  110.                                     {% endif %}
  111.                                     <div class="row filter-button-lines">
  112.                                         <div class="col-12">
  113.                                             <button id="button-reset" class="btn-reset-filter mt-4 mt-dm-0" {% if isBlackFriday %}style="color:orange;"{% endif %} data-current-url="{{ app.request.pathinfo }}">{{ 'Reset filters' | trans }}</button>
  114.                                         </div>
  115.                                     </div>
  116.                                 </div>
  117.                             </div>
  118.                         </div>
  119.                     {% endif %}
  120.                     {% if defaultLocale in ['sk'] and customerTypeId != 2 %}
  121.                         <div class="text-center pt-3 pb-4 hide-on-sm product-category-heureka-widget-holder">
  122.                             <div id="showHeurekaBadgeHere-12"></div>
  123.                             <script type="text/javascript">
  124.                                 //<![CDATA[
  125.                                 var _hwq = _hwq || [];
  126.                                 _hwq.push(['setKey', '{{ heurekaSak }}']);
  127.                                 _hwq.push(['showWidget', '12', '6655', 'Furbify.{{ defaultLocale }}', 'Furbify-{{ defaultLocale }}']);
  128.                                 (function () {
  129.                                     var ho = document.createElement('script');
  130.                                     ho.type = 'text/javascript';
  131.                                     ho.async = true;
  132.                                     ho.src = 'https://' + '{{ defaultLocale }}' + '.im9.cz/direct/i/gjs.php?n=wdgt&sak=' + '{{ heurekaSak }}';
  133.                                     var s = document.getElementsByTagName('script')[0];
  134.                                     s.parentNode.insertBefore(ho, s);
  135.                                 })();
  136.                                 //]]>
  137.                             </script>
  138.                         </div>
  139.                         {# HEUREKA REVIEW #}
  140.                         {#<div class="heureka-text-reviews hide-on-sm mb-3">
  141.                             {% set verifiedCustomerTrans = 'Verified customer' | trans %}
  142.                             {% for review in heureka_reviews if heureka_reviews|length > 0 %}
  143.                                 <div class="heureka-text-review p-3">
  144.                                     <p class="heureka-text-review-customer">{{ verifiedCustomerTrans }}</p>
  145.                                     <p class="heureka-text-review-text">{{ review.text }}</p>
  146.                                     <p class="heureka-text-review-date mb-2"><small>{{ review.date }}</small></p>
  147.                                     {% for i in 1..review.rating %}
  148.                                         <i class="fas fa-star"></i>
  149.                                     {% endfor %}
  150.                                 </div>
  151.                             {% endfor %}
  152.                         </div>#}
  153.                     {% endif %}
  154.                     {{ macros.getLeftSideHelpBox(webshop_phone_number, salesManager, isBlackFriday) }}
  155.                 </div>
  156.                 <div class="col-md-9 ps-lg-4 category-list">
  157.                     <h1 class="category-title">{{ title }}</h1>
  158.                     {% set collapseDesc = false %}
  159.                     {% if description|raw|striptags|length > 228 %}
  160.                         {% set collapseDesc = true %}
  161.                     {% endif %}
  162.                     <div class="cat-desc{% if collapseDesc == true %} collapse{% endif %}" {% if collapseDesc == true %}id="collapseSummary"{% endif %} >
  163.                         {{- description|raw -}}
  164.                     </div>
  165.                     {% if collapseDesc == true %}
  166.                         <a id="cat-desc-collapse" href="#collapseSummary" role="button" aria-expanded="false" aria-controls="collapseSummary" class="collapsed" data-bs-toggle="collapse" data-bs-target="#collapseSummary" data-txt-read-more="{{ 'Read more' | trans }}" data-txt-read-less="{{ 'Read less' | trans }}">{{ 'Read more' | trans }}...</a>
  167.                     {% endif %}
  168.                     {% if header_categories %}
  169.                         <div class="category-header-links mb-4 {% if isBlackFriday %} black-friday-links {% endif %}">
  170.                             {% for hc in header_categories %}
  171.                                 <div class="link-item">
  172.                                     <a href="{{ hc.href }}" class="{% if hc.active %}active{% endif %}">
  173.                                         {% if hc.icon is defined %}
  174.                                             <img decoding="async" src="{{ asset('theme/images/icon/' ~ hc.icon) }}" alt="{{ hc.title }}" width="40" height="38"{% if hc.withPadding is defined %} class="p0303"{% endif %}>
  175.                                         {% endif %}
  176.                                         <span>{{ hc.title }}</span>
  177.                                         <div class="arrow-right"></div>
  178.                                     </a>
  179.                                 </div>
  180.                             {% endfor %}
  181.                         </div>
  182.                     {% endif %}
  183.                     {% if header_productTypes is defined and header_productTypes %}
  184.                         <div class="category-header-links mb-4 {% if isBlackFriday %} black-friday-links {% endif %}">
  185.                             {% for key, hpt in header_productTypes %}
  186.                                 <div class="link-item">
  187.                                     <a id="sale-product-type-{{ key }}" href="{{ hpt.href }}" class="{% if hpt.active %}active{% endif %}" data-filter-product-type="{{ key }}" data-pill-label="{{ hpt.title }}">
  188.                                         {% if hpt.icon is defined %}
  189.                                             <img decoding="async" src="{{ asset(hpt.icon) }}" alt="{{ hpt.title }}" width="40" height="38"{% if hpt.withPadding is defined %} class="p0303"{% endif %}>
  190.                                         {% endif %}
  191.                                         <span>{{ hpt.title }}</span>
  192.                                         <div class="arrow-right"></div>
  193.                                     </a>
  194.                                 </div>
  195.                             {% endfor %}
  196.                         </div>
  197.                     {% endif %}
  198.                     {% if popularItems %}
  199.                         <div class="popular-products">
  200.                             <h3 class="mb-2">{{ 'Popular items' | trans }}:</h3>
  201.                             <div class="popular-list m-0">
  202.                                 {% for popularItem in popularItems %}
  203.                                     {% set popularItemClickGtagEvent = "pushSelectItemToGtagDataLayer('" ~ popularItem.id ~ "','" ~ popularItem.title ~ "','" ~ currency ~ "'," ~ popularItem.price ~ "," ~ popularItem.special ~ ",'category-page-popular-products')" %}
  204.                                     <div class="popular-item d-md-block w-100">
  205.                                         <div class="row flex-md-nowrap">
  206.                                             <div class="col-md-auto popular-item-pic">
  207.                                                 <a href="{{ popularItem.href }}" onclick="{{ popularItemClickGtagEvent }}">
  208.                                                     <img decoding="async" src="{{ popularItem.image }}" alt="{{ popularItem.vendor ~ ' ' ~ popularItem.title }}" width="100" height="76" />
  209.                                                 </a>
  210.                                                 <span class="discount-icon">
  211.                                                     <div>%</div>
  212.                                                 </span>
  213.                                             </div>
  214.                                             <div class="flex-fill ps-md-3">
  215.                                                 <a href="{{ popularItem.href }}" class="product-list-name" onclick="{{ popularItemClickGtagEvent }}">{{ popularItem.vendor ~ ' ' ~ popularItem.title }}</a>
  216.                                                 <p>
  217.                                                     {{- popularItem.description -}}
  218.                                                 </p>
  219.                                                 {%- if popularItem.quantity > 10 -%}
  220.                                                     <span class="text-success">{{ '10+ in stock' | trans }}</span>
  221.                                                 {%- elseif popularItem.quantity >= 5 -%}
  222.                                                     <span class="text-success">{{ '5-10 in stock' | trans }}</span>
  223.                                                 {%- elseif popularItem.quantity > 1 -%}
  224.                                                     <span class="text-success">{{ '2-4 in stock'|trans }}</span>
  225.                                                 {%- elseif popularItem.quantity == 1 -%}
  226.                                                     <span class="text-danger">{{ 'Only one left'|trans }}</span>
  227.                                                 {%- else -%}
  228.                                                     <span class="text-grey">{{ 'Out of stock'|trans }}</span>
  229.                                                 {%- endif -%}
  230.                                             </div>
  231.                                             <div class="col-md-2">
  232.                                                 <div class="price-box">
  233.                                                     {% if popularItem.special %}
  234.                                                         <span class="special-price">{{ popularItem.special | price(currency, precision) }}</span>
  235.                                                         <span class="old-price">{{ popularItem.price | price(currency, precision) }}</span>
  236.                                                     {% else %}
  237.                                                         {{ popularItem.price | price(currency, precision) }}
  238.                                                     {% endif %}
  239.                                                 </div>
  240.                                             </div>
  241.                                         </div>
  242.                                     </div>
  243.                                 {% endfor %}
  244.                             </div>
  245.                             {% if app.environment == 'prod' %}
  246.                                 <script>
  247.                                     window.dataLayer.push({ ecommerce: null });
  248.                                     window.dataLayer.push({
  249.                                         event: "view_item_list",
  250.                                         ecommerce: {
  251.                                             item_list_id: "category-page-popular-products",
  252.                                             item_list_name: "category-page-popular-products",
  253.                                             items: [
  254.                                             {% for popularItem in popularItems %}{% if loop.index > 1 %},{% endif %}{
  255.                                                     item_id: "{{ popularItem.id }}",
  256.                                                     item_name: "{{ popularItem.title }}",
  257.                                                     discount: {{ popularItem.special }},
  258.                                                     index: {{ loop.index }},
  259.                                                     item_brand: "{{ popularItem.vendor }}",
  260.                                                     price: {{ popularItem.price }},
  261.                                                     quantity: 1
  262.                                                 }
  263.                                             {% endfor %}
  264.                                             ]
  265.                                         }
  266.                                     });
  267.                                 </script>
  268.                             {% endif %}
  269.                         </div>
  270.                     {% endif %}
  271.                     <div id="filter-mobile"{% if isBlackFriday %} class="black-friday-filter"{% endif %}></div>
  272.                     <div class="sort-and-limit-settings mt-1 p-2 rounded-2 {% if isBlackFriday %} black-friday-sort-limit {% endif %}">
  273.                         <div class="row">
  274.                             <div class="col-8 col-sm-4 sort-select">
  275.                                 <select name="sort" onChange="setFilterOptions()" class="select-bg" aria-label="{{ 'Sort by'|trans }}" data-default-sort="{{ defaultSort }}" data-default-order="{{ defaultOrder }}">
  276.                                     {% for sortOrderItem in sortOrders %}
  277.                                         {% if sortOrderItem.value == '%s-%s'|format(sort, order) %}
  278.                                             <option data-sort="{{ sortOrderItem.sort }}" data-order="{{ sortOrderItem.order }}" value="{{ sortOrderItem.value }}" selected>{{ sortOrderItem.text }}</option>
  279.                                         {% else %}
  280.                                             <option data-sort="{{ sortOrderItem.sort }}" data-order="{{ sortOrderItem.order }}" value="{{ sortOrderItem.value }}">{{ sortOrderItem.text }}</option>
  281.                                         {% endif %}
  282.                                     {% endfor %}
  283.                                 </select>
  284.                             </div>
  285.                             <div class="col-4 col-sm-2 ps-0">
  286.                                 <select name="limit" onchange="setFilterOptions()" class="select-bg" aria-label="{{ 'Limit'|trans }}" data-default="{{ defaultLimit }}">
  287.                                     {% for limitItem in limits %}
  288.                                         {% if limitItem == limit %}
  289.                                             <option value="{{ limitItem }}" selected>{{ limitItem }}</option>
  290.                                         {% else %}
  291.                                             <option value="{{ limitItem }}">{{ limitItem }}</option>
  292.                                         {% endif %}
  293.                                     {% endfor %}
  294.                                 </select>
  295.                             </div>
  296.                             <div class="d-none col-12 col-sm-6 d-md-flex align-items-center justify-content-end" id="pagination-info">
  297.                                 <small><span id="limit">{{ pagination.total < limit ? pagination.total : limit }}</span> / <span id="total">{{  pagination.total }}</span> {{ 'Pagination info product text' | trans | lower }}</small>
  298.                             </div>
  299.                         </div>
  300.                     </div>
  301.                     <div class="filter-pills hidden">
  302.                         <div class="list w-100 {% if isBlackFriday %} black-friday-list {% endif %}"></div>
  303.                     </div>
  304.                     <div class="product-list {% if isBlackFriday %} black-friday-product-list {% endif %}">
  305.                         <div class="row preload ">
  306.                             {% for i in 1..limit %}
  307.                                 <div class="col-6 col-lg-4 d-inline-block px-2 px-sm-3 py-3 py-sm-3">
  308.                                     <div class="preload-item">
  309.                                         <div class="image"></div>
  310.                                         <div class="title1"></div>
  311.                                         <div class="title2"></div>
  312.                                         <div class="description"></div>
  313.                                         <div class="prices"></div>
  314.                                         <div class="button"></div>
  315.                                     </div>
  316.                                 </div>
  317.                             {% endfor %}
  318.                         </div>
  319.                     </div>
  320.                 </div>
  321.             </div>
  322.             {%- if extraSeoDesc -%}
  323.                 {%- set seoDescArray = extraSeoDesc|split("</p>", 2) -%}
  324.                 <div class="category-description">
  325.                     <div>{{- seoDescArray[0]|replace({'&nbsp;': ' '})|raw -}}</div>
  326.                     <div class="collapse" id="category-extra-description">
  327.                         <div>
  328.                             {{- seoDescArray[1]|replace({'&nbsp;': ' '})|raw -}}
  329.                         </div>
  330.                     </div>
  331.                     <a
  332.                         id="category-extra-description-toggle"
  333.                         href="#category-extra-description"
  334.                         role="button"
  335.                         aria-expanded="false"
  336.                         aria-controls="category-extra-description"
  337.                         data-bs-toggle="collapse"
  338.                         data-bs-target="#category-extra-description"
  339.                         data-txt-read-more="{{ 'Read more'|trans }}"
  340.                         data-txt-read-less="{{ 'Read less'|trans }}"
  341.                     >
  342.                         {{- 'Read more'|trans -}}
  343.                     </a>
  344.                 </div>
  345.             {% endif %}
  346.             {# if defaultLocale == 'sk' and customerTypeId != 2 %}
  347.                 <div class="text-center pt-3 pb-4 product-category-heureka-widget-holder d-sm-block d-md-none">
  348.                     <div id="showHeurekaBadgeHere-3"></div><script type="text/javascript">
  349.                         //<![CDATA[
  350.                         var _hwq = _hwq || [];
  351.                         _hwq.push(['setKey', '9DCFF7A54D9B32A964D650EC01AA5378']);_hwq.push(['showWidget', '3', '6655', 'Furbify.sk', 'furbify-sk']);(function() {
  352.                             var ho = document.createElement('script'); ho.type = 'text/javascript'; ho.async = true;
  353.                             ho.src = 'https://www.heureka.sk/direct/i/gjs.php?n=wdgt&sak=9DCFF7A54D9B32A964D650EC01AA5378';
  354.                             var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ho, s);
  355.                         })();
  356.                         //]]>
  357.                     </script>
  358.                 </div>
  359.             {% endif #}
  360.             {{ include(template_from_string(contentBottom)) }}
  361.         </div>
  362.     </div>
  363. {% endblock %}
  364. {% block title %}{{ seoTitle }} | {{ parent() }}{% endblock %}
  365. {% block bodyClass %}{% if isBazaar %}is-bazaar{% endif %}{% endblock %}
  366. {% block meta %}
  367.     {% set domainTLD = app.request.session.get('defaultLocale') %}
  368.     {% if domainTLD == 'en' %}
  369.         {% set domainTLD = 'eu' %}
  370.     {% endif %}
  371.     <meta name="description" content="{{ seoDescription }}" />
  372.     <meta property="og:url" content="{{ app.request.uri }}{{ app.request.attributes.get('_route_params') }}" />
  373.     <meta property="og:type" content="website" />
  374.     <meta property="og:locale" content="{{ app.request.locale |ogLocale }}" />
  375.     <meta property="og:title" content="{{ seoTitle }}" />
  376.     <meta property="og:description" content="{{ seoDescription }}" />
  377.     {% if socialShareImage is defined and socialShareImage is not null %}
  378.         <meta property="og:image" content="{{ socialShareImage }}" />
  379.     {% else %}
  380.         <meta property="og:image" content="https://www.furbify.{{ domainTLD }}/theme/images/furbify-share-image.png" />
  381.     {% endif %}
  382. {% endblock %}
  383. {% block header %}
  384.     {{ include(template_from_string(header)) }}
  385. {% endblock %}
  386. {% block footer %}
  387.     {{ include(template_from_string(footer)) }}
  388. {% endblock %}
  389. {% block categoryListLinks %}
  390.     {% if categoryListLinks is defined and categoryListLinks | length > 0 %}
  391.         {% for direction,categoryListLink in categoryListLinks %}
  392.             <link rel="{{ direction }}" href="{{ categoryListLink }}">
  393.         {% endfor %}
  394.     {% endif %}
  395. {% endblock %}
  396. {% block stylesheets %}
  397.     <link rel="stylesheet" href="{{ asset('theme/noUiSlider/nouislider.min.css') }}">
  398.     <link rel="stylesheet" href="{{ asset('theme/owl-carousel/assets/owl.carousel.min.css'|appendAssetCache) }}">
  399.     {{ parent() }}
  400. {% endblock %}
  401. {% block canonical %}
  402.     {% if canonical_link != '' %}<link rel="canonical" href="{{ canonical_link }}" />{% endif %}
  403. {% endblock %}
  404. {% block schema %}
  405. {{ parent() }}
  406. {% set _baseUrl = app.request.schemeAndHttpHost %}
  407. {% set _pageUrl = canonical_link != '' ? canonical_link : (app.request.schemeAndHttpHost ~ app.request.pathInfo) %}
  408. <script type="application/ld+json">
  409. {
  410.     "@context": "https://schema.org",
  411.     "@type": "CollectionPage",
  412.     "@id": "{{ _pageUrl }}#collectionpage",
  413.     "name": "{{ seoTitle|e('js') }}",
  414.     "description": "{{ seoDescription|e('js') }}",
  415.     "url": "{{ _pageUrl }}",
  416.     "isPartOf": {"@id": "{{ _baseUrl }}/#website"},
  417.     "mainEntity": {"@type": "ItemList", "@id": "{{ _pageUrl }}#itemlist"}
  418. }
  419. </script>
  420. <script type="application/ld+json">
  421. {
  422.     "@context": "https://schema.org",
  423.     "@type": "ItemList",
  424.     "@id": "{{ _pageUrl }}#itemlist",
  425.     "name": "{{ title|e('js') }}",
  426.     "description": "{{ seoDescription|e('js') }}",
  427.     "itemListOrder": "https://schema.org/ItemListOrderDescending"
  428. }
  429. </script>
  430. <script type="application/ld+json">
  431. {
  432.     "@context": "https://schema.org",
  433.     "@type": "BreadcrumbList",
  434.     "itemListElement": [
  435.         {% for breadcrumb in breadcrumbs %}
  436.         {
  437.             "@type": "ListItem",
  438.             "position": {{ loop.index }},
  439.             "name": "{{ breadcrumb.text|e('js') }}",
  440.             "item": "{{ breadcrumb.href }}"
  441.         }{% if not loop.last %},{% endif %}
  442.         {% endfor %}
  443.     ]
  444. }
  445. </script>
  446. {% endblock %}
  447. {% block robots %}
  448.     {% if parent() == '' and indexable is defined and indexable == false %}<meta name="robots" content="noindex">{% else %}{{ parent() }}{% endif %}
  449. {% endblock %}
  450. {% block javascripts %}
  451.     {{ parent() }}
  452.     <script src="{{ asset('theme/noUiSlider/wNumb.min.js') }}"></script>
  453.     <script src="{{ asset('theme/noUiSlider/nouislider.min.js') }}"></script>
  454.     <script type="text/javascript" src="{{ asset('theme/owl-carousel/owl.carousel.min.js'|appendAssetCache) }}"></script>
  455.     {% if showAdminLoginPanel %}
  456.         <script src="{{ asset('theme/js/admin-login-panel.js') }}"></script>
  457.     {% endif %}
  458.     <script type="text/javascript">
  459.         var filterObject = JSON.parse('{{ filterData | json_encode() }}'.replace(/&quot;/g,'"'));
  460.         options = {
  461.             translated: {
  462.                 'View': "{{ 'View'| trans }}",
  463.                 'Details': "{{ 'Details'| trans }}",
  464.                 'discount': "{{ 'discount'| trans }}",
  465.                 '10+ in stock': "{{ '10+ in stock'| trans }}",
  466.                 '5-10 in stock': "{{ '5-10 in stock'| trans }}",
  467.                 '2-4 in stock': "{{ '2-4 in stock'| trans }}",
  468.                 'Only one left': "{{ 'Only one left'| trans }}",
  469.                 'On order within %d working days': "{{ 'On order within %d working days'| trans }}",
  470.                 'Out of stock': "{{ 'Out of stock'| trans }}",
  471.                 'without VAT': "{{ 'without VAT'| trans }}",
  472.                 'Y year warranty': "{{ 'Y year warranty'| trans }}",
  473.                 'Fast delivery': "{{ 'Fast delivery'| trans }}",
  474.                 'Please login or signup for wholesale prices.': "{{ 'Please login or signup for wholesale prices.'| trans }}",
  475.                 'Wizard banner title': "{{ 'Wizard banner title'|trans }}",
  476.                 'Wizard banner subtitle': "{{ 'Wizard banner subtitle'|trans }}",
  477.                 'Wizard banner button': "{{ 'Wizard banner button'|trans }}",
  478.                 'Furbify zsakbamacska title': "{{ 'Furbify zsakbamacska title'|trans }}",
  479.                 'Zsakbamacska attributes': "{{ 'Zsakbamacska attributes'|trans }}",
  480.                 '1 in stock': "{{ '1 in stock'|trans }}",
  481.                 'productsNotFound': "{{ 'Currently we have no products which suit your selection, please try to select another product category.'|trans }}",
  482.                 'Next {limit}': "{{ 'Next {limit}'|trans }}",
  483.                 'Showed {from} - {to} of {total}': "{{ 'Showed {from} - {to} of {total}'|trans|raw }}",
  484.                 'review': "{{ 'product list review text'|trans }}",
  485.                 'Net price': "{{ 'Net price'|trans }}",
  486.                 'Price with VAT': "{{ 'Price with VAT'|trans }}",
  487.                 'coupon list text': "{{ 'Coupon list text'|trans|raw }}",
  488.                 'Bestseller': "{{ 'Bestseller'|trans }}",
  489.                 labels: {
  490.                     new: "{{ 'New'| trans }}",
  491.                     win7: "{{ 'win7'| trans }}",
  492.                     win81: "{{ 'win81'| trans }}",
  493.                     win10: "{{ 'win10'| trans }}",
  494.                     gamer: "{{ 'gamer'| trans }}",
  495.                     work: "{{ 'work'| trans }}",
  496.                     travel: "{{ 'travel'| trans }}",
  497.                     senior: "{{ 'senior'| trans }}",
  498.                     internet: "{{ 'internet'| trans }}",
  499.                     '24h': "{{ '24h'| trans }}",
  500.                     '7d': "{{ '7d'| trans }}",
  501.                     gold: "{{ 'gold'| trans }}",
  502.                     a: "{{ 'A'| trans }}",
  503.                     'b+': "{{ 'B+'| trans }}",
  504.                     platinum: "{{ 'platinum'| trans }}",
  505.                     discount: "{{ 'discount'| trans }}",
  506.                     bazaar: "{{ 'Bazaar'| trans }}",
  507.                     c: "{{ 'C'| trans }}",
  508.                     silver: "{{ 'silver'|trans }}",
  509.                     bronze: "{{ 'bronze'|trans }}"
  510.                 }
  511.             },
  512.             customerTypeId: '{{ customerTypeId }}',
  513.             windowsBadgeUrl: "{{ asset('theme/images/windows-badge.svg') }}",
  514.             wizardImage: "{{ asset('theme/images/icon/wizard_mascot.png') }}",
  515.             furbicatFace: "{{ asset('theme/images/furbicat-face-2.jpg') }}",
  516.             bestsellerBadge: "{{ asset('theme/images/icon/bestseller.png') }}", 
  517.             domainId: '{{ domainId }}',
  518.             basePrice: "{{ app.request.session.get('basePrice') }}",
  519.             locale: '{{ app.request.locale }}', 
  520.             defaultlocale: "{{ app.request.session.get('defaultLocale') }}", 
  521.             currency: '{{ currency }}',
  522.             precision: '{{ precision }}',
  523.             page: '{{ pagination.page }}',
  524.             showOnlyDiscounted: '{{ showOnlyDiscounted }}',
  525.             regenerateCache: "{{ regenerateCache is defined and showAdminLoginPanel ? regenerateCache|raw : '' }}",
  526.             showAdminLoginPanel: '{{ showAdminLoginPanel }}' == '1',
  527.             isWholesale: "{{ app.request.attributes.get('request').query.get('wholesale') }}" == '1',
  528.             isAdminLogin: "{{ app.request.session.get('isAdminLogin') }}",
  529.             urls: {
  530.                 customerRegistration: '{{ path("customer_registration") }}',
  531.                 customerLogin: '{{ path("customer_login") }}',
  532.                 wizardHome: '{{ path("wizard_home") }}',
  533.                 zsakbamacska: '{{ path("product_zsakbamacska_hu") }}',
  534.                 productListAjax: '{{ path("product_list_ajax") }}'
  535.             },
  536.             seoTitle: "{{ seoTitle }}",
  537.             categoryId: '{{ categoryId }}', 
  538.             environment: "{{ app.environment }}",
  539.             productItemColClass: "col-lg-4",
  540.             categoryPageId: '{{ categoryId }}',
  541.             cpuMarkTexts: {
  542.                 1: "{{ 'CPUMarkLevels.1'|trans }}",
  543.                 2: "{{ 'CPUMarkLevels.2'|trans }}",
  544.                 3: "{{ 'CPUMarkLevels.3'|trans }}",
  545.                 4: "{{ 'CPUMarkLevels.4'|trans }}",
  546.                 5: "{{ 'CPUMarkLevels.5'|trans }}",
  547.             },
  548.             easter: {
  549.                 bannerImg: "{{ asset('theme/images/furbify_egg.png') }}",
  550.                 couponSvg: "{{ asset('theme/images/icon/furbify_easter.svg') }}",
  551.             {% if "now"|date("Y-m-d") <= "2025-04-22"|date("Y-m-d") %}
  552.                 couponName: "{{ 'eastern.20.coupon_name'|trans }}",
  553.                 couponText1: "{{ 'eastern.20.text1'|trans }}",
  554.                 couponText2: "{{ 'eastern.20.text2'|trans }}",
  555.                 endDate: "2025-04-22T23:59:59"
  556.             {% else %}
  557.                 couponName: "{{ 'eastern.10.coupon_name'|trans }}",
  558.                 couponText1: "{{ 'eastern.10.text1'|trans }}",
  559.                 couponText2: "{{ 'eastern.10.text2'|trans }}",
  560.                 endDate: "2025-04-22T23:59:59"
  561.             {% endif %}
  562.             },
  563.             halloween: {
  564.                 bannerImg: "{{ asset('theme/images/szellem_2.png') }}",
  565.                 couponSvg: "{{ asset('theme/images/szellem_2.png') }}",
  566.                 couponName: "{{ 'hallowen.20.coupon_name'|trans }}",
  567.                 couponText1: "{{ 'hallowen.20.text1'|trans }}",
  568.                 couponText2: "{{ 'hallowen.20.text2'|trans }}",
  569.                 endDate: "2025-11-02T23:59:59"
  570.             },
  571.             noWebcamBadgeImg: "{{ asset('theme/images/icon/no_webcam.png') }}",
  572.             productBadgeRow: {
  573.                 os : {
  574.                     include: "{{ 'productListBadgeRow.os.include'|trans }}"
  575.                 },
  576.                 warranty: {
  577.                     month: "{{ 'productListBadgeRow.warranty.month'|trans }}",
  578.                     months: "{{ 'productListBadgeRow.warranty.months'|trans }}",
  579.                     year: "{{ 'productListBadgeRow.warranty.year'|trans }}",
  580.                     years: "{{ 'productListBadgeRow.warranty.years'|trans }}",
  581.                     label: "{{ 'productListBadgeRow.warranty.label'|trans }}"
  582.                 }
  583.             }
  584.         };
  585.     </script>
  586.     <script src="{{ asset('theme/js/printProducts.min.js')|appendAssetCache }}"></script>
  587.     <script>
  588.         setFilterOptions(true, false, false);
  589.     </script>
  590.     <script type="text/javascript">
  591.         {% if partnerLoginRedirect %}
  592.             window.location.href = '{{ partnerLoginRedirectRoute }}';
  593.         {% endif %}
  594.         {% if filters.priceMin >= 0 and filters.priceMax >= 0 and filters.priceMin != filters.priceMax %}
  595.             {% if filterPriceMin and filterPriceMax %}
  596.             let start = [ {{ filterPriceMin }}, {{ filterPriceMax }} ];
  597.             {% elseif filterPriceMin and not filterPriceMax %}
  598.             let start = [ {{ filterPriceMin }}, {{ filters.priceMax }} ];
  599.             {% elseif not filterPriceMin and filterPriceMax %}
  600.             let start = [ {{ filters.priceMin }}, {{ filterPriceMax }} ];
  601.             {% else %}
  602.             let start = [ {{ filters.priceMin }}, {{ filters.priceMax }} ];
  603.             {% endif %}
  604.             createPriceFilter(start, {{ filters.priceMin }}, {{ filters.priceMax }});
  605.         {% endif %}
  606.         
  607.         if ($('#cpuMark').length > 0) {
  608.             {% if filters.cpuMarkMin is not null and filters.cpuMarkMax is not null %}
  609.                 createCpuMarkFilter([{{ filters.cpuMarkMin }}, {{ filters.cpuMarkMax }}]);
  610.             {% else %}
  611.                 createCpuMarkFilter();
  612.             {% endif %}
  613.         }
  614.         {% if showAdminLoginPanel %}
  615.             var additionalDataForAdminLoginPanel = {
  616.                 idForPage: "{{ categoryId }}",
  617.                 module: "category",
  618.                 {% if app.environment == 'prod' %}
  619.                     domain: "https://www.atechcomp.eu/centralis/web",
  620.                     smallerPadding: true
  621.                 {% else %}
  622.                     domain: "http://centralis"
  623.                 {% endif %}
  624.             };
  625.             startAdminLoginPanel(additionalDataForAdminLoginPanel);
  626.         {% endif %}
  627.     </script>
  628. {% endblock %}