templates/AtechNetCoreBundle/Product/product.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' and app.request.locale == 'sk' %}
  6.         <!-- Start VWO Async SmartCode -->
  7.         <link rel="preconnect" href="https://dev.visualwebsiteoptimizer.com"/>
  8.         <script type='text/javascript' id='vwoCode'>
  9.             window._vwo_code || (function () {
  10.                 var account_id = 839743,
  11.                     version = 2.0,
  12.                     settings_tolerance = 2000,
  13.                     hide_element = 'body',
  14.                     hide_element_style = 'opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important',
  15.                     /* DO NOT EDIT BELOW THIS LINE */
  16.                     f = false, w = window, d = document, v = d.querySelector('#vwoCode'),
  17.                     cK = '_vwo_' + account_id + '_settings', cc = {};
  18.                 try {
  19.                     var c = JSON.parse(localStorage.getItem('_vwo_' + account_id + '_config'));
  20.                     cc = c && typeof c === 'object' ? c : {}
  21.                 } catch (e) {
  22.                 }
  23.                 var stT = cc.stT === 'session' ? w.sessionStorage : w.localStorage;
  24.                 code = {
  25.                     use_existing_jquery: function () {
  26.                         return typeof use_existing_jquery !== 'undefined' ? use_existing_jquery : undefined
  27.                     }, library_tolerance: function () {
  28.                         return typeof library_tolerance !== 'undefined' ? library_tolerance : undefined
  29.                     }, settings_tolerance: function () {
  30.                         return cc.sT || settings_tolerance
  31.                     }, hide_element_style: function () {
  32.                         return '{' + (cc.hES || hide_element_style) + '}'
  33.                     }, hide_element: function () {
  34.                         return typeof cc.hE === 'string' ? cc.hE : hide_element
  35.                     }, getVersion: function () {
  36.                         return version
  37.                     }, finish: function () {
  38.                         if (!f) {
  39.                             f = true;
  40.                             var e = d.getElementById('_vis_opt_path_hides');
  41.                             if (e) e.parentNode.removeChild(e)
  42.                         }
  43.                     }, finished: function () {
  44.                         return f
  45.                     }, load: function (e) {
  46.                         var t = this.getSettings(), n = d.createElement('script'), i = this;
  47.                         if (t) {
  48.                             n.textContent = t;
  49.                             d.getElementsByTagName('head')[0].appendChild(n);
  50.                             if (!w.VWO || VWO.caE) {
  51.                                 stT.removeItem(cK);
  52.                                 i.load(e)
  53.                             }
  54.                         } else {
  55.                             n.fetchPriority = 'high';
  56.                             n.src = e;
  57.                             n.type = 'text/javascript';
  58.                             n.onerror = function () {
  59.                                 _vwo_code.finish()
  60.                             };
  61.                             d.getElementsByTagName('head')[0].appendChild(n)
  62.                         }
  63.                     }, getSettings: function () {
  64.                         try {
  65.                             var e = stT.getItem(cK);
  66.                             if (!e) {
  67.                                 return
  68.                             }
  69.                             e = JSON.parse(e);
  70.                             if (Date.now() > e.e) {
  71.                                 stT.removeItem(cK);
  72.                                 return
  73.                             }
  74.                             return e.s
  75.                         } catch (e) {
  76.                             return
  77.                         }
  78.                     }, init: function () {
  79.                         if (d.URL.indexOf('__vwo_disable__') > -1) return;
  80.                         var e = this.settings_tolerance();
  81.                         w._vwo_settings_timer = setTimeout(function () {
  82.                             _vwo_code.finish();
  83.                             stT.removeItem(cK)
  84.                         }, e);
  85.                         var t = d.currentScript, n = d.createElement('style'), i = this.hide_element(),
  86.                             r = t && !t.async && i ? i + this.hide_element_style() : '',
  87.                             c = d.getElementsByTagName('head')[0];
  88.                         n.setAttribute('id', '_vis_opt_path_hides');
  89.                         v && n.setAttribute('nonce', v.nonce);
  90.                         n.setAttribute('type', 'text/css');
  91.                         if (n.styleSheet) n.styleSheet.cssText = r; else n.appendChild(d.createTextNode(r));
  92.                         c.appendChild(n);
  93.                         this.load('https://dev.visualwebsiteoptimizer.com/j.php?a=' + account_id + '&u=' + encodeURIComponent(d.URL) + '&vn=' + version)
  94.                     }
  95.                 };
  96.                 w._vwo_code = code;
  97.                 code.init();
  98.             })();
  99.         </script>
  100.         <!-- End VWO Async SmartCode -->
  101.     {% endif %}
  102. {% endblock %}
  103. {% block dataLayer %}
  104.     {% if app.environment == 'prod' %}
  105.         <script>
  106.             window.dataLayer = window.dataLayer || [];
  107.             dataLayer.push({ecommerce: null});
  108.             dataLayer.push({
  109.                 event: 'view_item',
  110.                 ecommerce: {
  111.                     currency: '{{ currency_ISO }}',
  112.                     value: '{{ ( special ? special : price ) }}',
  113.                     items: [{
  114.                         item_id: '{{ model }}',
  115.                         item_name: '{{ title|replace({ '/' : '-' }) }}',
  116.                         discount: '{{ ( special ? ( price - special ) : 0 ) }}',
  117.                         index: 0,
  118.                         item_brand: '{{ brand }}',
  119.                         item_category: '{{ type }}',
  120.                         price: '{{ price }}',
  121.                         quantity: 1
  122.                     }]
  123.                 }
  124.             });
  125.         </script>
  126.     {% endif %}
  127. {% endblock %}
  128. {% block content %}
  129.     {% set customerTypeId = app.session.get('customerTypeId') %}
  130.     {% set basePrice = app.session.get('basePrice') %}
  131.     {% set domainId = app.session.get('domainId') %}
  132.     {% set withVatTxt = 'with VAT' | trans %}
  133.     {% set isBazarProduct = qualityStatusId == const('Product::QualityStatus_Bazaar') %}
  134.     {% set warrantyYear = isBazarProduct ? 1 : warrantyYear %}
  135.     {% set defaultLocale = app.request.session.get('defaultLocale') %}
  136. <div class="main-content">
  137.     <div class="container mobile-full">
  138.         <div class="product-page">
  139.             <ul class="breadcrumb">
  140.                 <li class="arrow">
  141.                     {% set previousLink = breadcrumbs|length - 2 %}
  142.                     <a href="{{ breadcrumbs[previousLink].href }}"><i class="fas fa-arrow-left"></i></a>
  143.                 </li>
  144.                 {% for breadcrumb in breadcrumbs %}
  145.                     <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
  146.                 {% endfor %}
  147.             </ul>
  148.             <div class="product-images">
  149.                 {% for message in app.flashes('successReview') %}
  150.                     <div class="alert alert-success" role="alert">{{ message }}</div>
  151.                 {% endfor %}
  152.                 {% set currentDate = "now"|date('YmdHi') %}
  153.                 <div class="product-page-pic{% if not orderable %} not-orderable{% endif %}">
  154.                         <div id="productThumbs" class="product-thumbs slider-pro mt-2 mt-md-0 mb-md-3">
  155.                             <div class="sp-slides">
  156.                                 {% for image in images %}
  157.                                     <div class="sp-slide text-center" data-popup="{{ image.popup }}">
  158.                                         <img loading="lazy" decoding="async" src="{{ image.thumb }}"
  159.                                              alt="{{ h1_title }} #{{ loop.index }}" width="540" height="405"/>
  160.                                     </div>
  161.                                 {% endfor %}
  162.                             </div>
  163.                             <div class="sp-thumbnails{% if images|length > 4 %} more-than-4-img{% endif %}"
  164.                                  style="margin-top: 398px">
  165.                                 {% if images|length > 4 %}
  166.                                     {% for index in 0..3 %}
  167.                                         {% set image = images[index] %}
  168.                                         <img loading="lazy" decoding="async" class="sp-thumbnail"
  169.                                              src="{{ image.additional }}" alt="{{ h1_title }} thumb #{{ index }}"/>
  170.                                     {% endfor %}
  171.                                     {% set moreImagesCount = images|length - 4 %}
  172.                                     <span id="more-images-count" style="display: none;">+{{ moreImagesCount }}</span>
  173.                                 {% else %}
  174.                                     {% for image in images %}
  175.                                         <img decoding="async" class="sp-thumbnail" src="{{ image.additional }}"
  176.                                              alt="{{ h1_title }} thumb #{{ loop.index }}"/>
  177.                                     {% endfor %}
  178.                                 {% endif %}
  179.                             </div>
  180.                         </div>
  181.                     {% if labels %}
  182.                         {% set localQuality = quality|lower %}
  183.                         {% set qualityLevel = 0 %}
  184.                         {% if localQuality == 'bronze' %}
  185.                             {% set localQuality = 'C' %}
  186.                             {% set qualityLevel = 1 %}
  187.                         {% elseif localQuality == 'silver' %}
  188.                             {% set localQuality = 'B' %}
  189.                             {% set qualityLevel = 2 %}
  190.                         {% elseif localQuality == 'gold' %}
  191.                             {% set localQuality = 'A' %}
  192.                             {% set qualityLevel = 3 %}
  193.                         {% endif %}
  194.                         <div class="product-list-label">
  195.                             {% if qualityLevel != 0 %}
  196.                                 <div class="badge-item quality">
  197.                                     <div class="quality-text">
  198.                                         <span class="quality-name">{{ ('grades.'~localQuality)|trans }}</span>
  199.                                         <span class="quality-info-text">{{ 'condition'|trans }}</span>
  200.                                         <span class="quality-meter">
  201.                                             {% for i in 1..3 %}
  202.                                                 <span class="quality-element {{ qualityLevel >= i ? 'active' : '' }}"></span>
  203.                                             {% endfor %}
  204.                                         </span>
  205.                                     </div>
  206.                                 </div>
  207.                             {% else %}
  208.                                 <div class="badge-item quality">
  209.                                     <div class="quality-text">
  210.                                         <span class="quality-name">{{ ('grades.'~localQuality)|trans }}</span>
  211.                                         <span class="quality-info-text">{{ 'condition'|trans }}</span>
  212.                                     </div>
  213.                                 </div>
  214.                             {% endif %}
  215.                             {%- if (
  216.                                 customerTypeId == 1 and
  217.                                 labelOs and
  218.                                 typeId in [
  219.                                 const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  220.                                 const('ProductType::PRODUCT_TYPE_ID_PC'),
  221.                                 const('ProductType::PRODUCT_TYPE_ID_PC_SET'),
  222.                                 const('ProductType::PRODUCT_TYPE_ID_ALL_IN_ONE'),
  223.                                 const('ProductType::PRODUCT_TYPE_ID_SMARTPHONE'),
  224.                                 const('ProductType::PRODUCT_TYPE_ID_TABLET')
  225.                                 ] and
  226.                                 'windows' in labelOs.title|lower
  227.                             ) -%}
  228.                                 <div class="badge-item operation-system">
  229.                                     <svg class="os-icon" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
  230.                                         <path fill="#ffffff" d="M0 2.4L6.5 1.5V7.5H0V2.4Z"/>
  231.                                         <path fill="#ffffff" d="M7.3 1.4L16 0V7.5H7.3V1.4Z"/>
  232.                                         <path fill="#ffffff" d="M0 8.5H6.5V14.5L0 13.6V8.5Z"/>
  233.                                         <path fill="#ffffff" d="M7.3 8.5H16V16L7.3 14.6V8.5Z"/>
  234.                                     </svg>
  235.                                     <span class="os-text">
  236.                                         {% set localLabel = 11 in labelOs.title ? 'Windows 11' : 'Windows 10' %}
  237.                                         <span class="os-name">{{ localLabel }}</span>
  238.                                         <span class="os-included">{{ 'productListBadgeRow.os.include'|trans }}</span>
  239.                                     </span>
  240.                                 </div>
  241.                             {% endif %}
  242.                             {% if warrantyYear < 1 %}
  243.                                 {% set warrantyMonths = (warrantyYear * 12)|round %}
  244.                                 {% set warrantyText = warrantyMonths ~ ' ' ~ (warrantyMonths > 1 ? 'productListBadgeRow.warranty.months'|trans : 'productListBadgeRow.warranty.month'|trans) %}
  245.                             {% else %}
  246.                                 {% set warrantyText = warrantyYear ~ ' ' ~ (warrantyYear > 1 ? 'productListBadgeRow.warranty.years'|trans : 'productListBadgeRow.warranty.year'|trans) %}
  247.                             {% endif %}
  248.                             <div class="badge-item warranty">
  249.                                 <span class="warranty-text">
  250.                                     <span class="warranty-years">{{ warrantyText }}</span>
  251.                                     <span class="warranty-label">{{ 'productListBadgeRow.warranty.label'|trans }}</span>
  252.                                 </span>
  253.                             </div>
  254.                         </div>
  255.                     {% endif %}
  256.                     <div class="product-list-icons justify-content-start gap-2">
  257.                         {% if special %}
  258.                             <span class="discount-icon"><div>%</div></span>
  259.                         {% endif %}
  260.                         {% if isBestseller %}
  261.                             <img loading="lazy" decoding="async" src="{{ asset('theme/images/icon/bestseller.png') }}" alt="{{ 'Bestseller'|trans }}" width="35" height="35" />
  262.                         {% endif %}
  263.                     </div>
  264.                 </div>
  265.                 <small class="illustration">{{ 'Product images are illustrations' | trans }}</small>
  266.             </div>
  267.             <div class="product-details mt-3 mt-md-0">
  268.                 <h1 data-bs-toggle="popover" data-bs-original-title="{{ 'Product title popover title'|trans }}:"
  269.                     data-bs-content="{{ 'Product title popover body'|trans }}" data-bs-placement="bottom">
  270.                     {{- h1_title|raw -}}
  271.                 </h1>
  272.                 <div class="details-top" {% if typeId in [52, 60, 116, 68, 41, 90] %} style="margin-bottom: 0 !important;" {% endif %}>
  273.                     <div class="d-flex align-items-center justify-content-start flex-row flex-wrap my-2">
  274.                         <div class="number-availability">
  275.                             <div class="header-top-small-info d-sm-block d-md-inline-block">
  276.                                 {% if orderable and active == 1 %}
  277.                                     {% if available > 10 %}
  278.                                         <span class="in-stock text-success"><span
  279.                                                     class="dot"></span>{{ '10+ in stock' | trans }}</span>
  280.                                     {% elseif available >= 5 %}
  281.                                         <span class="in-stock text-success"><span
  282.                                                     class="dot"></span>{{ '5-10 in stock' | trans }}</span>
  283.                                     {% elseif available > 1 %}
  284.                                         <span class="in-stock text-success"><span
  285.                                                     class="dot"></span>{{ '2-4 in stock'|trans }}</span>
  286.                                     {% elseif available == 1 %}
  287.                                         <span class="in-stock text-danger"><span
  288.                                                     class="dot"></span>{{ 'Only one left'|trans }}!</span>
  289.                                     {% elseif orderWaitingDays is defined and orderWaitingDays > 0 %}
  290.                                         <span class="in-stock text-grey"><span
  291.                                                     class="dot"></span>{{ 'On order within %d working days' |trans |format(orderWaitingDays) }}</span>
  292.                                     {% else %}
  293.                                         <span class="in-stock text-grey"><span
  294.                                                     class="dot"></span>{{ 'Out of stock'|trans }}</span>
  295.                                     {% endif %}
  296.                                 {% else %}
  297.                                     <span class="in-stock text-grey"><span
  298.                                                 class="dot"></span>{{ 'Out of stock'|trans }}</span>
  299.                                 {% endif %}
  300.                             </div>
  301.                         </div>
  302.                         <div class="review-stars review-stars-product-header d-inline-block product-detail-reviews">
  303.                             {% include('AtechNetCoreBundle/Widgets/TrustIndex/ProductShowAllReviews.html.twig') %}
  304.                         </div>
  305.                     </div>
  306.                     {% set description = description|replace({
  307.                         'Gold': ('grades.A')|trans,
  308.                         'Silver': ('grades.B')|trans,
  309.                         'Bronze': ('grades.C')|trans,
  310.                     }) %}
  311.                     <div class="row">
  312.                         <p class="product-short-description mb-2 mb-md-0 col-md-12">{{ description }},
  313.                             <a id="jump-show-more-info" href="#">{{ 'Full specification'|trans }}</a></p>
  314.                     </div>
  315.                 </div>
  316.                 {% if typeId in [52, 60, 116, 68, 41, 90] %}
  317.                     <p class="product-configuration-box-title mt-1">
  318.                         {{ ('package_contains.' ~ typeId)|trans }}
  319.                     </p>
  320.                 {% endif %}
  321.                 {% set optionsNoVatTxt = '' %}
  322.                 {% if basePrice == 'net' %}
  323.                     {% set optionsNoVatTxt = ' ' ~ 'without VAT' | trans %}
  324.                 {% endif %}
  325.                 {% if primaryOptions and orderable and domainId != 7 %}
  326.                 <div class="product-configuration-box">
  327.                     <p class="product-configuration-box-title">{{ 'Windows and software' | trans }}:</p>
  328.                     {% for option in primaryOptions %}
  329.                     {% set configOptions = option.options %}
  330.                     <div class="row product-configuration-row">
  331.                         <div class="col-12{{ option.id == 22 ? ' flex-center' : '' }}">
  332.                             <select name="option[{{ option.id }}]"
  333.                                     {% if option.id == 21 %}id="operation-system-select"
  334.                                     {% else %}id=""{% endif %}
  335.                                     class="selectpicker" data-live-search="false"
  336.                                     data-option="{{ option.id }}"
  337.                                     {% if customerTypeId == 1 %}{% if option.id != 21 %}title="{{ option.title }}"{% endif %}{% else %}{% if option.id != 21 %}title="{{ option.title }}"{% endif %}{% endif %}>
  338.                                 {% if option.id == 21 and customerTypeId == 2 %}
  339.                                     <option value="0" data-price="0" data-special="0"
  340.                                             {% if customerTypeId == 2 %}selected{% endif %}
  341.                                             data-content="{{ 'Without operating system (only for advanced users)' | trans }} <span class='option-price'>+ 0 {{ currency }}</span>">
  342.                                         {{ 'Without operating system (only for advanced users)' | trans }} +
  343.                                         0 {{ currency }}
  344.                                     </option>
  345.                                 {% endif %}
  346.                                 {% for value in configOptions %}
  347.                                 {% if option.id == 21 %}
  348.                                     {% set optionTitle = value.title ~ ' + ' ~ 'installation' | trans %}
  349.                                 {% else %}
  350.                                     {% set optionTitle = value.title %}
  351.                                 {% endif %}
  352.                                 {% if basePrice == 'net' %}
  353.                                     {% if value.discounted %}
  354.                                         {% set optionPrice = '+ ' ~ value.discount |price(currency, precision) ~ optionsNoVatTxt %}
  355.                                     {% else %}
  356.                                         {% set optionPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  357.                                     {% endif %}
  358.                                 {% else %}
  359.                                     {% if value.discounted %}
  360.                                         {% set optionPrice = '+ ' ~ value.vatDiscounted |price(currency, precision) %}
  361.                                     {% else %}
  362.                                         {% set optionPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  363.                                     {% endif %}
  364.                                 {% endif %}
  365.                                 <option value="{{ value.id }}"
  366.                                         data-price="{{ value.vatPrice }}"
  367.                                         data-net-price="{{ value.price }}"
  368.                                         data-special="{{ value.discounted and value.vatDiscounted > 0 ? value.vatDiscounted : 0 }}"
  369.                                         data-net-special="{{ value.discounted and value.discount > 0 ? value.discount : 0 }}"
  370.                                         {% if customerTypeId == 2 %}
  371.                                             data-suggested-price="{{ customerTypeId == 2 and value.vatSuggestedPrice > 0 ? value.vatSuggestedPrice : 0 }}"
  372.                                             data-suggested-net-price="{{ customerTypeId == 2 and value.suggestedPrice > 0 ? value.suggestedPrice : 0 }}"
  373.                                         {% endif %}
  374.                                         data-content="{# antivirus-option => id is 23 #} {% if option.id in [23, 24] %}{#<div class='icon-container me-3'>{% if value.image is defined %}<img decoding='async' src='{{ value.image }}'>{% elseif value.productId == 0 %}<i class='far fa-ban mt-auto mb-auto fa-2x'></i>{% endif %}</div> #}<span class='ms-0 me-auto'>{{ optionTitle }}</span><span class='option-price'>{{ optionPrice }}</span>{% else %}{{ optionTitle }}<span class='option-price'>{{ optionPrice }}</span>{% endif %}"
  375.                                         {% if value.id == 3508 %}selected{% endif %}>
  376.                                     {{ optionTitle }} {{ optionPrice }}
  377.                                 </option>
  378.                                 {% endfor %}
  379.                                 {% if option.id == 21 and customerTypeId == 1 %}
  380.                                     <option value="0" data-price="0" data-special="0"
  381.                                             data-content="{{ 'Without operating system (only for advanced users)' | trans }} <span class='option-price'>+ 0 {{ currency }}</span>">
  382.                                         {{ 'Without operating system (only for advanced users)' | trans }} +
  383.                                         0 {{ currency }}
  384.                                     </option>
  385.                                 {% endif %}
  386.                                 {% if option.id != 21 %}
  387.                                     <option value="0" data-dont-want="1" data-price="0" data-special="0"
  388.                                             data-content="{% if option.id == 23 %}{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>{% else %}{{ 'Dont need' | trans }} <span class='option-price'>+ 0 {{ currency }}</span>{% endif %}">{{ 'Dont need' | trans }}
  389.                                         + 0 {{ currency }}</option>
  390.                                 {% endif %}
  391.                             </select>
  392.                             {%- if option.id == 22 -%}
  393.                                 <button type="button" class="service-pack-open-link"
  394.                                         title="{{ 'More info'|trans }}" data-bs-toggle="modal"
  395.                                         data-bs-target="#modal-service-pack-info"><i
  396.                                             class="fas fa-info-circle"></i></button>
  397.                             {%- endif -%}
  398.                             {% if option.id == 21 %}
  399.                                 <div class="operation-system-message success {% if customerTypeId == 2 %}d-none{% endif %}"
  400.                                      id="operation-system-message-success">
  401.                                     <i class="fas fa-check"></i>
  402.                                     <span>{{ 'Turn it on and use immediately!' | trans }}</span>
  403.                                 </div>
  404.                                 <div class="operation-system-message danger d-none"
  405.                                      id="operation-system-message-danger">
  406.                                     <i class="fas fa-exclamation-triangle"></i>
  407.                                     <span>{{ 'The OS is a must for everyday use!' | trans }}<br/>{{ 'Choose this option only if u know how to install one!' | trans }}</span>
  408.                                 </div>
  409.                                 <div class="operation-system-message warning d-none"
  410.                                      id="linux-message-danger">
  411.                                     <i class="fas fa-exclamation-triangle"></i>
  412.                                     <span>{{ 'Linux warning message' | trans | raw }}</span>
  413.                                 </div>
  414.                             {% endif %}
  415.                         </div>
  416.                     </div>
  417.                     {% endfor %}
  418.                 </div>
  419.                 {% endif %}
  420.                 {% if secondaryOptions and orderable and domainId != 7 %}
  421.                 <div class="product-configuration-box">
  422.                     {% if typeId == const('ProductType::PRODUCT_TYPE_ID_MONITOR') %}
  423.                         <p class="product-configuration-box-title mt-4">
  424.                             {# {{ 'The package includes the power cable and the CABLE_TYPE.' | trans({'CABLE_TYPE': secondaryOptions[0].options|first['title']}) }} #}
  425.                             {{ 'Monitor cable info text'|trans }}
  426.                         </p>
  427.                         <p class="product-configuration-box-title mt-4">
  428.                             {{ 'Choose an accessory monitor' | trans }}:
  429.                         </p>
  430.                     {% else %}
  431.                         <p class="product-configuration-box-title mt-4">
  432.                             {{ 'Choose an accessory' | trans }}:
  433.                         </p>
  434.                     {% endif %}
  435.                     {% for option in secondaryOptions|slice(0, 3) %}
  436.                         {% if option.id == 401 %}<div class="battery-option-wrapper">{% endif %}
  437.                         <div class="row product-configuration-row">
  438.                             <div class="col-12{% if option.id == 320 %} d-flex align-items-center{% endif %} {% if option.id in [47, 184, 401] %} flex-center {% endif %}">
  439.                                 {% if option.id == 320 %}
  440.                                     {% set skinColorSelectorIsDefined = true %}
  441.                                     <div style="position: relative; flex: 1;">
  442.                                         <button id="colorSelector"
  443.                                                 class="w-100 fw-normal d-flex justify-content-start align-items-center form-select px-3 collapsed rounded-2"
  444.                                                 data-bs-toggle="collapse" data-bs-target="#colorSelect"
  445.                                                 aria-expanded="false" aria-controls="colorSelect">
  446.                                             <img decoding="async" src="{{ asset('theme/images/cfg-skin.svg') }}"
  447.                                                  width="25" height="25" alt="{{ 'Color select'|trans }}">
  448.                                             <span class="selected-title">{{- 'Color select'|trans -}}</span>
  449.                                             <span class="selected-price"></span>
  450.                                         </button>
  451.                                         <div class="collapse" id="colorSelect">
  452.                                             <div class="card card-body border-top-0 rounded-bottom px-4 py-3 pt-2 color-select-wrapper">
  453.                                                 <div class="selected-color py-2 pb-3">
  454.                                                     <strong class="color-title">{{ 'Select color'|trans }}</strong>
  455.                                                     <strong class="color-price"
  456.                                                             style="white-space: nowrap;"></strong>
  457.                                                 </div>
  458.                                                 <div class="color-palettes">
  459.                                                     {% for colorItem in option.options %}
  460.                                                         {% if colorItem.id not in [4035,4047,4051,4054,4552] %}
  461.                                                             <div class="color-palette-item">
  462.                                                                 {% set colorPrice = customerTypeId == 2 ? colorItem.price : colorItem.vatPrice %}
  463.                                                                 <input type="radio" name="selectedColor"
  464.                                                                        class="me-3 d-none"
  465.                                                                        value="{{ colorItem.id }}"
  466.                                                                        data-price="{{ colorPrice|price(currency, precision) }}"
  467.                                                                        data-color-name="{{ colorItem.title | trans }}">
  468.                                                                 <img decoding="async" src="{{ colorItem.image }}"
  469.                                                                      alt="{{ colorItem.title | trans }}">
  470.                                                             </div>
  471.                                                         {% endif %}
  472.                                                     {% endfor %}
  473.                                                     <div class="color-palette-item"
  474.                                                          style="display: flex; background-color: #e5e5e5;">
  475.                                                         <input type="radio" name="selectedColor" class="me-3 d-none"
  476.                                                                value="0"
  477.                                                                data-price="{{ 0|price(currency, precision) }}"
  478.                                                                data-color-name="{{ 'Dont need'|trans }}">
  479.                                                         <i class="far fa-ban m-auto fa-2x"
  480.                                                            style="color: #b7b7b7;"></i>
  481.                                                     </div>
  482.                                                 </div>
  483.                                                 <div class="confirm-selected-color mt-5 mb-2">
  484.                                                     <button data-bs-toggle="collapse" data-bs-target="#colorSelect"
  485.                                                             aria-controls="colorSelect" class="btn btn-primary w-75"
  486.                                                             disabled>
  487.                                                         {{- 'Select'|trans -}}
  488.                                                     </button>
  489.                                                 </div>
  490.                                             </div>
  491.                                             <select name="option[{{ option.id }}]"
  492.                                                     id="{% if option.id == 123 %}cable-select{% endif %}"
  493.                                                     class="selectpicker select-option-icon select-option-icon-{{ option.id }} d-none"
  494.                                                     data-live-search="false" data-option="{{ option.id }}"
  495.                                                     {% if option.id != 123 %}title="{{ option.title }}"{% endif %}>
  496.                                                 {% for value in option.options %}
  497.                                                     {% set optionTitle = value.title %}
  498.                                                     {% if basePrice == 'net' %}
  499.                                                         {% if value.discounted %}
  500.                                                             {% set optionPrice = '+ ' ~ value.discount |price(currency, precision) ~ optionsNoVatTxt %}
  501.                                                         {% else %}
  502.                                                             {% set optionPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  503.                                                         {% endif %}
  504.                                                     {% else %}
  505.                                                         {% if value.discounted %}
  506.                                                             {% set optionPrice = '+ ' ~ value.vatDiscounted |price(currency, precision) %}
  507.                                                         {% else %}
  508.                                                             {% set optionPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  509.                                                         {% endif %}
  510.                                                     {% endif %}
  511.                                                     <option value="{{ value.id }}"
  512.                                                             data-price="{{ value.vatPrice }}"
  513.                                                             data-net-price="{{ value.price }}"
  514.                                                             data-special="{{ value.discounted and value.vatDiscounted > 0 ? value.vatDiscounted : 0 }}"
  515.                                                             data-net-special="{{ value.discounted and value.discount > 0 ? value.discount : 0 }}"
  516.                                                             {% if customerTypeId == 2 %}
  517.                                                                 data-suggested-price="{{ customerTypeId == 2 and value.vatSuggestedPrice > 0 ? value.vatSuggestedPrice : 0 }}"
  518.                                                                 data-suggested-net-price="{{ customerTypeId == 2 and value.suggestedPrice > 0 ? value.suggestedPrice : 0 }}"
  519.                                                             {% endif %}
  520.                                                             data-content="{# <div class='icon-container me-3'>{% if value.image is defined %}<img decoding='async' src='{{ value.image }}'>{% elseif value.productId == 0 %}<i class='far fa-ban mt-auto mb-auto fa-2x'></i>{% endif %}</div> #}<span class='ms-0 me-auto'>{{ optionTitle }}</span><span class='option-price'>{{ optionPrice }}</span>"
  521.                                                             {% if option.id == 123 and customerTypeId == 1 and loop.index == 1 %}selected{% endif %} >
  522.                                                         {{ optionTitle }} {{ optionPrice }}
  523.                                                     </option>
  524.                                                 {% endfor %}
  525.                                                 {# note itt lehet a selectben visszakapcsolni a kepeket #}
  526.                                                 <option value="0" data-dont-want="1" data-price="0" data-special="0"
  527.                                                         data-content="{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>">{{ 'Dont need' | trans }}
  528.                                                     + 0 {{ currency }}</option>
  529.                                             </select>
  530.                                         </div>
  531.                                     </div>
  532.                                     {# <button type="button" class="service-pack-open-link" title="{{ 'More info'|trans }}" data-bs-toggle="modal" data-bs-target="#modal-skin-info"><i class="fas fa-info-circle"></i></button> #}
  533.                                 {% else %}
  534.                                     <select name="option[{{ option.id }}]"
  535.                                             id="{% if option.id == 123 %}cable-select{% endif %}"
  536.                                             class="selectpicker select-option-icon select-option-icon-{{ option.id }} "
  537.                                             data-live-search="false" data-option="{{ option.id }}"
  538.                                             {% if option.id != 123 %} title="{{ option.title }}" {% endif %}>
  539.                                         {% if product_type_id == const('ProductType::PRODUCT_TYPE_ID_MONITOR') %}
  540.                                             <option value="0" data-dont-want="1" data-price="0" data-special="0"
  541.                                                     selected="selected"
  542.                                                     data-content="{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>">
  543.                                                 {{ 'Dont need' | trans }} + 0 {{ currency }}
  544.                                             </option>
  545.                                         {% endif %}
  546.                                         {% for value in option.options %}
  547.                                             {% set optionTitle = value.title %}
  548.                                             {% if basePrice == 'net' %}
  549.                                                 {% if value.discounted %}
  550.                                                     {% set optionPrice = '+ ' ~ value.discount |price(currency, precision) ~ optionsNoVatTxt %}
  551.                                                     {% set optionOriginalPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  552.                                                 {% else %}
  553.                                                     {% set optionPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  554.                                                 {% endif %}
  555.                                             {% else %}
  556.                                                 {% if value.discounted %}
  557.                                                     {% set optionPrice = '+ ' ~ value.vatDiscounted |price(currency, precision) %}
  558.                                                     {% set optionOriginalPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  559.                                                 {% else %}
  560.                                                     {% set optionPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  561.                                                 {% endif %}
  562.                                             {% endif %}
  563.                                             <option value="{{ value.id }}"
  564.                                                     data-price="{{ value.vatPrice }}"
  565.                                                     data-net-price="{{ value.price }}"
  566.                                                     data-special="{{ value.discounted and value.vatDiscounted > 0 ? value.vatDiscounted : 0 }}"
  567.                                                     data-net-special="{{ value.discounted and value.discount > 0 ? value.discount : 0 }}"
  568.                                                     data-free="{{ value.discounted and option.id == 184 ? 1 : 0 }}"
  569.                                                     {% if customerTypeId == 2 %}
  570.                                                         data-suggested-price="{{ customerTypeId == 2 and value.vatSuggestedPrice > 0 ? value.vatSuggestedPrice : 0 }}"
  571.                                                         data-suggested-net-price="{{ customerTypeId == 2 and value.suggestedPrice > 0 ? value.suggestedPrice : 0 }}"
  572.                                                     {% endif %}
  573.                                                     {# note itt lehet a selectben visszakapcsolni a kepeket #}
  574.                                                     data-content="{# <div class='icon-container me-3'> #}
  575.                                                         {% if value.image is defined %}
  576.                                                             {# <img decoding='async' src='{{ value.image }}'> #}
  577.                                                         {% elseif value.productId == 0 %}
  578.                                                             {# <i class='far fa-ban mt-auto mb-auto fa-2x'></i> #}
  579.                                                         {% endif %} {# </div> #}<span class='ms-0 me-auto'>{{ optionTitle }}</span>{% if value.discounted %} <span class='option-original-price'>{{ optionOriginalPrice }}</span> <span class='option-price'>{{ optionPrice }}</span>{% else %} <span class='option-price'>{{ optionPrice }}</span> {% endif %}"
  580.                                                     {% if option.id == 123 and customerTypeId == 1 and loop.index == 1 %}selected{% endif %} >
  581.                                                 {{ optionTitle }} {{ optionPrice }}
  582.                                             </option>
  583.                                         {% endfor %}
  584.                                         {% if product_type_id != const('ProductType::PRODUCT_TYPE_ID_MONITOR') %}
  585.                                             <option value="0" data-dont-want="1" data-price="0" data-special="0"
  586.                                                     data-content="{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>">
  587.                                                 {{ 'Dont need' | trans }} + 0 {{ currency }}
  588.                                             </option>
  589.                                         {% endif %}
  590.                                     </select>
  591.                                     {% if option.id == 47 %}
  592.                                         <button type="button" class="service-pack-open-link"
  593.                                                 title="{{ 'More info'|trans }}" data-bs-toggle="modal"
  594.                                                 data-bs-target="#modal-ssd-change-info"><i
  595.                                                     class="fas fa-info-circle"></i></button>
  596.                                     {% elseif option.id == 184 %}
  597.                                         <button type="button" class="service-pack-open-link"
  598.                                                 title="{{ 'More info'|trans }}" data-bs-toggle="modal"
  599.                                                 data-bs-target="#modal-keyboard-reprint-info"><i
  600.                                                     class="fas fa-info-circle"></i></button>
  601.                                     {% elseif option.id == 401 %}
  602.                                         <button type="button" class="service-pack-open-link"
  603.                                                 title="{{ 'More info'|trans }}" data-bs-toggle="modal"
  604.                                                 data-bs-target="#modal-new-battery-info"><i
  605.                                                     class="fas fa-info-circle"></i></button>
  606.                                     {% endif %}
  607.                                 {% endif %}
  608.                             </div>
  609.                         </div>
  610.                         {% if option.id == 401 %}
  611.                             <div>
  612.                                 <div class="battery-message success ">
  613.                                     <i class="fas fa-check"></i>
  614.                                     <span>{{ 'newBatteryInfo.highlight'|trans }}</span>
  615.                                 </div>
  616.                             </div>
  617.                         </div>{% endif %}
  618.                     {% endfor %}
  619.                     {% if warranties is defined %}
  620.                         {% set option = warranties['attribute'] %}
  621.                         <div class="row product-configuration-row">
  622.                             <div class="col-12">
  623.                                 <select name="option[{{ option.id }}]" id=""
  624.                                         class="selectpicker select-option-icon select-option-icon-{{ option.id }}"
  625.                                         data-live-search="false" data-option="{{ option.id }}"
  626.                                         title="{{ option.title|trans }}">
  627.                                     {% for warranty in warranties['data'] %}
  628.                                         {% set optionTitle = warranty['title'] %}
  629.                                         {% set currentDate = "now"|date("Y-m-d") %}
  630.                                         {% set startDate = "2025-11-29" %}
  631.                                         {% set endDate = "2025-12-22" %}
  632.                                         {% set discounted = currentDate > startDate and currentDate < endDate %}
  633.                                         {% if basePrice == 'net' %}
  634.                                             {% if discounted %}
  635.                                                 {% set optionPrice = '+ ' ~ warranty['discount'] | price(currency, precision) ~ optionsNoVatTxt %}
  636.                                                 {% set optionOriginalPrice = warranty['price'] | price(currency, precision) ~ optionsNoVatTxt %}
  637.                                             {% else %}
  638.                                                 {% set optionPrice = '+ ' ~ warranty['price'] | price(currency, precision) ~ optionsNoVatTxt %}
  639.                                             {% endif %}
  640.                                         {% else %}
  641.                                             {% if discounted %}
  642.                                                 {% set optionPrice = '+ ' ~ warranty['vatDiscounted'] |price(currency, precision) %}
  643.                                                 {% set optionOriginalPrice = warranty['vatPrice'] | price(currency, precision) ~ optionsNoVatTxt %}
  644.                                             {% else %}
  645.                                                 {% set optionPrice = '+ ' ~ warranty['vatPrice'] | price(currency, precision) %}
  646.                                             {% endif %}
  647.                                         {% endif %}
  648.                                         <option value="{{ warranty['id'] }}"
  649.                                                 data-price="{{ warranty['vatPrice'] }}"
  650.                                                 data-net-price="{{ warranty['price'] }}"
  651.                                                 data-special="{{ warranty['vatDiscounted'] }}"
  652.                                                 data-net-special="{{ warranty['discount'] }}"
  653.                                                 data-content="{# <div class='icon-container me-3'>{% if warranty['image'] is defined %}<img decoding='async' src='{{ warranty['image'] }}'>{% elseif value.productId == 0 %}<i class='far fa-ban mt-auto mb-auto fa-2x'></i>{% endif %}</div> #}<span class='ms-0 me-auto'>{{ optionTitle|trans }}</span>{% if discounted %} <span class='option-original-price'>{{ optionOriginalPrice }}</span> <span class='option-price'>{{ optionPrice }}</span>{% else %} <span class='option-price'>{{ optionPrice }}</span> {% endif %}">
  654.                                             {{ optionTitle }} {{ optionPrice }}
  655.                                         </option>
  656.                                     {% endfor %}
  657.                                     <option value="0" data-dont-want="1" data-price="0" data-special="0"
  658.                                             selected="selected"
  659.                                             data-content="{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>">
  660.                                         {{ 'Dont need' | trans }} + 0 {{ currency }}
  661.                                     </option>
  662.                                 </select>
  663.                             </div>
  664.                         </div>
  665.                     {% endif %}
  666.                     {% if secondaryOptions|length > 3 %}
  667.                     <div class="collapse collapse-content more-collapse-content" id="moreOptions">
  668.                         {% for option in secondaryOptions|slice(3, options|length) %}
  669.                             <div class="row product-configuration-row">
  670.                             <div class="col-12">
  671.                                 <select name="option[{{ option.id }}]" id=""
  672.                                         class="selectpicker select-option-icon select-option-icon-{{ option.id }}"
  673.                                         data-live-search="false" data-option="{{ option.id }}"
  674.                                         title="{{ option.title|trans }}">
  675.                                     {% for value in option.options %}
  676.                                         {% set optionTitle = value.title %}
  677.                                         {% if basePrice == 'net' %}
  678.                                             {% if value.discounted %}
  679.                                                 {% set optionPrice = '+ ' ~ value.discount |price(currency, precision) ~ optionsNoVatTxt %}
  680.                                                 {% set optionOriginalPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  681.                                             {% else %}
  682.                                                 {% set optionPrice = '+ ' ~ value.price |price(currency, precision) ~ optionsNoVatTxt %}
  683.                                             {% endif %}
  684.                                         {% else %}
  685.                                             {% if value.discounted %}
  686.                                                 {% set optionPrice = '+ ' ~ value.vatDiscounted |price(currency, precision) %}
  687.                                                 {% set optionOriginalPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  688.                                             {% else %}
  689.                                                 {% set optionPrice = '+ ' ~ value.vatPrice |price(currency, precision) %}
  690.                                             {% endif %}
  691.                                         {% endif %}
  692.                                         <option value="{{ value.id }}"
  693.                                                 data-price="{{ value.vatPrice }}"
  694.                                                 data-net-price="{{ value.price }}"
  695.                                                 data-special="{{ value.discounted and value.vatDiscounted > 0 ? value.vatDiscounted : 0 }}"
  696.                                                 data-net-special="{{ value.discounted and value.discount > 0 ? value.discount : 0 }}"
  697.                                                 {% if customerTypeId == 2 %}
  698.                                                     data-suggested-price="{{ customerTypeId == 2 and value.vatSuggestedPrice > 0 ? value.vatSuggestedPrice : 0 }}"
  699.                                                     data-suggested-net-price="{{ customerTypeId == 2 and value.suggestedPrice > 0 ? value.suggestedPrice : 0 }}"
  700.                                                 {% endif %}
  701.                                                 data-content="{# <div class='icon-container me-3'>{% if value.image is defined %}<img decoding='async' src='{{ value.image }}'>{% elseif value.productId == 0 %}<i class='far fa-ban mt-auto mb-auto fa-2x'></i>{% endif %}</div> #}<span class='ms-0 me-auto'>{{ optionTitle|trans }}</span>{% if value.discounted %} <span class='option-original-price'>{{ optionOriginalPrice }}</span> <span class='option-price'>{{ optionPrice }}</span>{% else %} <span class='option-price'>{{ optionPrice }}</span> {% endif %}">
  702.                                             {{ optionTitle|trans }} {{ optionPrice }}
  703.                                         </option>
  704.                                     {% endfor %}
  705.                                     <option value="247" data-dont-want="1" data-price="0" data-special="0"
  706.                                             data-content="<span class='ms-0 me-auto'>{{ 'Dont need' | trans }}</span><span class='option-price'>+ 0 {{ currency }}</span>">{{ 'Dont need' | trans }}
  707.                                         + 0 {{ currency }}</option>
  708.                                 </select>
  709.                             </div>
  710.                             </div>{# <div class='icon-container me-3'><i class='far fa-ban mt-auto mb-auto fa-2x'></i></div> #}
  711.                         {% endfor %}
  712.                     </div>
  713.                 </div>
  714.                 <div>
  715.                     <a class="more-collapse" data-bs-toggle="collapse" href="#moreOptions" role="button"
  716.                        aria-expanded="false" aria-controls="moreOptions">
  717.                         {{ 'Other accessories' | trans }}...
  718.                     </a>
  719.                 </div>
  720.                 {% else %}
  721.             </div>
  722.             {% endif %}
  723.             {% endif %}
  724.             {% if not orderable %}
  725.                 <div class="ready-box with-windows collapse show">
  726.                     <div class="row">
  727.                         <div class="col-sm-12">
  728.                             <div>
  729.                                 {{- 'Product is not orderable at the moment!'|trans -}}
  730.                             </div>
  731.                         </div>
  732.                     </div>
  733.                 </div>
  734.             {% endif %}
  735.             {% if orderable %}
  736.                 <div class="price-row">
  737.                     <div class="row">
  738.                         <div class="col-12">
  739.                             {% if basePrice == 'net' %}
  740.                                 <div class="product-price {{ coupon is defined and coupon.code != "MACLICK" ? 'coupon-is-active' : '' }} mb-1 wholesale-style"
  741.                                      data-price="{{ priceWoVAT }}" data-gross-price="{{ price }}"
  742.                                      data-special="{{ isDiscounted ? rawDiscountPriceWoVAT : 0 }}"
  743.                                      data-gross-special="{{ isDiscounted ? special : 0 }}"
  744.                                      data-suggested-price="{{ suggestedPrice }}"
  745.                                      data-suggested-gross-price="{{ suggestedVatPrice }}">
  746.                                     <span class="w-100 mb-2">{{ 'Net price'|trans }}:</span>
  747.                                     {% if special %}
  748.                                         <div class="special-price me-2">
  749.                                             <span class="price-value">{{- rawDiscountPriceWoVAT |price(currency, precision) -}}</span>
  750.                                         </div>
  751.                                         <div class="old-price mt-auto">
  752.                                             <span>{{- priceWoVAT |price(currency, precision) -}}</span>
  753.                                         </div>
  754.                                         <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip"
  755.                                            data-bs-title="{{ 'Product price tooltip info'|trans }}"></i>
  756.                                         <span class="price-savings special my-1">
  757.                                                     <b>{{- 'Savings' | trans }}: {{ ( priceWoVAT - rawDiscountPriceWoVAT ) |price(currency, precision) }}</b>
  758.                                                 </span>
  759.                                     {% else %}
  760.                                         <div class="standard-price w-100">
  761.                                             <span>{{ priceWoVAT |price(currency, precision) }}</span>
  762.                                         </div>
  763.                                     {% endif %}
  764.                                     {% set priceToShow = special ? special : price %}
  765.                                     <div class="prices-include-vat">
  766.                                         {{- 'Price with VAT' | trans }}
  767.                                         : {{ priceToShow |price(currency, precision) -}}
  768.                                     </div>
  769.                                 </div>
  770.                             {% elseif customerTypeId == 2 %}
  771.                                 <div class="product-price {{ coupon is defined and coupon.code != "MACLICK" ? 'coupon-is-active' : '' }} wholesale-style mb-1"
  772.                                      data-price="{{ price }}" data-special="{{ special }}"
  773.                                      data-suggested-price="{{ suggestedPrice }}"
  774.                                      data-suggested-gross-price="{{ suggestedVatPrice }}">
  775.                                     {% if special %}
  776.                                         <span class="w-100 mb-2">{{ 'Price with VAT'|trans }}:</span>
  777.                                         <span class="old-price mt-auto width-100">{{ price|price(currency, precision) }}</span>
  778.                                         <span class="special-price me-2 width-100">{{ special|price(currency, precision) }}</span>
  779.                                         <i class="fas fa-info-circle ms-2" data-bs-toggle="tooltip"
  780.                                            data-bs-title="{{ 'Product price tooltip info'|trans }}"></i>
  781.                                         <span class="price-savings"><b>{{ 'Savings' | trans }}: {{ (price - special) |price(currency, precision) }}</b></span>
  782.                                         <span class="without-vat">{{ 'without VAT' | trans }}: {{ rawDiscountPriceWoVAT |price(currency, precision) }}</span>
  783.                                     {% else %}
  784.                                         <span class="w-100 mb-2">{{ 'Price with VAT'|trans }}:</span>
  785.                                         <div class="standard-price mt-auto w-100">
  786.                                             <span>{{ price|price(currency, precision) }}</span>
  787.                                         </div>
  788.                                         <span class="without-vat ms-1">
  789.                                                     {{ 'without VAT' | trans }}: {{ priceWoVAT |price(currency, precision) }}
  790.                                                 </span>
  791.                                     {% endif %}
  792.                                 </div>
  793.                             {% else %}
  794.                                 <div class="product-price mb-1 {{ coupon is defined and coupon.code != "MACLICK" ? 'coupon-is-active' : '' }}"
  795.                                      data-price="{{ price }}" data-special="{{ special }}">
  796.                                     {% if special %}
  797.                                         <span class="special-price me-2">{{ special|price(currency, precision) }}</span>
  798.                                         <span class="old-price mt-auto">{{ price|price(currency, precision) }}</span>
  799.                                         <i class="fas fa-info-circle ms-2" data-bs-toggle="tooltip"
  800.                                            data-bs-title="{{ 'Product price tooltip info'|trans }}"></i>
  801.                                         <span class="price-savings mt-1"><b>{{ 'Savings' | trans }}: {{ (price - special) |price(currency, precision) }}</b>{% if basePrice == 'gross' %} ({{ 'Total price (with VAT)' | trans }}){% endif %}</span>
  802.                                     {% else %}
  803.                                         <span id="grossPrice"> {{ price|price(currency, precision) }}  </span>
  804.                                         <span class="price-savings mt-1 {{ coupon is defined and coupon.code != "MACLICK" ? 'coupon-is-active' : '' }}">
  805.                                                     {{- 'Total price (with VAT)' | trans -}}
  806.                                                 </span>
  807.                                     {% endif %}
  808.                                 </div>
  809.                             {% endif %}
  810.                         </div>
  811.                     </div>
  812.                 </div>
  813.             {% else %}
  814.                 <div class="price-row">
  815.                     <div class="row">
  816.                         <div class="col-12">
  817.                             <div class="total-price mb-1">{{ 'Last known price' | trans }}:</div>
  818.                             <div class="product-price mb-1 {{ coupon is defined and coupon.code != "MACLICK" ? 'coupon-is-active' : '' }}"
  819.                                  data-price="{{ price }}" data-special="{{ special }}">
  820.                                 {% if basePrice == 'gross' %}
  821.                                     {% if special %}
  822.                                         <span class="special-price me-2">{{ special|price(currency, precision) }}</span>
  823.                                         <span class="old-price mt-auto">{{ price|price(currency, precision) }}</span>
  824.                                         <i class="fas fa-info-circle ms-2" data-bs-toggle="tooltip"
  825.                                            data-bs-title="{{ 'Product price tooltip info'|trans }}"></i>
  826.                                         <span class="price-savings mt-1"><b>{{ 'Savings' | trans }}: {{ (price - special)|price(currency, precision) }}</b> ({{ 'Total price (with VAT)' | trans }})</span>
  827.                                     {% else %}
  828.                                         {{ price|price(currency, precision) }}
  829.                                     {% endif %}
  830.                                 {% else %}
  831.                                     {% if special %}
  832.                                         <span class="special-price me-2">{{ rawDiscountPriceWoVAT|price(currency, precision) }}</span>
  833.                                         <span class="old-price mt-auto">{{ priceWoVAT|price(currency, precision) }}</span>
  834.                                         <i class="fas fa-info-circle ms-2" data-bs-toggle="tooltip"
  835.                                            data-bs-title="{{ 'Product price tooltip info'|trans }}"></i>
  836.                                         <span class="price-savings mt-1"><b>{{ 'Savings' | trans }}: {{ (priceWoVAT - rawDiscountPriceWoVAT)|price(currency, precision) }}</b></span>
  837.                                     {% else %}
  838.                                         {{ priceWoVAT|price(currency, precision) }}
  839.                                     {% endif %}
  840.                                 {% endif %}
  841.                             </div>
  842.                         </div>
  843.                     </div>
  844.                 </div>
  845.             {% endif %}
  846.             {% if customerTypeId == 2 and suggestedPrice > 0 %}
  847.                 <div class="suggested-price-row">
  848.                     <div class="suggested-price-cell d-flex flex-column align-items-left justify-content-center">
  849.                         <span><b>{{ 'Suggested selling price' | trans }}:</b></span>
  850.                         <span>
  851.                                     {{- suggestedPrice|price(currency, precision) }} ({{ 'without VAT' | trans | lower }}) / {{ suggestedVatPrice|price(currency, precision) }} ({{ 'Price with VAT' | trans | lower }})
  852.                                 </span>
  853.                     </div>
  854.                     <div class="text-sm-left text-md-center suggested-price-cell suggested-price-profit">
  855.                         <span>{{ 'Your profit' | trans }}:</span>
  856.                         <strong>{{ profitPercentage }}%</strong>
  857.                     </div>
  858.                 </div>
  859.             {% endif %}
  860.             {% if orderable %}
  861.                 <div class="no-os-warning d-none" id="no-os-warning"><i
  862.                             class="fas fa-info-circle"></i> {{ 'Choose an operation system' | trans }}</div>
  863.                 <div class="row product-cart-row mb-1">
  864.                     <div class="col-12 d-flex flex-column">
  865.                         {% if coupon is defined and coupon.showCouponBadgeOnWebsite %}
  866.                             {% if coupon.code == "MACLICK" %}
  867.                                 <div class="coupon-list product-show" style="justify-content: space-around">
  868.                                             <span style="font-weight: 600">
  869.                                                 {{ 'MACLICK coupon text'|trans|raw }}
  870.                                             </span>
  871.                                     <span class="copy-svg" id="copy-svg"
  872.                                           onclick="copyToClickBoard('{{ coupon.code }}')">
  873.                                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
  874.                                                      fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"
  875.                                                      style="stroke: currentColor; stroke-width: 1;">
  876.                                                   <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1z"/>
  877.                                                   <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0z"/>
  878.                                                 </svg>
  879.                                             </span>
  880.                                 </div>
  881.                             {% else %}
  882.                                 <div class="coupon-list product-show">
  883.                                         <span>
  884.                                             {{ 'Coupon display'|trans({'discount': coupon.discount, 'code': coupon.code}) }}
  885.                                         </span>
  886.                                     <span>
  887.                                             {{ coupon.priceWithCoupon|price(currency, precision) }}
  888.                                         </span>
  889.                                 </div>
  890.                             {% endif %}
  891.                         {% endif %}
  892.                         {%- if hasStockItemAlbum -%}
  893.                             <button
  894.                                     type="button"
  895.                                     data-bs-target="#stockItemSelectModal"
  896.                                     data-bs-toggle="modal"
  897.                                     class="btn btn-primary btn-product w-100 rounded-pill m-auto text-nowrap"
  898.                             >
  899.                                         <span>
  900.                                             {{- 'Select product' | trans }}
  901.                                         </span><i class="fas fa-camera" style="font-size: 22px;"></i>
  902.                             </button>
  903.                         {%- else -%}
  904.                             <button
  905.                                     id="button-cart"
  906.                                     class="btn btn-primary btn-product btn-add-to-cart m-auto"
  907.                                     data-loading-text="{{ 'Loading' | trans }}"
  908.                             >
  909.                                         <span>
  910.                                             {{- 'Add to cart' | trans -}}
  911.                                         </span><i class="fas fa-shopping-cart" style="font-size: 17px;"></i>
  912.                             </button>
  913.                         {%- endif -%}
  914.                     </div>
  915.                 </div>
  916.                 <input type="hidden" name="product_id" value="{{ product_id }}"/>
  917.             {% endif %}
  918.             <div class="product-benefit-list py-3 p-md-3">
  919.                 {% if showNorton is defined and showNorton %}
  920.                     <div class="product-benefit-item mb-3">
  921.                         <img decoding="async" src="{{ asset('theme/images/icon/nortonLogo.svg') }}"
  922.                              alt="{{ 'NortonProductShowText'|trans }}" class="me-2 me-mb-3">
  923.                         <p class="mb-0">{{- 'NortonProductShowText'|trans -}}</p>
  924.                         <a type="button" title="{{ 'More info'|trans }}" href="{{ nortonUrl }}">
  925.                             &nbsp;<i class="fas fa-info-circle"></i>
  926.                         </a>
  927.                     </div>
  928.                 {% endif %}
  929.                 {%- if orderable and customerTypeId == 1 -%}
  930.                     <div class="product-benefit-item mb-3">
  931.                         <img decoding="async" src="{{ asset('theme/images/icon/clock.svg') }}"
  932.                              alt="{{ estimated_deliver_date|raw }}" class="me-2 me-mb-3">
  933.                         <p class="mb-0">
  934.                             {{- estimated_deliver_date|raw -}}
  935.                             {%- if typeId != const('ProductType::PRODUCT_TYPE_ID_INTERACTIVE_BOARD') -%}
  936.                                 <button
  937.                                         data-bs-target="#shippingListModal"
  938.                                         data-bs-toggle="modal"
  939.                                         class="delivery-info-modal"
  940.                                 >
  941.                                     {{- 'Delivery link for modal'|trans -}}...
  942.                                 </button>
  943.                             {%- endif -%}
  944.                         </p>
  945.                     </div>
  946.                 {%- endif -%}
  947.                 <div class="product-benefit-item mb-3">
  948.                     {%- set currentDate = "now"|date('Ymd') -%}
  949.                     {%- set freePacketaShipping = freePacketaShipping is defined and freePacketaShipping == true -%}
  950.                     {%- set deliveryInfo = freeShipping
  951.                         ? '<b>'~'Product delivery info free'|trans~'</b>'
  952.                         : freePacketaShipping
  953.                         ? 'Product delivery info free packeta'|trans
  954.                         : 'Product delivery info'|trans({"title": shippingTitle, "price": shippingCost | price('', precision)}) | replace({',00':''}) -%}
  955.                     <img decoding="async" src="{{ asset('theme/images/icon/truck.svg') }}" alt="{{ deliveryInfo }}"
  956.                          class="me-2 me-mb-3">
  957.                     <p class="mb-0">{{- deliveryInfo|raw -}}</p>
  958.                 </div>
  959.                 {% if app.session.get('domainId') != const('Domain::DOMAIN_ID_WS_EU') %}
  960.                     <div class="product-benefit-item mb-3">
  961.                         <img decoding="async" src="{{ asset('theme/images/icon/checkmark.svg') }}"
  962.                              alt="{{ 'Warranty advantage text' | trans({'year': warrantyYear}) | replace({'<b>': '', '</b>': ''}) }}"
  963.                              class="me-2 me-mb-3">
  964.                         {% if typeId !=  110 %}
  965.                             <p class="mb-0">{{ 'Warranty advantage text' | trans({'year': warrantyYear})|raw }}</p>
  966.                         {% else %}
  967.                             <p class="mb-0">{{ '6 months warranty' | trans|raw }}</p>
  968.                         {% endif %}
  969.                     </div>
  970.                 {% endif %}
  971.                 <div class="product-benefit-item mb-3">
  972.                     {# Pénzvisszafizetési garancia switchDate-ig #}
  973.                     {% set currentDate = "now"|date("Y-m-d") %}
  974.                     {% set startDate = "2025-12-14" %}
  975.                     {% set endDate = "2025-12-21" %}
  976.                     <img decoding="async" src="{{ asset('theme/images/icon/calendar.svg') }}"
  977.                          alt="{{ 'Payback advantage text' | trans({'day': priceWarrantyDay}) | replace({'<b>': '', '</b>': ''}) }}"
  978.                          class="me-2 me-mb-3">
  979.                     {% if currentDate > startDate and currentDate < endDate %}
  980.                         <p class="mb-0"
  981.                            style="color: #B91F1C">{{ 'Payback advantage text jan' | trans | replace({'<br>': ''}) | raw }}</p>
  982.                     {% else %}
  983.                         <p class="mb-0">{{ 'Payback advantage text' | trans({'day': priceWarrantyDay}) | replace({'<br>': ''}) |raw }}</p>
  984.                     {% endif %}
  985.                 </div>
  986.                 <div class="product-benefit-item mb-2 me-mb-3">
  987.                     <img decoding="async" src="{{ asset('theme/images/icon/benefit-recycle.svg') }}"
  988.                          alt="{{ 'Stabil advantage text' | trans }}" class="me-2 me-mb-3">
  989.                     <p class="mb-0">{{ 'Stabil advantage text'|trans|raw }}</p>
  990.                 </div>
  991.             </div>
  992.             <div class="other-features mb-4">
  993.                 {% if isPriceMonitorActivated %}
  994.                     <button type="button" class="btn d-none d-sm-block active" data-bs-toggle="modal"
  995.                             data-bs-target="#modal-price-monitor" title="{{ 'Price monitor activated' |trans }}">
  996.                         <i class="fas fa-tag mx-2"></i>
  997.                         <span>{{ 'Price monitor' |trans }}</span>
  998.                     </button>
  999.                 {% else %}
  1000.                     <button type="button" class="btn d-sm-block" data-bs-toggle="modal"
  1001.                             data-bs-target="#modal-price-monitor">
  1002.                         <i class="fas fa-tag mx-2"></i>
  1003.                         <span>{{ 'Price monitor' |trans }}</span>
  1004.                     </button>
  1005.                 {% endif %}
  1006.                 {% if typeId in [
  1007.                     const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  1008.                     const('ProductType::PRODUCT_TYPE_ID_PC'),
  1009.                     const('ProductType::PRODUCT_TYPE_ID_MONITOR')
  1010.                 ] %}
  1011.                     {% if app.session.has('productCompare') and product_id in app.session.get('productCompare') %}
  1012.                         <button type="button" class="btn d-none d-sm-block active" id="button-compare"
  1013.                                 title="{{ 'Compare' |trans }}" data-product="{{ product_id }}">
  1014.                             <i class="fas fa-balance-scale mx-2"></i>
  1015.                             <span>{{ 'Compare' |trans }}</span>
  1016.                         </button>
  1017.                     {% else %}
  1018.                         <button type="button" class="btn d-sm-block" id="button-compare"
  1019.                                 title="{{ 'Compare' |trans }}" data-product="{{ product_id }}">
  1020.                             <i class="fas fa-balance-scale mx-2"></i>
  1021.                             <span>{{ 'Compare' |trans }}</span>
  1022.                         </button>
  1023.                     {% endif %}
  1024.                 {% endif %}
  1025.             </div>
  1026.             <script type="application/ld+json">
  1027.                 {
  1028.                         "@context": "http://schema.org",
  1029.                         "@type": "Product",
  1030.                         "description": "{{ description }}",
  1031.                             "brand": "{{ brand }}",
  1032.                             "sku": "{{ model }}",
  1033.                             "name": "{{ title|replace({'/': '-'}) }}",
  1034.                             "image": "{% if images|length > 0 %}{{ images|first.thumb }}{% endif %}",
  1035.                 "offers": {
  1036.                             "@type": "Offer",
  1037.                             "availability": "{% if available > 0 %}http://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}",
  1038.                                 "shippingDetails": {
  1039.                                     "deliveryTime": {
  1040.                                         "@type": "ShippingDeliveryTime",
  1041.                                         "handlingTime": {
  1042.                                             "@type": "QuantitativeValue",
  1043.                                             "minValue": 0,
  1044.                                             "maxValue": 2,
  1045.                                             "unitCode": "DAY"
  1046.                                         },
  1047.                                         "transitTime": {
  1048.                                             "@type": "QuantitativeValue",
  1049.                                             "minValue": 1,
  1050.                                             "maxValue": 2,
  1051.                                             "unitCode": "DAY"
  1052.                                         }
  1053.                                     },
  1054.                                     "shippingRate": {
  1055.                                         "@type": "MonetaryAmount",
  1056.                                         "value": {{ minShippingPrice }},
  1057.                 {% if defaultLocale != 'en' -%}
  1058.                                         "maxValue": {{ maxShippingPrice }},
  1059.                                         {% endif -%}
  1060.                 "currency": "{{ currencyForShippingRate }}"
  1061.                                     },
  1062.                                     "shippingDestination": {
  1063.                                         "@type": "DefinedRegion",
  1064.                                         "addressCountry": "{{ addressCountry }}"
  1065.                                     }
  1066.                                 },
  1067.                                 "price": "{% if special %}{{ special }}{% else %}{{ price }}{% endif %}",
  1068.                                 "priceCurrency": "{% if currency == 'Ft' %}HUF{% else %}EUR{% endif %}",
  1069.                                 "url": "{{ app.request.uri }}"
  1070.                             }
  1071.                         }
  1072.             </script>
  1073.         </div>
  1074.         <div class="product-help-box">
  1075.             <div class="row mb-md-4">
  1076.                 {% if (milpayInfo is defined and milpayInfo is not empty) or showKlarna %}
  1077.                     {% if app.session.get('domainId') == 1 %}
  1078.                         {% if app.session.get('languageId') == 1 %}
  1079.                             {% set local = 'sk-SK' %}
  1080.                         {% elseif app.session.get('languageId') == 2 %}
  1081.                             {% set local = 'sk-SK' %}
  1082.                         {% elseif app.session.get('languageId') == 4 %}
  1083.                             {% set local = 'en-SK' %}
  1084.                         {% endif %}
  1085.                     {% elseif app.session.get('domainId') == 3 %}
  1086.                         {% if app.session.get('languageId') == 2 %}
  1087.                             {% set local = 'hu-HU' %}
  1088.                         {% elseif app.session.get('languageId') == 4 %}
  1089.                             {% set local = 'en-HU' %}
  1090.                         {% endif %}
  1091.                     {% elseif app.session.get('domainId') == 9 %}
  1092.                         {% if app.session.get('languageId') == 1 %}
  1093.                             {% set local = 'cs-CZ' %}
  1094.                         {% elseif app.session.get('languageId') == 3 %}
  1095.                             {% set local = 'cs-CZ' %}
  1096.                         {% elseif app.session.get('languageId') == 4 %}
  1097.                             {% set local = 'en-CZ' %}
  1098.                         {% endif %}
  1099.                     {% elseif app.session.get('domainId') == 11 %}
  1100.                         {% if app.session.get('languageId') == 1 %}
  1101.                             {% set local = 'sk-SK' %}
  1102.                         {% elseif app.session.get('languageId') == 2 %}
  1103.                             {% set local = 'en-SK' %}
  1104.                         {% elseif app.session.get('languageId') == 3 %}
  1105.                             {% set local = 'cs-CZ' %}
  1106.                         {% elseif app.session.get('languageId') == 4 %}
  1107.                             {% set local = 'en-SK' %}
  1108.                         {% endif %}
  1109.                     {% endif %}
  1110.                     <div class="alert alert-info p-3 mt-3 mb-md-1 instacash-info" role="alert">
  1111.                         <strong class="mb-1">{{ "paymentInInstalments.label"|trans }}</strong>
  1112.                         <div class="instacash-klarna-info-buttons">
  1113.                             {% if showKlarna %}
  1114.                                 {% if app.environment == 'dev' %}
  1115.                                     {% set klarna_client_identifier = klarna_test.client_identifier %}
  1116.                                 {% else %}
  1117.                                     {% if app.session.get('domainId') == const('Domain::DOMAIN_ID_RT_HU') %}
  1118.                                         {% set klarna_client_identifier = klarna_hu.client_identifier %}
  1119.                                     {% elseif app.session.get('domainId') == const('Domain::DOMAIN_ID_RT_SK') %}
  1120.                                         {% set klarna_client_identifier = klarna_sk.client_identifier %}
  1121.                                     {% elseif app.session.get('domainId') == const('Domain::DOMAIN_ID_RT_CZ') %}
  1122.                                         {% set klarna_client_identifier = klarna_cz.client_identifier %}
  1123.                                     {% elseif app.session.get('domainId') == const('Domain::DOMAIN_ID_RT_EU') %}
  1124.                                         {% set klarna_client_identifier = klarna_eu.client_identifier %}
  1125.                                     {% endif %}
  1126.                                 {% endif %}
  1127.                                 <script
  1128.                                         async
  1129.                                         data-environment="{{ app.environment == 'dev' ? 'playground' : 'production' }}"
  1130.                                         src="https://js.klarna.com/web-sdk/v1/klarna.js"
  1131.                                         data-client-id="{{ klarna_client_identifier }}">
  1132.                                 </script>
  1133.                                 <div>
  1134.                                     <klarna-placement
  1135.                                             data-key="credit-promotion-badge"
  1136.                                             data-locale="{{ local }}"
  1137.                                             data-purchase-amount="{{ (special == null ? price : special) * 100 }}"
  1138.                                             id="klarna-placement-product-page"
  1139.                                     ></klarna-placement>
  1140.                                 </div>
  1141.                             {% endif %}
  1142.                             {% if milpayInfo is defined and milpayInfo is not empty %}
  1143.                                 {% set priceRange = (milpayInfo.minAmount|price('', precision))~"- "~(milpayInfo.maxAmount|price('', precision)) %}
  1144.                                 <div class="instacash-holder">
  1145.                                     <img src="{{ asset('theme/images/icon/milpay_logo_product_show.png') }}"
  1146.                                          alt="milpay">
  1147.                                     <p>
  1148.                                         {{ "milpay.info"|trans({
  1149.                                             "firstPayment": milpayInfo.firstPayment,
  1150.                                             "currency": currency
  1151.                                         })| raw }}
  1152.                                         <a data-bs-target="#milpayMoreInfo" data-bs-toggle="modal"></a>
  1153.                                     </p>
  1154.                                 </div>
  1155.                                 <div class="modal fade" id="milpayMoreInfo" tabindex="-1"
  1156.                                      aria-labelledby="shippingListLabel" aria-hidden="true">
  1157.                                     <div class="modal-dialog">
  1158.                                         <div class="modal-content">
  1159.                                             <div class="modal-header">
  1160.                                                 <h3 class="modal-title"
  1161.                                                     id="shippingListLabel">{{ 'Milpay prescore modal heading' | trans }}</h3>
  1162.                                                 <button type="button" class="btn-close custome-close-modal"
  1163.                                                         data-bs-dismiss="modal"
  1164.                                                         aria-label="{{ 'Close' |trans }}"><i
  1165.                                                             class="fal fa-times"></i>
  1166.                                                 </button>
  1167.                                             </div>
  1168.                                             <div class="modal-body p-4">
  1169.                                                 <h6 class="mb-3">{{ 'Chosen product'|trans }}</h6>
  1170.                                                 <div class="instacash-product-details d-flex flex-row flex-nowrap mb-4">
  1171.                                                     <div class="main-image">
  1172.                                                         {% if images|length > 0 %}
  1173.                                                             <img decoding="async"
  1174.                                                                  src="{{ (images|first).additional }}"
  1175.                                                                  alt="{{- h1_title -}}" width="120" height="90">
  1176.                                                         {% endif %}
  1177.                                                     </div>
  1178.                                                     <div class="main-info ms-3 d-flex flex-column justify-content-center align-items-start">
  1179.                                                         <span class="instacash-product-title fw-bold mb-1">{{- h1_title|raw -}}</span>
  1180.                                                         <span class="instacash-product-price">
  1181.                                                                     {%- set priceToShow = special ? special : price -%}
  1182.                                                             {{- priceToShow|price(currency, precision) -}}
  1183.                                                                 </span>
  1184.                                                     </div>
  1185.                                                 </div>
  1186.                                                 <div class="payment-details px-1">
  1187.                                                     <h6 class="mb-3">{{ 'Deferred payment details'|trans }}</h6>
  1188.                                                     <div class="payment-type-radios mb-4">
  1189.                                                         {% for periodItem in 0..3 %}
  1190.                                                             <div class="form-check p-2 d-flex align-items-center justify-content-start">
  1191.                                                                 <img src="{{ asset('theme/images/icon/circle_loading_' ~ loop.index ~ '.svg') }}"
  1192.                                                                      alt="Circle icon" width="30" height="30">
  1193.                                                                 <label class="form-check-label ms-2"
  1194.                                                                        for="exampleRadios1">
  1195.                                                                     <strong>
  1196.                                                                         {% if loop.first %}
  1197.                                                                             {{- milpayInfo.firstPayment }} {{ currency }}
  1198.                                                                         {% else %}
  1199.                                                                             {{- milpayInfo.laterPayments }} {{ currency }}
  1200.                                                                         {% endif %}
  1201.                                                                     </strong>
  1202.                                                                     <small>
  1203.                                                                         {% if loop.first %}
  1204.                                                                             {{ 'Instacash now payable'|trans }}
  1205.                                                                         {% else %}
  1206.                                                                             {{ "now"|date|date_modify("+" ~ periodItem ~ " month")|date("M")|trans }} {{ "now"|date('d.') }}
  1207.                                                                         {% endif %}
  1208.                                                                     </small>
  1209.                                                                 </label>
  1210.                                                             </div>
  1211.                                                         {% endfor %}
  1212.                                                     </div>
  1213.                                                     <div class="d-flex w-100 flex-column instacash-description">
  1214.                                                         <ul>
  1215.                                                             <li>{{ "milpay.description.2"|trans }}</li>
  1216.                                                             <li>{{ "milpay.description.3"|trans }}</li>
  1217.                                                             <li>{{ "milpay.description.4"|trans }}</li>
  1218.                                                             <li>
  1219.                                                                 {{ "milpay.description.5"|trans({
  1220.                                                                     "range": priceRange,
  1221.                                                                     "currency": currency
  1222.                                                                 }) }}
  1223.                                                             </li>
  1224.                                                             <li>{{ "milpay.description.6"|trans }}</li>
  1225.                                                             <li>{{ "milpay.description.7"|trans }}</li>
  1226.                                                             <li>{{ "milpay.description.9"|trans }}</li>
  1227.                                                             {% if domainId == 1 %}
  1228.                                                                 {% set link = 'https://www.furbify.sk/furbify-splatkova-platba' %}
  1229.                                                             {% elseif domainId == 3 %}
  1230.                                                                 {% set link = 'https://www.furbify.hu/furbify-reszletfizetes' %}
  1231.                                                             {% elseif domainId == 9 %}
  1232.                                                                 {% set link = 'https://www.furbify.cz/platba-na-splatky' %}
  1233.                                                             {% else %}
  1234.                                                                 {% set link = 'https://www.furbify.sk/furbify-splatkova-platba' %}
  1235.                                                             {% endif %}
  1236.                                                             <li>{{ "milpay.description.8"|trans({'link': link}) | raw }}</li>
  1237.                                                         </ul>
  1238.                                                     </div>
  1239.                                                     <div class="d-flex w-100 flex-row justify-content-between">
  1240.                                                         <span>{{ 'APR'|trans }}</span>
  1241.                                                         <span>0 %</span>
  1242.                                                     </div>
  1243.                                                     <div class="d-flex w-100 flex-row justify-content-between">
  1244.                                                         <span>{{ 'Service fee'|trans }}</span>
  1245.                                                         <span>0 {{ currency }}</span>
  1246.                                                     </div>
  1247.                                                     <div class="d-flex w-100 flex-row justify-content-between">
  1248.                                                         <span><b>{{ 'Total amount'|trans }}</b></span>
  1249.                                                         <span><b>{{ priceToShow|price(currency, precision) }}</b></span>
  1250.                                                     </div>
  1251.                                                     <div class="d-flex w-100 flex-row justify-content-end mt-2">
  1252.                                                         <a href="{{ milpayInfo.prescoreLink }}"
  1253.                                                            target="_blank"
  1254.                                                            class="btn instacash-modal-button">{{ 'Start prescore'|trans }}</a>
  1255.                                                     </div>
  1256.                                                     <div class="d-flex w-100 flex-row justify-content-end mt-2 text-danger"
  1257.                                                          style="font-size: 12px">
  1258.                                                         {{ "milpay.warning" |trans }}
  1259.                                                     </div>
  1260.                                                 </div>
  1261.                                             </div>
  1262.                                         </div>
  1263.                                     </div>
  1264.                                 </div>
  1265.                             {% endif %}
  1266.                             <div class="text-center other-info mt-2">
  1267.                                 <a href="{% if domainId == 1 %}https://www.furbify.sk/furbify-splatkova-platba{% elseif (domainId == 9) %}https://www.furbify.cz/platba-na-splatky{% else %}https://www.furbify.hu/furbify-reszletfizetes{% endif %}"
  1268.                                    target="_blank">{{ 'More informations'|trans }}</a>
  1269.                             </div>
  1270.                         </div>
  1271.                     </div>
  1272.                 {% endif %}
  1273.                 <div class="product-detail-help-box">
  1274.                     <div class="product-detail-help-box-head">
  1275.                         <div class="help-box-image" {% if app.session.get('domainId') == const('Domain::DOMAIN_ID_WS_EU') %} style="width: 0; height: 0; overflow: hidden;" {% endif %}>
  1276.                             {% if salesManager.photoFilename != '' %}
  1277.                                 <img decoding="async"
  1278.                                      src="{{ asset('theme/images/' ~ salesManager.photoFilename) }}"
  1279.                                      alt="{{ salesManager.name }}" width="90" height="90">
  1280.                                 {%- if "now"|date('w') in [1,2,3,4,5] and "now"|date('H') >= 8 and "now"|date('H') <= 16 -%}
  1281.                                     <span class="user-status-active"></span>
  1282.                                 {%- endif -%}
  1283.                             {% endif %}
  1284.                         </div>
  1285.                         <div class="help-box-right-side">
  1286.                             <div class="product-help-text">
  1287.                                 <p>{{- 'If you have any questions about the product or you would like to order on phone, feel free to contact us!'|trans({'phoneNumber': salesManager.phoneNumber})|raw -}}</p>
  1288.                             </div>
  1289.                             {% if domainId in [7] %}
  1290.                                 <strong>+421 (0) 220 512 060</strong>
  1291.                             {% elseif domainId in [11] %}
  1292.                                 <strong>webshop@furbify.eu</strong>
  1293.                             {% else %}
  1294.                                 <button
  1295.                                         class="btn mt-2 help-box-callback"
  1296.                                         id="product-detail-request-callback"
  1297.                                         data-bs-toggle="modal" data-bs-target="#modal-callback"
  1298.                                 >
  1299.                                     <strong>{{ 'Request call back'|trans }}</strong>
  1300.                                 </button>
  1301.                             {% endif %}
  1302.                         </div>
  1303.                     </div>
  1304.                     <div class="modal fade" id="modal-callback" tabindex="-1" data-bs-backdrop="static"
  1305.                          aria-labelledby="modalCallbackLabel" aria-hidden="true">
  1306.                         <div class="modal-dialog">
  1307.                             <div class="modal-content">
  1308.                                 <div class="modal-header">
  1309.                                     <h3 class="modal-title"
  1310.                                         id="modalCallbackLabel">{{ 'Request call back'|trans }}</h3>
  1311.                                     <button type="button" class="btn-close" data-bs-dismiss="modal"
  1312.                                             aria-label="{{ 'Close' |trans }}"><i class="fal fa-times"></i></button>
  1313.                                 </div>
  1314.                                 <div class="modal-body">
  1315.                                     <p>{{ 'Send us your phone number and we will call you back' | trans }}.</p>
  1316.                                     <div class="product-callback-request-holder d-flex justify-content-center mt-2">
  1317.                                         {{ macros.printCallbackRequest(product_id, loggedInCustomer) }}
  1318.                                     </div>
  1319.                                 </div>
  1320.                             </div>
  1321.                         </div>
  1322.                     </div>
  1323.                 </div>
  1324.                 {%- if
  1325.                     customerTypeId == 2 and
  1326.                     product_type_id in [
  1327.                     const('ProductType::PRODUCT_TYPE_ID_MONITOR'),
  1328.                     const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  1329.                     const('ProductType::PRODUCT_TYPE_ID_PC'),
  1330.                     const('ProductType::PRODUCT_TYPE_ID_PC_SET'),
  1331.                     const('ProductType::PRODUCT_TYPE_ID_ALL_IN_ONE'),
  1332.                     const('ProductType::PRODUCT_TYPE_ID_SMARTPHONE')
  1333.                 ] -%}
  1334.                     <div class="col-md-12 text-center mt-3">
  1335.                         <form action="{{ path('product_partner_label_download', {id: product_id}) }}" method="POST"
  1336.                               id="print-label-form" target="_blank">
  1337.                             <input type="number" name="print-label-price" required="required" min="0" step="1"
  1338.                                    class="print-label-price" value="{{ suggestedVatPrice }}"> {{ currency }}
  1339.                             <button class="print-label" id="print-label"><i
  1340.                                         class="fas fa-print"></i> {{ 'Print label' | trans }}</button>
  1341.                         </form>
  1342.                     </div>
  1343.                 {% endif %}
  1344.             </div>
  1345.         </div>
  1346.     </div>
  1347. </div>
  1348. <div class="grey-background py-md-5">
  1349.     <section class="container variant-list mobile-min-content-carousel">
  1350.         <h2 class="mb-4">{{ 'variations'|trans }}:</h2>
  1351.         <div id="variants-carousel" class="variant-list-wrapper owl-carousel">
  1352.             {%- for i in 1..3 -%}
  1353.                 <a href="#" class="product-list-minimal-item empty">
  1354.                     <div class="min-image">
  1355.                         <img src="#" width="278" height="210">
  1356.                         <div class="quality-label label"></div>
  1357.                     </div>
  1358.                     <div class="min-details">
  1359.                         <h5></h5>
  1360.                         <span class="attribute-list"></span>
  1361.                         <div class="prices">
  1362.                             <span class="price"></span>
  1363.                             <strong class="price-for-discount"></strong>
  1364.                         </div>
  1365.                     </div>
  1366.                 </a>
  1367.             {%- endfor -%}
  1368.         </div>
  1369.     </section>
  1370. </div>
  1371. <div class="container mobile-full">
  1372.     {% set haveProductModelDescription = productModelDescription is defined %}
  1373.     <ul class="nav nav-tabs product-info-holder" id="myTab" role="tablist">
  1374.         {% if haveProductModelDescription %}
  1375.             <li class="nav-item product-info-nav-item" role="presentation">
  1376.                 <button class="nav-link active" id="product-model-description-tab" data-bs-toggle="tab"
  1377.                         data-bs-target="#product-model-description" type="button" role="tab"
  1378.                         aria-controls="product-model-description" aria-selected="true">
  1379.                     {{ "Description" | trans }}
  1380.                 </button>
  1381.             </li>
  1382.         {% endif %}
  1383.         <li class="nav-item product-info-nav-item" role="presentation">
  1384.             <button class="nav-link {% if haveProductModelDescription == false %} active {% endif %}"
  1385.                     id="full-specification-tab" data-bs-toggle="tab" data-bs-target="#full-specification"
  1386.                     type="button" role="tab" aria-controls="full-specification" aria-selected="false">
  1387.                 {{ 'Full specification' | trans }}
  1388.             </button>
  1389.         </li>
  1390.         <li class="nav-item product-info-nav-item" role="presentation">
  1391.             <button class="nav-link" id="shipping-and-pay-tab" data-bs-toggle="tab"
  1392.                     data-bs-target="#shipping-and-pay" type="button" role="tab" aria-controls="shipping-and-pay"
  1393.                     aria-selected="false">
  1394.                 {{ 'Shipping & pay' | trans }}
  1395.             </button>
  1396.         </li>
  1397.         <!-- REVIEWS -->
  1398.         {# <li class="nav-item product-info-nav-item" role="presentation">
  1399.             <button class="nav-link" id="reviews-tab" data-bs-toggle="tab" data-bs-target="#reviews" type="button"
  1400.                     role="tab" aria-controls="reviews" aria-selected="false">
  1401.                 {{ 'Reviews' | trans }} ({{ reviewCount }})
  1402.             </button>
  1403.         </li>#}
  1404.     </ul>
  1405.     <div class="tab-content" id="productInfoTab">
  1406.         {% if haveProductModelDescription %}
  1407.             <div class="tab-pane fade show active" id="product-model-description" role="tabpanel"
  1408.                  aria-labelledby="product-model-description-tab" style="margin-bottom: 30px">
  1409.                 {% if haveProductModelDescription %}
  1410.                     {{ productModelDescription | raw }}
  1411.                 {% endif %}
  1412.             </div>
  1413.         {% endif %}
  1414.         <div class="tab-pane fade {% if haveProductModelDescription == false %} show active {% endif %}"
  1415.              id="full-specification" role="tabpanel" aria-labelledby="full-specification-tab">
  1416.             <div class="accordion my-2 my-md-4">
  1417.                 <div class="accordion-item">
  1418.                     <h2 class="accordion-header" id="headingOne">
  1419.                         {{ 'Full specification' | trans }}
  1420.                     </h2>
  1421.                     <div id="specificationCollapse" class="accordion-collapse collapse show"
  1422.                          aria-labelledby="headingOne">
  1423.                         <div class="accordion-body">
  1424.                             {% if 'Chromebook' in labels %}
  1425.                                 <div class="alert alert-info py-2 mt-0 mb-3 border-0" role="alert">
  1426.                                     {{- 'Chromebook OS alert'|trans|raw -}}
  1427.                                 </div>
  1428.                             {% endif %}
  1429.                             <div class="">
  1430.                                 <table class="table table-top-borderless">
  1431.                                     <tbody>
  1432.                                     {% for item in specificationList|slice(0, 10) %}
  1433.                                         <tr>
  1434.                                             <td width="30%">{{ item.title|trans }}</td>
  1435.                                             <td>{{ item.content|raw }}</td>
  1436.                                         </tr>
  1437.                                     {% endfor %}
  1438.                                     </tbody>
  1439.                                     <tbody class="hidden-specification d-none">
  1440.                                     {% for item in specificationList|slice(10, specificationList|length) %}
  1441.                                         <tr>
  1442.                                             <td width="30%">{{ item.title|trans }}</td>
  1443.                                             <td style="text-align: justify; text-justify: inter-word;">{{ item.content|raw }}</td>
  1444.                                         </tr>
  1445.                                     {% endfor %}
  1446.                                     </tbody>
  1447.                                     <tbody>
  1448.                                     <tr style="background-color: unset;">
  1449.                                         <td colspan="2">
  1450.                                             <button class="show-full-spec mt-2"
  1451.                                                     data-text-more="{{ 'Show full specification'|trans }}"
  1452.                                                     data-text-less="{{ 'Read less'|trans }}">
  1453.                                                 <span>{{ 'Show full specification'|trans }}</span>
  1454.                                                 <div class="arrow-icon"></div>
  1455.                                             </button>
  1456.                                         </td>
  1457.                                     </tr>
  1458.                                     </tbody>
  1459.                                 </table>
  1460.                                 {% if containerParts is not empty %}
  1461.                                     {% for part in containerParts %}
  1462.                                         <h3 class="pt-4">{{ part.title }}</h3>
  1463.                                         <table class="table table-top-borderless">
  1464.                                             {% for attribute in part.attributes %}
  1465.                                                 <tr>
  1466.                                                     <td width="30%">{{ attribute.title }}:</td>
  1467.                                                     <td>
  1468.                                                         {% if attribute.options %}
  1469.                                                             {% for option in attribute.options %}
  1470.                                                                 <span class="fw-bold">{{ ( option.multiplier > 0 ? option.multiplier ~ ' x ' : '' ) ~ option.title }}</span>
  1471.                                                                 <br>
  1472.                                                             {% endfor %}
  1473.                                                         {% endif %}
  1474.                                                     </td>
  1475.                                                 </tr>
  1476.                                             {% endfor %}
  1477.                                         </table>
  1478.                                     {% endfor %}
  1479.                                 {% endif %}
  1480.                                 {% if additionalDetail != '' %}
  1481.                                     <table class="col-sm-12">
  1482.                                         <tr>
  1483.                                             <td>
  1484.                                                 {{ additionalDetail | raw }}
  1485.                                             </td>
  1486.                                         </tr>
  1487.                                     </table>
  1488.                                 {% endif %}
  1489.                             </div>
  1490.                         </div>
  1491.                     </div>
  1492.                 </div>
  1493.             </div>
  1494.         </div>
  1495.         <div class="tab-pane fade" id="shipping-and-pay" role="tabpanel" aria-labelledby="shipping-and-pay-tab">
  1496.             <div class="accordion my-2 my-md-4">
  1497.                 <div class="accordion-item">
  1498.                     <h2 class="accordion-header" id="headingTwo">
  1499.                         {{ 'Shipping & pay' | trans }}
  1500.                     </h2>
  1501.                     <div id="shippingPaymentCollapse" class="accordion-collapse collapse show"
  1502.                          aria-labelledby="headingTwo">
  1503.                         <div class="accordion-body">
  1504.                             {% set currentDate = "now"|date('Ymd') %}
  1505.                             <h3 class="mb-3">{{ 'Shipping type list'|trans }}:</h3>
  1506.                             <div class="w-100 mb-5">
  1507.                                 {% for method in shippingMethods %}
  1508.                                     <div class="d-flex shipping-payment-flex">
  1509.                                         <div class="method-title">
  1510.                                             {{- method.title -}}
  1511.                                         </div>
  1512.                                         <div class="method-info d-flex">
  1513.                                             {% if method.price %}
  1514.                                                 {% if typeId in [
  1515.                                                     const('ProductType::PRODUCT_TYPE_ID_MONITOR'),
  1516.                                                     const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  1517.                                                     const('ProductType::PRODUCT_TYPE_ID_PC'),
  1518.                                                     const('ProductType::PRODUCT_TYPE_ID_PC_SET'),
  1519.                                                     const('ProductType::PRODUCT_TYPE_ID_ALL_IN_ONE'),
  1520.                                                     const('ProductType::PRODUCT_TYPE_ID_TABLET'),
  1521.                                                     const('ProductType::PRODUCT_TYPE_ID_SMARTPHONE')
  1522.                                                 ] and defaultLocale != 'en' and currentDate >= 20241123 and currentDate <= 20241130 %}
  1523.                                                     {% set shippingPrice = 'Free'|trans %}
  1524.                                                 {% else %}
  1525.                                                     {% set shippingPrice = method.price | price(currency, precision) %}
  1526.                                                 {% endif %}
  1527.                                                 <span>{{- shippingPrice -}}{% if method.type == const('DomainShippingType::SHIPPING_TYPE_MPL_ID') %} + {{ 'Package fee'|trans|lower }} 10000 Ft{% endif %}</span>
  1528.                                                 {%- if method.deliveryDays != 0 -%}
  1529.                                                     <span class="d-none d-md-block">
  1530.                                                         ({{ 'shipping working days' | trans({'days': method.deliveryDays}) }})
  1531.                                                     </span>
  1532.                                                 {%- endif -%}
  1533.                                             {% endif %}
  1534.                                         </div>
  1535.                                     </div>
  1536.                                 {% endfor %}
  1537.                             </div>
  1538.                             <h3 class="mb-3">{{ 'Payment type list'|trans }}:</h3>
  1539.                             <div class="w-100 mb-5">
  1540.                                 {% for method in paymentMethods %}
  1541.                                     <div class="d-flex shipping-payment-flex">
  1542.                                         <div class="method-title">
  1543.                                             <span>{{- method.title -}}</span>
  1544.                                             {%- if method.plusInfo -%}
  1545.                                                 <span class="d-none d-md-block">({{ method.plusInfo }})</span>
  1546.                                             {%- endif -%}
  1547.                                         </div>
  1548.                                         <div class="method-info d-flex method-label-price{% if (method.price == 0) %} free{% endif %}">
  1549.                                             {%- if method.price > 0 -%}
  1550.                                                 {{- method.price | price(currency, precision) }}
  1551.                                             {%- else -%}
  1552.                                                 {{- 'Free'|trans -}}
  1553.                                             {%- endif -%}
  1554.                                         </div>
  1555.                                     </div>
  1556.                                 {% endfor %}
  1557.                             </div>
  1558.                         </div>
  1559.                     </div>
  1560.                 </div>
  1561.             </div>
  1562.         </div>
  1563.         <!-- REVIEWS -->
  1564.         {#<div class="tab-pane fade" id="reviews" role="tabpanel" aria-labelledby="reviews-tab">
  1565.             <div class="accordion my-2 my-md-4">
  1566.                 <div class="accordion-item">
  1567.                     <h2 class="accordion-header" id="headingThree">
  1568.                         {{ 'Reviews' | trans }} ({{ reviewCount }})
  1569.                     </h2>
  1570.                     <div id="reviewCollapse" aria-labelledby="headingThree">
  1571.                         <div class="accordion-body">
  1572.                             {% if reviewCount == 0 %}
  1573.                                 <div class="alert alert-warning" role="alert">
  1574.                                     {{ 'There are no reviews for this product' | trans }}
  1575.                                 </div>
  1576.                             {% endif %}
  1577.                             <div class="row">
  1578.                                 <div class="col-md-12 text-start mt-sm-5 mt-md-2 mb-5">
  1579.                                     {% if reviewCount == 0 %}
  1580.                                         {% if reviewsRedirectLink %}
  1581.                                             <a class="redirect"
  1582.                                                href="{{ reviewLinkWithFilter }}">{{ 'All <strong>{quality}</strong> quality {category} review...' | trans({'quality': quality, 'category': type}) | raw }}</a>
  1583.                                         {% endif %}
  1584.                                         <h3 class="d-block">{{ 'Did you buy this product?' | trans }}</h3>
  1585.                                     {% else %}
  1586.                                         <p class="review-stars-display mb-0">{{ reviewStars|number_format(1, '.', '') }}</p>
  1587.                                         <div class="review-stars pt-0">
  1588.                                             {% for star in 1..5 %}
  1589.                                                 <i class="review-star{% if reviewStars >= star %} review-star-full{% endif %}{% if reviewStars < star and reviewStars == (star - 0.5) %} review-star-half-full{% endif %}"></i>
  1590.                                             {% endfor %}
  1591.                                         </div>
  1592.                                         <p>{{ 'From {review_count} reviews in total.' | trans({'review_count':reviewCount}) }}</p>
  1593.                                     {% endif %}
  1594.                                     {% if reviewForm %}
  1595.                                         <a href="#write" data-bs-toggle="collapse" role="button"
  1596.                                            aria-expanded="false" aria-controls="write" class="btn btn-primary"
  1597.                                            style="color: white; text-decoration: none">{{ 'I want to review' | trans }}</a>
  1598.                                     {% else %}
  1599.                                         <p class="mb-4">{{ 'Share your experiences with others' | trans }}, <a
  1600.                                                     href="{{ path('customer_login') }}"
  1601.                                                     class="">{{ 'Submit a review' | trans }}</a></p>
  1602.                                     {% endif %}
  1603.                                 </div>
  1604.                             </div>
  1605.                             <div class="row collaps" id="write">
  1606.                                 <div class="col testimonial-form-col">
  1607.                                     <div class="testimonial-form pb-sm-0">
  1608.                                         {% if reviewForm %}
  1609.                                             {{ form_start(reviewForm, { 'attr': { 'enctype': 'multipart/form-data' }}) }}
  1610.                                             <h3>{{ 'Send a review' | trans }}:</h3>
  1611.                                             <div class="row mb-3">
  1612.                                                 {{- inputMacros.inputGroup(reviewForm.name, { 'cols': 'col-12' }) -}}
  1613.                                             </div>
  1614.                                             <div class="row mb-3">
  1615.                                                 {{- inputMacros.inputGroup(reviewForm.text, { 'cols': 'col-12' }) -}}
  1616.                                             </div>
  1617.                                             <div class="row">
  1618.                                                 <div class="col-sm-6">
  1619.                                                     <label class="form-label">{{ 'Rating' | trans }}</label>
  1620.                                                     <div class="d-flex flex-wrap mb-3 rating">
  1621.                                                         <div class="stars">
  1622.                                                             <i class="fas fa-star" data-star="1"></i>
  1623.                                                             <i class="fas fa-star" data-star="2"></i>
  1624.                                                             <i class="fas fa-star" data-star="3"></i>
  1625.                                                             <i class="fas fa-star" data-star="4"></i>
  1626.                                                             <i class="fas fa-star" data-star="5"></i>
  1627.                                                         </div>
  1628.                                                         <div id="description-for-clicked-star"
  1629.                                                              style="display: flex; margin-left: 15px; align-items: center;">
  1630.                                                             <span style="font-size: 13px; line-height: 1.4;"></span>
  1631.                                                         </div>
  1632.                                                         {%- if form_errors(reviewForm.stars) -%}
  1633.                                                             <div class="error-text m-0 w-100 flex-1"
  1634.                                                                  style="padding-top: 12px;">{{ form_errors(reviewForm.stars) }}</div>
  1635.                                                         {%- endif -%}
  1636.                                                     </div>
  1637.                                                 </div>
  1638.                                             </div>
  1639.                                             <div class="row pb-5">
  1640.                                                 <div class="col-sm-12">
  1641.                                                     <label class="form-label">{{ 'Upload photos' | trans }}</label>
  1642.                                                     <br>
  1643.                                                     <input type="file" class="form-control" name="reviewImages[]"
  1644.                                                            id="reviewImages" accept="image/png,image/jpeg,image/jpg"
  1645.                                                            multiple="multiple"/>
  1646.                                                     <small>({{ '.jpg or .png file format' | trans }})</small>
  1647.                                                 </div>
  1648.                                             </div>
  1649.                                             <div class="buttons buttons-review pt-2">
  1650.                                                 <button type="submit"
  1651.                                                         class="btn btn-primary">{{ 'Send' | trans }}</button>
  1652.                                             </div>
  1653.                                             {{ form_widget(reviewForm.stars, { 'attr': { 'class': 'd-none' }}) }}
  1654.                                             {{ form_end(reviewForm) }}
  1655.                                         {% endif %}
  1656.                                     </div>
  1657.                                 </div>
  1658.                             </div>
  1659.                             <div id="review" class="row testimonial-list">
  1660.                                 {% if reviewCount > 0 %}
  1661.                                     <h3 class="d-block mt-3 mb-4 w-100 text-center">{{ 'Reviews for {product_family_name} product family from our customers' | trans({'product_family_name':title}) }}
  1662.                                         :</h3>
  1663.                                 {% endif %}
  1664.                                 {% for review in reviews %}
  1665.                                     <div class="col-12 mb-3">
  1666.                                         <div class="testimonial clearfix mt-0">
  1667.                                             <div class="testimonial-stars w-100 mb-md-3">
  1668.                                                 {% for star in 1..5 %}
  1669.                                                     <i class="fas fa-star{% if review.stars >= star %} yellow{% endif %}"></i>
  1670.                                                 {% endfor %}
  1671.                                                 <p class="ms-2"><strong>{{ review.stars }} / 5</strong></p>
  1672.                                             </div>
  1673.                                             <p class="d-block">{% if review.message != '' %}„{{ review.message }}” - {% endif %}
  1674.                                                 <strong>{{ review.name }}</strong></p>
  1675.                                             <p class="testimonial-source-product m-0">
  1676.                                                 <small>{{ 'Purchased product' | trans }}
  1677.                                                     :<br><strong>{{ review.product_name }}</strong>
  1678.                                                     - {{ review.product_config }} {% if review.reviewDate is defined %}
  1679.                                                         <span class="mt-2 d-block">{{ 'Review date' | trans }}
  1680.                                                         : {{ review.reviewDate }}</span>{% endif %}</small></p>
  1681.                                             {% if review.reviewImages is defined %}
  1682.                                                 <div class="row review-images">
  1683.                                                     {% for reviewImage in review.reviewImages %}
  1684.                                                         <div class="col-md-6">
  1685.                                                         <span>
  1686.                                                             <img decoding="async" src="{{ reviewImage.thumb }}"
  1687.                                                                  alt="{{ title }} {{ 'review' | trans }} {{ review.name }} #{{ loop.index }}">
  1688.                                                         </span>
  1689.                                                         </div>
  1690.                                                     {% endfor %}
  1691.                                                 </div>
  1692.                                             {% endif %}
  1693.                                         </div>
  1694.                                     </div>
  1695.                                 {% endfor %}
  1696.                             </div>
  1697.                         </div>
  1698.                     </div>
  1699.                 </div>
  1700.             </div>
  1701.         </div>#}
  1702.     </div>
  1703. </div>
  1704. {% if similarProducts %}
  1705.     <div class="grey-background py-md-5">
  1706.         <section class="container mobile-min-content-carousel">
  1707.             <h2 class="mb-4">{{ 'Similar products' | trans }}</h2>
  1708.             <div class="owl-carousel" id="similar-products-carousel">
  1709.                 {{ macros.printProductListMinimal(similarProducts, currency, precision) }}
  1710.             </div>
  1711.         </section>
  1712.     </div>
  1713. {% endif %}
  1714.     {%- if defaultLocale in ['sk','hu'] and
  1715.         product_type_id in [
  1716.         const('ProductType::PRODUCT_TYPE_ID_MONITOR'),
  1717.         const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  1718.         const('ProductType::PRODUCT_TYPE_ID_PC'),
  1719.         const('ProductType::PRODUCT_TYPE_ID_PC_SET'),
  1720.         const('ProductType::PRODUCT_TYPE_ID_ALL_IN_ONE')
  1721.     ] and
  1722.         quality != 'New' -%}
  1723.         <div class="container mobile-full">
  1724.             <div class="product-furbishing-description">
  1725.                 {% set productDetailFooterTranslationKey = ('product.detail.footer.' ~ product_type_id) | trans({'year':warrantyYear}) | raw | split("</p>", 2) %}
  1726.                 <div>{{- productDetailFooterTranslationKey[0]|raw -}}</div>
  1727.                 <div class="collapse" id="category-extra-description">
  1728.                     <div>
  1729.                         {{- productDetailFooterTranslationKey[1]|raw -}}
  1730.                     </div>
  1731.                 </div>
  1732.                 <a
  1733.                         id="category-extra-description-toggle"
  1734.                         href="#category-extra-description"
  1735.                         role="button"
  1736.                         aria-expanded="false"
  1737.                         aria-controls="category-extra-description"
  1738.                         data-bs-toggle="collapse"
  1739.                         data-bs-target="#category-extra-description"
  1740.                         data-txt-read-more="{{ 'Read more'|trans }}"
  1741.                         data-txt-read-less="{{ 'Read less'|trans }}"
  1742.                 >
  1743.                     {{- 'Read more'|trans -}}
  1744.                 </a>
  1745.             </div>
  1746.         </div>
  1747.     {% endif %}
  1748.     {% if lastCacheUpdate is defined and showAdminLoginPanel %}
  1749.         <input type="hidden" id="input-last-cache-update" value="{{ lastCacheUpdate |date('d.m.Y H:i') }}">
  1750.     {% endif %}
  1751.     {{ include(template_from_string(contentBottom)) }}
  1752. </div>
  1753. {% if orderable %}
  1754.     <div class="modal fade" id="modal-price-monitor" tabindex="-1" data-bs-backdrop="static"
  1755.          aria-labelledby="modalPriceMonitorLabel" aria-hidden="true">
  1756.         <div class="modal-dialog">
  1757.             <div class="modal-content">
  1758.                 <div class="modal-header">
  1759.                     <h3 class="modal-title" id="modalPriceMonitorLabel">{{ 'Price monitor' |trans }}</h3>
  1760.                     <button type="button" class="btn-close" data-bs-dismiss="modal"
  1761.                             aria-label="{{ 'Close' |trans }}"><i class="fal fa-times"></i></button>
  1762.                 </div>
  1763.                 <div class="modal-body">
  1764.                     <div class="success d-none pt-3">
  1765.                         <p class="text-center">
  1766.                             <img decoding="async" src="/theme/images/price-monitor-success-icon.svg" width="78"
  1767.                                  height="78" alt="{{ 'Price monitor activated' |trans }}">
  1768.                         </p>
  1769.                         <p class="text-center mb-4">{{ 'Price monitor activated' |trans }}</p>
  1770.                         <button type="button" class="btn btn-primary"
  1771.                                 data-bs-dismiss="modal">{{ 'Back to shopping' |trans }}</button>
  1772.                     </div>
  1773.                     <div class="form">
  1774.                         <div class="mb-3">
  1775.                             <label class="form-label"
  1776.                                    for="price-monitor-value">{{ 'Notify me when the product price is lower than' |trans }}
  1777.                                 :</label>
  1778.                             <div class="input-group">
  1779.                                 {% if special %}
  1780.                                     {% set currentPrice = special %}
  1781.                                 {% else %}
  1782.                                     {% set currentPrice = price %}
  1783.                                 {% endif %}
  1784.                                 <input type="text" class="form-control" id="price-monitor-value" min="1"
  1785.                                        max="{{ currentPrice }}" value=""
  1786.                                        aria-describedby="price-monitor-value-addon">
  1787.                                 <input type="hidden" id="price-monitor-current-price" value="{{ currentPrice }}">
  1788.                                 <button class="input-group-text">
  1789.                                     <span id="price-monitor-value-addon">{{ currency }} ({{ 'with VAT' |trans }})</span>
  1790.                                 </button>
  1791.                             </div>
  1792.                             <small>{{ 'Current price'|trans }}:
  1793.                                 <strong>{{ currentPrice | price(currency, precision) }}</strong></small>
  1794.                         </div>
  1795.                             <div class="mb-3">
  1796.                                 <label class="form-label" for="price-monitor-name">{{ 'Firstname' |trans }}:</label>
  1797.                                 <input type="text" class="form-control" id="price-monitor-name"
  1798.                                        value="{{ ( isLoggedIn and customer.firstName is defined ? customer.firstName : '' ) }}">
  1799.                             </div>
  1800.                         <div class="mb-3">
  1801.                             <label class="form-label" for="price-monitor-email">{{ 'Email' |trans }}:</label>
  1802.                             <input type="email" class="form-control" id="price-monitor-email"
  1803.                                    value="{{ ( isLoggedIn and customer.email is defined ? customer.email : '' ) }}">
  1804.                                 <div class="text-warning mt-1 d-none"></div>
  1805.                         </div>
  1806.                         <button id="button-add-price-monitor"
  1807.                                 class="btn btn-primary">{{ 'Set price monitoring' |trans }}</button>
  1808.                     </div>
  1809.                 </div>
  1810.             </div>
  1811.         </div>
  1812.     </div>
  1813. {% endif %}
  1814.     {% if cetelem_calculator %}
  1815.         <div class="modal fade" id="cetelemModal" tabindex="-1" aria-labelledby="cetelemLabel" aria-hidden="true">
  1816.             <div class="modal-dialog modal-lg">
  1817.                 <div class="modal-content">
  1818.                     <div class="modal-header">
  1819.                         <h3 class="modal-title" id="cetelemLabel">{{ 'Cetelem loan' | trans }}</h3>
  1820.                         <button type="button" class="btn-close" data-bs-dismiss="modal"
  1821.                                 aria-label="{{ 'Close' |trans }}"><i class="fal fa-times"></i></button>
  1822.                     </div>
  1823.                     <div class="modal-body p-4">
  1824.                         <p>{{ 'cetelem calculator description' | trans({'cetelem_desc_page_link' : cetelem_desc_page_link}) | raw }}</p>
  1825.                         <div id="cetelem-calc-container" data-country="{{ cetelem_calculator_country }}"><i
  1826.                                     class="far fa-cog fa-spin"></i></div> {# Loaded dynamically with ajax if needed #}
  1827.                     </div>
  1828.                 </div>
  1829.             </div>
  1830.         </div>
  1831.     {% endif %}
  1832.     {% if quatro_calculator %}
  1833.         <div class="modal fade" id="quatroModal" tabindex="-1" aria-labelledby="quatroLabel" aria-hidden="true">
  1834.             <div class="modal-dialog modal-lg">
  1835.                 <div class="modal-content">
  1836.                     <div class="modal-header">
  1837.                         <h3 class="modal-title" id="quatroLabel">{{ 'Quatro loan' | trans }}</h3>
  1838.                         <button type="button" class="btn-close" data-bs-dismiss="modal"
  1839.                                 aria-label="{{ 'Close' |trans }}"><i class="fal fa-times"></i></button>
  1840.                     </div>
  1841.                     <div class="modal-body p-0">
  1842.                         <div id="quatro-calc-container" class="d-flex"></div>
  1843.                     </div>
  1844.                 </div>
  1845.             </div>
  1846.         </div>
  1847.     {% endif %}
  1848. <div class="modal fade" id="shippingListModal" tabindex="-1" aria-labelledby="shippingListLabel" aria-hidden="true">
  1849.     <div class="modal-dialog">
  1850.         <div class="modal-content">
  1851.             <div class="modal-header">
  1852.                 <h3 class="modal-title" id="shippingListLabel">{{ 'Delivery prices' | trans }}</h3>
  1853.                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close' |trans }}"><i
  1854.                             class="fal fa-times"></i></button>
  1855.             </div>
  1856.             <div class="modal-body px-0 py-4">
  1857.                 {% set currentDate = "now"|date('Ymd') %}
  1858.                 {% for method in shippingMethods %}
  1859.                     <div class="method-row" data-restriction="{{ method.restriction | json_encode() }}"
  1860.                          data-title="{{ method.title }}" data-type="{{ method.type }}"
  1861.                          data-price="{{ method.price > 0 ? method.price | price(currency, precision) : 'false' }}">
  1862.                         <label for="shipping-method-{{ method.id }}">
  1863.                             <div class="method-label-pic">
  1864.                                 {% if method.icon %}
  1865.                                     <img decoding="async" src="{{ asset('theme/images/' ~ method.icon) }}" alt=""
  1866.                                          width="42" height="42"/>
  1867.                                 {% endif %}
  1868.                             </div>
  1869.                             <div class="method-label-text">
  1870.                                     <span><strong>{{ method.title }}</strong>
  1871.                                         {% if method.price %}
  1872.                                             {% if typeId in [
  1873.                                                 const('ProductType::PRODUCT_TYPE_ID_NOTEBOOK'),
  1874.                                             ]
  1875.                                                 and method.type == const('DomainShippingType::SHIPPING_TYPE_PACKETA_PICKUP_POINT_ID')
  1876.                                                 and currentDate >= 20250519
  1877.                                                 and currentDate <= 20250630 %}
  1878.                                                 {% set shippingPrice = 'Free'|trans %}
  1879.                                             {% else %}
  1880.                                                 {% set shippingPrice = method.price | price(currency, precision) %}
  1881.                                             {% endif %}
  1882.                                             <br/>
  1883.                                             <small>{{ shippingPrice }}{% if method.type == const('DomainShippingType::SHIPPING_TYPE_MPL_ID') %} + {{ 'Package fee'|trans|lower }} {{ MPL_PACKAGE_FEE }} Ft{% endif %}</small>
  1884.                                         {% endif %}
  1885.                                         {% if method.type == 8 %}
  1886.                                             <div id="packeta-point-address">{% if packetaPickupPointTitle is defined and packetaPickupPointTitle != '' %}{{ packetaPickupPointTitle }}{% endif %}</div>
  1887.                                         {% endif %}
  1888.                                     </span>
  1889.                             </div>
  1890.                             <span class="method-delivery-date">
  1891.                                     {% if method.deliveryDays != 0 %}
  1892.                                         {{ 'shipping working days' | trans({'days': method.deliveryDays}) }}
  1893.                                     {% endif %}
  1894.                                 </span>
  1895.                         </label>
  1896.                     </div>
  1897.                 {% endfor %}
  1898.             </div>
  1899.         </div>
  1900.     </div>
  1901. </div>
  1902. <div class="modal fade modal-service-pack-info" id="modal-service-pack-info" tabindex="-1"
  1903.      aria-labelledby="modalPriceMonitorLabel" aria-hidden="true">
  1904.     <div class="modal-dialog">
  1905.         <div class="modal-content">
  1906.             <div class="modal-header">
  1907.                 <h3 class="modal-title" id="servicePackTitle">{{ 'Software pack' | trans }}</h3>
  1908.                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close' |trans }}"><i
  1909.                             class="fal fa-times"></i></button>
  1910.             </div>
  1911.             <div class="modal-body">
  1912.                 <p>{{ 'Service pack description' | trans | raw }}</p>
  1913.                 <h6><strong>{{ 'Service pack list header' | trans }}:</strong></h6>
  1914.                 <ul>
  1915.                     <li>{{ 'Picture browser' | trans }}</li>
  1916.                     <li>{{ 'Media players' | trans }}</li>
  1917.                     <li>{{ 'CD-DVD drive' | trans }}</li>
  1918.                     <li>{{ 'Music player' | trans }}</li>
  1919.                     <li>{{ 'File zippers' | trans }}</li>
  1920.                     <li>{{ 'File managers' | trans }}</li>
  1921.                     <li>{{ 'Open office' | trans }}</li>
  1922.                     <li>{{ 'Web browsers' | trans }}</li>
  1923.                 </ul>
  1924.                 <small>({{ 'Service pack bottom info' | trans }})</small>
  1925.             </div>
  1926.         </div>
  1927.     </div>
  1928. </div>
  1929.     <div class="add-to-cart-always-visible pt-2">
  1930.         <div class="row mb-1 mr-0">
  1931.             <div class="container col-12 col-md-10 margin-auto">
  1932.                 <div class="row p-2 px-4 vertical-center">
  1933.                     <div class="col-8 col-md-6 col-lg-8  p-0 m-0">
  1934.                         <div class="row  p-0 m-0">
  1935.                             <div class="col-12 col-md-12  p-0 m-0 ">
  1936.                                 <strong class="footer-item-title">
  1937.                                     {{- title|raw -}}
  1938.                                 </strong>
  1939.                             </div>
  1940.                             <div class="col-12 col-md-none vertical-center p-0 m-0">
  1941.                                 <strong id="grossPriceFooter" class="d-inline d-md-none text-left mb-0">
  1942.                                     {% if basePrice == 'net' %}
  1943.                                         {% if special %}
  1944.                                             {{- rawDiscountPriceWoVAT |price(currency, precision) -}}
  1945.                                         {% else %}
  1946.                                             {{ priceWoVAT |price(currency, precision) }}
  1947.                                         {% endif %}
  1948.                                     {% elseif customerTypeId == 2 %}
  1949.                                         {% if special %}
  1950.                                             {{ special|price(currency, precision) }}
  1951.                                         {% else %}
  1952.                                             {{ price|price(currency, precision) }}
  1953.                                         {% endif %}
  1954.                                     {% else %}
  1955.                                         {% if special %}
  1956.                                             {{ special|price(currency, precision) }}
  1957.                                         {% else %}
  1958.                                             {{ price|price(currency, precision) }}
  1959.                                         {% endif %}
  1960.                                     {% endif %}
  1961.                                 </strong>
  1962.                             </div>
  1963.                         </div>
  1964.                     </div>
  1965.                     <div class="col-4 col-md-6 col-lg-4 vertical-center flex-end">
  1966.                         <strong id="grossPriceFooter2" class="d-none d-md-inline mx-2 mb-0">
  1967.                             {% if basePrice == 'net' %}
  1968.                                 {% if special %}
  1969.                                     {{- rawDiscountPriceWoVAT |price(currency, precision) -}}
  1970.                                 {% else %}
  1971.                                     {{ priceWoVAT |price(currency, precision) }}
  1972.                                 {% endif %}
  1973.                             {% elseif customerTypeId == 2 %}
  1974.                                 {% if special %}
  1975.                                     {{ special|price(currency, precision) }}
  1976.                                 {% else %}
  1977.                                     {{ price|price(currency, precision) }}
  1978.                                 {% endif %}
  1979.                             {% else %}
  1980.                                 {% if special %}
  1981.                                     {{ special|price(currency, precision) }}
  1982.                                 {% else %}
  1983.                                     {{ price|price(currency, precision) }}
  1984.                                 {% endif %}
  1985.                             {% endif %}
  1986.                         </strong>
  1987.                         {%- if hasStockItemAlbum -%}
  1988.                             <button
  1989.                                     type="button"
  1990.                                     data-bs-target="#stockItemSelectModal"
  1991.                                     data-bs-toggle="modal"
  1992.                                     class="btn btn-primary btn-product w-100 rounded-pill m-auto text-nowrap"
  1993.                             >
  1994.                                 <span>
  1995.                                     {{- 'Select product' | trans }}
  1996.                                 </span><i class="fas fa-camera" style="font-size: 22px;"></i>
  1997.                             </button>
  1998.                         {%- else -%}
  1999.                             <button
  2000.                                     id="button-cart-footer"
  2001.                                     class="btn btn-primary btn-product btn-add-to-cart m-auto footer-cart-button mx-0 "
  2002.                                     data-loading-text="{{ 'Loading' | trans }}"
  2003.                             >
  2004.                                 <span>
  2005.                                     {{- 'Add to cart' | trans -}}
  2006.                                 </span>
  2007.                                 <i class="fas fa-shopping-cart footer-cart-button"></i>
  2008.                             </button>
  2009.                         {%- endif -%}
  2010.                     </div>
  2011.                 </div>
  2012.             </div>
  2013.         </div>
  2014.     </div>
  2015.     <div class="modal fade" id="modal-ssd-change-info" tabindex="-1" aria-labelledby="modalSsdChangeInfo"
  2016.          aria-hidden="true">
  2017.         <div class="modal-dialog">
  2018.             <div class="modal-content">
  2019.                 <div class="modal-header">
  2020.                     <h3 class="modal-title" id="ssdChangeInfo"> {{ 'ssdChangeInfo.label' | trans }}</h3>
  2021.                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close' |trans }}"><i
  2022.                                 class="fal fa-times"></i></button>
  2023.                 </div>
  2024.                 <div class="modal-body">
  2025.                     <h6>{{ 'ssdChangeInfo.info'|trans|raw }}</h6>
  2026.                 </div>
  2027.             </div>
  2028.         </div>
  2029.     </div>
  2030.     <div class="modal fade" id="modal-keyboard-reprint-info" tabindex="-1" aria-labelledby="modalKeyboardReprintInfo"
  2031.          aria-hidden="true">
  2032.         <div class="modal-dialog">
  2033.             <div class="modal-content">
  2034.                 <div class="modal-header">
  2035.                     <h3 class="modal-title" id="keyboardReprintInfo"> {{ 'keyboardReprintInfo.label' | trans }}</h3>
  2036.                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close' |trans }}"><i
  2037.                                 class="fal fa-times"></i></button>
  2038.                 </div>
  2039.                 <div class="modal-body">
  2040.                     <h6>{{ 'keyboardReprintInfo.info'|trans|raw }}</h6>
  2041.                 </div>
  2042.             </div>
  2043.         </div>
  2044.     </div>
  2045.     <div class="modal fade" id="modal-new-battery-info" tabindex="-1" aria-labelledby="modalNewBatteryInfo"
  2046.          aria-hidden="true">
  2047.         <div class="modal-dialog">
  2048.             <div class="modal-content">
  2049.                 <div class="modal-header">
  2050.                     <h3 class="modal-title" id="modalNewBatteryInfo">
  2051.                         {{ 'newBatteryInfo.label' | trans }}
  2052.                     </h3>
  2053.                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close' |trans }}"><i
  2054.                                 class="fal fa-times"></i></button>
  2055.                 </div>
  2056.                 <div class="modal-body">
  2057.                     <div class="d-flex gap-2 align-items-start p-3 rounded-3" style="background: #fff8e1; border-left: 4px solid #f59e0b;">
  2058.                         <i class="fal fa-clock mt-1" style="color: #f59e0b; flex-shrink: 0;"></i>
  2059.                         <p class="mb-0 small">{{ 'newBatteryInfo.info'|trans|raw }}</p>
  2060.                     </div>
  2061.                 </div>
  2062.             </div>
  2063.         </div>
  2064.     </div>
  2065.     <div class="modal fade" id="modal-bazaar-warning" tabindex="-1" aria-labelledby="modalBazaarWarning" aria-hidden="true">
  2066.         <div class="modal-dialog">
  2067.             <div class="modal-content">
  2068.                 <div class="modal-header">
  2069.                     <h3 class="modal-title" id="modalBazaarWarning"><i class="far fa-exclamation-triangle mt-1 me-1"></i> {{ 'modal.bazaar.title' | trans }}</h3>
  2070.                 </div>
  2071.                 <div class="modal-body">
  2072.                     <p>{{ 'modal.bazaar.info' |trans }}</p>
  2073.                     <strong>{{ 'modal.bazaar.shortcomings' |trans }}:</strong>
  2074.                     <ul>
  2075.                         <li>{{ 'modal.bazaar.caseA' |trans }}</li>
  2076.                         <li>{{ 'modal.bazaar.caseB' |trans }}</li>
  2077.                         <li>{{ 'modal.bazaar.caseC' |trans }}</li>
  2078.                     </ul>
  2079.                     <p>{{ 'modal.bazaar.before' |trans }}</p>
  2080.                     <div class="alert alert-warning p-3 rounded-3">
  2081.                         <label for="product-bazaar-agree">
  2082.                             <input type="checkbox" id="product-bazaar-agree">
  2083.                             <span>{{ 'modal.bazaar.agree'|trans }}</span>
  2084.                         </label>
  2085.                     </div>
  2086.                 </div>
  2087.                 <div class="modal-footer">
  2088.                     <button id="button-cancel-bazaar" class="btn btn-link">{{ 'modal.bazaar.cancel' |trans }}</button>
  2089.                     <button id="button-confirm-bazaar" class="btn btn-primary" disabled>{{ 'modal.bazaar.submit' |trans }}</button>
  2090.                 </div>
  2091.             </div>
  2092.         </div>
  2093.     </div>
  2094. {% if hasStockItemAlbum %}
  2095.     {% include 'AtechNetCoreBundle/Common/modal.html.twig' with { 'type': 'stock-item-select', 'productType': type } %}
  2096. {% endif %}
  2097. {% endblock %}
  2098. {% block title %}{{ heading_title }} | {{ parent() }}{% endblock %}
  2099. {% block bodyClass %}{% if isBazaar %}is-bazaar{% endif %}{% endblock %}
  2100. {% block meta %}
  2101.     {% set domainTLD = app.request.session.get('defaultLocale') %}
  2102.     {% if domainTLD == 'en' %}
  2103.         {% set domainTLD = 'eu' %}
  2104.     {% endif %}
  2105.     <meta name="description" content="{{ seoDescription }}"/>
  2106.     <meta property="og:url" content="{{ app.request.uri }}"/>
  2107.     <meta property="og:type" content="product"/>
  2108.     <meta property="og:locale" content="{{ app.request.locale |ogLocale }}"/>
  2109.     <meta property="og:title" content="{{ heading_title }}"/>
  2110.     <meta property="og:description" content="{{ seoDescription }}"/>
  2111.     <meta property="og:image"
  2112.           content="{% if images|length > 0 %}{{ images|first.thumb }}{% else %}https://www.furbify.{{ domainTLD }}/theme/images/furbify-share-image.png{% endif %}"/>
  2113. {% endblock %}
  2114. {% block schema %}
  2115.     {{ parent() }}
  2116.     <script type="application/ld+json">
  2117.         {
  2118.     "@context": "https://schema.org",
  2119.     "@type": "BreadcrumbList",
  2120.     "itemListElement": [
  2121.         {% for breadcrumb in breadcrumbs %}
  2122.         {
  2123.             "@type": "ListItem",
  2124.             "position": {{ loop.index }},
  2125.             "name": "{{ breadcrumb.text|e('js') }}",
  2126.             "item": "{{ breadcrumb.href }}"
  2127.         }{% if not loop.last %}{% endif %}
  2128.         {% endfor %}
  2129.         ]
  2130. }
  2131.     </script>
  2132. {% endblock %}
  2133. {% block header %}
  2134.     {{ include(template_from_string(header)) }}
  2135. {% endblock %}
  2136. {% block footer %}
  2137.     {{ include(template_from_string(footer)) }}
  2138. {% endblock %}
  2139. {% block stylesheets %}
  2140.     <link rel="stylesheet"
  2141.           href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/css/bootstrap-select.min.css">
  2142.     <link rel="stylesheet" href="{{ asset('theme/owl-carousel/assets/owl.carousel.min.css') }}">
  2143.     {{ parent() }}
  2144.     <link rel="stylesheet" href="{{ asset('theme/magnific/magnific-popup.min.css') }}">
  2145.     <link rel="stylesheet" href="{{ asset('theme/css/slider-pro.min.css')|appendAssetCache }}">
  2146.     {% if hasStockItemAlbum %}
  2147.         <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"/>
  2148.     {% endif %}
  2149.     {% if (milpayInfo is defined and milpayInfo is not empty) and showKlarna %}
  2150.         <style>
  2151.             #klarna-placement-product-page::part(osm-badge-container) {
  2152.                 width: 80%;
  2153.             }
  2154.         </style>
  2155.     {% endif %}
  2156.     <style>
  2157.         .add-to-cart-always-visible {
  2158.             z-index: 10000000;
  2159.             position: fixed;
  2160.             bottom: -160px;
  2161.             background-color: #fdfdfd;
  2162.             width: 100%;
  2163.             -webkit-box-shadow: 0px -5px 13px 3px rgba(0, 0, 0, 0.27);
  2164.             box-shadow: 0px -5px 13px 3px rgba(0, 0, 0, 0.27);
  2165.             transition: bottom 0.4s ease-in-out, opacity 0.3s ease-in-out;
  2166.         }
  2167.         .add-to-cart-always-visible.visible {
  2168.         {% if app.environment == 'dev' %} bottom: 36px;
  2169.         {% else %} bottom: 0;
  2170.         {% endif %} opacity: 1;
  2171.         }
  2172.         .text-right {
  2173.             text-align: right;
  2174.         }
  2175.         .vertical-center {
  2176.             display: flex;
  2177.             align-items: center;
  2178.             flex-direction: row;
  2179.         }
  2180.         .flex-end {
  2181.             justify-content: flex-end;
  2182.         }
  2183.         .footer-cart-button, .footer-cart-button > span {
  2184.             font-size: 0.8rem !important;
  2185.             padding: 0.3rem;
  2186.             width: auto !important;
  2187.         }
  2188.         .margin-auto {
  2189.             margin-left: auto;
  2190.             margin-right: auto;
  2191.         }
  2192.         .footer-cart-button > i {
  2193.             margin-left: 0 !important;
  2194.         }
  2195.         .footer-item-title {
  2196.             font-size: 0.9rem;
  2197.         }
  2198.         .text-left {
  2199.             text-align: left;
  2200.         }
  2201.     </style>
  2202. {% endblock %}
  2203. {% block javascripts %}
  2204.     {{ parent() }}
  2205.     <script src="{{ asset('theme/magnific/jquery.magnific-popup.min.js') }}"></script>
  2206.     <script src="{{ asset('theme/js/jquery.sliderPro.min.js') }}"></script>
  2207.     <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.min.js"></script>
  2208.     <script type="text/javascript"
  2209.             src="{{ asset('theme/owl-carousel/owl.carousel.min.js'|appendAssetCache) }}"></script>
  2210.     {% if showAdminLoginPanel %}
  2211.         <script src="{{ asset('theme/js/admin-login-panel.js') }}"></script>
  2212.     {% endif %}
  2213.     {% if cetelem_calculator %}
  2214.         <script src="{{ asset('theme/js/cetelem.min.js') }}"></script>
  2215.     {% endif %}
  2216.     {% set basePrice = app.session.get('basePrice') %}
  2217.     <script type="text/javascript">
  2218.         const modalConfirm = () => {
  2219.             return new Promise( (resolve) => {
  2220.                 const element = document.getElementById('modal-bazaar-warning');
  2221.                 const modal = new bootstrap.Modal(element, { backdrop: 'static' });
  2222.                 const buttonConfirm = document.getElementById('button-confirm-bazaar');
  2223.                 const buttonCancel = document.getElementById('button-cancel-bazaar');
  2224.                 const checkbox = document.getElementById('product-bazaar-agree');
  2225.                 let handled = false;
  2226.                 const reset = () => {
  2227.                     buttonConfirm.removeEventListener('click', handleConfirming);
  2228.                     buttonCancel.removeEventListener('click', handleCanceling);
  2229.                     checkbox.removeEventListener('click', handleAgreeing);
  2230.                     element.removeEventListener('hidden.bs.modal', handleHidding);
  2231.                 };
  2232.                 const handleAgreeing = () => {
  2233.                     buttonConfirm.disabled = !checkbox.checked;
  2234.                 };
  2235.                 const handleConfirming = () => {
  2236.                     handled = true;
  2237.                     reset();
  2238.                     modal.hide();
  2239.                     resolve(true);
  2240.                 };
  2241.                 const handleCanceling = () => {
  2242.                     handled = true;
  2243.                     reset();
  2244.                     modal.hide();
  2245.                     resolve(false);
  2246.                 };
  2247.                 const handleHidding = () => {
  2248.                     reset();
  2249.                     if ( !handled ) {
  2250.                         resolve(false);
  2251.                     }
  2252.                 }
  2253.                 buttonConfirm.addEventListener('click', handleConfirming);
  2254.                 buttonCancel.addEventListener('click', handleCanceling);
  2255.                 checkbox.addEventListener('click', handleAgreeing);
  2256.                 element.addEventListener('hidden.bs.modal', handleHidding);
  2257.                 modal.show();
  2258.             });
  2259.         };
  2260.         $(document).ready(function () {
  2261.             const $buttonCart = $('#button-cart');
  2262.             const $stickyAddToCart = $('.add-to-cart-always-visible');
  2263.             if ($buttonCart.length && $stickyAddToCart.length) {
  2264.                 const observer = new IntersectionObserver(entries => {
  2265.                     entries.forEach(entry => {
  2266.                         if (entry.isIntersecting) {
  2267.                             // Button visible → hide sticky (slide down)
  2268.                             $stickyAddToCart.removeClass('visible');
  2269.                         } else {
  2270.                             // Button not visible → show sticky (slide up)
  2271.                             $stickyAddToCart.addClass('visible');
  2272.                         }
  2273.                     });
  2274.                 }, {threshold: 0});
  2275.                 observer.observe($buttonCart[0]);
  2276.             }
  2277.         });
  2278.         {% if cetelem_calculator %}
  2279.         var cetelemSkInitUrl = '{{ path('init_cetelem_sk') }}';
  2280.         var cetelemSkRecalculateUrl = '{{ path('recalculate_cetelem_sk') }}';
  2281.         {% endif %}
  2282.         if ($(window).width() <= 767) {
  2283.             $('#productThumbs .sp-thumbnails').addClass('d-none');
  2284.         }
  2285.         $(window).resize(function () {
  2286.             if ($(window).width() <= 767) {
  2287.                 $('#productThumbs .sp-thumbnails').addClass('d-none');
  2288.             } else {
  2289.                 $('#productThumbs .sp-thumbnails').removeClass('d-none');
  2290.             }
  2291.         });
  2292.         $('#productThumbs').sliderPro({
  2293.             arrows: true,
  2294.             loop: false,
  2295.             buttons: false,
  2296.             autoplay: false,
  2297.             width: 540,
  2298.             height: 400,
  2299.             thumbnailsPosition: 'bottom',
  2300.             thumbnailTouchSwipe: false,
  2301.             centerSelectedSlide: false,
  2302.             init: function (e) {
  2303.                 $('.sp-thumbnails').css('margin-top', 0);
  2304.                 $('#productThumbs .sp-slides').magnificPopup({
  2305.                     delegate: '.sp-slide',
  2306.                     type: 'image',
  2307.                     gallery: {
  2308.                         enabled: true
  2309.                     },
  2310.                     callbacks: {
  2311.                         elementParse: function (item) {
  2312.                             item.src = $(item.el).data('popup');
  2313.                         }
  2314.                     }
  2315.                 });
  2316.                 if ($('#more-images-count').length) {
  2317.                     $('#more-images-count').appendTo($('.sp-thumbnail-container:last-child'));
  2318.                     $('#more-images-count').css('display', 'block');
  2319.                 }
  2320.             },
  2321.             {% if images|length > 4 %}
  2322.             gotoSlide: function (event) {
  2323.                 if (event.index != 3) {
  2324.                     return;
  2325.                 }
  2326.                 $('.sp-slide.sp-selected').click();
  2327.             },
  2328.             {% endif %}
  2329.             breakpoints: {
  2330.                 767: {
  2331.                     arrows: false,
  2332.                     buttons: true,
  2333.                     thumbnailsPosition: 'none',
  2334.                     thumbnailWidth: 0,
  2335.                     thumbnailHeight: 0
  2336.                 },
  2337.                 992: {
  2338.                     width: 990
  2339.                 }
  2340.             }
  2341.         });
  2342.         var selectedStockItems = [];
  2343.         $('#button-cart, #button-cart-footer, #orderSelectedStockItems').on('click', async function () {
  2344.             $('#no-os-warning').addClass('d-none');
  2345.             selectedStockItems = document.querySelectorAll('#stockListCollapse input[type="checkbox"]:checked');
  2346.             // Check if
  2347.             if ($('#operation-system-select').val() == "") {
  2348.                 $('#no-os-warning').removeClass('d-none');
  2349.                 $('.btn.dropdown-toggle.form-control[data-id="operation-system-select"]').addClass('select-red-bg');
  2350.                 scrollToElementWithId("operation-system-select");
  2351.                 return false;
  2352.             }
  2353.             if ( '{{ isBazaar }}' === '1' ) {
  2354.                 const isConfirmed = await modalConfirm();
  2355.                 if ( !isConfirmed ) {
  2356.                     return false;
  2357.                 }
  2358.             }
  2359.             let postData = $('.product-details input[type=\'hidden\'], .product-page select');
  2360.             let formDataToPost = new FormData();
  2361.             for (var key in postData) {
  2362.                 if (!isNaN(key)) {
  2363.                     formDataToPost.append(postData[key].name, postData[key].value);
  2364.                 }
  2365.             }
  2366.             selectedStockItems.forEach(element => {
  2367.                 formDataToPost.append(element.name, element.value);
  2368.             });
  2369.             $.ajax({
  2370.                 url: '{{ path("cart_add") }}',
  2371.                 type: 'post',
  2372.                 data: formDataToPost,
  2373.                 processData: false,
  2374.                 contentType: false,
  2375.                 enctype: 'multipart/form-data',
  2376.                 dataType: 'json',
  2377.                 beforeSend: function () {
  2378.                     $('#button-cart').button('loading');
  2379.                     $('#button-cart-footer').button('loading');
  2380.                     $('#cart').find('.dropdown-toggle').prop('disabled', true);
  2381.                 },
  2382.                 success: function (json) {
  2383.                     if (json['error']) {
  2384.                         $('#notification').html(json['error']).modal('show');
  2385.                     }
  2386.                     if (json['success']) {
  2387.                         $.ajax({
  2388.                             url: '{{ path("cart_widget") }}',
  2389.                             type: 'get',
  2390.                             dataType: 'html',
  2391.                             success: function (html) {
  2392.                                 $('#cart').replaceWith(html);
  2393.                                 setTimeout(function () {
  2394.                                     $('#dropdownCartButton').trigger('click');
  2395.                                 }, 500);
  2396.                             }
  2397.                         });
  2398.                         $('#button-cart, #button-cart-footer').text('{{ 'Item was added to the card'|trans }}')
  2399.                         {% if app.environment == 'prod' %}
  2400.                         const price = json.success.data.value.price;
  2401.                         const special = json.success.data.value.special;
  2402.                         const quantity = json.success.data.quantity;
  2403.                         const code = json.success.data.code;
  2404.                         const brand = json.success.data.brand;
  2405.                         const name = json.success.data.name;
  2406.                         const brandAndName = (brand && brand !== '' ? brand + ' ' : '') + name.replace(/\//g, '-');
  2407.                         const productType = json.success.data.productType;
  2408.                         const discount = special === 0 ? 0 : price - special;
  2409.                         window.dataLayer = window.dataLayer || [];
  2410.                         dataLayer.push({ecommerce: null});
  2411.                         dataLayer.push({
  2412.                             event: 'add_to_cart',
  2413.                             ecommerce: {
  2414.                                 currency: '{{ currency_ISO }}',
  2415.                                 value: (price - discount) * quantity,
  2416.                                 items: [{
  2417.                                     item_id: code,
  2418.                                     item_name: brandAndName,
  2419.                                     discount: discount,
  2420.                                     index: 0,
  2421.                                     item_brand: brand,
  2422.                                     item_category: productType,
  2423.                                     price: price,
  2424.                                     quantity: quantity
  2425.                                 }]
  2426.                             }
  2427.                         });
  2428.                         {% endif %}
  2429.                         gtag('event', 'add_to_cart', {
  2430.                             "items": [{
  2431.                                 "id": "{{ product_id }}",
  2432.                                 "name": "{{ brand ~ ' ' ~ title | trim }}",
  2433.                                 "brand": "{{ brand }}",
  2434.                                 "category": "{{ type }}",
  2435.                                 "quantity": {{ available }},
  2436.                                 "price": {{ special ? special : price }} }]
  2437.                         });
  2438.                     }
  2439.                     setTimeout(function () {
  2440.                         $('#button-cart').button('reset');
  2441.                         $('#button-cart-footer').button('reset')
  2442.                     }, 2000);
  2443.                     $('#cart').find('.dropdown-toggle').prop('disabled', false);
  2444.                 }
  2445.             });
  2446.         });
  2447.         $('#scroll-to-review-form').click(function () {
  2448.             scrollToElementWithId('write');
  2449.         });
  2450.         $('.button-cart').on('click', function () {
  2451.             var recommendedProductId = 'recommended-product-id-' + $(this).data('product-id');
  2452.             $.ajax({
  2453.                 url: '{{ path("cart_add") }}',
  2454.                 type: 'post',
  2455.                 data: $('#' + recommendedProductId),
  2456.                 dataType: 'json',
  2457.                 beforeSend: function () {
  2458.                     $('#cart').find('.dropdown-toggle').prop('disabled', true);
  2459.                 },
  2460.                 success: function (json) {
  2461.                     if (json['error']) {
  2462.                         $('#notification').html(json['error']).modal('show');
  2463.                     }
  2464.                     if (json['success']) {
  2465.                         $('#notification').html(json['success']).modal('show');
  2466.                         $.ajax({
  2467.                             url: '{{ path("cart_widget") }}',
  2468.                             type: 'get',
  2469.                             dataType: 'html',
  2470.                             success: function (html) {
  2471.                                 $('#cart').replaceWith(html);
  2472.                             }
  2473.                         });
  2474.                         gtag('event', 'add_to_cart', {
  2475.                             "items": [{
  2476.                                 "id": "{{ product_id }}",
  2477.                                 "name": "{{ brand ~ ' ' ~ title | trim }}",
  2478.                                 "brand": "{{ brand }}",
  2479.                                 "category": "{{ type }}",
  2480.                                 "quantity": {{ available }},
  2481.                                 "price": {{ special ? special : price }} }]
  2482.                         });
  2483.                     }
  2484.                     $(this).button('reset');
  2485.                     $('#cart').find('.dropdown-toggle').prop('disabled', false);
  2486.                 }
  2487.             });
  2488.         });
  2489.         var formatPrice = function (amount, decimals = {{ precision }}, dec_point = ',', thousands_sep = ' ', currency = ' {{ currency }}') {
  2490.             return (
  2491.                 amount
  2492.                     .toFixed(decimals)
  2493.                     .replace('.', dec_point)
  2494.                     .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + thousands_sep) + currency
  2495.             )
  2496.         }
  2497.         $("option:selected").removeAttr("selected");
  2498.         $('select[name^="option"]').on('change', function () {
  2499.             reCalculateProductPrice();
  2500.             if ($(this).children("option:selected").attr('data-dont-want') == 1) {
  2501.                 $(this).children("option:selected").prop("selected", false);
  2502.             }
  2503.             if ($(this).attr('name') == 'option[21]' && $(this).children("option:selected").val() == 247) {
  2504.                 $('.ready-box.with-windows').hide();
  2505.                 $('.ready-box.without-windows').show();
  2506.                 $('select[name="option[22]"]').val(237).attr('disabled', 'disabled'); // Reset software package select to "No"
  2507.             } else {
  2508.                 $('.ready-box.with-windows').show();
  2509.                 $('.ready-box.without-windows').hide();
  2510.                 $('select[name="option[22]"]').removeAttr('disabled');
  2511.             }
  2512.             $('.operation-system-message').addClass('d-none');
  2513.             if ($(this).attr('name') == 'option[21]' && ["425", "426", "2128", "3508"].includes($(this).children("option:selected").val())) {
  2514.                 $('#operation-system-message-success').removeClass('d-none');
  2515.                 $('.btn.dropdown-toggle[data-id="operation-system-select"]').removeClass('select-red-bg');
  2516.                 $('#no-os-warning').addClass('d-none');
  2517.             } else if ($(this).attr('name') == 'option[21]' && $(this).children("option:selected").val() == 6368) {
  2518.                 $('#linux-message-danger').removeClass('d-none');
  2519.                 $('#no-os-warning').addClass('d-none');
  2520.                 $('.btn.dropdown-toggle[data-id="operation-system-select"]').removeClass('select-red-bg');
  2521.             } else if ($(this).attr('name') == 'option[21]') {
  2522.                 $('#operation-system-message-danger').removeClass('d-none');
  2523.                 $('#no-os-warning').addClass('d-none');
  2524.                 $('.btn.dropdown-toggle[data-id="operation-system-select"]').removeClass('select-red-bg');
  2525.             }
  2526.         });
  2527.         $('.btn-cetelem-calc').click(function () {
  2528.             if ($('#cetelem-calc-container').attr('data-country') == 'sk') {
  2529.                 {% if special %}
  2530.                 initCetelemSK(parseFloat($('.special-price').html().trim().replace(' €', '').replace(' ', '').replace(',', '.')));
  2531.                 {% else %}
  2532.                 initCetelemSK(parseFloat($('.product-price').html().trim().replace(' €', '').replace(' ', '').replace(',', '.')));
  2533.                 {% endif %}
  2534.             } else {
  2535.                 {% if special %}
  2536.                 var price = parseFloat($('.product-price').attr('data-special').trim().replace(' €', '').replace(' ', '').replace(',', '.'));
  2537.                 {% else %}
  2538.                 var price = parseFloat($('.product-price').attr('data-price').trim().replace(' €', '').replace(' ', '').replace(',', '.'));
  2539.                 {% endif %}
  2540.                 initCetelemHU(
  2541.                     'cetelem-calc-container',
  2542.                     price,
  2543.                     '{{ cetelem_hu_shop_id }}',
  2544.                     '{{ cetelem_hu_url }}',
  2545.                     '{{ cetelem_hu_barem_code }}',
  2546.                     '{{ cetelem_hu_price_minimum }}'
  2547.                 );
  2548.             }
  2549.         });
  2550.         {% if quatro_calculator %}
  2551.         $('.btn-quatro-calc').click(function (e) {
  2552.             {% if special %}
  2553.             var price = parseFloat($('.product-price').attr('data-special').trim().replace(' €', '').replace(' ', '').replace(',', '.'));
  2554.             {% else %}
  2555.             var price = parseFloat($('.product-price').attr('data-price').trim().replace(' €', '').replace(' ', '').replace(',', '.'));
  2556.             {% endif %}
  2557.             initQuatroSK(price);
  2558.         });
  2559.         function initQuatroSK(price) {
  2560.             if (document.getElementById('quatro-calc-container').innerHTML != '') {
  2561.                 return;
  2562.             }
  2563.             document.getElementById('quatro-calc-container').innerHTML = `<iframe src="https://quatro.vub.sk/kalkulacka/I594?cenaTovaru=${price}" title="Quatro loan" style="width: 100%; height: 750px; padding-top: 20px; background-color: #f5f5f5;"></iframe>`
  2564.         }
  2565.         {% endif %}
  2566.         var witoutVatTrans = '{{ "without VAT" | trans }}';
  2567.         function reCalculateProductPrice() {
  2568.             {% if customerTypeId == 2 and basePrice == 'net' %}
  2569.             var netPrice = parseFloat($('.product-price').data('price'));
  2570.             var netSpecial = parseFloat($('.product-price').data('special'));
  2571.             var grossPrice = parseFloat($('.product-price').data('gross-price'));
  2572.             var grossSpecial = parseFloat($('.product-price').data('gross-special'));
  2573.             var suggestedNetPrice = parseFloat($('.product-price').data('suggested-price'));
  2574.             var suggestedGrossPrice = parseFloat($('.product-price').data('suggested-gross-price'));
  2575.             {% elseif customerTypeId == 2 %}
  2576.             var grossPrice = parseFloat($('.product-price').data('price'));
  2577.             var grossSpecial = parseFloat($('.product-price').data('special'));
  2578.             var suggestedNetPrice = parseFloat($('.product-price').data('suggested-price'));
  2579.             var suggestedGrossPrice = parseFloat($('.product-price').data('suggested-gross-price'));
  2580.             {% else %}
  2581.             var grossPrice = parseFloat($('.product-price').data('price'));
  2582.             var grossSpecial = parseFloat($('.product-price').data('special'));
  2583.             {% endif %}
  2584.             $('select[name^="option"]').each(function () {
  2585.                 var option = $(this).find('option[value="' + $(this).val() + '"]');
  2586.                 if (!isNaN($(option).data('price')) && $(option).is(':selected')) {
  2587.                     {% if customerTypeId == 2 and basePrice == 'net' %}
  2588.                     if (!isNaN($(option).data('net-price'))) {
  2589.                         if (option.data('free') === 1) {
  2590.                         } else if (parseFloat(option.data('net-special')) > 0) {
  2591.                             // Special Net Price
  2592.                             netPrice += parseFloat(option.data('net-special'));
  2593.                             netSpecial += parseFloat(option.data('net-special'));
  2594.                             // Special Gross Price
  2595.                             grossPrice += parseFloat(option.data('special'));
  2596.                             grossSpecial += parseFloat(option.data('special'));
  2597.                         } else {
  2598.                             // Net Price
  2599.                             netPrice += parseFloat(option.data('net-price'));
  2600.                             netSpecial += parseFloat(option.data('net-price'));
  2601.                             // Gross Price
  2602.                             grossPrice += parseFloat(option.data('price'));
  2603.                             grossSpecial += parseFloat(option.data('price'));
  2604.                         }
  2605.                         // Suggested Price
  2606.                         suggestedNetPrice += parseFloat(option.data('suggested-net-price'));
  2607.                         suggestedGrossPrice += parseFloat(option.data('suggested-price'));
  2608.                     }
  2609.                     {% elseif customerTypeId == 2 %}
  2610.                     if (!isNaN($(option).data('net-price'))) {
  2611.                         // Gross Price
  2612.                         if (option.data('free') === 1) {
  2613.                         } else if (parseFloat(option.data('special')) > 0) {
  2614.                             grossPrice += parseFloat(option.data('special'));
  2615.                             grossSpecial += parseFloat(option.data('special'));
  2616.                         } else {
  2617.                             grossPrice += parseFloat(option.data('price'));
  2618.                             grossSpecial += parseFloat(option.data('price'));
  2619.                         }
  2620.                         // Suggested Price
  2621.                         suggestedNetPrice += parseFloat(option.data('suggested-net-price'));
  2622.                         suggestedGrossPrice += parseFloat(option.data('suggested-price'));
  2623.                     }
  2624.                     {% else %}
  2625.                     // Gross Price
  2626.                     if (option.data('free') === 1) {
  2627.                     } else if (parseFloat(option.attr('data-special')) > 0) {
  2628.                         grossPrice += parseFloat(option.attr('data-special'));
  2629.                         grossSpecial += parseFloat(option.attr('data-special'));
  2630.                     } else {
  2631.                         grossPrice += parseFloat(option.attr('data-price'));
  2632.                         grossSpecial += parseFloat(option.attr('data-price'));
  2633.                     }
  2634.                     {% endif %}
  2635.                     {% if special %}
  2636.                     {% if customerTypeId == 2 and basePrice == 'net' %}
  2637.                     $('#grossPriceFooter').html(formatPrice(netSpecial, {{ precision }}, '{{ currency }}'));
  2638.                     $('#grossPriceFooter2').html(formatPrice(netSpecial, {{ precision }}, '{{ currency }}'));
  2639.                     $('.product-price .special-price span.price-value').html(formatPrice(netSpecial, {{ precision }}, '{{ currency }}'));
  2640.                     $('.product-price .old-price > span').html(formatPrice(netPrice, {{ precision }}, '{{ currency }}'));
  2641.                     $('.product-price .price-savings').html(`<b>{{ 'Savings' | trans }}: ${formatPrice((netPrice - netSpecial))}</b> {{ 'without VAT' | trans }}`);
  2642.                     $('.product-price .prices-include-vat').html(`${formatPrice(grossSpecial, {{ precision }}, '{{ currency }}')} {{ 'with VAT' | trans }}`);
  2643.                     $('.suggested-price-row .suggested-price-cell.d-flex').html(
  2644.                         `<span><b>{{ 'Suggested selling price' | trans }}:</b></span>
  2645.                                 <span>${formatPrice(suggestedNetPrice, {{ precision }}, '{{ currency }}')} ({{ 'without VAT' | trans }}) / ${formatPrice(suggestedGrossPrice, {{ precision }}, '{{ currency }}')} ({{ 'Price with VAT' | trans | lower }})</span>`
  2646.                     );
  2647.                     $('.suggested-price-row .suggested-price-cell.suggested-price-profit').html(
  2648.                         `<span>{{ 'Your profit' | trans }}</span>
  2649.                                 <strong>${(Math.round((1 - (grossSpecial / suggestedGrossPrice)) * 100).toFixed(0))}%</strong>`
  2650.                     );
  2651.                     $('.print-label-price').val(suggestedGrossPrice);
  2652.                     {% elseif customerTypeId == 2 %}
  2653.                     $('.product-price .special-price').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2654.                     $('#grossPriceFooter').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2655.                     $('#grossPriceFooter2').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2656.                     $('.product-price .old-price').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2657.                     $('.product-price .price-savings').html(`<b>{{ 'Savings' | trans }}: ${formatPrice((grossPrice - grossSpecial), {{ precision }}, '{{ currency }}')}</b>`);
  2658.                     $('.suggested-price-row .suggested-price-cell').html(
  2659.                         `<span><b>{{ 'Suggested selling price' | trans }}</b></span>
  2660.                                 <span>${formatPrice(suggestedNetPrice, {{ precision }}, '{{ currency }}')} ({{ 'without VAT' | trans }}) / ${formatPrice(suggestedGrossPrice, {{ precision }}, '{{ currency }}')} {{ 'with VAT' | trans }}</span>`
  2661.                     );
  2662.                     $('.suggested-price-row .suggested-price-cell.suggested-price-profit').html(
  2663.                         `<span>{{ 'Your profit' | trans }}</span>
  2664.                                 <strong>${(Math.round((1 - (grossSpecial / suggestedGrossPrice)) * 100).toFixed(0))}%</strong>`
  2665.                     );
  2666.                     $('.print-label-price').val(suggestedGrossPrice);
  2667.                     {% else %}
  2668.                     $('.product-price .special-price').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2669.                     $('#grossPriceFooter').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2670.                     $('#grossPriceFooter2').html(formatPrice(grossSpecial, {{ precision }}, '{{ currency }}'));
  2671.                     $('.product-price .old-price').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2672.                     $('.product-price .price-savings').html(`<b>{{ 'Savings' | trans }}: ${formatPrice(grossPrice - grossSpecial, {{ precision }}, '{{ currency }}')}</b>`);
  2673.                     {% endif %}
  2674.                     {% else %}
  2675.                     {% if customerTypeId == 2 and basePrice == 'net' %}
  2676.                     $('.product-price .standard-price span').html(formatPrice(netPrice, {{ precision }}, '{{ currency }}'));
  2677.                     $('.product-price .prices-include-vat').html(`${formatPrice(grossPrice, {{ precision }}, '{{ currency }}')} {{ 'with VAT' | trans }}`);
  2678.                     $('#grossPriceFooter').html(formatPrice(netPrice, {{ precision }}, '{{ currency }}'));
  2679.                     $('#grossPriceFooter2').html(formatPrice(netPrice, {{ precision }}, '{{ currency }}'));
  2680.                     $('.suggested-price-row .suggested-price-cell').html(
  2681.                         `<span><b>{{ 'Suggested selling price' | trans }}</b></span>
  2682.                                 <span>${formatPrice(suggestedNetPrice, {{ precision }}, '{{ currency }}')} ({{ 'without VAT' | trans }}) / ${formatPrice(suggestedGrossPrice, {{ precision }}, '{{ currency }}')} ({{ 'Price with VAT' | trans | lower }})</span>`
  2683.                     );
  2684.                     $('.suggested-price-row .suggested-price-cell.suggested-price-profit').html(
  2685.                         `<span>{{ 'Your profit' | trans }}</span>
  2686.                                 <strong>${(Math.round((1 - (grossPrice / suggestedGrossPrice)) * 100).toFixed(0))}%</strong>`
  2687.                     );
  2688.                     $('.print-label-price').val(suggestedGrossPrice);
  2689.                     {% elseif customerTypeId == 2 %}
  2690.                     $('.product-price .standard-price span').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2691.                     $('#grossPriceFooter').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2692.                     $('#grossPriceFooter2').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2693.                     $('.suggested-price-row .suggested-price-cell').html(
  2694.                         `<span><b>{{ 'Suggested selling price' | trans }}</b></span>
  2695.                                 <span>${formatPrice(suggestedNetPrice, {{ precision }}, '{{ currency }}')} ({{ 'without VAT' | trans }}) / ${formatPrice(suggestedGrossPrice, {{ precision }}, '{{ currency }}')} ({{ 'Price with VAT' | trans | lower }})</span>`
  2696.                     );
  2697.                     $('.suggested-price-row .suggested-price-cell.suggested-price-profit').html(
  2698.                         `<span>{{ 'Your profit' | trans }}</span>
  2699.                                 <span>${(Math.round((1 - (grossPrice / suggestedGrossPrice)) * 100).toFixed(0))}%</span>`
  2700.                     );
  2701.                     $('.print-label-price').val(suggestedGrossPrice);
  2702.                     {% else %}
  2703.                     $('#grossPrice').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2704.                     $('#grossPriceFooter').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2705.                     $('#grossPriceFooter2').html(formatPrice(grossPrice, {{ precision }}, '{{ currency }}'));
  2706.                     {% endif %}
  2707.                     {% endif %}
  2708.                 }
  2709.             });
  2710.         }
  2711.         $(document).ready(function () {
  2712.             $('.selectpicker').selectpicker('render');
  2713.             setTimeout(function () {
  2714.                 $('.selectpicker').on('changed.bs.select', function (e, clickedIndex, isSelected, previousValue) {
  2715.                     if (isSelected) {
  2716.                         if (e.currentTarget) {
  2717.                             if (parseInt($(e.currentTarget).val()) >= 0) {
  2718.                                 $(e.currentTarget).parent().find('button .filter-option-inner-inner').addClass('selected');
  2719.                             } else {
  2720.                                 $(e.currentTarget).parent().find('button .filter-option-inner-inner').removeClass('selected');
  2721.                             }
  2722.                         }
  2723.                     }
  2724.                 });
  2725.                 if ($('#cable-select')) {
  2726.                     $('#cable-select').parent().find('button .filter-option-inner-inner').addClass('selected');
  2727.                 }
  2728.                 $('.selectpicker').on('loaded.bs.select', function (e) {
  2729.                     if (e.currentTarget) {
  2730.                         if (parseInt($(e.currentTarget).val()) >= 0) {
  2731.                             $(e.currentTarget).parent().find('button .filter-option-inner-inner').addClass('selected');
  2732.                         } else {
  2733.                             $(e.currentTarget).parent().find('button .filter-option-inner-inner').removeClass('selected');
  2734.                         }
  2735.                     }
  2736.                 });
  2737.             }, 100)
  2738.             {% if partnerLoginRedirect %}
  2739.             window.location.href = '{{ partnerLoginRedirectRoute }}';
  2740.             {% endif %}
  2741.             $("#recommended-products-carousel").owlCarousel({
  2742.                 items: 4,
  2743.                 loop: false,
  2744.                 startPosition: 0,
  2745.                 nav: true,
  2746.                 dots: false,
  2747.                 mouseDrag: false,
  2748.                 navText: [
  2749.                     '<i class="fas fa-chevron-left"></i>',
  2750.                     '<i class="fas fa-chevron-right"></i>'
  2751.                 ],
  2752.                 responsive: {
  2753.                     990: {
  2754.                         items: 6,
  2755.                         nav: true,
  2756.                         stagePadding: 0
  2757.                     },
  2758.                     768: {
  2759.                         mouseDrag: true
  2760.                     },
  2761.                     576: {
  2762.                         items: 2,
  2763.                         nav: false,
  2764.                         dots: true,
  2765.                         stagePadding: 0,
  2766.                         mouseDrag: true
  2767.                     },
  2768.                     0: {
  2769.                         items: 2,
  2770.                         nav: false,
  2771.                         dots: false,
  2772.                         stagePadding: 0,
  2773.                         mouseDrag: true
  2774.                     }
  2775.                 }
  2776.             });
  2777.             $("#similar-products-carousel").owlCarousel({
  2778.                 items: 1,
  2779.                 loop: false,
  2780.                 startPosition: 0,
  2781.                 nav: false,
  2782.                 dots: true,
  2783.                 mouseDrag: true,
  2784.                 margin: 10,
  2785.                 stagePadding: 5,
  2786.                 responsive: {
  2787.                     992: {
  2788.                         items: 3,
  2789.                         dots: false,
  2790.                         nav: false,
  2791.                         mouseDrag: true,
  2792.                         stagePadding: 0,
  2793.                         margin: 20
  2794.                     },
  2795.                     670: {
  2796.                         stagePadding: 40
  2797.                     },
  2798.                     380: {
  2799.                         stagePadding: 20
  2800.                     },
  2801.                     0: {
  2802.                         stagePadding: 12
  2803.                     }
  2804.                 }
  2805.             });
  2806.             getProductVariants();
  2807.         }).delegate('#ctlm-recalculate', 'click', function () {
  2808.             reCalcCetelemSK();
  2809.         })
  2810.         function getProductVariants() {
  2811.             $.ajax({
  2812.                 method: 'GET',
  2813.                 url: '{{ path("product_variants") }}',
  2814.                 data: {productId: "{{ product_id }}"},
  2815.                 success: function (response) {
  2816.                     if (response.length > 0) {
  2817.                         $("#variants-carousel").owlCarousel({
  2818.                             items: 1,
  2819.                             loop: false,
  2820.                             startPosition: 0,
  2821.                             nav: false,
  2822.                             dots: true,
  2823.                             mouseDrag: true,
  2824.                             margin: 10,
  2825.                             stagePadding: 5,
  2826.                             responsive: {
  2827.                                 992: {
  2828.                                     items: 3,
  2829.                                     dots: false,
  2830.                                     nav: false,
  2831.                                     mouseDrag: true,
  2832.                                     stagePadding: 0,
  2833.                                     margin: 20
  2834.                                 },
  2835.                                 670: {
  2836.                                     stagePadding: 40
  2837.                                 },
  2838.                                 380: {
  2839.                                     stagePadding: 20
  2840.                                 },
  2841.                                 0: {
  2842.                                     stagePadding: 12
  2843.                                 }
  2844.                             },
  2845.                             onInitialize: fillVariantsSection(response)
  2846.                         });
  2847.                     } else {
  2848.                         $('section.variant-list').parent().hide();
  2849.                     }
  2850.                 }
  2851.             });
  2852.         }
  2853.         function fillVariantsSection(response) {
  2854.             var currency = '{{ currency }}',
  2855.                 precision = '{{ precision }}',
  2856.                 variantCount = response.length
  2857.             ;
  2858.             for (let i = 0; i < variantCount; i++) {
  2859.                 const variantItem = response[i];
  2860.                 let emptyVariantItem = $('.product-list-minimal-item.empty')[0];
  2861.                 $('h5', emptyVariantItem).html(variantItem.title);
  2862.                 $('img', emptyVariantItem).attr('src', variantItem.image).attr('alt', variantItem.title);
  2863.                 const grades = {
  2864.                     gold: () => { return [GRADE_TRANSLATIONS.A, 3] },
  2865.                     silver: () => { return [GRADE_TRANSLATIONS.B, 2] },
  2866.                     bronze: () => { return [GRADE_TRANSLATIONS.C, 1] },
  2867.                     new: () => { return [GRADE_TRANSLATIONS.New, 0] },
  2868.                     bazaar: () => { return [GRADE_TRANSLATIONS.Bazaar, 0] }
  2869.                 }
  2870.                 let qualityLevel = 0
  2871.                 if (['gold','silver','bronze'].includes(variantItem.quality.toLowerCase())) {
  2872.                     [variantItem.quality, qualityLevel] = grades[variantItem.quality.toLowerCase()]?.();
  2873.                 }
  2874.                 $('.quality-label.label', emptyVariantItem).addClass('badge-item quality').removeClass('quality-label label');
  2875.                 if (qualityLevel !== 0) {
  2876.                     let qualityHtml = `<div class="quality-text">`;
  2877.                     qualityHtml += `<span class="quality-name">${variantItem.quality}</span>
  2878.                                     <span class="quality-info-text">${GRADE_TRANSLATIONS.condition}</span>
  2879.                                     <span class="quality-meter">`
  2880.                     for (let i = 0; i < 3; i++) {
  2881.                         qualityHtml += `<span class="quality-element ${qualityLevel > i ? 'active' : ''}"></span>`
  2882.                     }
  2883.                     qualityHtml += `</span></div>`;
  2884.                     $('.badge-item.quality', emptyVariantItem).html(qualityHtml);
  2885.                 }
  2886.                 else {
  2887.                     let qualityHtml = `<div class="quality-text">`;
  2888.                     qualityHtml += `<span class="quality-name">${variantItem.quality}</span>
  2889.                                     <span class="quality-info-text">${GRADE_TRANSLATIONS.condition}</span>`;
  2890.                     qualityHtml += `</span>`;
  2891.                     $('.badge-item.quality', emptyVariantItem).html(qualityHtml);
  2892.                 }
  2893.                 var descriptionHtml = "";
  2894.                 for (let index = 0; index < variantItem.description.length; index++) {
  2895.                     const configItem = variantItem.description[index];
  2896.                     descriptionHtml += configItem + ", " + (variantItem.description.length - 1 == index ? variantItem.quality : '');
  2897.                 }
  2898.                 $('span.attribute-list', emptyVariantItem).html(descriptionHtml);
  2899.                 let price = ((variantItem.price).toFixed(precision) + ' ' + currency).replace('.', ',');
  2900.                 $('span.price', emptyVariantItem).text(price.replace(/\B(?=(\d{3})+(?!\d))/g, ' '));
  2901.                 if (variantItem.isDiscounted) {
  2902.                     $('span.price', emptyVariantItem).addClass('new-price');
  2903.                     let oldPriceForDiscount = ((variantItem.oldPriceForDiscount).toFixed(precision) + ' ' + currency).replace('.', ',');
  2904.                     $('strong.price-for-discount', emptyVariantItem).text(oldPriceForDiscount.replace(/\B(?=(\d{3})+(?!\d))/g, ' '));
  2905.                 } else {
  2906.                     $('strong.price-for-discount', emptyVariantItem).remove();
  2907.                 }
  2908.                 $(emptyVariantItem).attr('href', variantItem.link);
  2909.                 $(emptyVariantItem).removeClass('empty');
  2910.             }
  2911.             $('.product-list-minimal-item.empty').remove();
  2912.             $("#variants-carousel").trigger('refresh.owl.carousel');
  2913.         }
  2914.         var starDescriptions = [
  2915.             "{{ '1. star description'|trans }}",
  2916.             "{{ '2. star description'|trans }}",
  2917.             "{{ '3. star description'|trans }}",
  2918.             "{{ '4. star description'|trans }}",
  2919.             "{{ '5. star description'|trans }}"
  2920.         ];
  2921.         $('.testimonial-form .stars > i').on('click', function () {
  2922.             $('.testimonial-form .stars > i').removeClass('yellow');
  2923.             $('.testimonial-form .stars > i').removeClass('clicked');
  2924.             var star = $(this).attr('data-star');
  2925.             document.querySelector('#description-for-clicked-star span').textContent = starDescriptions[star - 1];
  2926.             $('.testimonial-form .stars > i').each(function () {
  2927.                 var stars = $(this).attr('data-star');
  2928.                 if (star >= stars) {
  2929.                     $(this).addClass('yellow');
  2930.                     $(this).addClass('clicked');
  2931.                     $('#review_stars').val(star);
  2932.                 }
  2933.             });
  2934.         });
  2935.         $('.testimonial-form .stars > i').hover(function () {
  2936.             $('.testimonial-form .stars > i').removeClass('yellow');
  2937.             var star = $(this).attr('data-star');
  2938.             $('.testimonial-form .stars > i').each(function () {
  2939.                 var stars = $(this).attr('data-star');
  2940.                 if (star >= stars) {
  2941.                     $(this).addClass('yellow');
  2942.                 }
  2943.             });
  2944.         }).mouseleave(function () {
  2945.             $('.testimonial-form .stars > i').removeClass('yellow');
  2946.             $('.testimonial-form .stars > i.clicked').addClass('yellow');
  2947.         });
  2948.         $('#review').on('click', '.pagination-ul a', function (e) {
  2949.             e.preventDefault();
  2950.             $('#review').fadeOut('slow');
  2951.             $('#review').load(this.href);
  2952.             $('#review').fadeIn('slow');
  2953.             return false;
  2954.         });
  2955.         function scrollToNavigationItem(hrefValue) {
  2956.             $('html, body').animate({
  2957.                 scrollTop: $(`a[href="${hrefValue}"`).offset().top - 50
  2958.             }, 1000);
  2959.             return false;
  2960.         }
  2961.         $('.more-collapse-content').on('shown.bs.collapse', function (ev) {
  2962.             $('.more-collapse[href="#' + $(this).attr('id') + '"]').html('{{ 'Close' | trans }}');
  2963.         });
  2964.         $('.more-collapse-content').on('hidden.bs.collapse', function (ev) {
  2965.             $('.more-collapse[href="#' + $(this).attr('id') + '"]').html('{{ 'Other accessories' | trans }}');
  2966.         });
  2967.         if ($(window).width() < 992) {
  2968.             $('.custom-select-line div').each(function () {
  2969.                 if ($(this).html() == 'Operating system:' || $(this).html() == 'Operációs rendszer:' || $(this).html() == 'Operačný systém:') {
  2970.                     $(this).html('OS:');
  2971.                 }
  2972.             });
  2973.         }
  2974.         $('#quality-more-info').click(function () {
  2975.             if ($('#desc-box').length > 0) {
  2976.                 scrollToElementWithId('desc-box');
  2977.                 return false;
  2978.             }
  2979.         });
  2980.         $('.product-configuration-box select').change(function () {
  2981.             let option = $(this).find('option:selected');
  2982.             let id = $(option).val();
  2983.             if (id != '') {
  2984.                 let name = $(option).attr('data-content').replace(/<span[^>]*>([^<]+)<\/span>/g, '$1');
  2985.                 let price = $(option).attr('data-price');
  2986.                 let discountPrice = $(option).attr('data-special');
  2987.                 if (discountPrice != 0) {
  2988.                     price = discountPrice;
  2989.                 }
  2990.                 let baseCurrency = '{{ currency }}';
  2991.                 let currency = '';
  2992.                 switch (baseCurrency) {
  2993.                     case '€':
  2994.                         currency = 'EUR';
  2995.                         break;
  2996.                     case 'Ft':
  2997.                         currency = 'HUF';
  2998.                         break;
  2999.                     case 'Kč':
  3000.                         currency = 'CZK';
  3001.                         break;
  3002.                     default:
  3003.                         currency = 'EUR';
  3004.                 }
  3005.                 {% if app.environment == 'prod' %}
  3006.                 gtag('event', 'add_to_cart', {
  3007.                     currency: currency,
  3008.                     items: [{
  3009.                         id: id,
  3010.                         name: name,
  3011.                         category: "Accessory",
  3012.                         list_name: "Configurator",
  3013.                         price: price,
  3014.                         quantity: 1
  3015.                     }],
  3016.                     value: price
  3017.                 });
  3018.                 {% endif %}
  3019.             }
  3020.         });
  3021.         {% if orderable %}
  3022.         $('#button-add-price-monitor').on('click', function () {
  3023.             $.ajax({
  3024.                 url: '{{ path("product_price_monitor") }}',
  3025.                 type: 'post',
  3026.                 data: {
  3027.                     'productId': $('.product-page').find('input[name="product_id"]').val(),
  3028.                     'email': $('#price-monitor-email').val(),
  3029.                     'name': $('#price-monitor-name').val(),
  3030.                     'price': $('#price-monitor-value').val(),
  3031.                     'sourcePrice': $('#price-monitor-current-price').val()
  3032.                 },
  3033.                 dataType: 'json',
  3034.                 beforeSend: function () {
  3035.                     $('#button-add-price-monitor').button('loading');
  3036.                 },
  3037.                 success: function (json) {
  3038.                     $('#modal-price-monitor').find('.alert').remove();
  3039.                     if (json['error']) {
  3040.                         $('#modal-price-monitor').find('.modal-body').prepend('<div class="alert alert-danger" role="alert">' + json['error'] + '</div>');
  3041.                     }
  3042.                     if (json['success']) {
  3043.                         $('#modal-price-monitor .success').removeClass('d-none');
  3044.                         $('#modal-price-monitor .form').addClass('d-none');
  3045.                         $('.button-price-monitor').addClass('active');
  3046.                     }
  3047.                     $('#button-add-price-monitor').button('reset');
  3048.                 }
  3049.             });
  3050.         });
  3051.         let priceMonitorEmail = document.getElementById('price-monitor-email');
  3052.         if (priceMonitorEmail != null) {
  3053.             let priceMonitorEmailWarning = priceMonitorEmail.parentElement.querySelector('.text-warning');
  3054.             if (priceMonitorEmailWarning != null) {
  3055.                 priceMonitorEmail.addEventListener('keyup', () => {
  3056.                     priceMonitorEmailWarning.classList.add('d-none');
  3057.                     if (priceMonitorEmail.value.indexOf('@') > 0 && priceMonitorEmail.value.indexOf('.') > 0) {
  3058.                         let email = priceMonitorEmail.value.split('@');
  3059.                         let name = email.shift();
  3060.                         let domain = email.pop().toLowerCase();
  3061.                         let suggest = wordSuggest(domain, {{ priceMonitorEmailDictionary |raw }});
  3062.                         if (suggest != '') {
  3063.                             priceMonitorEmailWarning.innerHTML = '{{ 'Did you mean' |trans }}: <a href="#" class="link-warning" data-email="' + name + '@' + suggest + '">' + name + '@' + suggest + '</a>?';
  3064.                             priceMonitorEmailWarning.classList.remove('d-none');
  3065.                             let priceMonitorEmailLink = priceMonitorEmailWarning.querySelector('.link-warning');
  3066.                             if (priceMonitorEmailLink != null) {
  3067.                                 priceMonitorEmailLink.addEventListener('click', (e) => {
  3068.                                     e.preventDefault();
  3069.                                     priceMonitorEmail.value = priceMonitorEmailLink.dataset.email.trim();
  3070.                                     return false;
  3071.                                 });
  3072.                             }
  3073.                         }
  3074.                     }
  3075.                 });
  3076.             }
  3077.         }
  3078.         {% else %}
  3079.         /*$('#button-add-stock-monitor').on('click', function() {
  3080.                 $.ajax({
  3081.                     url: '{{ path("product_stock_monitor") }}',
  3082.                     type: 'post',
  3083.                     data: {
  3084.                         'productId': $('input[name="product_id"]').val(),
  3085.                         'email': $('#stock-monitor-email').val(),
  3086.                         'name': $('#stock-monitor-name').val()
  3087.                     },
  3088.                     dataType: 'json',
  3089.                     beforeSend: function() {
  3090.                         $('#button-add-stock-monitor').button('loading');
  3091.                     },
  3092.                     success: function(json) {
  3093.                         $('#modal-stock-monitor').find('.alert').remove();
  3094.                         if ( json['error'] ) {
  3095.                             $('#modal-stock-monitor').find('.modal-body').prepend(`<div class="alert alert-danger" role="alert">${json['error']}</div>`);
  3096.                         }
  3097.                         if ( json['success'] ) {
  3098.                             $('#modal-stock-monitor .success').removeClass('d-none');
  3099.                             $('#modal-stock-monitor .form').addClass('d-none');
  3100.                             $('.button-stock-monitor').addClass('active');
  3101.                         }
  3102.                         $('#button-add-price-monitor').button('reset');
  3103.                     }
  3104.                 });
  3105.             });*/
  3106.         {% endif %}
  3107.         {% if showAdminLoginPanel %}
  3108.         var additionalDataForAdminLoginPanel = {
  3109.             idForPage: "{{ product_id }}",
  3110.             module: "product",
  3111.             ajaxUrl: "{{ path('product_admin_login_data_ajax') }}",
  3112.             {% if app.environment == 'prod' %}
  3113.             domain: "https://www.atechcomp.eu/centralis/web",
  3114.             smallerPadding: true
  3115.             {% else %}
  3116.             domain: "http://centralis"
  3117.             {% endif %}
  3118.         };
  3119.         startAdminLoginPanel(additionalDataForAdminLoginPanel);
  3120.         {% endif %}
  3121.         var popover = new bootstrap.Popover(document.querySelector('.product-details > h1'), {
  3122.             trigger: 'focus',
  3123.             html: true
  3124.         });
  3125.         document.addEventListener('mousedown', () => {
  3126.             if (document.querySelector('.popover.fade.show')) {
  3127.                 popover.dispose();
  3128.             }
  3129.         });
  3130.         document.querySelector('.product-details > h1').addEventListener('mouseup', (e) => {
  3131.             if (window.getSelection().toString().length > 3) {
  3132.                 if (!document.querySelector('.popover.fade')) {
  3133.                     popover = new bootstrap.Popover(document.querySelector('.product-details > h1'), {
  3134.                         trigger: 'focus',
  3135.                         html: true
  3136.                     });
  3137.                 }
  3138.                 popover.show();
  3139.             }
  3140.         });
  3141.         let productDetailRequestCallback = document.getElementById('product-detail-request-callback');
  3142.         if (productDetailRequestCallback) {
  3143.             productDetailRequestCallback.addEventListener('click', (buttonElement) => {
  3144.                 gtag('event', 'click', {'event_category': 'Click', 'event_label': 'product-detail-request-callback'});
  3145.             });
  3146.         }
  3147.         {% if milpayInfo is defined and milpayInfo is not empty and false %}
  3148.         document.querySelector('.instacash-info-buttons a').addEventListener('click', (buttonElement) => {
  3149.             gtag('event', 'click', {
  3150.                 'event_category': 'Click',
  3151.                 'event_label': 'product-detail-milpay-prescore-launched'
  3152.             });
  3153.         });
  3154.         document.querySelector('.instacash-info-buttons button').addEventListener('click', (buttonElement) => {
  3155.             gtag('event', 'click', {'event_category': 'Click', 'event_label': 'product-detail-milpay-prescore-modal'});
  3156.         });
  3157.         document.querySelector('.other-info > a').addEventListener('click', (buttonElement) => {
  3158.             gtag('event', 'click', {'event_category': 'Click', 'event_label': 'product-detail-milpay-more-info-page'});
  3159.         });
  3160.         {% endif %}
  3161.         document.querySelector('button.show-full-spec').addEventListener('click', () => {
  3162.             let hiddenInfo = document.querySelector('.hidden-specification'),
  3163.                 showMoreButton = document.querySelector('button.show-full-spec')
  3164.             ;
  3165.             console.log(this)
  3166.             hiddenInfo.classList.toggle('d-none');
  3167.             document.querySelector('button.show-full-spec > span').innerHTML = hiddenInfo.classList.contains('d-none') ? showMoreButton.dataset.textMore : showMoreButton.dataset.textLess;
  3168.             document.querySelector('button.show-full-spec .arrow-icon').style.transform = hiddenInfo.classList.contains('d-none') ? 'rotate(90deg)' : 'rotate(-90deg)';
  3169.         });
  3170.         {% if orderable and skinColorSelectorIsDefined %}
  3171.         if (document.getElementById('colorSelector')) {
  3172.             const selectColorText = document.getElementById('colorSelector').textContent.trim();
  3173.             const colorSelectorImageSrc = document.querySelector('#colorSelector img').src;
  3174.             function updateCollapserText() {
  3175.                 let selectedColor = document.querySelector('.color-palette-item input:checked');
  3176.                 if (selectedColor.value) {
  3177.                     document.querySelector('#colorSelect .color-title').innerHTML = selectedColor.dataset.colorName;
  3178.                     document.querySelector('#colorSelect .color-price').innerHTML = `+ ${selectedColor.dataset.price}`;
  3179.                     document.querySelector('.confirm-selected-color button').disabled = false;
  3180.                 } else {
  3181.                     document.querySelector('#colorSelect .color-title').innerHTML = selectColorText;
  3182.                     document.querySelector('#colorSelect .color-price').innerHTML = '';
  3183.                 }
  3184.             }
  3185.             $('.color-palette-item').on('click', (ev, el) => {
  3186.                 let paletteItem = ev.currentTarget;
  3187.                 $('.color-palette-item').each((k, element) => {
  3188.                     element.classList.remove('checked');
  3189.                 });
  3190.                 paletteItem.querySelector('input').checked = true;
  3191.                 paletteItem.classList.add('checked');
  3192.                 updateCollapserText();
  3193.             });
  3194.             $('.confirm-selected-color button').on('click', (ev, el) => {
  3195.                 let selectedColor = {
  3196.                         'title': document.querySelector('#colorSelect .color-title').innerText,
  3197.                         'price': document.querySelector('#colorSelect .color-price').innerText
  3198.                     },
  3199.                     selectedColorValue = document.querySelector('.color-palette-item.checked input').value,
  3200.                     selectedColorTitle = selectedColorValue > 0 ? `${selectColorText}: ${selectedColor.title}` : selectColorText,
  3201.                     selectedColorPrice = selectedColorValue > 0 ? selectedColor.price : ''
  3202.                 ;
  3203.                 document.querySelector('#colorSelector .selected-title').innerHTML = selectedColorTitle;
  3204.                 document.querySelector('#colorSelector .selected-price').innerHTML = selectedColorPrice;
  3205.                 let selectedImageSrc = selectedColorValue > 0 ? document.querySelector('.color-palette-item.checked img').src : colorSelectorImageSrc;
  3206.                 document.querySelector('#colorSelector img').src = selectedImageSrc;
  3207.                 document.querySelector('select[name="option[320]"]').value = selectedColorValue;
  3208.                 let changeEvent = new Event('change');
  3209.                 document.querySelector('select[name="option[320]"]').dispatchEvent(changeEvent);
  3210.             });
  3211.         }
  3212.         {% endif %}
  3213.         $('#jump-top-reviews').click(() => $('#reviews-tab').trigger("click"));
  3214.         $('#jump-show-more-info').on('click', () => {
  3215.             $('html, body').animate({
  3216.                 scrollTop: $('#full-specification-tab').offset().top - 100
  3217.             }, 50);
  3218.             $('#full-specification-tab').click();
  3219.         });
  3220.         async function copyToClickBoard(textToCopy) {
  3221.             try {
  3222.                 await navigator.clipboard.writeText(textToCopy);
  3223.                 document.querySelector('#copy-svg').innerHTML =
  3224.                     `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check" viewBox="0 0 16 16" style="stroke: currentColor; stroke-width: 1;">
  3225.                 <path fill-rule="evenodd" d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0"/>
  3226.                 <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1z"/>
  3227.                 <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zm-3-1A1.5.5 0 0 0 5 1.5v1A1.5.5 0 0 0 6.5 4h3A1.5.5 0 0 0 11 2.5v-1A1.5.5 0 0 0 9.5 0z"/>
  3228.             </svg>`
  3229.                 setTimeout(() => {
  3230.                     document.querySelector('#copy-svg').innerHTML =
  3231.                         `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16" style="stroke: currentColor; stroke-width: 1;">
  3232.                     <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1z"/>
  3233.                     <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zm-3-1A1.5.5 0 0 0 5 1.5v1A1.5.5 0 0 0 6.5 4h3A1.5.5 0 0 0 11 2.5v-1A1.5.5 0 0 0 9.5 0z"/>
  3234.                 </svg>`
  3235.                 }, 2000);
  3236.             } catch (err) {
  3237.                 console.error('Error copying to clipboard', err);
  3238.             }
  3239.         }
  3240.     </script>
  3241.     <script type="text/javascript">
  3242.         $(document).ready(function () {
  3243.             $('#product-model-description img').each(function (index) {
  3244.                 $(this).attr('alt', "{{ seoDescription }} image_" + (index + 1));
  3245.             })
  3246.         })
  3247.     </script>
  3248.     {# klaviyo #}
  3249.     {% if app.user
  3250.         or (app.session.get('checkout') is defined and app.session.get('checkout').email is defined)
  3251.         or app.session.get('customerEmailForKlaviyo') is defined %}
  3252.         {% set customerEmail = app.user
  3253.             ? app.user.email
  3254.             : (app.session.get('checkout').email is defined
  3255.             ? app.session.get('checkout').email
  3256.             : app.session.get('customerEmailForKlaviyo')
  3257.             ) %}
  3258.         <script type="text/javascript">
  3259.             function addToCartCallback() {
  3260.                 let item = {
  3261.                     'Product_id': '{{ product_id }}',
  3262.                     'Code': '{{ model }}',
  3263.                     'Product_name': '{{ productName }}',
  3264.                     'Product_category': '{{ type }}',
  3265.                     'Product_category_id': {{ typeId }},
  3266.                     'Brand': '{{ brand }}',
  3267.                     'Price': '{{ special ? special : price }}',
  3268.                     'Quality': '{{ quality }}',
  3269.                     'Currency': convertCurrency('{{ currency }}'),
  3270.                     'Image_url': '{{ (images|first).popup }}',
  3271.                     'URL': "{{ app.session.get('cartBackToProductsLink') }}",
  3272.                 }
  3273.                 klaviyo.track('Added to Cart', item);
  3274.             }
  3275.             $('#button-cart, #button-cart-footer').on('click', function (e) {
  3276.                 e.preventDefault();
  3277.                 klaviyo.identify({
  3278.                     'email': '{{ customerEmail }}'
  3279.                 }, addToCartCallback);
  3280.             })
  3281.         </script>
  3282.     {% endif %}
  3283. {% endblock %}