templates/Slivki/offers/details.html.twig line 347

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ parent() }}{{ currentPage is defined and currentPage != 1 ? ' - Страница №' ~ currentPage }}{% endblock %}
  3. {% block messenger %}{% endblock %}
  4. {% block stylesheets %}
  5.     <link rel="stylesheet" href="/css/statistics_modal.css?v=4"/>
  6.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css"/>
  7.     <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
  8.     <link rel="stylesheet" href="/admin/plugins/datetimepicker/css/bootstrap-datetimepicker.min.css">
  9.     <link rel="stylesheet" href="/admin/plugins/datatables/jquery.dataTables.min.css"/>
  10.     <link rel="stylesheet" href="/admin/plugins/colorpicker/bootstrap-colorpicker.min.css"/>
  11.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css">
  12.     <link rel="stylesheet" href="/css/swiper/swiper.min.css"/>
  13.     <link href="/css/bootstrap3.3.6.min.css" type="text/css" rel="stylesheet">
  14.     <link rel="stylesheet"
  15.           href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker-standalone.min.css"
  16.           integrity="sha512-L0/PNISezIYAoqFXBGP9EJ4qLH8XF356+Lo92vzloQqk7HUpZ4FN1x1dUOnsUAUjHTSxXxeaD0HXfrANhtJOEA=="
  17.           crossorigin="anonymous" referrerpolicy="no-referrer"/>
  18.     {{ parent() }}
  19.     <link href="/css/offers.min.css?v={{ offers_css }}" rel="stylesheet" type="text/css"/>
  20.     <link href="/css/foodForGift.css?v={{ food_for_gift_css }}" rel="stylesheet" type="text/css"/>
  21.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  22.           integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw=="
  23.           crossorigin="anonymous" referrerpolicy="no-referrer"/>
  24. {% endblock %}
  25. {% set isOfferFavourite = app.user ? app.user.isOfferFavourite(offer) : false %}
  26. {% set subscribed = app.user and isSubscriber(app.user) %}
  27.     {% block ogimage %}
  28.         {% if detailMediaList|length > 0 %}
  29.             <meta property="og:image"
  30.                   content="{{ app.request.getSchemeAndHttpHost() }}{{ getImageURL(detailMediaList|first, 522, 322) }}"/>
  31.             <meta property="og:image:width" content="522"/>
  32.             <meta property="og:image:height" content="322"/>
  33.         {% else %}
  34.             {{ parent() }}
  35.         {% endif %}
  36.     {% endblock %}
  37. {% block header %}
  38.     {% embed 'header.html.twig' %}
  39.         {% block headerTopMenu %}
  40.             {{ parent() }}
  41.         {% endblock %}
  42.     {% endembed %}
  43. {% endblock %}
  44. {% block mainColumnClass %} one-column bg-white{% endblock %}
  45. {% block main_content %}
  46.     {% set isPickupEnabled = offer.getOnlineOrderSettings().isPickupEnabled() is defined ? offer.getOnlineOrderSettings().isPickupEnabled() %}
  47.     {% set isDeliveryEnabled = offer.getOnlineOrderSettings().isDeliveryEnabled() is defined ? offer.getOnlineOrderSettings().isDeliveryEnabled() %}
  48.     {% set ratingWithCount = getEntityRatingWithCount(constant('Slivki\\Entity\\Category::OFFER_CATEGORY_ID'), offer.getID()) %}
  49.     {% if isPickupEnabled or isDeliveryEnabled %}
  50.         <input id="deliveryMethodEnabled" type="hidden" value="{{ isDeliveryEnabled == '' ? '2' : '1' }}">
  51.     {% endif %}
  52.     <input id="offerID" type="hidden" value="{{ offer.getID() }}">
  53.     <input id="isMedicalCenter" type="hidden"
  54.            value="{{ parentCategoryList and parentCategoryList[0].getID() == constant('Slivki\\Entity\\Category::MEDICAL_CENTER_CATEGORY_ID') }}">
  55.     <input type="hidden" id="stock-id" value="{{ offer.getID() }}">
  56.     <input type="hidden" id="stock-link" value="{{ app.request.getSchemeAndHttpHost() ~ app.request.getRequestUri() }}">
  57.     {% if subscribed %}
  58.         <input id="allowedCodesCountBySubscription" type="hidden" value="{{ allowedCodesCountBySubscription }}">
  59.     {% endif %}
  60.     {% if app.user %}
  61.         <input id="splitTotalCodesCountByUser" type="hidden" value="{{ app.user.getCodesCountByOffer(offer) }}">
  62.         <input type="hidden" id="customerID" value="{{ app.user.getID() }}"/>
  63.     {% endif %}
  64.     <input type="hidden" id="codeCost" value="{{ codeCost }}">
  65.     <input type="hidden" class="buyOrderAmount form-element" type="text"
  66.            value="{{ codeCost }}"/>
  67.     <div class="content-wrapper">
  68.         <div class="content-wrapper-offers" itemscope itemtype="https://schema.org/Product">
  69.             <div class="d-flex pb-2" style="padding: 10px 34px;">
  70.                 <div class="col-6">
  71.                     {% include 'Slivki/breadcrumbs.html.twig' with { 'parentCategoryList': parentCategoryList, 'supplierCategoryData': offer.getSupplierCategoryData() } only %}
  72.                 </div>
  73.                 <div class="col-6">
  74.                     <p class="color-violet text-end cursor-pointer" data-toggle="modal"
  75.                        data-target="{{ app.user ? '#complaintModal' : '.modal-auth' }}">
  76.                         Пожаловаться на акцию</p>
  77.                 </div>
  78.             </div>
  79.             <h3 class="offers-tittle" style="color: {{ offer.getTitleFontColor() }};">{{ offer.getTitle()|raw }}</h3>
  80.             <div class="content-offers-top pb-0">
  81.                 <div class="left-top-block">
  82.                     {% if app.user() and not pastOffer %}
  83.                         <div class="button-add-follow fovoutite-block"
  84.                              onclick="onFavouriteClickOffer({{ offer.getID() }}, {{ isOfferFavourite ? 'true' : 'false' }})"
  85.                              data-html="true"
  86.                              data-toggle="tooltip"
  87.                              data-placement="top"
  88.                              data-original-title="Добавить в <br> избранное"
  89.                         >
  90.                             <img src="{{ isOfferFavourite ? '/images/heart_active.svg' : '/images/offers/follow.svg' }}">
  91.                         </div>
  92.                     {% endif %}
  93.                     <div class="content-wrapper-carousel position-relative" style="margin-bottom: 28px">
  94.                         <div class="stock-image">
  95.                             <div id="offerImageSlider" class="m-0 swiper-container">
  96.                                 {% if is_granted('ROLE_ADMIN') and not offer.isWithoutCodes() %}
  97.                                     <div id="statisticsButton" data-toggle="modal" data-target="#statisticOffersPopup">
  98.                                         <img width="37" height="37" src="/images/statistics.png"/>
  99.                                     </div>
  100.                                 {% endif %}
  101.                                 <div class="swiper-wrapper"
  102.                                      data-pixel={{ offer.getID() == constant('Slivki\\Entity\\Offer::BETERA_OFFER_ID') ? 'https://amc.yandex.ru/show?cmn_id=26372&plt_id=194140&crv_id=464042&evt_t=render&ad_type=banner&rnd=%system.random%' }}>
  103.                                     {% set medias = detailMediaList %}
  104.                                     {% set mediaCount = medias|length %}
  105.                                     {% if mediaCount > 1 %}
  106.                                         {% for media in medias %}
  107.                                             <div class="swiper-slide">
  108.                                                 {% if media.isYoutube() %}
  109.                                                     <input class="js-src-video" type="hidden"
  110.                                                            value="https://www.youtube.com/embed/{{ media.getName() }}">
  111.                                                 {% else %}
  112.                                                     <img class="img-fluid lazyload" alt="{{ media.getDescription() }}"
  113.                                                          src="{{ getImageURL(media, 1044, 644) }}"/>
  114.                                                 {% endif %}
  115.                                             </div>
  116.                                         {% endfor %}
  117.                                     {% elseif mediaCount == 1 %}
  118.                                         <div>
  119.                                             <img class="img-fluid lazyload" alt="{{ medias[0].getDescription() }}"
  120.                                                  src="{{ getImageURL(medias[0], 1044, 644) }}"/>
  121.                                         </div>
  122.                                     {% endif %}
  123.                                 </div>
  124.                                 {% if mediaCount > 1 %}
  125.                                     <div class="swiper-pagination mt-2"></div>
  126.                                     <div class="swiper-button-next"></div>
  127.                                     <div class="swiper-button-prev"></div>
  128.                                 {% endif %}
  129.                             </div>
  130.                         </div>
  131.                         {% if not offer.isWithoutCodes() %}
  132.                             <div class="discount-block">
  133.                                 {{ offer.getDiscount() }}
  134.                             </div>
  135.                         {% endif %}
  136.                         {% if offer.isWithoutCodes() %}
  137.                             <div class="button-add-follow button-add-follow-teaser fovoutite-block"
  138.                                  onclick="onFavouriteClickOffer({{ offer.getID() }}, {{ isOfferFavourite ? 'true' : 'false' }})"
  139.                                  data-html="true"
  140.                                  data-toggle="tooltip"
  141.                                  data-placement="top"
  142.                                  data-original-title="Добавить в <br> избранное"
  143.                             >
  144.                                 <img src="{{ isOfferFavourite ? '/images/heart_active.svg' : '/images/offers/follow.svg' }}">
  145.                             </div>
  146.                         {% endif %}
  147.                     </div>
  148.                 </div>
  149.                 <div class="right-top-block">
  150.                     <div class="offers-description">
  151.                         {% if pastOffer or offer.getFreeCodesCount() == 0 %}
  152.                             <div class="past-offer mt-5 pt-5">
  153.                                 <i class="slivki-icon-minus-circled"></i>
  154.                                 <p>Упс, акция завершена!</p>
  155.                                 <a href="#offersConditions" class="buttons-link-offers">
  156.                                     Условия
  157.                                 </a>
  158.                                 <a href="#conditionAddress" class="buttons-link-offers">
  159.                                     Адрес, телефоны
  160.                                 </a>
  161.                                 <a href="#offersReview" class="buttons-link-offers">
  162.                                     Отзывы
  163.                                 </a>
  164.                             </div>
  165.                         {% else %}
  166.                             {% if not offer.isInFreeCodesCategory() and not offer.isWithoutCodes() %}
  167.                                 <div class="d-flex statistic-block {% if is_granted('ROLE_ADMIN') %}justify-content-between{% endif %} col px-2 my-0">
  168.                                     <p class="text-dark-violet font-size-0750 text-end w-auto"
  169.                                        data-toggle="tooltip"
  170.                                        data-html="true" data-placement="top"
  171.                                        data-original-title="Кол-во продаж к кол-ву просмотров. <br> Конверсия за 30 дней">
  172.                                         Конверсия {{ getOfferConversion(offer.getID()) }}%</p>
  173.                                 </div>
  174.                             {% endif %}
  175.                             {% if not offer.isWithoutCodes() %}
  176.                                 <div class="d-flex offers-description--item">
  177.                                     <div class="col">
  178.                                         <p class="color-dark-gray px-0 mb-0">Взято всего:</p>
  179.                                     </div>
  180.                                     <div class="col font-bold text-end">
  181.                                         <p> {{ multiplePoolOfferUsedCodesCount is defined ? multiplePoolOfferUsedCodesCount : usedCodesCount }}
  182.                                             {{ ['промокод', 'промокода', 'промокодов']|plural(usedCodesCount) }}
  183.                                             из {{ allCodesCount }}</p>
  184.                                     </div>
  185.                                 </div>
  186.                                 <div class="d-flex px-2 my-0">
  187.                                     <div class="col">
  188.                                         <p class="color-dark-gray mb-0">Взято сутки/месяц:</p>
  189.                                     </div>
  190.                                     <div class="col font-bold text-end pl-2">
  191.                                         <p>{{ todayPurchaseCount }}
  192.                                             /{{ getOfferMonthlyPurchaseCount(offer.getID(), 30) > 0 ? getOfferMonthlyPurchaseCount(offer.getID(), 30) : 0 }} {{ ['промокод', 'промокода', 'промокодов']|plural(todayPurchaseCount) }}
  193.                                         </p>
  194.                                     </div>
  195.                                 </div>
  196.                             {% endif %}
  197.                             <div class="d-flex {{ offer.isWithoutCodes() ? 'pl-2' : 'offers-description--item' }}">
  198.                                 <div class="col">
  199.                                     <p class="color-dark-gray">Просмотров сутки/месяц:</p>
  200.                                 </div>
  201.                                 <div class="col font-bold text-end">
  202.                                     <p>{{ todayVisitCount }}/{{ visitCount }}</p>
  203.                                 </div>
  204.                             </div>
  205.                             {% if not offer.isWithoutCodes() %}
  206.                                 <div class="d-flex px-2 my-0">
  207.                                     <div class="col">
  208.                                         <p class="color-dark-gray">До завершения:&nbsp;</p>
  209.                                     </div>
  210.                                     <div class="col text-end">
  211.                                         {% if freeCodesCount > 0 %}
  212.                                             <input type="hidden" id="daysLeft" value="{{ daysLeft }} &nbsp;"/>
  213.                                             <input type="hidden" id="hoursLeft" value="{{ hoursLeft }} &nbsp;"/>
  214.                                             <input type="hidden" id="minutesLeft" value="{{ minutesLeft }} &nbsp;"/>
  215.                                             <input type="hidden" id="secondsLeft"
  216.                                                    value="{{ offer.getActiveTill().diff(date()).format('%s') }}"/>
  217.                                             <span id="days">{{ daysLeft }}
  218.                                             &nbsp</span>{{ ['день', 'дня', 'дней']|plural(daysLeft) }},&nbsp;
  219.                                             <span id="hours">{{ hoursLeft }}&nbsp</span>час{{ ['', 'а', 'ов']|plural(hoursLeft) }}&nbsp;
  220.                                         {% endif %}
  221.                                     </div>
  222.                                 </div>
  223.                             {% endif %}
  224.                             <div class="d-flex offers-description--item js-to-review-block">
  225.                                 <div class="col">
  226.                                     <p class="color-dark-gray">Отзывы/оценка:</p>
  227.                                 </div>
  228.                                 <div class="col font-bold text-end">
  229.                                     <p>{{ commentsAmount }} /
  230.                                         <r data-html="true"
  231.                                            data-toggle="tooltip"
  232.                                            data-placement="top"
  233.                                            data-original-title="Рейтинг компании <br> за 90 дней">
  234.                                             <span class="yellow-span">★</span>{{ offer.getRating() }}</r>
  235.                                     </p>
  236.                                 </div>
  237.                             </div>
  238.                             <div class="d-flex offer-price-block">
  239.                                 <div class="col px-2">
  240.                                     <p class="color-dark-gray">Стоимость:</p>
  241.                                 </div>
  242.                                 <div class="col text-end">
  243.                                     <span id="offerRegularPrice"
  244.                                           class="regular-price">{{ offer.getRegularPrice() }}</span>
  245.                                     <span class="discount-price">&nbsp;&nbsp;{{ offer.getOfferPrice()|replace({'(': '<span id="details-offer-price">(', ')': ')</span>'})|raw }}</span>
  246.                                 </div>
  247.                             </div>
  248.                             {% if offer.isWithoutCodes() %}
  249.                                 <a href="/moya_akciya" target="_blank">
  250.                                     <img class="mt-3" src="/images/without_codes.png"/>
  251.                                 </a>
  252.                             {% endif %}
  253.                         {% endif %}
  254.                     </div>
  255.                     <div class="d-flex" style="min-height: 90px;align-items: end;">
  256.                         {% if offer.getFreeCodesCount() > 0 and not offer.isWithoutCodes() %}
  257.                             <div class="buttons-wrapper-offers">
  258.                                 {% if hasDelivery is defined %}
  259.                                     {% if not offer.isBuyCodeDisable() %}
  260.                                         {% include 'Slivki/offers/buy_button.html.twig' %}
  261.                                     {% endif %}
  262.                                     {% if offer.isFoodOnlineOrderAllowedOnSite() %}
  263.                                         <a id="deliveryBtn" href="{{ getLinkFoodOnlineOrder(offer) }}"
  264.                                            class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  265.                                             Заказать онлайн {{ offer.getDiscount() }}
  266.                                         </a>
  267.                                     {% endif %}
  268.                                     {% if offer.isGiftCertificateOnlineOrderAllowedOnSite() %}
  269.                                         {% if offer.getID() == constant('Slivki\\Entity\\Offer::MINSK_WORLD_CERTIFICATE_OFFER_ID') %}
  270.                                             <a id="deliveryBtn" href="{{ getLinkGiftCertificateOnlineOrder(offer) }}"
  271.                                                class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  272.                                                 Получить скидку {{ offer.getDiscount() }}
  273.                                             </a>
  274.                                         {% elseif offer.getID() in constant('Slivki\\Entity\\Offer::FREESTYLE_OFFER_IDS') %}
  275.                                             <a id="deliveryBtn2"
  276.                                                href="{{ getLinkGiftCertificateOnlineOrderByOnlyCode(offer) }}"
  277.                                                class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  278.                                                 ПОЛУЧИТЬ СКИДКУ {{ offer.getDiscount() }}
  279.                                             </a>
  280.                                         {% elseif not offer.isFoodOnlineOrderAllowedOnSite() %}
  281.                                             <a id="deliveryBtn" href="{{ getLinkGiftCertificateOnlineOrder(offer) }}"
  282.                                                class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  283.                                                 Оплатить онлайн {{ offer.getDiscount() }}
  284.                                             </a>
  285.                                         {% endif %}
  286.                                     {% endif %}
  287.                                     {% if offer.isTireOnlineOrderAllowedOnSite() %}
  288.                                         <a id="deliveryBtn" href="{{ offer.getOnlineRegistrationLink() }}"
  289.                                            class="online-zapis d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  290.                                             Онлайн-запись
  291.                                         </a>
  292.                                     {% endif %}
  293.                                 {% elseif isAllowedByOnlyCode %}
  294.                                     <div class="col">
  295.                                         {% include 'Slivki/offers/buy_button.html.twig' %}
  296.                                     </div>
  297.                                 {% endif %}
  298.                                     {% if not pastOffer and offer.isOnlineOrderGiftEnabled() and offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['delivery'][4] != 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY'))
  299.                                         or not pastOffer and offer.isOnlineOrderGiftEnabled() and offer.getOnlineOrderSettings() is null and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) %}
  300.                                         <div class="col mb-2">
  301.                                             <a class="button-gift" data-toggle="modal" data-target="#choiceGiftModal">
  302.                                                 <div class="button-gift-text">
  303.                                                     <p>ЕДА В ПОДАРОК 😋</p>
  304.                                                     <p>Подарю сам или подарят мне</p>
  305.                                                 </div>
  306.                                                 <div class="button-gift-item-button">
  307.                                                     <div class="new">NEW</div>
  308.                                                 </div>
  309.                                             </a>
  310.                                         </div>
  311.                                     {% endif %}
  312.                                 {% if not pastOffer and offer.isGiftCertificateOnlineOrderAllowedOnSite() and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY_FOR_CERTIFICATE'))
  313.                                 %}
  314.                                     <div class="col mb-3" style="width: 350px;margin: 0 auto">
  315.                                         {% if app.user %}
  316.                                             <a class="button-gift"  href="/virtual-wallet-pay">
  317.                                                 <div class="button-gift-text">
  318.                                                     <p>ТЕПЕРЬ МОЖНО</p>
  319.                                                     <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  320.                                                 </div>
  321.                                                 <div class="button-gift-item-button">
  322.                                                     <div class="new">NEW</div>
  323.                                                 </div>
  324.                                             </a>
  325.                                         {% else %}
  326.                                             <a class="button-gift"  data-toggle="modal" data-target=".modal-auth">
  327.                                                 <div class="button-gift-text">
  328.                                                     <p>ТЕПЕРЬ МОЖНО</p>
  329.                                                     <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  330.                                                 </div>
  331.                                                 <div class="button-gift-item-button">
  332.                                                     <div class="new">NEW</div>
  333.                                                 </div>
  334.                                             </a>
  335.                                         {% endif %}
  336.                                     </div>
  337.                                 {% endif %}
  338.                                     {% if offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['delivery'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and not pastOffer and not offer.isOnlineOrderGiftEnabled() or
  339.                                         offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['pickup'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and not pastOffer
  340.                                         and not offer.isOnlineOrderGiftEnabled()%}
  341.                                         <div class="col">
  342.                                             {% if app.user %}
  343.                                                 <a class="button-gift"  href="/virtual-wallet-pay">
  344.                                                     <div class="button-gift-text">
  345.                                                         <p>ТЕПЕРЬ МОЖНО</p>
  346.                                                         <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  347.                                                     </div>
  348.                                                     <div class="button-gift-item-button">
  349.                                                         <div class="new">NEW</div>
  350.                                                     </div>
  351.                                                 </a>
  352.                                             {% else %}
  353.                                                 <a class="button-gift"  data-toggle="modal" data-target=".modal-auth">
  354.                                                     <div class="button-gift-text">
  355.                                                         <p>ТЕПЕРЬ МОЖНО</p>
  356.                                                         <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  357.                                                     </div>
  358.                                                     <div class="button-gift-item-button">
  359.                                                         <div class="new">NEW</div>
  360.                                                     </div>
  361.                                                 </a>
  362.                                             {% endif %}
  363.                                         </div>
  364.                                     {% endif %}
  365.                                 {% endif %}
  366.                             </div>
  367.                     </div>
  368.                 </div>
  369.             </div>
  370.             <div id="conditions_offers" class="d-flex" style="{{ pastOffer ? 'display: none!important' : '' }}">
  371.                 <div class="content-wrapper-col-left pt-0">
  372.                     {% if offer.isFoodOnlineOrderAllowedOnSite() and (offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['delivery'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY'))  and offer.isFoodOnlineOrderAllowedOnSite() or
  373.                         offer.isFoodOnlineOrderAllowedOnSite() and offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['delivery'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and offer.isOnlineOrderGiftEnabled()) %}
  374.                     <div class="d-flex mb-2" style="max-width: 625px;">
  375.                         {% if not pastOffer and offer.getFreeCodesCount() > 0 and offer.isOnlineOrderGiftEnabled() and offer.isFoodOnlineOrderAllowedOnSite() %}
  376.                             <div class="col mb-2 mr-2">
  377.                                 <a class="button-gift" data-toggle="modal" data-target="#choiceGiftModal">
  378.                                     <div class="button-gift-text">
  379.                                         <p>ЕДА В ПОДАРОК 😋</p>
  380.                                         <p>Подарю сам или подарят мне</p>
  381.                                     </div>
  382.                                 </a>
  383.                             </div>
  384.                         {% endif %}
  385.                         {% if offer.isFoodOnlineOrderAllowedOnSite() and offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['delivery'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and not pastOffer and  offer.isOnlineOrderGiftEnabled() or
  386.                             offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['pickup'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and not pastOffer and offer.isOnlineOrderGiftEnabled()
  387.                         or offer.isGiftCertificateOnlineOrderAllowedOnSite() and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY_FOR_CERTIFICATE'))
  388.                         %}
  389.                             <div class="col">
  390.                                 {% if app.user %}
  391.                                     <a class="button-gift"  href="/virtual-wallet-pay">
  392.                                         <div class="button-gift-text">
  393.                                             <p>ТЕПЕРЬ МОЖНО</p>
  394.                                             <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  395.                                         </div>
  396.                                         <div class="button-gift-item-button">
  397.                                             <div class="new">NEW</div>
  398.                                         </div>
  399.                                     </a>
  400.                                 {% else %}
  401.                                     <a class="button-gift"  data-toggle="modal" data-target=".modal-auth">
  402.                                         <div class="button-gift-text">
  403.                                             <p>ТЕПЕРЬ МОЖНО</p>
  404.                                             <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  405.                                         </div>
  406.                                         <div class="button-gift-item-button">
  407.                                             <div class="new">NEW</div>
  408.                                         </div>
  409.                                     </a>
  410.                                 {% endif %}
  411.                             </div>
  412.                         {% endif %}
  413.                     </div>
  414.                     {% endif %}
  415.                     <div id="offersConditions" class="offers-conditions active" style="max-height: fit-content;">
  416.                         <div class="offer-titles mb-2 mt-0"><h2>Условия</h2></div>
  417.                         {% set isOfferFavourite = app.user ? app.user.isOfferFavourite(offer) : false %}
  418.                         <div id="startOfOfferCondition"></div>
  419.                         {% if offer.getID() != 239232 %}
  420.                         {% endif %}
  421.                         {% if not offer.isWithoutCodes() and offer.getID() != 140553 %}
  422.                             <p>
  423.                                 {% set codeTill = offer.getCodeActiveTill() %}
  424.                                 {% set codeFrom = offer.getActiveTill()|date_modify('-1 day') %}
  425.                                 {% set codeFrom = codeFrom > codeTill ? codeTill : codeFrom %}
  426.                                 {% if not offer.isHideFeatures() %}
  427.                                     - Получить промокод можно до {{ codeFrom|date('d.m') }}, воспользоваться {{ offer.getID() != 134390 ? 'до' }} {{ codeTill|date('d.m.y') }}
  428.                                     <br/>
  429.                                 {% endif %}
  430.                                 {% if offer.isShowPriceInConditions() and not offerIsFreeForUser %}
  431.                                     - Стоимость промокода: {{ codeCost }} руб.
  432.                                 {% endif %}
  433.                             </p>
  434.                         {% endif %}
  435.                         <div class="offer-details-conditions offers-conditions p-0">
  436.                             {{ offer.getConditions()|raw }}
  437.                             {# Таблица с прейскурантом для акции с квестами "Ящик Пандоры" #}
  438.                             {% if offer.getID() == 143528 %}
  439.                                 {% include 'Slivki/offers/table_for_pandorra_box_offer2.html.twig' %}
  440.                             {% elseif offer.getID() == 282234 %}
  441.                                 {% include 'Slivki/offers/table_for_pandorra_box_offer4.html.twig' %}
  442.                             {% endif %}
  443.                             {% if not offer.isWithoutCodes() %}
  444.                                 {% include "Slivki#{regional_template_path}/phrase_subscription_in_offer_page.html.twig" %}
  445.                             {% endif %}
  446.                             {% if not offer.isHideFeatures() %}
  447.                                 </br>
  448.                                 <div class="offer-titles mb-2 mt-0"><h2>Особенности</h2></div>
  449.                                 <div class="offer-details-conditions">
  450.                                     {% if not offer.isWithoutCodes() %}
  451.                                         - Скидка предоставляется только при наличии промокода.
  452.                                     {% endif %}
  453.                                     {{ offer.getFeatures()|raw }}
  454.                                 </div>
  455.                                 - Поставщик несет полную ответственность перед потребителем за достоверность информации.
  456.                             {% endif %}
  457.                         </div>
  458.                         <div id="endOfOfferCondition"></div>
  459.                         <div class="clear"></div>
  460.                     </div>
  461.                     {% if offer.getShopMedias()|length > 0 %}
  462.                         <div class="offer-titles mb-2 mt-0"><h2>Галерея</h2></div>
  463.                     {% endif %}
  464.                     <div id="offerConditionsSlider"
  465.                          class="my-4 screenshots {{ offer.getShopMedias()|length == 0 or freeCodesCount == 0 ? 'empty' }}">
  466.                         {% if offer.getShopMedias()|length > 0 %}
  467.                             <div class="screenshot-container">
  468.                                 {% if  galleryVideos.getVideos() is defined and galleryVideos.getVideos()|length > 0 %}
  469.                                     <div class="screenshot screenshot-story" data-toggle="modal"
  470.                                          data-target="#detailsStoryPopup">
  471.                                         <img src="{{ galleryVideos.getImageUrl() }}" width="300"
  472.                                              alt="Видео" border="0"/>
  473.                                         <div class="screenshot-story-btn"></div>
  474.                                         <div class="screenshot-story-tittle">{{ galleryVideos.getTitle() }}</div>
  475.                                     </div>
  476.                                 {% endif %}
  477.                                 {% for media in offer.getShopMedias() %}
  478.                                     <div class="screenshot">
  479.                                         <a href="{{ getImageURL(media, 0, 0) }}" title="{{ media.getDescription() }}"
  480.                                            data-lightbox="image">
  481.                                             <img src="{{ getImageURL(media, 300, 0) }}" width="300"
  482.                                                  alt="{{ media.getDescription() }}" border="0"/>
  483.                                         </a>
  484.                                     </div>
  485.                                 {% endfor %}
  486.                             </div>
  487.                         {% endif %}
  488.                     </div>
  489.                     <div id="examplesOfWorksBlock" class="">
  490.                         <div class="headerBlockCategory examples d-none bg-white px-0 pb-0 bg-transpanent examples-block-offer-header">
  491.                             <div class="offer-titles"><h5 class="m-0">Фото
  492.                                     работ{# <div class="example-of-works-count-container"><span>1234</span></div> #}</h5>
  493.                             </div>
  494.                             <div class="examples-works-tooltip-filter">
  495.                                 <div class="tooltip-content">
  496.                                     <div class="tooltip-title border-bottom-f d-flex">Показать сначала:</div>
  497.                                     {% for key,sortItem in constant('Slivki\\Paginator\\WorkExample\\WorkExamplePaginatorInterface::SORT') %}
  498.                                         <div class="radio">
  499.                                             <input id="filter{{ key }}" type="radio" name="filter"
  500.                                                    data-direction="{{ sortItem.direction }}"
  501.                                                    value="{{ sortItem.field }}" {{ loop.first ? 'checked' }}>
  502.                                             <label for="filter{{ key }}"
  503.                                                    class="cursor-pointer">{{ sortItem.name }}</label>
  504.                                         </div>
  505.                                     {% endfor %}
  506.                                     <div class="tooltip-title border-top-f d-flex">Диапазон цены:</div>
  507.                                     <div id="workExamplePriceRangeInputs" class="price-range-inputs d-flex">
  508.                                         <div class="price-range-input"><input type="number" placeholder="Цена от"
  509.                                                                               id="priceFrom" name="priceFrom" min="0"
  510.                                                                               max="199" step="1"></div>
  511.                                         <div class="price-range-input"><input type="number" placeholder="Цена до"
  512.                                                                               id="priceTo" name="priceTo" min="0"
  513.                                                                               max="200" step="1"></div>
  514.                                     </div>
  515.                                     <div id="workExampleRangeSlider" class="range-slider">
  516.                                         <div class="range-labels">
  517.                                             <span id="workSimplesRangeLableStart"
  518.                                                   class="range-label range-label-start"></span>
  519.                                             <span>-</span>
  520.                                             <span id="workSimplesRangeLableEnd"
  521.                                                   class="range-label range-label-end"></span>
  522.                                         </div>
  523.                                         <input class="work-simples-input" type="range" name="startRange"
  524.                                                id="startRange">
  525.                                         <input class="work-simples-input" type="range" name="finishRange"
  526.                                                id="finishRange">
  527.                                         <div class="track-wrapper">
  528.                                             <div class="track"></div>
  529.                                             <div id="workSimplesSliderBetween" class="range-between"></div>
  530.                                             <div id="workSimplesTumbLeft" class="thumb left"></div>
  531.                                             <div id="workSimplesTumbRight" class="thumb right"></div>
  532.                                         </div>
  533.                                     </div>
  534.                                     <div id="buttonFilterBoxExamplesWork" class="buttonFilterBox">Показать</div>
  535.                                 </div>
  536.                                 <div id="buttonFilterBoxExamplesWork" class="d-flex cursor-pointer">Сортировка<img
  537.                                             width="25" class="pl-2" src="/images/sort_image.svg"/></div>
  538.                             </div>
  539.                         </div>
  540.                         {% include 'Slivki/works-examples/examples_of_works_gallery.html.twig' %}
  541.                     </div>
  542.                     <div id="beautyMastersBlock" class="beauty-masters-container beauty-masters-offer desk">
  543.                         <div id="beautyMastersHeader"
  544.                              class="tittleBlockCategory position-relative offer-titles mb-2 mt-0 d-none"><h2>
  545.                                 {{ parentCategoryList and parentCategoryList[0].getID() == constant('Slivki\\Entity\\Category::MEDICAL_CENTER_CATEGORY_ID') ? 'Врачи' : 'Найти своего мастера' }}</h2>
  546.                         </div>
  547.                         {% include 'Slivki/beauty/beauty_masters.html.twig' %}
  548.                     </div>
  549.                     <div id="offersDescription" class="offers-conditions mt-3">
  550.                         {% if offer.isShowProductsInOfferDescription() %}
  551.                             <div id="foodItemsBlock">
  552.                                 <div class="offer-titles mb-2 mt-0"><h2>Описание</h2></div>
  553.                                 {% if isPickupEnabled and isDeliveryEnabled %}
  554.                                     <div id="fixedFiltersOffer" class="w-auto px-2 d-flex"
  555.                                          style="position: relative;background: linear-gradient(180deg, #A839FF 0%, #6747e5 100%), #6747E5;border-radius: 8px;padding: 10px 0;">
  556.                                         <div class="col d-flex align-items-center text-white justify-content-end px-0"></div>
  557.                                         <div class="switch-delivery-pickup-block px-0 ">
  558.                                             <a data-type-delivery="1"
  559.                                                class="switch-delivery-pickup-item button-tab-delivery delivery-type active">
  560.                                                 <p class="m-0">Доставка</p>
  561.                                                 <small>удобно👌</small>
  562.                                             </a>
  563.                                             <a data-type-delivery="2"
  564.                                                class="switch-delivery-pickup-item pickup-type button-tab-pickup">
  565.                                                 <p class="m-0"> Самовывоз</p>
  566.                                                 <small>еще дешевле🔥</small>
  567.                                             </a>
  568.                                         </div>
  569.                                     </div>
  570.                                 {% endif %}
  571.                                 <div id="foodBlock"></div>
  572.                                 <div id="foodOptionsBlock"></div>
  573.                             </div>
  574.                         {% endif %}
  575.                         <div class="description" id="descriptionText">
  576.                             {% for offerDescription in offer.getDescriptionList() %}
  577.                                 {% set offerDescriptionSliderImages = offerDescription.getEntityDescriptionSliderImages() %}
  578.                                 {% if offerDescriptionSliderImages|length > 0 %}
  579.                                     <div class="sale-description-carousel">
  580.                                         <div id="saleDescriptionSliderFor{{ offerDescription.getID() }}"
  581.                                              class="sale-description-slider-for">
  582.                                             {% for offerDescriptionSliderImage in offerDescriptionSliderImages %}
  583.                                                 <div><img data-lazy="{{ offerDescriptionSliderImage.getImageUrl() }}"/>
  584.                                                 </div>
  585.                                             {% endfor %}
  586.                                         </div>
  587.                                     </div>
  588.                                 {% endif %}
  589.                                 {{ addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw }}
  590.                                 {#                                <div id="showMoreDescription" #}
  591.                                 {#                                     class="{{ addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw == "" or addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw == '<p><span style="color: #ecf0f1;">.</span></p>' ? 'd-none' : "" }}"> #}
  592.                                 {#                                    <div class="w-100 position-absolute bottom-0" #}
  593.                                 {#                                         style="background: linear-gradient(360deg, #FFFFFF 15.15%, rgba(255, 255, 255, 0) 206.06%);"></div> #}
  594.                                 {#                                    <p class="w-100 position-absolute bottom-0">Подробнее</p> #}
  595.                                 {#                                </div> #}
  596.                             {% endfor %}
  597.                         </div>
  598.                     </div>
  599.                     <div class="tab-pane fade" id="offerLocationTab">
  600.                         <i class="fa fa-spinner fa-spin"></i>
  601.                     </div>
  602.                     <div id="offersReview" class="offers-review">
  603.                         {{ comments|raw }}
  604.                     </div>
  605.                 </div>
  606.                 <div class="content-wrapper-col-right">
  607.                     <div id="conditionAddress">
  608.                         <div class="offer-titles mb-2 mt-0"><h2>Контакты</h2></div>
  609.                         <div style="display:none">{{ offer.getAddress() }}</div>
  610.                         <div id="offerConditionLogo">
  611.                             {{ offer.getLogo()|raw }}
  612.                         </div>
  613.                         <div id="dataFromLocation">
  614.                             <div class="move-data">
  615.                                 {% if geoLocations|length > 0 %}
  616.                                     <div class="geo-location-block" style="display: block">
  617.                                         {% include 'Slivki/offers/geo_location_data.html.twig' with {'offer': offer} only %}
  618.                                         <div id="offerGeoLocationData" data-json="{{ offerGeoLocationData }}"></div>
  619.                                         <div class="distance d-none">
  620.                                             <i class="slivki-icon slivki-icon-direction"></i> <img class='ajaxLoader'
  621.                                                                                                    src='/images/ajax-loader-16x16.gif'
  622.                                                                                                    alt='Загрузка...'/><span></span>
  623.                                         </div>
  624.                                         <div class="offer-details-map category-map-wrapper category-map"
  625.                                              id="offerMapCanvas">
  626.                                             <div id="mapCollapseBtn" class="button button--map-collapse capsuled"
  627.                                                  onclick="offerMapToggleSize();">Развернуть
  628.                                             </div>
  629.                                             <a id="setUserLocationBtn" href="#" class="capsuled">Указать
  630.                                                 местоположение</a>
  631.                                             <div id="zoomIn"></div>
  632.                                             <div id="zoomOut"></div>
  633.                                         </div>
  634.                                     </div>
  635.                                 {% endif %}
  636.                                 <div class="before-map" style="clear:both;"></div>
  637.                             </div>
  638.                         </div>
  639.                         {% if (offer.getLocation()|preg_replace("/<[^>]*>/", '')|replace({"\n": '', "\r": '', '&nbsp;': '', ' ': ''}) != '') %}
  640.                             {{ offer.getLocation()|raw }}
  641.                             {% set phoneNumbers = offer.getPhoneNumbers() %}
  642.                             {% if phoneNumbers.count() > 0 %}
  643.                                 <div class="text-bold">Телефон{{ phoneNumbers.count() > 1 ? 'ы' }}:</div>
  644.                             {% endif %}
  645.                             {% for phoneNumber in phoneNumbers %}
  646.                                 {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  647.                             {% endfor %}
  648.                         {% else %}
  649.                             {% set geoLocationsCount = geoLocations.count() %}
  650.                             {% set commonWoringHours = offer.getCommonWorkingHours() %}
  651.                             {% if commonWoringHours != '' %}
  652.                                 <br>
  653.                                 <div class="text-bold">Время работы:</div>
  654.                                 {{ commonWoringHours|raw }}
  655.                             {% endif %}
  656.                             {% for geoLocation in geoLocations %}
  657.                                 {% set margin = false %}
  658.                                 <div class="offer-details-geolocation-item my-3">
  659.                                     <div class="font-bold font-size-17">г. {{ geoLocation.getCity() }}
  660.                                         , {{ geoLocation.getStreet() }}, {{ geoLocation.getHouse() }}
  661.                                         <br>{{ geoLocation.getLabel() }}</div>
  662.                                     <div class="location-more-info {{ geoLocationsCount > 2 ? 'hidden' }}">
  663.                                         {% if geoLocation.getWorkingHours()|trim != '' %}
  664.                                             {% set margin = true %}
  665.                                             <div class="offer-details-work-hours">Время работы:
  666.                                             </div> {{ geoLocation.getWorkingHours()|nl2br|raw }}
  667.                                         {% endif %}
  668.                                         {% set phoneNumbers = geoLocation.getPhoneNumbers() %}
  669.                                         {% if phoneNumbers.count() > 0 %}
  670.                                         {% set margin = true %}
  671.                                         <span>
  672.                                             <div class="offer-details-phone-item">
  673.                                                 <div class="full-phone-item">
  674.                                                     {% for phoneNumber  in phoneNumbers %}
  675.                                                         {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  676.                                                     {% endfor %}
  677.                                                 </div>
  678.                                             </div>
  679.                                         {% endif %}
  680.                                             {% if margin %}
  681.                                                 <br>
  682.                                             {% endif %}
  683.                                             </span>
  684.                                         {% if geoLocation.getCallbackChatId() and geoLocation.getCallbackChatId() != '' %}
  685.                                             <div class="callback-button" data-id="{{ geoLocation.getId() }}">Обратный звонок</div>
  686.                                         {% endif %}
  687.                                     </div>
  688.                                     {% if geoLocationsCount > 2 %}
  689.                                         <a data-id="{{ geoLocation.getID() }}"
  690.                                            class="text-slivki location-more-info-toggle">Подробнее</a>
  691.                                     {% endif %}
  692.                                 </div>
  693.                             {% endfor %}
  694.                             {# {% if geoLocationsCount > 4 %} #}
  695.                             {# <div class="text-center"> #}
  696.                             {# <a id="showMoreAddressInDetailsLink" class="button" href="#">Еще адреса</a> #}
  697.                             {# </div> #}
  698.                             {# {% endif %} #}
  699.                             {% set phoneNumbersWithoutGeoLocations = offer.getPhoneNumbersWithoutGeoLocations() %}
  700.                             {% if phoneNumbersWithoutGeoLocations|length > 0 %}
  701.                                 <div class="text-bold">Телефон{{ phoneNumbersWithoutGeoLocations|length > 1 ? 'ы' }}:
  702.                                 </div>
  703.                                 <div class="offer-details-phone-item">
  704.                                     <div class="full-phone-item">
  705.                                         {% for phoneNumber  in phoneNumbersWithoutGeoLocations %}
  706.                                             {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  707.                                         {% endfor %}
  708.                                     </div>
  709.                                 </div>
  710.                                 {% if phoneNumber is defined and phoneNumber.getCallbackChatId() and phoneNumber.getCallbackChatId() != '' %}
  711.                                     <div class="callback-button" data-id="{{ phoneNumber.getId() }}">Обратный звонок</div>
  712.                                 {% endif %}
  713.                             {% endif %}
  714.                         {% endif %}
  715.                         <div id="phoneOffersBlock" class="offer-details-legal-info">{{ offer.getLegal()|raw }}</div>
  716.                         <div class="offer-titles offer-titles-mobile mt-0 mb-0"><h5 class="mt-0 mb-0">Написать</h5>
  717.                         </div>
  718.                         <div class="col px-0">
  719.                             <a class="tg-button offer-phone-mob btn btn-block bg-slivki text-white py-1 no-decoration my-2 d-flex justify-content-center align-items-center"
  720.                                href="https://t.me/{{ offer.getTelegram() != null ? offer.getTelegram() : 'slivkislivkiby' }}"
  721.                                style="width: 200px">
  722.                                 <img class="mr-2" src="/images/tg.svg" width="20" height="18">
  723.                                 <span class="float-right">Telegram</span>
  724.                             </a>
  725.                             {% set viberNumber = offer.getViber() != null ? offer.getViber() : '+375295084444' %}
  726.                             <a class="vb-button offer-phone-mob btn btn-block bg-slivki text-white py-1 no-decoration my-2 d-flex justify-content-center align-items-center"
  727.                                href='viber://chat?number="  {{ viberNumber }} "' style="width: 200px">
  728.                                 <img class="mr-2" src="/images/vb.svg" width="20" height="18">
  729.                                 <span class="float-right">Viber</span>
  730.                             </a>
  731.                         </div>
  732.                     </div>
  733.                     {% include 'Slivki/offers/share.html.twig' %}
  734.                     {% include "Slivki#{regional_template_path}/jivosite/button_offers_page.html.twig" %}
  735.                     <p class="tittle-messenger-offers d-none">Мы всегда рады помочь: служба поддержки Slivki.by ответит
  736.                         на
  737.                         любой
  738.                         ваш вопрос</p>
  739.                 </div>
  740.             </div>
  741.         </div>
  742.         {% if (pastOffer or freeCodesCount == 0) and relatedOfferListHtml is defined %}
  743.             <div class="col px-3">
  744.                 <div class="related-offers-title">Другие похожие предложения:</div>
  745.                 <div class="related-offers-list stock-group-list">
  746.                     {{ relatedOfferListHtml|raw }}
  747.                 </div>
  748.             </div>
  749.         {% endif %}
  750.     </div>
  751.     {% if lastPurchaseText is defined %}
  752.         <div id="lastPurchaseNofify"><a href="#"><i class="slivki-icon-close-thin"></i></a>Последний раз промокод<br>получен {{ lastPurchaseText }}
  753.         </div>
  754.     {% endif %}
  755. {% endblock %}
  756. {% block popups %}
  757.     {{ parent() }}
  758.     {% if not pastOffer %}
  759.         {% include 'Slivki/popups/header_offers.html.twig' %}
  760.     {% endif %}
  761.     {% include 'Slivki/share_block.html.twig' %}
  762.     {% include 'Slivki/popups/callback.html.twig' %}
  763.     {% include 'Slivki/offers/complaint.html.twig' %}
  764.     {% include 'Slivki/orderAsGift/foodForGift.html.twig' %}
  765.     {% if  galleryVideos.getVideos() is defined and galleryVideos.getVideos()|length > 0 %}
  766.         {% include 'Slivki/popups/details-story-popup.html.twig' %}
  767.     {% endif %}
  768.     {% include 'Slivki/popups/comment_media_block_popup.html.twig' %}
  769.     {% include 'Slivki/popups/statistics_popup.html.twig' %}
  770.     {% include 'Slivki/mobile/popup/buy_codes_avways_app.html.twig' %}
  771.     {% include 'Slivki/delivery/modal/details.html.twig' with {'isOfferPage': true} %}
  772.     {% if offer.isGiftCertificateOffer() %}
  773.         {% include 'Slivki/popups/step_buy_certificate.twig' with {'deliveryLink': deliveryLink} %}
  774.     {% endif %}
  775.     {% if app.user %}
  776.         {% include 'Slivki/popups/mail_offers.html.twig' %}
  777.         {% include 'Slivki/popups/rating_edit_popup.html.twig' %}
  778.         {% include 'Slivki/popups/popup_subscription_limited.html.twig' %}
  779.         {% if not isMobileDevice() or offerIsFreeForUser %}
  780.             {% if not codeCostInCurrency is defined and codeCostInCurrency is not null %}
  781.                 {% set codeCostInCurrency = null %}
  782.             {% endif %}
  783.             {% include 'Slivki/popups/confirm_box.html.twig' with {'codeCost': codeCost, 'offerID': offer.getID(), 'codeCostInCurrency': codeCostInCurrency} %}
  784.             {% include 'Slivki/popups/confirm_subscription_card_popup.html.twig' with {'creditCards': app.user.getActiveCreditCards()} %}
  785.         {% endif %}
  786.         {% if not isMobileDevice() %}
  787.             {% include 'Slivki/popups/add_comment_popup.html.twig' with {'id': 'addVoteBox'} %}
  788.             {% include 'Slivki/popups/edit_comment_popup.html.twig' with {'id': 'editVoteBox'} %}
  789.             {% include 'Slivki/popups/comment_censor_message.html.twig' with {'id': 'commentCensorMessage'} %}
  790.         {% endif %}
  791.     {% else %}
  792.         {% if not isMobileDevice() %}
  793.             {% include 'Slivki/popups/comment_only_registered_popup.html.twig' with {'id': 'onlyRegistered'} %}
  794.         {% endif %}
  795.     {% endif %}
  796. {% endblock %}
  797. {% block javascripts %}
  798.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"
  799.             integrity="sha512-jNDtFf7qgU0eH/+Z42FG4fw3w7DM/9zbgNPe3wfJlCylVDTT3IgKW5r92Vy9IHa6U50vyMz5gRByIu4YIXFtaQ=="
  800.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  801.     <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js"></script>
  802.     <script src="//api-maps.yandex.ru/2.1.29/?lang=ru-RU" type="text/javascript"></script>
  803.     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
  804.     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/locale/ru.min.js"
  805.             integrity="sha512-QezkC2mljFGA2zQBPe+FrNA7i2RVFaYOfdQHk6icEap1TZX/Q6MNx+0AOTr9msSec0LsMrpURxfgJSbodYoiLg=="
  806.             crossorigin="anonymous"></script>
  807.     <script src="https://cdnjs.cloudflare.com/ajax/libs/fecha/2.3.3/fecha.min.js"></script>
  808.     <script src="/js/hotel-datepicker-3.6.5/hotel-datepicker.min.js"></script>
  809.     <script src="/js/swiper-js/swiper.min.js"></script>
  810.     <script src="/js/story-slider/story-slider-js.js?v={{ story_slider_js_version }}"></script>
  811.     {{ parent() }}
  812.     <script src="/js/offer.js?v={{ offer_js_version }}"></script>
  813.     <script src="/js/offer/offerDescriptionItems.js?v={{ offer_description_items_js_version }}"></script>
  814.     <script src="/js/common-old.js?v={{ common_old_js_version }}"></script>
  815.     <script type="text/javascript">
  816.         {% if preview is defined and preview %}
  817.         var offerPreview = 1;
  818.         {% else %}
  819.         var offerPreview = 0;
  820.         {% endif %}
  821.         {% if app.request.query.has('checkOrder') %}
  822.         initCheckOfferOrderStatus({{ app.request.get('checkOrder') }});
  823.         {% endif %}
  824.     </script>
  825.     <script src="/js/offer-new.js?v={{ offer_new_js_version }}"/>
  826. {% endblock %}
  827. {% block assetsBottom %}
  828.     {{ parent() }}
  829.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js"
  830.             integrity="sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw=="
  831.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  832.     <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"
  833.             integrity="sha512-Y+0b10RbVUTf3Mi0EgJue0FoheNzentTMMIE2OreNbqnUPNbQj8zmjK3fs5D2WhQeGWIem2G2UkKjAL/bJ/UXQ=="
  834.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  835.     {#    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>#}
  836.     <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
  837.     <script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
  838.     <script type="text/javascript" src="/js/statistics_offer/statistics_offer.js?v={{ statistics_offer_js_version }}"
  839.             charset="utf-8"></script>
  840.     <script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.6/jquery.easypiechart.min.js"
  841.             integrity="sha512-DHNepbIus9t4e6YoMBSJLwl+nnm0tIwMBonsQQ+W9NKN6gVVVbomJs9Ii3mQ+HzGZiU5FyJLdnAz9a63ZgZvTQ=="
  842.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  843.     <script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.6/easypiechart.min.js"
  844.             integrity="sha512-1yldf7W5suy0ko2u4OGU1qyeGrzh9+A3uyWGH4ws8MbndaWxZsgnzy6uqqBq7NUU/ImI1Js5kqDbunovCN1JqA=="
  845.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  846.     <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
  847.     <script type="module" src="/js/work_examples/work_examples.js?v={{ work_examples_js_version }}"></script>
  848.     <script type="module" src="/js/beauty/masters.js?v={{ beauty_masters_js_version }}"></script>
  849. {% endblock %}
  850. {% block RTBHouse %}
  851.     <script>
  852.         try {
  853.             (function () {
  854.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = [];
  855.                 rtbhTags.push("pr_" + hash + "_offer_" + document.getElementById('offerID').value);
  856.                 rtbhTags.push("pr_" + hash + "_uid_" + document.getElementById('rtbhUID').value);
  857.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key);
  858.                 if (!lid) {
  859.                     lid = "";
  860.                     var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  861.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length));
  862.                     window.localStorage.setItem(key, lid);
  863.                 }
  864.                 rtbhTags.push("pr_" + hash + "_lid_" + lid);
  865.                 var ifr = document.createElement("iframe"),
  866.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  867.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  868.                     ifrSrc = "https://" + prefix + "creativecdn.com/tags?type=iframe",
  869.                     tmstmp = encodeURIComponent("" + Date.now());
  870.                 for (var i = 0; i < rtbhTags.length; i++) {
  871.                     ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);
  872.                 }
  873.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  874.                 ifr.setAttribute("src", ifrSrc);
  875.                 ifr.setAttribute("width", "1");
  876.                 ifr.setAttribute("height", "1");
  877.                 ifr.setAttribute("scrolling", "no");
  878.                 ifr.setAttribute("frameBorder", "0");
  879.                 ifr.setAttribute("style", "display:none");
  880.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade");
  881.                 if (document.body) {
  882.                     document.body.appendChild(ifr);
  883.                 } else {
  884.                     window.addEventListener('DOMContentLoaded', function () {
  885.                         document.body.appendChild(ifr);
  886.                     });
  887.                 }
  888.             })();
  889.         } catch (e) {
  890.         } </script>
  891. {% endblock %}