templates/prodotti/productDetailOld.html.twig line 327

  1. {% extends "base.html.twig" %}
  2. {% import 'partials/macros/_breadcrumbs.html.twig' as page %}
  3. {% block bodyClass 'single-prodotto'~((product.productCategory and product.productCategory.identifier == 'CAMPIAMATI') ? ' body_app-show-category-ortofrutta') %}
  4. {% block content %}
  5.     {% set listBreadcrumbs = {
  6.         1: [ path('app_show_category', {'category_slug': product.type.productType.slug }), ('menu.' ~ product.type.productType.slug) ],
  7.         2: [ '', product.name ]
  8.     } %}
  9.     {{ page.breadcrumbs(listBreadcrumbs) }}
  10.     <section class="wow animate__fadeIn padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom single-prodotto">
  11.         <div class="container-fluid">
  12.             <div class="row justify-content-center">
  13.                 <div class="col-12 col-sm-6 col-lg-4 order-1 order-sm-1 order-lg-2 text-center text-sm-end">
  14.                     <h1 class="margin-20px-bottom">
  15.                         {{ product.name }}
  16.                     </h1>
  17.                     <div class="easyadmin-output margin-40px-bottom">
  18.                         {{ product.description|raw }}
  19.                     </div>
  20.                     {% if app.request.locale == 'it' %}
  21.                         <a class="button button_color_jewel button_size_medium" href="{{ path('app_wheretobuy') }}">
  22.                             {{ 'products_detail.where_to_buy'|trans({}, 'pages')|upper }}
  23.                         </a>
  24.                     {% endif %}
  25.                 </div>
  26.                 <div class="col-10 col-sm-6 col-lg-4 order-0 order-sm-0 order-lg-1 position-relative z-index-2">
  27.                     {% if product.imagePackName is not null and product.imagePackName  is defined  %}
  28.                         <div class="" data-js="product">
  29.                             {% if product.new %}
  30.                                 {% include 'partials/badge/_badge_new.html.twig' %}
  31.                             {% endif %}
  32.                             <img
  33.                                     class="sm-margin-30px-bottom product-png-shadow"
  34.                                     src="{{ ('/uploads/images/product/' ~ product.imagePackName) }}"
  35.                                     alt="{{ product.name }}">
  36.                         </div>
  37.                     {% endif %}
  38.                 </div>
  39.                 {% if product.type.productType.slug in ['ortofrutta']  %}
  40.                     <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-0 order-2 order-sm-2 order-lg-0 align-self-end sm-margin-30px-top sm-padding-30px-top md-padding-60px-top">
  41.                         <div class="d-flex align-items-center margin-20px-right">
  42.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  43.                                 <div class="">
  44.                                     <img src="{{ asset('assets/images/frontend/products/campiamati/cottura_padella.jpg') }}" alt="{{ (product.type.productType.slug ~ '.padella')|trans({}, 'pages') }}">
  45.                                 </div>
  46.                             </div>
  47.                             <span class="text-start">
  48.                                 {{ (product.type.productType.slug ~ '.padella')|trans({}, 'pages') }}
  49.                             </span>
  50.                         </div>
  51.                         <div class="d-flex align-items-center margin-20px-right margin-20px-top">
  52.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  53.                                 <div class="">
  54.                                     <img src="{{ asset('assets/images/frontend/products/campiamati/cottura_forno.jpg') }}" alt="{{ (product.type.productType.slug ~ '.forno')|trans({}, 'pages') }}">
  55.                                 </div>
  56.                             </div>
  57.                             <span class="text-start">
  58.                                 {{ (product.type.productType.slug ~ '.forno')|trans({}, 'pages') }}
  59.                             </span>
  60.                         </div>
  61.                         <div class="d-flex align-items-center margin-20px-right margin-20px-top">
  62.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  63.                                 <div class="">
  64.                                     <img src="{{ asset('assets/images/frontend/products/campiamati/cottura_friggitrice.jpg') }}" alt="{{ (product.type.productType.slug ~ '.friggitrice')|trans({}, 'pages') }}">
  65.                                 </div>
  66.                             </div>
  67.                             <span class="text-start">
  68.                                 {{ (product.type.productType.slug ~ '.friggitrice')|trans({}, 'pages') }}
  69.                             </span>
  70.                         </div>
  71.                     </div>
  72.                 {% elseif product.type.productType.slug in ['kroccanti'] %}
  73.                     <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-0 order-2 order-sm-2 order-lg-0 align-self-end sm-margin-30px-top sm-padding-30px-top md-padding-60px-top">
  74.                         <div class="d-flex align-items-center margin-20px-right">
  75.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  76.                                 <div class="">
  77.                                     <img src="{{ asset('assets/svg/kroccanti-padella.svg') }}" alt="{{ (product.type.productType.slug ~ '.padella')|trans({}, 'pages') }}">
  78.                                 </div>
  79.                             </div>
  80.                             <span class="text-start">
  81.                                 {{ (product.type.productType.slug ~ '.padella')|trans({}, 'pages') }}
  82.                             </span>
  83.                         </div>
  84.                         <div class="d-flex align-items-center margin-20px-right margin-20px-top">
  85.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  86.                                 <div class="">
  87.                                     <img src="{{ asset('assets/svg/kroccanti-forno.svg') }}" alt="{{ (product.type.productType.slug ~ '.forno')|trans({}, 'pages') }}">
  88.                                 </div>
  89.                             </div>
  90.                             <span class="text-start">
  91.                                 {{ (product.type.productType.slug ~ '.forno')|trans({}, 'pages') }}
  92.                             </span>
  93.                         </div>
  94.                         <div class="d-flex align-items-center margin-20px-right margin-20px-top">
  95.                             <div class="border-radius-50 d-flex margin-10px-right padding-10px-all Bgc(white) H(80px) W(80px) Ar(1/1)">
  96.                                 <div class="">
  97.                                     <img src="{{ asset('assets/svg/kroccanti-friggitrice.svg') }}" alt="{{ (product.type.productType.slug ~ '.friggitrice')|trans({}, 'pages') }}">
  98.                                 </div>
  99.                             </div>
  100.                             <span class="text-start">
  101.                                 {{ (product.type.productType.slug ~ '.friggitrice')|trans({}, 'pages') }}
  102.                             </span>
  103.                         </div>
  104.                     </div>
  105.                 {% else %}
  106.                     <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-0 order-2 order-sm-2 order-lg-0 align-self-end sm-margin-30px-top sm-padding-30px-top md-padding-60px-top">
  107.                         {% if '~FRESH~' in product.tagValues %}
  108.                             <div class="typologyBadge d-flex align-items-center Mb(40px) Mb(80px)--md">
  109.                                 <div class="typologyBadge__item typologyBadge__item__fresh">
  110.                                     <img src="{{ asset('/assets/images/webp/frontend/products/icona_freschi.webp') | imagine_filter('size_100_100') }}"
  111.                                          class="W(50px) H(50px)"
  112.                                          alt="Freschi"
  113.                                          title="Freschi"
  114.                                          width="100"
  115.                                          height="100"
  116.                                          loading="lazy">
  117.                                     <span class="Mstart(10px)">Freschi</span>
  118.                                 </div>
  119.                             </div>
  120.                         {% elseif '~FROZEN~' in product.tagValues %}
  121.                             <div class="typologyBadge d-flex align-items-center Mb(40px) Mb(80px)--md">
  122.                                 <div class="typologyBadge__item typologyBadge__item__frozen">
  123.                                     <img src="{{ asset('/assets/images/webp/frontend/products/icona_surgelati_blu.webp') | imagine_filter('size_100_100') }}"
  124.                                          class="W(50px) H(50px)"
  125.                                          alt="Surgelati"
  126.                                          title="Surgelati"
  127.                                          width="100"
  128.                                          height="100"
  129.                                          loading="lazy">
  130.                                     <span class="Mstart(10px)">Surgelati</span>
  131.                                 </div>
  132.                             </div>
  133.                         {% endif %}
  134.                         {% for key, value in product.generalInformations %}
  135.                             <div class="d-flex align-items-center margin-20px-right {% if not loop.first %}margin-20px-top{% endif %}">
  136.                                 <div class="border-radius-50 d-flex margin-10px-right padding-10px-all w-50px Bgc(la-rioja) H(50px)">
  137.                                     {% if key|lower == 'proteine' %}
  138.                                         {% include 'partials/svg/_icon_muscle.svg.twig' %}
  139.                                     {% elseif key|lower == 'tipo_di_vegetale' %}
  140.                                         {% include 'partials/svg/_icon_bell_pepper_capsicum.svg.twig' %}
  141.                                     {% elseif key|lower == 'tempo' %}
  142.                                         {% include 'partials/svg/_icon_clock_time.svg.twig' %}
  143.                                     {% elseif key|lower == 'pack' %}
  144.                                         {% include 'partials/svg/_icon_box.svg.twig' %}
  145.                                     {% elseif key|lower == 'porzioni' %}
  146.                                         {% include 'partials/svg/_icon_fork_and_knife.svg.twig' %}
  147.                                     {% endif %}
  148.                                 </div>
  149.                                 <span class="text-start">
  150.                                     {{ value }}
  151.                                 </span>
  152.                             </div>
  153.                         {% endfor %}
  154.                         {% for value in product.plus %}
  155.                             <div class="d-flex align-items-center margin-20px-top margin-20px-right">
  156.                                 <div class="border-radius-50 d-flex margin-10px-right padding-10px-all w-50px Bgc(la-rioja) H(50px)">
  157.                                     {% include 'partials/svg/_icon_exclamation.svg.twig' %}
  158.                                 </div>
  159.                                 <span class="text-start">
  160.                                     {{ value }}
  161.                                 </span>
  162.                             </div>
  163.                         {% endfor %}
  164.                     </div>
  165.                 {% endif %}
  166.             </div>
  167.         </div>
  168.     </section>
  169.     <section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  170.         <div class="container-fluid">
  171.             <div class="row align-items-center">
  172.                 <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-4 order-sm-1 sm-padding-30px-top md-padding-60px-top text-sm-end">
  173.                     <h3 class="margin-40px-bottom">
  174.                         {{ 'products_detail.ingredients'|trans({}, 'pages') }}
  175.                     </h3>
  176.                     <div class="easyadmin-output">
  177.                         {{ product.ingredients|raw }}
  178.                     </div>
  179.                 </div>
  180.                 <div class="col-12 col-sm-6 offset-sm-6 offset-lg-0 col-lg-4 order-sm-0">
  181.                     <div class="icon-large sm-margin-40px-top margin-10px-bottom w-70px C(jewel)">
  182.                         {% include 'partials/svg/_icon_quote_left.svg.twig' %}
  183.                     </div>
  184.                     <p class="margin-50px-bottom md-margin-20px-bottom text-sm-end text-lg-start">
  185.                         {% if product.type.productType.slug == 'dolci' %}
  186.                             {{ 'products_detail.quote_dolci'|trans({}, 'pages') }}
  187.                         {% else %}
  188.                             {{ 'products_detail.quote'|trans({}, 'pages') }}
  189.                         {% endif %}
  190.                     </p>
  191.                 </div>
  192.             </div>
  193.         </div>
  194.     </section>
  195.     <section class="wow animate__fadeInUp sm-padding-30px-bottom">
  196.         <div class="container-fluid">
  197.             <div class="row">
  198.                 <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-0 padding-100px-bottom md-padding-60px-bottom">
  199.                     {% if product.nutritionalValues|length > 0 %}
  200.                         <h3 class="margin-40px-bottom text-sm-end text-lg-start">
  201.                             {{ 'products_detail.nutritional_values.title'|trans({}, 'pages') }}
  202.                         </h3>
  203.                         <p class="margin-20px-bottom text-small text-end">
  204.                             {{ 'products_detail.nutritional_values.average_values'|trans({}, 'pages') }}
  205.                         </p>
  206.                         <table class="w-100">
  207.                             <tbody>
  208.                                 {% for key, value in product.nutritionalValues %}
  209.                                     <tr class="Bds(d) Bdbw(3px) Bdbc(la-rioja)">
  210.                                         <td class="padding-10px-all text-start">
  211.                                             {% if key in ['di_cui_saturi', 'di_cui_zuccheri'] %}{% else %}<strong>{% endif %}
  212.                                                 {{ ('products_detail.nutritional_values.table.' ~ key|lower)|trans({}, 'pages') }}
  213.                                             {% if key in ['di_cui_saturi', 'di_cui_zuccheri'] %}{% else %}</strong>{% endif %}
  214.                                         </td>
  215.                                         <td class="padding-10px-all text-end">
  216.                                             {% if key in ['di_cui_saturi', 'di_cui_zuccheri'] %}{% else %}<strong>{% endif %}
  217.                                                 {{ value }}
  218.                                             {% if key in ['di_cui_saturi', 'di_cui_zuccheri'] %}{% else %}</strong>{% endif %}
  219.                                         </td>
  220.                                     </tr>
  221.                                 {% endfor %}
  222.                             </tbody>
  223.                         </table>
  224.                     {% endif %}
  225.                 </div>
  226.                 <div class="col-12 col-sm-6 col-lg-4 offset-sm-6 offset-lg-4">
  227.                     {% if product.imageProductName is not null and product.imageProductName  is defined  %}
  228.                         <img src="/uploads/images/product/{{ product.imageProductName }}" alt="{{ product.name }}">
  229.                     {% endif %}
  230.                 </div>
  231.             </div>
  232.         </div>
  233.     </section>
  234.     {% set recipes = product.recipes %}
  235.     <section class="row position-relative padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom z-index-2" style="background-image: url('{{ asset('assets/images/webp/frontend/bg-texture.webp') }}')">
  236.         <div class="container-fluid p-0 overflow-hidden Bdrs(30px)">
  237.             <div class="row g-0">
  238.                 {% if product.productCookings|length > 0 %}
  239.                     <div class="col-12 {% if recipes|length > 0 %}col-sm-7 col-lg-6{% endif %} Bgc(la-rioja) overflow-hidden" data-parallax-background-ratio="0.7" style="background-image: url('{{ asset('assets/images/webp/frontend/recipes/bg-leaf.webp') }}')">
  240.                         <div class="sm-padding-20px-lr padding-40px-all">
  241.                             <h3 class="margin-40px-bottom text-white text-center {% if recipes|length > 0 %}text-sm-start{% endif %}">
  242.                                 {{ 'products_detail.product_cookings'|trans({}, 'pages') }}
  243.                             </h3>
  244.                             <div class="row g-0 justify-content-center">
  245.                                 <div class="col-12 {% if recipes|length == 0 %}col-md-10 col-lg-8{% endif %}">
  246.                                     {% for productCooking in product.productCookings %}
  247.                                         <div class="col margin-six-bottom md-margin-50px-bottom sm-margin-40px-bottom wow animate__fadeInUp last-paragraph-no-margin">
  248.                                             <div class="feature-box-5 position-relative">
  249.                                                 <i class="icon-desktop">
  250.                                                     <div class="background-white border-radius-50 d-flex margin-lr-auto padding-5px-all w-60px H(60px)">
  251.                                                         {% include 'partials/svg/_icon_' ~ productCooking.type|lower ~ '.svg.twig' %}
  252.                                                     </div>
  253.                                                 </i>
  254.                                                 <div class="feature-content">
  255.                                                     <div class="margin-10px-bottom font-weight-600">{{ ('products_detail.cooking_method.' ~ productCooking.type|lower)|trans({}, 'pages')|upper }}</div>
  256.                                                     <p class="d-inline-block sm-w-90">{{ productCooking.description }}</p>
  257.                                                 </div>
  258.                                             </div>
  259.                                         </div>
  260.                                     {% endfor %}
  261.                                 </div>
  262.                             </div>
  263.                         </div>
  264.                     </div>
  265.                 {% endif %}
  266.                 {% if recipes|length > 0 %}
  267.                     <div class="col-12 {% if product.productCookings|length > 0 %}col-sm-5 col-lg-6{% endif %} Bgc(jewel)">
  268.                         <div class="padding-40px-tb">
  269.                             <h3 class="margin-40px-bottom padding-40px-lr text-white text-center text-sm-end">
  270.                                 {{ 'products_detail.our_recipes'|trans({}, 'pages') }}
  271.                             </h3>
  272.                             <div class="row g-0 justify-content-center">
  273.                                 <div class="col-12 {% if product.productCookings|length == 0 %}col-md-10 col-lg-8{% endif %}">
  274.                                     <div class="swiper-container swiper-pagination-bottom white-move" data-slider-options='{
  275.                                         {% if recipes|length > 2 %}"loop": true,{% endif %}
  276.                                         "slidesPerView": "auto",
  277.                                         "centeredSlides": true,
  278.                                         "spaceBetween": 15,
  279.                                         "loopedSlides": {{ recipes|length < 3 ? recipes|length : 3 }},
  280.                                         "allowTouchMove": true,
  281.                                         "autoplay": {
  282.                                             "delay": 3000,
  283.                                             "disableOnInteraction": false
  284.                                         },
  285.                                         "pagination": {
  286.                                             "el": ".swiper-pagination-recipes",
  287.                                             "clickable": true
  288.                                         }
  289.                                     }'>
  290.                                         <div class="swiper-wrapper">
  291.                                             {% for recipe in recipes %}
  292.                                                 {% if recipe.isEnabled == true %}
  293.                                                     {% if recipe.locale == app.request.locale %}
  294.                                                         <div class="swiper-slide w-50 md-w-80 sm-w-70">
  295.                                                             <div class="blog-post bg-white border-radius-10 overflow-hidden">
  296.                                                                 <div class="blog-post-images border-radius-10 overflow-hidden position-relative">
  297.                                                                     <a href="{{ path('app_recipes_detail', {'slug': recipe.slug }) }}">
  298.                                                                         <img class="d-block" src="{{ ('/uploads/images/ricette/' ~ recipe.image) | imagine_filter('size_550_425') }}" alt="{{ recipe.title }}">
  299.                                                                     </a>
  300.                                                                 </div>
  301.                                                                 <div class="post-details padding-20px-all">
  302.                                                                     <a href="{{ path('app_recipes_detail', {'slug': recipe.slug }) }}" class="post-title w-100 d-block lg-w-100 margin-15px-bottom C(jewel)">
  303.                                                                         <strong>
  304.                                                                             {{ recipe.title|upper }}
  305.                                                                         </strong>
  306.                                                                     </a>
  307.                                                                 </div>
  308.                                                             </div>
  309.                                                         </div>
  310.                                                     {% endif %}
  311.                                                 {% endif %}
  312.                                             {% endfor %}
  313.                                         </div>
  314.                                         <div class="swiper-pagination-recipes swiper-pagination swiper-pagination-white"></div>
  315.                                     </div>
  316.                                 </div>
  317.                             </div>
  318.                         </div>
  319.                     </div>
  320.                 {% endif %}
  321.             </div>
  322.         </div>
  323.     </section>
  324.     <section class="position-relative padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom z-index-2" style="background-image: url('{{ asset('assets/images/webp/frontend/bg-texture.webp') }}')">
  325.         <div class="container-fluid">
  326.             <div class="row justify-content-center">
  327.                 <div class="col col-md-8 text-center">
  328.                     <h3 class="margin-40px-bottom">
  329.                         {{ 'products_detail.other_products'|trans({}, 'pages') }}
  330.                     </h3>
  331.                 </div>
  332.             </div>
  333.             <div class="row position-relative justify-content-center">
  334.                 <div class="col-12 col-md-12 col-sm-9">
  335.                     <div class="swiper-container swiper-pagination-bottom black-move blog-slider"
  336.                          data-slider-options='{
  337.                             "slidesPerView": "1",
  338.                             "allowTouchMove": true,
  339.                             "loop": false,
  340.                             "spaceBetween": 30,
  341.                             "autoplay": false,
  342.                             "keyboard": {
  343.                                 "enabled": true,
  344.                                 "onlyInViewport": true
  345.                             },
  346.                             "breakpoints": {
  347.                                 "992": {
  348.                                     "slidesPerView": {{ correlatedProducts|length < 3 ? correlatedProducts|length : 3 }}
  349.                                 },
  350.                                 "768": {
  351.                                     "slidesPerView": {{ correlatedProducts|length < 3 ? correlatedProducts|length : 3 }}
  352.                                 }
  353.                             },
  354.                             "pagination": {
  355.                                 "el": ".swiper-pagination-products",
  356.                                 "clickable": true
  357.                             }
  358.                         }'>
  359.                         <div class="swiper-wrapper">
  360.                             {% for correlatedProduct in correlatedProducts %}
  361.                                 <div class="swiper-slide">
  362.                                     <div class="text-center" onclick="track_click_item('{{ correlatedProduct.id }}', '{{ correlatedProduct.name }}', '{{ product.type.productType.name }}', 'related_products', 'Related Products')">
  363.                                         <a class="d-block margin-20px-bottom" href="{{ path('app_show_product', {'category_slug': product.type.productType.slug, 'product_slug': correlatedProduct.slug} ) }}">
  364.                                             <div class="productRelated">
  365.                                                 {% if correlatedProduct.new %}
  366.                                                     {% include 'partials/badge/_badge_new.html.twig' %}
  367.                                                 {% endif %}
  368.                                                 <img class="sm-w-70" src="{{ ('/uploads/images/product/' ~ correlatedProduct.image_pack_name) | imagine_filter('size_400_500') }}" alt="{{ correlatedProduct.name }}">
  369.                                             </div>
  370.                                         </a>
  371.                                         <h5>
  372.                                             <a class="C(jewel)" href="{{ path('app_show_product', {'category_slug': product.type.productType.slug, 'product_slug': correlatedProduct.slug} ) }}">
  373.                                                 {{ correlatedProduct.name }}
  374.                                             </a>
  375.                                         </h5>
  376.                                     </div>
  377.                                 </div>
  378.                             {% endfor %}
  379.                         </div>
  380.                         <div class="swiper-pagination-products swiper-pagination"></div>
  381.                     </div>
  382.                 </div>
  383.             </div>
  384.         </div>
  385.     </section>
  386. {% endblock %}
  387. {% block javascripts_body %}
  388.     <script>
  389.         tracking__viewcontent__title = '{{ product.name }}';
  390.         tracking__viewcontent__ids = '{{ product.id }}';
  391.         tracking__viewcontent__type = 'product';
  392.         var productTrackingObj = {
  393.             'id' : '{{ product.id }}',
  394.             'name' : '{{ product.name }}',
  395.             'brand' : 'Kioene',
  396.             'category' : '{{ product.type.productType.slug }}',
  397.             'url' : '{{ app.request.uri }}'
  398.         }
  399.     </script>
  400.     {{ parent() }}
  401.     <script type="text/javascript">
  402.         window.addEventListener('load', () => {
  403.             let viewportWidth = window.innerWidth || document.documentElement.clientWidth;
  404.             if(viewportWidth >= 576) {
  405.                 const animationProduct = gsap.timeline({
  406.                     scrollTrigger: {
  407.                         trigger: document.querySelector('[data-js="product"]'),
  408.                         start: 'top 20%',
  409.                         end: document.body.scrollHeight + ' 10%',
  410.                         pin: true,
  411.                         pinSpacing: false,
  412.                         scrub: true
  413.                     }
  414.                 })
  415.             }
  416.         });
  417.     </script>
  418. {% endblock %}