templates/frontend-eforum/_partials/modules/productBanner.html.twig line 1

Open in your IDE?
  1. <section class="product-banner">
  2.     {% if injectBreadcrumbs is defined and injectBreadcrumbs == true %}
  3.         {% include "frontend-eforum/_partials/breadcrumbs.html.twig" %}
  4.     {% endif %}
  5.     <div class="container container--padding-top">
  6.         <div class="row">
  7.             <div class="col-lg-6 order-2 product-banner__mobile-description">
  8.                 <header class="product-header">
  9.                     <h2 class="product-header__category">
  10.                         {% if product.categories is not empty %}
  11.                             {{ product.categories|first }}
  12.                         {% endif %}
  13.                     </h2>
  14.                     {% if product.portalSettings is not empty %}
  15.                         <h2 class="product-header__website d-none d-md-block">
  16.                             <a href="{{ product.portalSettings.domain }}"
  17.                                class="product-header__website-link"
  18.                                target="_blank"
  19.                             >
  20.                                 {{ product.portalSettings.domain|replace({'http://': '', 'https://': ''}) }}
  21.                             </a>
  22.                         </h2>
  23.                     {% endif %}
  24.                     {% if product.title is not empty %}
  25.                         <h1 class="product-header__title">{{ product.title }}</h1>
  26.                     {% endif %}
  27.                     {% if product.frontendDescription is not empty %}
  28.                         <p class="product-header__description">
  29.                             {{ product.frontendDescription|raw }}
  30.                         </p>
  31.                     {% endif %}
  32.                     {% if module.details is defined %}
  33.                         <ul class="product-details">
  34.                             {% for detail in module.details %}
  35.                                 <li class="product-details__item">
  36.                                     {% if detail.icon is defined %}
  37.                                         <i class="icon icon--{{ detail.icon }}"></i>
  38.                                     {% endif %}
  39.                                     {% if detail.text is defined %}
  40.                                         {{ detail.text|raw }}
  41.                                     {% endif %}
  42.                                 </li>
  43.                             {% endfor %}
  44.                         </ul>
  45.                     {% endif %}
  46.                     {% if product.portalSettings is not empty %}
  47.                         <h2 class="product-header__website product-header__website--mobile-app d-block d-md-none">
  48.                             <a href="{{ product.portalSettings.domain }}"
  49.                                class="product-header__website-link"
  50.                                target="_blank"
  51.                             >
  52.                                 {{ product.portalSettings.domain|replace({'http://': '', 'https://': ''}) }}
  53.                             </a>
  54.                         </h2>
  55.                     {% endif %}
  56.                 </header>
  57.                 {% if productVariants is not empty %}
  58.                     <div class="product-form d-none d-md-block">
  59.                         <header class="product-form__header">
  60.                             <h3 class="product-form__title">Wybierz swoją wersję</h3>
  61.                         </header>
  62.                         {% for productVariant in productVariants %}
  63.                             {% if productVariant.isPublished == true %}
  64.                                 <div class="product-form__group">
  65.                                     <input type="radio"
  66.                                            id="product_{{ loop.index }}"
  67.                                            name="product"
  68.                                            class="product-form__radio"
  69.                                            {% if loop.index == 1 %} checked {% endif %}
  70.                                            data-productVariantNoComplete="{{ productVariant.productVariantNoComplete }}"
  71.                                            data-subname="{{ productVariant.tradeName }}"
  72.                                            data-productAssociationId="{{ product.id }}"
  73.                                            data-redirecttocart="false"
  74.                                            data-hidesuccessalert="false"
  75.                                            data-pixel="{{ fbPixelTrack('AddToCart', productVariant.id)|raw }}"
  76.                                             {% if product.checkCouponDefault(productVariant) %}
  77.                                                 data-pricenet="{{ productVariant.getFullPriceAfterCoupon('net', product.couponDefault, true) }}"
  78.                                                 data-pricegross="{{ productVariant.getFullPriceAfterCoupon('gross', product.couponDefault, true) }}"
  79.                                             {% else %}
  80.                                                 data-pricenet="{{ productVariant.getFullPrice('net', true) }}"
  81.                                                 data-pricegross="{{ productVariant.getFullPrice('gross', true) }}"
  82.                                             {% endif %}
  83.                                     >
  84.                                     <label for="product_{{ loop.index }}" class="product-form__product">
  85.                                         <h3 class="product-form__product-name">
  86.                                             {{ productVariant.tradeName }}
  87.                                             <small>{{ productVariant.technicalInformations|raw }}</small>
  88.                                         </h3>
  89.                                         <h3 class="product-form__product-price">
  90.                                             {{ productVariant.getFullPrice('net', true) }} zł netto
  91.                                             <small>{{ productVariant.getFullPrice('gross', true) }} zł brutto</small>
  92.                                         </h3>
  93.                                     </label>
  94.                                 </div>
  95.                             {% endif %}
  96.                         {% endfor %}
  97.                         <footer class="product-form__footer {{ source is defined and source == 'modal' ? 'product-form__footer--modal row' : '' }}">
  98.                             {% if source is not defined or source != 'modal' %}
  99.                                 <a href="#"
  100.                                    class="product-form__info jsToggleProductPreview"
  101.                                    data-url="{{ path('efProductPreview', {'productAssociationId': product.id, 'type': 'subscriptions'}) }}"
  102.                                    tabindex="0"
  103.                                 >
  104.                                     {% if module.modalButtonText is defined %}
  105.                                         {{ module.modalButtonText }}
  106.                                     {% else %}
  107.                                         Czym różnią się prenumeraty?
  108.                                     {% endif %}
  109.                                 </a>
  110.                             {% else %}
  111.                                 <div class="col-12 col-lg-7">
  112.                                     <a href="{{ path('efShowProduct', {
  113.                                         'categorySlug' :            product.getParentCategorySlug,
  114.                                         'categoryChildSlug':        product.getCategorySlug,
  115.                                         'productAssociationSlug' :  product.slug}) }}"
  116.                                        class="button button--bordered button--with-arrow button--fluid"
  117.                                     >
  118.                                         Więcej o produkcie
  119.                                     </a>
  120.                                 </div>
  121.                             {% endif %}
  122.                             <div {{ source is defined and source == 'modal' ? 'class="col-12 col-lg-5"' : '' }}>
  123.                                 <button class="button button--blue button--with-arrow addToCart"
  124.                                         id="add-to-cart-top"
  125.                                         type="button"
  126.                                 >
  127.                                     Dodaj do koszyka
  128.                                 </button>
  129.                             </div>
  130.                         </footer>
  131.                     </div>
  132.                 {% endif %}
  133.             </div>
  134.             <div class="col-lg-6 order-1">
  135.                 <header class="product-carousel">
  136.                     <div class="carousel product-carousel" id="{% if isModal is defined %}product-carouselInModal{% else %}product-carousel{% endif %}">
  137.                         {% for movie in product.productMovies %}
  138.                             <div class="carousel__item product-carousel__item">
  139.                                 {% if movie.link is not empty %}
  140.                                     <iframe width="560"
  141.                                             height="315"
  142.                                             src="{{ movie.link|embedMovieLink }}"
  143.                                             frameborder="0"
  144.                                             allow="autoplay; encrypted-media"
  145.                                             allowfullscreen>
  146.                                     </iframe>
  147.                                 {% endif %}
  148.                             </div>
  149.                         {% endfor %}
  150.                         {% for image in product.productImages %}
  151.                             <div class="carousel__item product-carousel__item">
  152.                                 {% if image.image is not empty %}
  153.                                     <img class="product-carousel__image"
  154.                                          src="{{ vich_uploader_asset(image, 'imageFile') }}"
  155.                                          alt=""
  156.                                     >
  157.                                 {% endif %}
  158.                             </div>
  159.                         {% endfor %}
  160.                     </div>
  161.                     <div style="text-align: center; margin-top: 10px;">
  162.                         {% if product.previewFragment is not empty %}
  163.                             <a href="{{ vich_uploader_asset(product, 'previewFragmentFile') }}"
  164.                                 target="_blank"
  165.                                 class="button button--bordered button--with-arrow"
  166.                             >
  167.                                 {% if module.previewFragmentText is defined %}
  168.                                     {{ module.previewFragmentText }}
  169.                                 {% else %}
  170.                                     Przeczytaj fragment
  171.                                 {% endif %}
  172.                             </a>
  173.                         {% endif %}
  174.                     </div>
  175.                     <nav class="product-carousel-nav" id="{% if isModal is defined %}product-carousel-navInModal{% else %}product-carousel-nav{% endif %}">
  176.                         <div class="product-list__slider d-none d-md-block" data-right-arrow = "true">
  177.                         {% for movie in product.productMovies %}
  178.                             <div class="product-carousel-nav__item product-carousel-nav__item--with-video">
  179.                                 {% if movie.thumbnail is not empty %}
  180.                                     <img src="{{ vich_uploader_asset(movie, 'thumbnailFile') }}"
  181.                                          alt=""
  182.                                          class="product-carousel-nav__image product-carousel-nav__image--with-video"
  183.                                     >
  184.                                 {% else %}
  185.                                     <img src="{{ movie.link|thumbnailUrl }}"
  186.                                          alt=""
  187.                                          class="product-carousel-nav__image product-carousel-nav__image--with-video"
  188.                                     >
  189.                                 {% endif %}
  190.                             </div>
  191.                         {% endfor %}
  192.                         {% for image in product.productImages %}
  193.                             <div class="product-carousel-nav__item">
  194.                                 <img src="{{ vich_uploader_asset(image, 'imageFile') }}"
  195.                                      alt=""
  196.                                      class="product-carousel-nav__image"
  197.                                 >
  198.                             </div>
  199.                         {% endfor %}
  200.                         </div>
  201.                     </nav>
  202.                 </header>
  203.             </div>
  204.         </div>
  205.     </div>
  206. </section>