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

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-2" src="/images/платидари.png" style="border-radius: 8px"/>
  251.                                 </a>
  252.                             {% endif %}
  253.                         {% endif %}
  254.                     </div>
  255.                     {% if offer.isTireOnlineOrderAllowedOnSite() and offer.isWithoutCodes() %}
  256.                         <div class="buttons-wrapper-offers">
  257.                             <a id="deliveryBtn" href="{{ offer.getOnlineRegistrationLink() }}" style="margin: 14px 0;"
  258.                                class="online-zapis d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  259.                                 Онлайн-запись
  260.                             </a>
  261.                         </div>
  262.                     {% endif %}
  263.                         {% if offer.getFreeCodesCount() > 0 and not offer.isWithoutCodes() %}
  264.                     <div class="d-flex" style="min-height: 90px;align-items: end;">
  265.                         <div class="buttons-wrapper-offers">
  266.                             {% if hasDelivery is defined %}
  267.                                 {% if not offer.isBuyCodeDisable() %}
  268.                                     {% include 'Slivki/offers/buy_button.html.twig' %}
  269.                                 {% endif %}
  270.                                 {% if offer.isFoodOnlineOrderAllowedOnSite() %}
  271.                                     <a id="deliveryBtn" href="{{ getLinkFoodOnlineOrder(offer) }}"
  272.                                        class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  273.                                         Заказать онлайн {{ offer.getDiscount() }}
  274.                                     </a>
  275.                                 {% endif %}
  276.                                 {% if offer.isGiftCertificateOnlineOrderAllowedOnSite() %}
  277.                                     {% if offer.getID() == constant('Slivki\\Entity\\Offer::MINSK_WORLD_CERTIFICATE_OFFER_ID') %}
  278.                                         <a id="deliveryBtn" href="{{ getLinkGiftCertificateOnlineOrder(offer) }}"
  279.                                            class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  280.                                             Получить скидку {{ offer.getDiscount() }}
  281.                                         </a>
  282.                                     {% elseif offer.getID() in constant('Slivki\\Entity\\Offer::FREESTYLE_OFFER_IDS') %}
  283.                                         <a id="deliveryBtn2"
  284.                                            href="{{ getLinkGiftCertificateOnlineOrderByOnlyCode(offer) }}"
  285.                                            class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  286.                                             ПОЛУЧИТЬ СКИДКУ {{ offer.getDiscount() }}
  287.                                         </a>
  288.                                     {% elseif not offer.isFoodOnlineOrderAllowedOnSite() %}
  289.                                         <a id="deliveryBtn" href="{{ getLinkGiftCertificateOnlineOrder(offer) }}"
  290.                                            class="d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  291.                                             Оплатить онлайн {{ offer.getDiscount() }}
  292.                                         </a>
  293.                                     {% endif %}
  294.                                 {% endif %}
  295.                                 {% if offer.isTireOnlineOrderAllowedOnSite() %}
  296.                                     <a id="deliveryBtn" href="{{ offer.getOnlineRegistrationLink() }}"
  297.                                        class="online-zapis d-flex justify-content-center align-items-center text-uppercase button-by-code button">
  298.                                         Онлайн-запись
  299.                                     </a>
  300.                                 {% endif %}
  301.                             {% elseif isAllowedByOnlyCode %}
  302.                                 <div class="col">
  303.                                     {% include 'Slivki/offers/buy_button.html.twig' %}
  304.                                 </div>
  305.                             {% endif %}
  306.                             {% 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'))
  307.                                 or not pastOffer and offer.isOnlineOrderGiftEnabled() and offer.getOnlineOrderSettings() is null and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) %}
  308.                                 <div class="col mb-2">
  309.                                     <a class="button-gift" data-toggle="modal" data-target="#choiceGiftModal">
  310.                                         <div class="button-gift-text">
  311.                                             <p>ЕДА В ПОДАРОК 😋</p>
  312.                                             <p>Подарю сам или подарят мне</p>
  313.                                         </div>
  314.                                         <div class="button-gift-item-button">
  315.                                             <div class="new">NEW</div>
  316.                                         </div>
  317.                                     </a>
  318.                                 </div>
  319.                         </div>
  320.                             {% endif %}
  321.                             {% if not pastOffer and offer.isGiftCertificateOnlineOrderAllowedOnSite() and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY_FOR_CERTIFICATE')) %}
  322.                                 <div class="col mb-3" style="width: 350px;margin: 0 auto">
  323.                                     {% if app.user %}
  324.                                         <a class="button-gift" href="/virtual-wallet-pay">
  325.                                             <div class="button-gift-text">
  326.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  327.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  328.                                             </div>
  329.                                             <div class="button-gift-item-button">
  330.                                                 <div class="new">NEW</div>
  331.                                             </div>
  332.                                         </a>
  333.                                     {% else %}
  334.                                         <a class="button-gift" data-toggle="modal" data-target=".modal-auth">
  335.                                             <div class="button-gift-text">
  336.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  337.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  338.                                             </div>
  339.                                             <div class="button-gift-item-button">
  340.                                                 <div class="new">NEW</div>
  341.                                             </div>
  342.                                         </a>
  343.                                     {% endif %}
  344.                                 </div>
  345.                             {% endif %}
  346.                             {% 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
  347.                                 offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().allowedPaymentMethods['pickup'][4] == 1 and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY')) and not pastOffer
  348.                                 and not offer.isOnlineOrderGiftEnabled() %}
  349.                                 <div class="col">
  350.                                     {% if app.user %}
  351.                                         <a class="button-gift" href="/virtual-wallet-pay">
  352.                                             <div class="button-gift-text">
  353.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  354.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  355.                                             </div>
  356.                                             <div class="button-gift-item-button">
  357.                                                 <div class="new">NEW</div>
  358.                                             </div>
  359.                                         </a>
  360.                                     {% else %}
  361.                                         <a class="button-gift" data-toggle="modal" data-target=".modal-auth">
  362.                                             <div class="button-gift-text">
  363.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  364.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  365.                                             </div>
  366.                                             <div class="button-gift-item-button">
  367.                                                 <div class="new">NEW</div>
  368.                                             </div>
  369.                                         </a>
  370.                                     {% endif %}
  371.                                 </div>
  372.                             {% endif %}
  373.                             {% endif %}
  374.                         </div>
  375.                     </div>
  376.                 </div>
  377.             </div>
  378.             <div id="conditions_offers" class="d-flex" style="{{ pastOffer ? 'display: none!important' : '' }}">
  379.                 <div class="content-wrapper-col-left pt-0">
  380.                     {% 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
  381.                         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()) %}
  382.                         <div class="d-flex mb-2" style="max-width: 625px;">
  383.                             {% if not pastOffer and offer.getFreeCodesCount() > 0 and offer.isOnlineOrderGiftEnabled() and offer.isFoodOnlineOrderAllowedOnSite() %}
  384.                                 <div class="col mb-2 mr-2">
  385.                                     <a class="button-gift" data-toggle="modal" data-target="#choiceGiftModal">
  386.                                         <div class="button-gift-text">
  387.                                             <p>ЕДА В ПОДАРОК 😋</p>
  388.                                             <p>Подарю сам или подарят мне</p>
  389.                                         </div>
  390.                                     </a>
  391.                                 </div>
  392.                             {% endif %}
  393.                             {% 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
  394.                                 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()
  395.                                 or offer.isGiftCertificateOnlineOrderAllowedOnSite() and isServerFeatureEnabled(constant('Slivki\\Enum\\SwitcherFeatures::SLIVKI_PAY_FOR_CERTIFICATE')) %}
  396.                                 <div class="col">
  397.                                     {% if app.user %}
  398.                                         <a class="button-gift" href="/virtual-wallet-pay">
  399.                                             <div class="button-gift-text">
  400.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  401.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  402.                                             </div>
  403.                                             <div class="button-gift-item-button">
  404.                                                 <div class="new">NEW</div>
  405.                                             </div>
  406.                                         </a>
  407.                                     {% else %}
  408.                                         <a class="button-gift" data-toggle="modal" data-target=".modal-auth">
  409.                                             <div class="button-gift-text">
  410.                                                 <p>ТЕПЕРЬ МОЖНО</p>
  411.                                                 <p class="color-violet">ОПЛАТИТЬ SLIVKI.PAY</p>
  412.                                             </div>
  413.                                             <div class="button-gift-item-button">
  414.                                                 <div class="new">NEW</div>
  415.                                             </div>
  416.                                         </a>
  417.                                     {% endif %}
  418.                                 </div>
  419.                             {% endif %}
  420.                         </div>
  421.                     {% endif %}
  422.                     <div id="offersConditions" class="offers-conditions active" style="max-height: fit-content;">
  423.                         <div class="offer-titles mb-2 mt-0"><h2>Условия</h2></div>
  424.                         {% set isOfferFavourite = app.user ? app.user.isOfferFavourite(offer) : false %}
  425.                         <div id="startOfOfferCondition"></div>
  426.                         {% if offer.getID() != 239232 %}
  427.                         {% endif %}
  428.                         {% if not offer.isWithoutCodes() and offer.getID() != 140553 %}
  429.                             <p>
  430.                                 {% set codeTill = offer.getCodeActiveTill() %}
  431.                                 {% set codeFrom = offer.getActiveTill()|date_modify('-1 day') %}
  432.                                 {% set codeFrom = codeFrom > codeTill ? codeTill : codeFrom %}
  433.                                 {% if not offer.isHideFeatures() %}
  434.                                     - Получить промокод можно до {{ codeFrom|date('d.m') }}, воспользоваться {{ offer.getID() != 134390 ? 'до' }} {{ codeTill|date('d.m.y') }}
  435.                                     <br/>
  436.                                 {% endif %}
  437.                                 {% if offer.isShowPriceInConditions() and not offerIsFreeForUser %}
  438.                                     - Стоимость промокода: {{ codeCost }} руб.
  439.                                 {% endif %}
  440.                             </p>
  441.                         {% endif %}
  442.                         <div class="offer-details-conditions offers-conditions p-0">
  443.                             {{ offer.getConditions()|raw }}
  444.                             {# Таблица с прейскурантом для акции с квестами "Ящик Пандоры" #}
  445.                             {% if offer.getID() == 143528 %}
  446.                                 {% include 'Slivki/offers/table_for_pandorra_box_offer2.html.twig' %}
  447.                             {% elseif offer.getID() == 282234 %}
  448.                                 {% include 'Slivki/offers/table_for_pandorra_box_offer4.html.twig' %}
  449.                             {% endif %}
  450.                             {% if not offer.isWithoutCodes() %}
  451.                                 {% include "Slivki#{regional_template_path}/phrase_subscription_in_offer_page.html.twig" %}
  452.                             {% endif %}
  453.                             {% if not offer.isHideFeatures() %}
  454.                                 </br>
  455.                                 <div class="offer-titles mb-2 mt-0"><h2>Особенности</h2></div>
  456.                                 <div class="offer-details-conditions">
  457.                                     {% if not offer.isWithoutCodes() %}
  458.                                         - Скидка предоставляется только при наличии промокода.
  459.                                     {% endif %}
  460.                                     {{ offer.getFeatures()|raw }}
  461.                                 </div>
  462.                                 - Поставщик несет полную ответственность перед потребителем за достоверность информации.
  463.                             {% endif %}
  464.                         </div>
  465.                         <div id="endOfOfferCondition"></div>
  466.                         <div class="clear"></div>
  467.                     </div>
  468.                     {% if offer.getShopMedias()|length > 0 %}
  469.                         <div class="offer-titles mb-2 mt-0"><h2>Галерея</h2></div>
  470.                     {% endif %}
  471.                     <div id="offerConditionsSlider"
  472.                          class="my-4 screenshots {{ offer.getShopMedias()|length == 0 or freeCodesCount == 0 ? 'empty' }}">
  473.                         {% if offer.getShopMedias()|length > 0 %}
  474.                             <div class="screenshot-container">
  475.                                 {% if  galleryVideos.getVideos() is defined and galleryVideos.getVideos()|length > 0 %}
  476.                                     <div class="screenshot screenshot-story" data-toggle="modal"
  477.                                          data-target="#detailsStoryPopup">
  478.                                         <img src="{{ galleryVideos.getImageUrl() }}" width="300"
  479.                                              alt="Видео" border="0"/>
  480.                                         <div class="screenshot-story-btn"></div>
  481.                                         <div class="screenshot-story-tittle">{{ galleryVideos.getTitle() }}</div>
  482.                                     </div>
  483.                                 {% endif %}
  484.                                 {% for media in offer.getShopMedias() %}
  485.                                     <div class="screenshot">
  486.                                         <a href="{{ getImageURL(media, 0, 0) }}" title="{{ media.getDescription() }}"
  487.                                            data-lightbox="image">
  488.                                             <img src="{{ getImageURL(media, 300, 0) }}" width="300"
  489.                                                  alt="{{ media.getDescription() }}" border="0"/>
  490.                                         </a>
  491.                                     </div>
  492.                                 {% endfor %}
  493.                             </div>
  494.                         {% endif %}
  495.                     </div>
  496.                     <div id="examplesOfWorksBlock" class="">
  497.                         <div class="headerBlockCategory examples d-none bg-white px-0 pb-0 bg-transpanent examples-block-offer-header">
  498.                             <div class="offer-titles"><h5 class="m-0">Фото
  499.                                     работ{# <div class="example-of-works-count-container"><span>1234</span></div> #}</h5>
  500.                             </div>
  501.                             <div class="examples-works-tooltip-filter">
  502.                                 <div class="tooltip-content">
  503.                                     <div class="tooltip-title border-bottom-f d-flex">Показать сначала:</div>
  504.                                     {% for key,sortItem in constant('Slivki\\Paginator\\WorkExample\\WorkExamplePaginatorInterface::SORT') %}
  505.                                         <div class="radio">
  506.                                             <input id="filter{{ key }}" type="radio" name="filter"
  507.                                                    data-direction="{{ sortItem.direction }}"
  508.                                                    value="{{ sortItem.field }}" {{ loop.first ? 'checked' }}>
  509.                                             <label for="filter{{ key }}"
  510.                                                    class="cursor-pointer">{{ sortItem.name }}</label>
  511.                                         </div>
  512.                                     {% endfor %}
  513.                                     <div class="tooltip-title border-top-f d-flex">Диапазон цены:</div>
  514.                                     <div id="workExamplePriceRangeInputs" class="price-range-inputs d-flex">
  515.                                         <div class="price-range-input"><input type="number" placeholder="Цена от"
  516.                                                                               id="priceFrom" name="priceFrom" min="0"
  517.                                                                               max="199" step="1"></div>
  518.                                         <div class="price-range-input"><input type="number" placeholder="Цена до"
  519.                                                                               id="priceTo" name="priceTo" min="0"
  520.                                                                               max="200" step="1"></div>
  521.                                     </div>
  522.                                     <div id="workExampleRangeSlider" class="range-slider">
  523.                                         <div class="range-labels">
  524.                                             <span id="workSimplesRangeLableStart"
  525.                                                   class="range-label range-label-start"></span>
  526.                                             <span>-</span>
  527.                                             <span id="workSimplesRangeLableEnd"
  528.                                                   class="range-label range-label-end"></span>
  529.                                         </div>
  530.                                         <input class="work-simples-input" type="range" name="startRange"
  531.                                                id="startRange">
  532.                                         <input class="work-simples-input" type="range" name="finishRange"
  533.                                                id="finishRange">
  534.                                         <div class="track-wrapper">
  535.                                             <div class="track"></div>
  536.                                             <div id="workSimplesSliderBetween" class="range-between"></div>
  537.                                             <div id="workSimplesTumbLeft" class="thumb left"></div>
  538.                                             <div id="workSimplesTumbRight" class="thumb right"></div>
  539.                                         </div>
  540.                                     </div>
  541.                                     <div id="buttonFilterBoxExamplesWork" class="buttonFilterBox">Показать</div>
  542.                                 </div>
  543.                                 <div id="buttonFilterBoxExamplesWork" class="d-flex cursor-pointer">Сортировка<img
  544.                                             width="25" class="pl-2" src="/images/sort_image.svg"/></div>
  545.                             </div>
  546.                         </div>
  547.                         {% include 'Slivki/works-examples/examples_of_works_gallery.html.twig' %}
  548.                     </div>
  549.                     <div id="beautyMastersBlock" class="beauty-masters-container beauty-masters-offer desk">
  550.                         <div id="beautyMastersHeader"
  551.                              class="tittleBlockCategory position-relative offer-titles mb-2 mt-0 d-none"><h2>
  552.                                 {{ parentCategoryList and parentCategoryList[0].getID() == constant('Slivki\\Entity\\Category::MEDICAL_CENTER_CATEGORY_ID') ? 'Врачи' : 'Найти своего мастера' }}</h2>
  553.                         </div>
  554.                         {% include 'Slivki/beauty/beauty_masters.html.twig' %}
  555.                     </div>
  556.                     <div id="offersDescription" class="offers-conditions mt-3">
  557.                         {% if offer.isShowProductsInOfferDescription() %}
  558.                             <div id="foodItemsBlock">
  559.                                 <div class="offer-titles mb-2 mt-0"><h2>Описание</h2></div>
  560.                                 {% if isPickupEnabled and isDeliveryEnabled %}
  561.                                     <div id="fixedFiltersOffer" class="w-auto px-2 d-flex"
  562.                                          style="position: relative;background: linear-gradient(180deg, #A839FF 0%, #6747e5 100%), #6747E5;border-radius: 8px;padding: 10px 0;">
  563.                                         <div class="col d-flex align-items-center text-white justify-content-end px-0"></div>
  564.                                         <div class="switch-delivery-pickup-block px-0 ">
  565.                                             <a data-type-delivery="1"
  566.                                                class="switch-delivery-pickup-item button-tab-delivery delivery-type active">
  567.                                                 <p class="m-0">Доставка</p>
  568.                                                 <small>удобно👌</small>
  569.                                             </a>
  570.                                             <a data-type-delivery="2"
  571.                                                class="switch-delivery-pickup-item pickup-type button-tab-pickup">
  572.                                                 <p class="m-0"> Самовывоз</p>
  573.                                                 <small>еще дешевле🔥</small>
  574.                                             </a>
  575.                                         </div>
  576.                                     </div>
  577.                                 {% endif %}
  578.                                 <div id="foodBlock"></div>
  579.                                 <div id="foodOptionsBlock"></div>
  580.                             </div>
  581.                         {% endif %}
  582.                         <div class="description" id="descriptionText">
  583.                             {% for offerDescription in offer.getDescriptionList() %}
  584.                                 {% set offerDescriptionSliderImages = offerDescription.getEntityDescriptionSliderImages() %}
  585.                                 {% if offerDescriptionSliderImages|length > 0 %}
  586.                                     <div class="sale-description-carousel">
  587.                                         <div id="saleDescriptionSliderFor{{ offerDescription.getID() }}"
  588.                                              class="sale-description-slider-for">
  589.                                             {% for offerDescriptionSliderImage in offerDescriptionSliderImages %}
  590.                                                 <div><img data-lazy="{{ offerDescriptionSliderImage.getImageUrl() }}"/>
  591.                                                 </div>
  592.                                             {% endfor %}
  593.                                         </div>
  594.                                     </div>
  595.                                 {% endif %}
  596.                                 {{ addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw }}
  597.                                 {#                                <div id="showMoreDescription" #}
  598.                                 {#                                     class="{{ addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw == "" or addLazyAndLightboxImagesInDescription(offerDescription.getDescription())|raw == '<p><span style="color: #ecf0f1;">.</span></p>' ? 'd-none' : "" }}"> #}
  599.                                 {#                                    <div class="w-100 position-absolute bottom-0" #}
  600.                                 {#                                         style="background: linear-gradient(360deg, #FFFFFF 15.15%, rgba(255, 255, 255, 0) 206.06%);"></div> #}
  601.                                 {#                                    <p class="w-100 position-absolute bottom-0">Подробнее</p> #}
  602.                                 {#                                </div> #}
  603.                             {% endfor %}
  604.                         </div>
  605.                     </div>
  606.                     <div class="tab-pane fade" id="offerLocationTab">
  607.                         <i class="fa fa-spinner fa-spin"></i>
  608.                     </div>
  609.                     <div id="offersReview" class="offers-review">
  610.                         {{ comments|raw }}
  611.                     </div>
  612.                 </div>
  613.                 <div class="content-wrapper-col-right">
  614.                     <div id="conditionAddress">
  615.                         <div class="offer-titles mb-2 mt-0"><h2>Контакты</h2></div>
  616.                         <div style="display:none">{{ offer.getAddress() }}</div>
  617.                         <div id="offerConditionLogo">
  618.                             {{ offer.getLogo()|raw }}
  619.                         </div>
  620.                         <div id="dataFromLocation">
  621.                             <div class="move-data">
  622.                                 {% if geoLocations|length > 0 %}
  623.                                     <div class="geo-location-block" style="display: block">
  624.                                         {% include 'Slivki/offers/geo_location_data.html.twig' with {'offer': offer} only %}
  625.                                         <div id="offerGeoLocationData" data-json="{{ offerGeoLocationData }}"></div>
  626.                                         <div class="distance d-none">
  627.                                             <i class="slivki-icon slivki-icon-direction"></i> <img class='ajaxLoader'
  628.                                                                                                    src='/images/ajax-loader-16x16.gif'
  629.                                                                                                    alt='Загрузка...'/><span></span>
  630.                                         </div>
  631.                                         <div class="offer-details-map category-map-wrapper category-map"
  632.                                              id="offerMapCanvas">
  633.                                             <div id="mapCollapseBtn" class="button button--map-collapse capsuled"
  634.                                                  onclick="offerMapToggleSize();">Развернуть
  635.                                             </div>
  636.                                             <a id="setUserLocationBtn" href="#" class="capsuled">Указать
  637.                                                 местоположение</a>
  638.                                             <div id="zoomIn"></div>
  639.                                             <div id="zoomOut"></div>
  640.                                         </div>
  641.                                     </div>
  642.                                 {% endif %}
  643.                                 <div class="before-map" style="clear:both;"></div>
  644.                             </div>
  645.                         </div>
  646.                         {% if (offer.getLocation()|preg_replace("/<[^>]*>/", '')|replace({"\n": '', "\r": '', '&nbsp;': '', ' ': ''}) != '') %}
  647.                             {{ offer.getLocation()|raw }}
  648.                             {% set phoneNumbers = offer.getPhoneNumbers() %}
  649.                             {% if phoneNumbers.count() > 0 %}
  650.                                 <div class="text-bold">Телефон{{ phoneNumbers.count() > 1 ? 'ы' }}:</div>
  651.                             {% endif %}
  652.                             {% for phoneNumber in phoneNumbers %}
  653.                                 {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  654.                             {% endfor %}
  655.                         {% else %}
  656.                             {% set geoLocationsCount = geoLocations.count() %}
  657.                             {% set commonWoringHours = offer.getCommonWorkingHours() %}
  658.                             {% if commonWoringHours != '' %}
  659.                                 <br>
  660.                                 <div class="text-bold">Время работы:</div>
  661.                                 {{ commonWoringHours|raw }}
  662.                             {% endif %}
  663.                             {% for geoLocation in geoLocations %}
  664.                                 {% set margin = false %}
  665.                                 <div class="offer-details-geolocation-item my-3">
  666.                                     <div class="font-bold font-size-17">г. {{ geoLocation.getCity() }}
  667.                                         , {{ geoLocation.getStreet() }}, {{ geoLocation.getHouse() }}
  668.                                         <br>{{ geoLocation.getLabel() }}</div>
  669.                                     <div class="location-more-info {{ geoLocationsCount > 2 ? 'hidden' }}">
  670.                                         {% if geoLocation.getWorkingHours()|trim != '' %}
  671.                                             {% set margin = true %}
  672.                                             <div class="offer-details-work-hours">Время работы:
  673.                                             </div> {{ geoLocation.getWorkingHours()|nl2br|raw }}
  674.                                         {% endif %}
  675.                                         {% set phoneNumbers = geoLocation.getPhoneNumbers() %}
  676.                                         {% if phoneNumbers.count() > 0 %}
  677.                                         {% set margin = true %}
  678.                                         <span>
  679.                                             <div class="offer-details-phone-item">
  680.                                                 <div class="full-phone-item">
  681.                                                     {% for phoneNumber  in phoneNumbers %}
  682.                                                         {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  683.                                                     {% endfor %}
  684.                                                 </div>
  685.                                             </div>
  686.                                         {% endif %}
  687.                                             {% if margin %}
  688.                                                 <br>
  689.                                             {% endif %}
  690.                                             </span>
  691.                                         {% if geoLocation.getCallbackChatId() and geoLocation.getCallbackChatId() != '' %}
  692.                                             <div class="callback-button" data-id="{{ geoLocation.getId() }}">Обратный
  693.                                                 звонок
  694.                                             </div>
  695.                                         {% endif %}
  696.                                     </div>
  697.                                     {% if geoLocationsCount > 2 %}
  698.                                         <a data-id="{{ geoLocation.getID() }}"
  699.                                            class="text-slivki location-more-info-toggle">Подробнее</a>
  700.                                     {% endif %}
  701.                                 </div>
  702.                             {% endfor %}
  703.                             {# {% if geoLocationsCount > 4 %} #}
  704.                             {# <div class="text-center"> #}
  705.                             {# <a id="showMoreAddressInDetailsLink" class="button" href="#">Еще адреса</a> #}
  706.                             {# </div> #}
  707.                             {# {% endif %} #}
  708.                             {% set phoneNumbersWithoutGeoLocations = offer.getPhoneNumbersWithoutGeoLocations() %}
  709.                             {% if phoneNumbersWithoutGeoLocations|length > 0 %}
  710.                                 <div class="text-bold">Телефон{{ phoneNumbersWithoutGeoLocations|length > 1 ? 'ы' }}:
  711.                                 </div>
  712.                                 <div class="offer-details-phone-item">
  713.                                     <div class="full-phone-item">
  714.                                         {% for phoneNumber  in phoneNumbersWithoutGeoLocations %}
  715.                                             {{ phoneNumber.getNumber() }} {{ phoneNumber.getLabel() }}<br/>
  716.                                         {% endfor %}
  717.                                     </div>
  718.                                 </div>
  719.                                 {% if phoneNumber is defined and phoneNumber.getCallbackChatId() and phoneNumber.getCallbackChatId() != '' %}
  720.                                     <div class="callback-button" data-id="{{ phoneNumber.getId() }}">Обратный звонок
  721.                                     </div>
  722.                                 {% endif %}
  723.                             {% endif %}
  724.                         {% endif %}
  725.                         <div id="phoneOffersBlock" class="offer-details-legal-info">{{ offer.getLegal()|raw }}</div>
  726.                         <div class="offer-titles offer-titles-mobile mt-0 mb-0"><h5 class="mt-0 mb-0">Написать</h5>
  727.                         </div>
  728.                         <div class="col px-0">
  729.                             <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"
  730.                                href="https://t.me/{{ offer.getTelegram() != null ? offer.getTelegram() : 'slivkislivkiby' }}"
  731.                                style="width: 200px">
  732.                                 <img class="mr-2" src="/images/tg.svg" width="20" height="18">
  733.                                 <span class="float-right">Telegram</span>
  734.                             </a>
  735.                             {% set viberNumber = offer.getViber() != null ? offer.getViber() : '+375295084444' %}
  736. {#                            <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"#}
  737. {#                               href='viber://chat?number="  {{ viberNumber }} "' style="width: 200px">#}
  738. {#                                <img class="mr-2" src="/images/vb.svg" width="20" height="18">#}
  739. {#                                <span class="float-right">Viber</span>#}
  740. {#                            </a>#}
  741.                         </div>
  742.                     </div>
  743.                     {% include 'Slivki/offers/share.html.twig' %}
  744.                     {% include "Slivki#{regional_template_path}/jivosite/button_offers_page.html.twig" %}
  745.                     <p class="tittle-messenger-offers d-none">Мы всегда рады помочь: служба поддержки Slivki.by ответит
  746.                         на
  747.                         любой
  748.                         ваш вопрос</p>
  749.                 </div>
  750.             </div>
  751.         </div>
  752.         {% if (pastOffer or freeCodesCount == 0) and relatedOfferListHtml is defined %}
  753.             <div class="col px-3">
  754.                 <div class="related-offers-title">Другие похожие предложения:</div>
  755.                 <div class="related-offers-list stock-group-list">
  756.                     {{ relatedOfferListHtml|raw }}
  757.                 </div>
  758.             </div>
  759.         {% endif %}
  760.     </div>
  761.     {% if lastPurchaseText is defined %}
  762.         <div id="lastPurchaseNofify"><a href="#"><i class="slivki-icon-close-thin"></i></a>Последний раз промокод<br>получен {{ lastPurchaseText }}
  763.         </div>
  764.     {% endif %}
  765. {% endblock %}
  766. {% block popups %}
  767.     {{ parent() }}
  768.     {% if not pastOffer %}
  769.         {% include 'Slivki/popups/header_offers.html.twig' %}
  770.     {% endif %}
  771.     {% include 'Slivki/share_block.html.twig' %}
  772.     {% include 'Slivki/popups/callback.html.twig' %}
  773.     {% include 'Slivki/offers/complaint.html.twig' %}
  774.     {% include 'Slivki/orderAsGift/foodForGift.html.twig' %}
  775.     {% if  galleryVideos.getVideos() is defined and galleryVideos.getVideos()|length > 0 %}
  776.         {% include 'Slivki/popups/details-story-popup.html.twig' %}
  777.     {% endif %}
  778.     {% include 'Slivki/popups/comment_media_block_popup.html.twig' %}
  779.     {% include 'Slivki/popups/statistics_popup.html.twig' %}
  780.     {% include 'Slivki/mobile/popup/buy_codes_avways_app.html.twig' %}
  781.     {% include 'Slivki/delivery/modal/details.html.twig' with {'isOfferPage': true} %}
  782.     {% if offer.isGiftCertificateOffer() %}
  783.         {% include 'Slivki/popups/step_buy_certificate.twig' with {'deliveryLink': deliveryLink} %}
  784.     {% endif %}
  785.     {% if app.user %}
  786.         {% include 'Slivki/popups/mail_offers.html.twig' %}
  787.         {% include 'Slivki/popups/rating_edit_popup.html.twig' %}
  788.         {% include 'Slivki/popups/popup_subscription_limited.html.twig' %}
  789.         {% if not isMobileDevice() or offerIsFreeForUser %}
  790.             {% if not codeCostInCurrency is defined and codeCostInCurrency is not null %}
  791.                 {% set codeCostInCurrency = null %}
  792.             {% endif %}
  793.             {% include 'Slivki/popups/confirm_box.html.twig' with {'codeCost': codeCost, 'offerID': offer.getID(), 'codeCostInCurrency': codeCostInCurrency} %}
  794.             {% include 'Slivki/popups/confirm_subscription_card_popup.html.twig' with {'creditCards': app.user.getActiveCreditCards()} %}
  795.         {% endif %}
  796.         {% if not isMobileDevice() %}
  797.             {% include 'Slivki/popups/add_comment_popup.html.twig' with {'id': 'addVoteBox'} %}
  798.             {% include 'Slivki/popups/edit_comment_popup.html.twig' with {'id': 'editVoteBox'} %}
  799.             {% include 'Slivki/popups/comment_censor_message.html.twig' with {'id': 'commentCensorMessage'} %}
  800.         {% endif %}
  801.     {% else %}
  802.         {% if not isMobileDevice() %}
  803.             {% include 'Slivki/popups/comment_only_registered_popup.html.twig' with {'id': 'onlyRegistered'} %}
  804.         {% endif %}
  805.     {% endif %}
  806. {% endblock %}
  807. {% block javascripts %}
  808.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"
  809.             integrity="sha512-jNDtFf7qgU0eH/+Z42FG4fw3w7DM/9zbgNPe3wfJlCylVDTT3IgKW5r92Vy9IHa6U50vyMz5gRByIu4YIXFtaQ=="
  810.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  811.     <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js"></script>
  812.     <script src="//api-maps.yandex.ru/2.1.29/?lang=ru-RU" type="text/javascript"></script>
  813.     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
  814.     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/locale/ru.min.js"
  815.             integrity="sha512-QezkC2mljFGA2zQBPe+FrNA7i2RVFaYOfdQHk6icEap1TZX/Q6MNx+0AOTr9msSec0LsMrpURxfgJSbodYoiLg=="
  816.             crossorigin="anonymous"></script>
  817.     <script src="https://cdnjs.cloudflare.com/ajax/libs/fecha/2.3.3/fecha.min.js"></script>
  818.     <script src="/js/hotel-datepicker-3.6.5/hotel-datepicker.min.js"></script>
  819.     <script src="/js/swiper-js/swiper.min.js"></script>
  820.     <script src="/js/story-slider/story-slider-js.js?v={{ story_slider_js_version }}"></script>
  821.     {{ parent() }}
  822.     <script src="/js/offer.js?v={{ offer_js_version }}"></script>
  823.     <script src="/js/offer/offerDescriptionItems.js?v={{ offer_description_items_js_version }}"></script>
  824.     <script src="/js/common-old.js?v={{ common_old_js_version }}"></script>
  825.     <script type="text/javascript">
  826.         {% if preview is defined and preview %}
  827.         var offerPreview = 1;
  828.         {% else %}
  829.         var offerPreview = 0;
  830.         {% endif %}
  831.         {% if app.request.query.has('checkOrder') %}
  832.         initCheckOfferOrderStatus({{ app.request.get('checkOrder') }});
  833.         {% endif %}
  834.     </script>
  835.     <script src="/js/offer-new.js?v={{ offer_new_js_version }}"/>
  836. {% endblock %}
  837. {% block assetsBottom %}
  838.     {{ parent() }}
  839.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js"
  840.             integrity="sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw=="
  841.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  842.     <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"
  843.             integrity="sha512-Y+0b10RbVUTf3Mi0EgJue0FoheNzentTMMIE2OreNbqnUPNbQj8zmjK3fs5D2WhQeGWIem2G2UkKjAL/bJ/UXQ=="
  844.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  845.     {#    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>#}
  846.     <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
  847.     <script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
  848.     <script type="text/javascript" src="/js/statistics_offer/statistics_offer.js?v={{ statistics_offer_js_version }}"
  849.             charset="utf-8"></script>
  850.     <script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.6/jquery.easypiechart.min.js"
  851.             integrity="sha512-DHNepbIus9t4e6YoMBSJLwl+nnm0tIwMBonsQQ+W9NKN6gVVVbomJs9Ii3mQ+HzGZiU5FyJLdnAz9a63ZgZvTQ=="
  852.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  853.     <script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.6/easypiechart.min.js"
  854.             integrity="sha512-1yldf7W5suy0ko2u4OGU1qyeGrzh9+A3uyWGH4ws8MbndaWxZsgnzy6uqqBq7NUU/ImI1Js5kqDbunovCN1JqA=="
  855.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  856.     <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
  857.     <script type="module" src="/js/work_examples/work_examples.js?v={{ work_examples_js_version }}"></script>
  858.     <script type="module" src="/js/beauty/masters.js?v={{ beauty_masters_js_version }}"></script>
  859. {% endblock %}
  860. {% block RTBHouse %}
  861.     <script>
  862.         try {
  863.             (function () {
  864.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = [];
  865.                 rtbhTags.push("pr_" + hash + "_offer_" + document.getElementById('offerID').value);
  866.                 rtbhTags.push("pr_" + hash + "_uid_" + document.getElementById('rtbhUID').value);
  867.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key);
  868.                 if (!lid) {
  869.                     lid = "";
  870.                     var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  871.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length));
  872.                     window.localStorage.setItem(key, lid);
  873.                 }
  874.                 rtbhTags.push("pr_" + hash + "_lid_" + lid);
  875.                 var ifr = document.createElement("iframe"),
  876.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  877.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  878.                     ifrSrc = "https://" + prefix + "creativecdn.com/tags?type=iframe",
  879.                     tmstmp = encodeURIComponent("" + Date.now());
  880.                 for (var i = 0; i < rtbhTags.length; i++) {
  881.                     ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);
  882.                 }
  883.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  884.                 ifr.setAttribute("src", ifrSrc);
  885.                 ifr.setAttribute("width", "1");
  886.                 ifr.setAttribute("height", "1");
  887.                 ifr.setAttribute("scrolling", "no");
  888.                 ifr.setAttribute("frameBorder", "0");
  889.                 ifr.setAttribute("style", "display:none");
  890.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade");
  891.                 if (document.body) {
  892.                     document.body.appendChild(ifr);
  893.                 } else {
  894.                     window.addEventListener('DOMContentLoaded', function () {
  895.                         document.body.appendChild(ifr);
  896.                     });
  897.                 }
  898.             })();
  899.         } catch (e) {
  900.         } </script>
  901. {% endblock %}