templates/front/catalog/product/view.html.twig line 7

Open in your IDE?
  1. {% extends 'front/front.html.twig' %}
  2. {% block bodyClass %}product{% endblock %}
  3. {% block metas %}
  4. <title>{{ productDescription.headTitleTag ? productDescription.headTitleTag : productDescription.name }}</title>
  5. <meta name="description" content="{{ productDescription.headDescTag ? productDescription.headDescTag : productDescription.description|metadescription }}">
  6. <link rel="canonical" href="{{ url('product',{id:product.id, url:productDescription.url}) }}" />
  7. {% endblock %}
  8. {% block structuredData %}
  9. {% set cpt = 1 %}
  10. <script type="application/ld+json">
  11. {
  12. "@context": "https://schema.org",
  13. "@type": "BreadcrumbList",
  14. "itemListElement":
  15. [
  16. {
  17. "@type": "ListItem",
  18. "position": {{ cpt }},
  19. "item":
  20. {
  21. "@id": "{{ url('index') }}",
  22. "name": "{% trans %}Vivog | Matériel pour les toiletteurs et éleveurs{% endtrans %}"
  23. }
  24. },
  25. {% for p in path %}
  26. {% set cpt = cpt + 1 %}
  27. {
  28. "@type": "ListItem",
  29. "position": {{ cpt }},
  30. "item":
  31. {
  32. {% if loop.index == 1 %}
  33. "@id": "{{ url('universe',{url:p.url,id:p.id}) }}",
  34. {% else %}
  35. "@id": "{{ url('category',{url:p.url,id:p.id}) }}",
  36. {% endif %}
  37. "name": "{{ p.name }}"
  38. }
  39. },
  40. {% endfor %}
  41. {% set cpt = cpt + 1 %}
  42. {
  43. "@type": "ListItem",
  44. "position": {{ cpt }},
  45. "item":
  46. {
  47. "@id": "{{ url('product',{url:product.url,id:product.id}) }}",
  48. "name": "{{ product.name }}"
  49. }
  50. }
  51. ]
  52. }
  53. </script>
  54. {% endblock %}
  55. {% block featured %}{% endblock %}
  56. {% block breadcrumbs %}
  57. {% include 'front/layout/breadcrumbs.html.twig' with {product:product} %}
  58. {% endblock %}
  59. {% block content %}
  60. {% include 'front/layout/messages.html.twig' %}
  61. <div class="product-view">
  62. <div class="ctn">
  63. {% include 'front/catalog/product/view/infos.html.twig' with {discounts:discountsList} %}
  64. </div>
  65. <div class="ctn">
  66. {% if productDescription.description %}
  67. <div class="tab-content rte section" id="description">
  68. <div class="title-ctn">
  69. <div class="title">{% trans %}Description détaillée{% endtrans %}</div>
  70. </div>
  71. {{ productDescription.description|raw }}
  72. </div>
  73. {% endif %}
  74. {% if product.notice %}
  75. <div class="tab-content rte section" id="notice">
  76. <div class="title-ctn">
  77. <div class="title">{% trans %}Notice{% endtrans %}</div>
  78. </div>
  79. <p class="notice"><a href="{{ product.noticeUrl }}" target="_blank">{% trans %}Télécharger la notice d'utilisation{% endtrans %}</a></p>
  80. </div>
  81. {% endif %}
  82. {% if productDescription.conseil1 %}
  83. <div class="section rte advices">
  84. <div class="title-ctn">
  85. <div class="title">{% trans %}Conseils et astuces{% endtrans %}</div>
  86. </div>
  87. {{ productDescription.conseil1|raw }}
  88. </div>
  89. {% endif %}
  90. {% if product.video %}
  91. <div class="tab-content rte section" id="video">
  92. <div class="title-ctn">
  93. <div class="title">{% trans %}Vid&Eacute;o{% endtrans %}</div>
  94. <hr>
  95. </div>
  96. <div class="video-ctn">
  97. {{ product.video|raw }}
  98. </div>
  99. </div>
  100. {% endif %}
  101. </div>
  102. {% if associates %}
  103. {% include 'front/catalog/product/carousel.html.twig' with {products:associates, title:'Produits associés'|trans, withWrapper:true} %}
  104. {% endif %}
  105. <div class="ctn" style="padding: 30px 0;">
  106. {% if inCategory %}
  107. {% include 'front/catalog/product/carousel.html.twig' with {products:inCategory, title:'Dans la même catégorie'|trans, withWrapper:false} %}
  108. {% endif %}
  109. </div>
  110. {{ render(controller(
  111. 'App\\Controller\\Front\\Modules\\SeenProductsController::block',
  112. { 'request': app.request }
  113. )) }}
  114. <div class="ctn">
  115. {% if pathTags %}
  116. <div class="section rte tags">
  117. <div class="title-ctn">
  118. <div class="title">{% trans %}Craquez aussi pour...{% endtrans %}</div>
  119. </div>
  120. {{ pathTags|raw }}
  121. </div>
  122. {% endif %}
  123. </div>
  124. {# <div class="ctn">
  125. <div class="section tags module-categories">
  126. <div class="title-ctn">
  127. <div class="title">{% trans %}No catégories{% endtrans %}</div>
  128. </div>
  129. <div class="content">
  130. {{ pathTags|raw }}
  131. </div>
  132. </div>
  133. </div>#}
  134. </div>
  135. {% endblock %}
  136. {% block javascripts %}
  137. <script src="{{ asset('js/product.js') }}"></script>
  138. <script>
  139. $(document).ready(function(){
  140. {# tabs.init();#}
  141. product.init();
  142. });
  143. </script>
  144. {% endblock %}