templates/product/product_details.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{product.metatitle}}{% endblock %}
  3. {% block metas %}
  4. <meta name="title" content="{{product.metatitle}}">
  5. <meta name="description" content="{{product.metadescription}}">
  6. <meta property="og:image" content="{{ asset( files_directory_relative ~ product.image) }}">
  7. <meta property="og:image:alt" content="{{product.legendeimage|default('image ' ~ product.getNameByDefaultLocale ~ 'Tany mena')}}">
  8. <meta property="og:url" content="https://aromaforest.fr/boutique">
  9. <script type="application/ld+json">
  10. {
  11. "@context": "https://schema.org",
  12. "@type": "WebPage",
  13. "mainEntityOfPage": {
  14. "@type": "WebPage",
  15. "@id": "https://aromaforest.fr/boutique"
  16. },
  17. "breadcrumb": {
  18. "@type": "BreadcrumbList",
  19. "itemListElement": [
  20. {
  21. "@type": "ListItem",
  22. "position": 1,
  23. "name": "Nos Huiles",
  24. "item": "https://aromaforest.fr/boutique"
  25. },
  26. {
  27. "@type": "ListItem",
  28. "position": 2,
  29. "name": "Blog",
  30. "item": "https://aromaforest.fr/blog"
  31. },
  32. {
  33. "@type": "ListItem",
  34. "position": 2,
  35. "name": "Conditions générales de vente",
  36. "item": "https://aromaforest.fr/condition_generale_vente"
  37. }
  38. ]
  39. }
  40. }
  41. </script>
  42. {% endblock %}
  43. {% block stylesheets %}
  44. {{ parent() }}
  45. <link rel="stylesheet" href="{{ asset('assets/css/image-zoom.css') }}">
  46. <link rel="stylesheet" type="text/css" href="{{ asset('assets/css/product/product-details.css') }}">
  47. {% endblock %}
  48. {% block body %}
  49. {% set banner_title, banner_subtitle_2 = 'Accueil', 'détails' %}
  50. {# {% include "/partials/_banner.html.twig" %} #}
  51. <!--product details start-->
  52. <div class="product_details my-5">
  53. <div class="container">
  54. <div class="row mb-5">
  55. <div class="col-12">
  56. <div class="banner-subtitle">
  57. <a href="{{ path('app_home_index') }}">{% trans %}Accueil{% endtrans %}</a>
  58. /
  59. {{banner_subtitle_2|default('Tany Mena')}}
  60. </div>
  61. </div>
  62. </div>
  63. {% if product == null or product.productCategory == null %}
  64. <div class="alert alert-danger text-center p-5" role="alert">
  65. <div class="alert-body">
  66. {% trans %}Vous ne pouvez pas accéder à ce produit{% endtrans %}.
  67. </div>
  68. </div>
  69. {% else %}
  70. <div class="row">
  71. <div class="col-lg-5 col-md-5">
  72. <div class="product-details-tab">
  73. <div class="row text-center d-flex align-items-center logo-hebbd-wl position-absolute">
  74. <div class="col-12 col-md-6 lhwl_right" >
  75. <img src="{{ asset('/assets/img/webp/home/wfen-logo-final-e1533836513548.webp') }}" alt="img-hebd" width="60">
  76. </div>
  77. <div class="col-12 col-md-6 lhwl_left">
  78. <img src="{{ asset('/assets/img/webp/home/hebbd-logo.webp') }}" alt="img-wildlife" width="60">
  79. </div>
  80. </div>
  81. <div id="img-1" class="zoomWrapper single-zoom br-12">
  82. <span class="zoom-image-custom" style="width : 100%; display : flex; justify-content : center;">
  83. <img id="zoom1" class="br-12" src="{{ asset( files_directory_relative ~ product.image) }}"
  84. data-zoom-image="{{ asset( files_directory_relative ~ product.image) }}"
  85. alt="{{product.legendeimage|default('image ' ~ product.getNameByDefaultLocale ~ 'Tany mena')}}">
  86. </span>
  87. </div>
  88. {% if product.productImages|length > 0 %}
  89. <div class="single-zoom-thumb">
  90. <ul class="s-tab-zoom owl-carousel single-product-active" id="gallery_01">
  91. <li>
  92. <a href="#" class="elevatezoom-gallery active" data-update=""
  93. data-image="{{ asset( files_directory_relative ~ product.image) }}"
  94. data-zoom-image="{{ asset( files_directory_relative ~ product.image) }}">
  95. <img src="{{ asset( files_directory_relative ~ product.image) }}" alt="{{product.legendeimage|default('image ' ~ product.getNameByDefaultLocale ~ 'Tany mena')}}" />
  96. </a>
  97. </li>
  98. {% for productImage in product.productImages %}
  99. <li>
  100. <a href="#" class="elevatezoom-gallery active" data-update=""
  101. data-image="{{ asset( files_directory_relative ~ productImage.image) }}"
  102. data-zoom-image="{{ asset( files_directory_relative ~ productImage.image) }}">
  103. <img src="{{ asset( files_directory_relative ~ productImage.image) }}" alt="{{product.legendeimage|default('image ' ~ product.getNameByDefaultLocale ~ 'Tany mena')}}" />
  104. </a>
  105. </li>
  106. {% endfor %}
  107. </ul>
  108. </div>
  109. {% endif %}
  110. </div>
  111. </div>
  112. <div class="col-lg-7 col-md-7">
  113. <div class="product_d_right">
  114. <form action="{{path('app_cart_add')}}" method="POST">
  115. <div class="mb-4">
  116. {# <span><a href="#">{{product.productCategory.description}}</a></span> #}
  117. </div>
  118. <div class="productd_title_nav">
  119. <h1><a href="#">{{product.getNameByDefaultLocale}} {% if product.volume %} - {{product.volume}}{% endif %}</a></h1>
  120. </div>
  121. <div class="price_box">
  122. <span class="current_price text-primary">{{product.cost|format_currency('EUR')}}</span>
  123. <span class="old_price"></span>
  124. </div>
  125. <div class="mb-4">
  126. <span>
  127. {# 100% pure et naturelle - COMPOSITION CONTROLÉE #}
  128. </span>
  129. </div>
  130. {% if product.getAproposByDefaultLocale %}
  131. <div class="" >
  132. {{product.getAproposByDefaultLocale|raw}}
  133. </div>
  134. {% endif %}
  135. {% if product.available %}
  136. <div class="product_variant quantity mt-3">
  137. <input min="1" max="100" value="1" type="number" name="quantity"/>
  138. <input type="hidden" value="{{product.id}}" name="product_id"/>
  139. <button class="button mx-2" type="submit">
  140. {% if product.preOrder %} {% trans %}Précommander{% endtrans %}
  141. {% else %} {% trans %}Ajouter au panier{% endtrans %} {% endif %}
  142. </button>
  143. <div class="product_variant">
  144. <a href="{{ path('app_cart_index') }}" class="button text-white bg-tany-mena px-2 mx-4"><i class="fa fa-shopping-cart" style="margin-right:10px;"></i>{% trans %}Voir le panier{% endtrans %}</a>
  145. </div>
  146. </div>
  147. {% if product.preOrder and date() < date("2023-08-28") %}
  148. <div class="mb-4">
  149. <p class="fw-bold">
  150. *Expédition au plus tard le 28 août
  151. </p>
  152. </div>
  153. {% endif %}
  154. {% else %}
  155. <div class="product_meta">
  156. {# <span>Rupture de stock</span>#}
  157. <button class="button" style="border: none;" type="button"> <span>{% trans %}Bientôt disponible{% endtrans %}</span> </button>
  158. </div>
  159. {% endif %}
  160. {# <div class=" product_ratting">
  161. <ul>
  162. <li><a href="#"><i class="ion-android-star"></i></a></li>
  163. <li><a href="#"><i class="ion-android-star"></i></a></li>
  164. <li><a href="#"><i class="ion-android-star"></i></a></li>
  165. <li><a href="#"><i class="ion-android-star"></i></a></li>
  166. <li><a href="#"><i class="ion-android-star"></i></a></li>
  167. </ul>
  168. </div> #}
  169. {#
  170. <div class="row">
  171. <div class="col-md-4 text-center">
  172. <img class="mt-4 mb-2" src="{{ asset('/assets/img/webp/home/icon/1.webp') }}" alt="img-hebd" width="60">
  173. <p class="text-secondary">
  174. <span class="fw-bolder">
  175. Expédition rapide
  176. </span>
  177. <br>
  178. <span class="detail-small">
  179. en 48h
  180. </span>
  181. </p>
  182. </div>
  183. <div class="col-md-4 text-center">
  184. <img class="mt-4 mb-2" src="{{ asset('/assets/img/webp/home/icon/2.webp') }}" alt="img-hebd" width="60">
  185. <p class="text-secondary">
  186. <span class="fw-bolder">
  187. Livraison offerte
  188. </span>
  189. <br>
  190. <span class="detail-small">
  191. dès 35€ d’achat
  192. </span>
  193. </p>
  194. </div>
  195. <div class="col-md-4 text-center">
  196. <img class="mt-4 mb-2" src="{{ asset('/assets/img/webp/home/icon/3.webp') }}" alt="img-hebd" width="60">
  197. <p class="text-secondary">
  198. <span class="fw-bolder">
  199. Paiement sécurisé
  200. </span>
  201. <br>
  202. <span class="detail-small">
  203. via stripe
  204. </span>
  205. </p>
  206. </div>
  207. </div> #}
  208. <div class="product_desc mt-5">
  209. {# <p><strong>Documents :</strong> Pour toute demande de documents concernant l’analyse chromatographique par lot ou les recherches scientifiques menées sur cette huile essentielle, <a href="{{path('app_contact_index')}}"> contactez-nous</a>.</p> #}
  210. {% if product.tracabilites|length > 0 %}
  211. <div class="d-flex flex-wrap align-items-center " style="gap: 10px;">
  212. {% for tracabilite in product.tracabilites %}
  213. <div class="card text-center" style="width: 18rem;">
  214. <div class="card-header">
  215. {{tracabilite.titre}}
  216. </div>
  217. <div class="card-body">
  218. <a href="{{path('app_product_tracabilite_download', {id: tracabilite.id})}}" class="btn btn-outline-secondary"><i class="fa fa-download" aria-hidden="true"></i>&nbsp;Télécharger</a>
  219. </div>
  220. </div>
  221. {% endfor %}
  222. </div>
  223. {% endif %}
  224. </div>
  225. </form>
  226. </div>
  227. </div>
  228. </div>
  229. {# <section class="section section-products">
  230. <div>
  231. <ul class="nav nav-tabs text-black" id="myTab" role="tablist">
  232. {% if product.getAproposByDefaultLocale %}
  233. <li class="nav-item">
  234. <a class="nav-link active" id="apropos-tab" data-bs-toggle="tab" role="tab" aria-controls="apropos" aria-selected="true" href="#apropos"><strong>{% trans %}A propos{% endtrans %}</strong></a>
  235. </li>
  236. {% endif %}
  237. {% if product.getOriginAndCurrentProductionByDefaultLocale %}
  238. <li class="nav-item">
  239. <a class="nav-link" id="originAndProduction-tab" data-bs-toggle="tab" role="tab" aria-controls="originAndProduction" aria-selected="false" href="#originAndProduction"><strong>{% trans %}Origine & production actuelle{% endtrans %}</strong></a>
  240. </li>
  241. {% endif %}
  242. {% if product.getUsageTipsByDefaultLocale %}
  243. <li class="nav-item">
  244. <a class="nav-link" id="usageTips-tab" data-bs-toggle="tab" role="tab" aria-controls="usageTips" aria-selected="false" href="#usageTips"><strong>{% trans %}Conseils d'utilisation{% endtrans %}</strong></a>
  245. </li>
  246. {% endif %}
  247. {% if product.getCompositionAndPrecautionsForUseByDefaultLocale %}
  248. <li class="nav-item">
  249. <a class="nav-link" id="precaution-tab" data-bs-toggle="tab" role="tab" aria-controls="precaution" aria-selected="false" href="#precaution"><strong>{% trans %}Composition typique & Précautions spécifiques{% endtrans %}</strong></a>
  250. </li>
  251. {% endif %}
  252. {% if product.getGeneralPrecautionByDefaultLocale %}
  253. <li class="nav-item">
  254. <a class="nav-link" id="general-precautions-tab" data-bs-toggle="tab" role="tab" aria-controls="precaution" aria-selected="false" href="#generalPrecautions"><strong>{% trans %}Précautions générales{% endtrans %}</strong></a>
  255. </li>
  256. {% endif %}
  257. {% if product.getLegalNoticeByDefaultLocale %}
  258. <li class="nav-item">
  259. <a class="nav-link" id="legal-notice-tab" data-bs-toggle="tab" role="tab" aria-controls="legelNotice" aria-selected="false" href="#legelNotice"><strong>{% trans %}Mention légale{% endtrans %}</strong></a>
  260. </li>
  261. {% endif %}
  262. </ul>
  263. <!-- Tab panes -->
  264. <div class="tab-content pt-4" id="myTabContent">
  265. {% if product.getAproposByDefaultLocale %}
  266. <div class="tab-pane container fade" id="apropos" role="tabpanel" aria-labelledby="apropos-tab">
  267. {{product.getAproposByDefaultLocale|raw}}
  268. </div>
  269. {% endif %}
  270. {% if product.getOriginAndCurrentProductionByDefaultLocale %}
  271. <div class="tab-pane container fade" id="originAndProduction" role="tabpanel" aria-labelledby="originAndProduction-tab">
  272. {{product.getOriginAndCurrentProductionByDefaultLocale|raw}}
  273. </div>
  274. {% endif %}
  275. {% if product.getUsageTipsByDefaultLocale %}
  276. <div class="tab-pane container fade" id="usageTips" role="tabpanel" aria-labelledby="usageTips-tab">
  277. {{product.getUsageTipsByDefaultLocale|raw}}
  278. </div>
  279. {% endif %}
  280. {% if product.getCompositionAndPrecautionsForUseByDefaultLocale %}
  281. <div class="tab-pane container fade" id="precaution" role="tabpanel" aria-labelledby="precaution-tab">
  282. {{product.getCompositionAndPrecautionsForUseByDefaultLocale|raw}}
  283. </div>
  284. {% endif %}
  285. {% if product.getGeneralPrecautionByDefaultLocale %}
  286. <div class="tab-pane container fade" id="generalPrecautions" role="tabpanel" aria-labelledby="general-precautions-tab">
  287. {{product.getGeneralPrecautionByDefaultLocale|raw}}
  288. </div>
  289. {% endif %}
  290. {% if product.getLegalNoticeByDefaultLocale %}
  291. <div class="tab-pane container fade" id="legelNotice" role="tabpanel" aria-labelledby="legal-notice-tab">
  292. {{product.getLegalNoticeByDefaultLocale|raw}}
  293. </div>
  294. {% endif %}
  295. </div>
  296. </div>
  297. <div class="section-container pb-0">
  298. <div class="section-products-category">
  299. <div class="section-products-category-title">
  300. <h2 class="af-section__subtitle text-secondary-2">{% trans %}Autres produits disponibles{% endtrans %}</h2>
  301. </div>
  302. <div class="section-products-items">
  303. <div id="our-oils-splide" class="splide" aria-label="Tany Mena Oils">
  304. <div class="splide__track container">
  305. <ul class="splide__list section-products-list">
  306. {% for prop in propositions %}
  307. <li class="splide__slide me-3">
  308. {% include '/partials/product/_product_2.html.twig' with {'product' : prop} %}
  309. </li>
  310. {% endfor %}
  311. </ul>
  312. </div>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </section> #}
  318. {% endif %}
  319. </div>
  320. </div>
  321. <!--product details end-->
  322. {% endblock %}
  323. {% block javascripts %}
  324. {{ parent() }}
  325. <script src="{{ asset('/assets/js/image-zoom.js') }}" type="text/javascript"></script>
  326. <script>
  327. var $ = jQuery.noConflict();
  328. $(document).ready(function(){
  329. const zoomImage = $('#zoom1').clone();
  330. $('#zoom1').imageZoom({zoom : 200});
  331. $(this).on('click','.elevatezoom-gallery', function(e) {
  332. e.preventDefault();
  333. // $('#imageZoom')[0].src = $(this).find('img').attr('src');
  334. $('.containerZoom').remove();
  335. zoomImage[0].src = $(this).find('img').attr('src')
  336. $('.zoom-image-custom').html(zoomImage);
  337. $('#zoom1').imageZoom({zoom : 200});
  338. })
  339. const splide_2 = new Splide('#our-oils-splide', {
  340. type: 'loop',
  341. perPage: 4,
  342. lazyLoad: 'nearby',
  343. perMove: 1,
  344. omitEnd: true,
  345. breakpoints: {
  346. 640: {
  347. height: '100vh',
  348. perPage: 1
  349. },
  350. },
  351. });
  352. splide_2.mount();
  353. });
  354. </script>
  355. {% endblock %}