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

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.     
  62.     <div class="product-view">
  63.         <div class="ctn">
  64.             {% include 'front/catalog/product/view/infos.html.twig' with {discounts:discountsList} %}
  65.         </div>
  66.         <div class="ctn">
  67.             {% if productDescription.description %}
  68.             <div class="tab-content rte section" id="description">
  69.                 <div class="title-ctn">
  70.                     <div class="title">{% trans %}Description détaillée{% endtrans %}</div>
  71.                 </div>
  72.                 {{ productDescription.description|raw }}
  73.             </div>
  74.             {% endif %}
  75.             {% if product.notice %}
  76.             <div class="tab-content rte section" id="notice">
  77.                 <div class="title-ctn">
  78.                     <div class="title">{% trans %}Notice{% endtrans %}</div>
  79.                 </div>
  80.                 <p class="notice"><a href="{{ product.noticeUrl }}" target="_blank">{% trans %}Télécharger la notice d'utilisation{% endtrans %}</a></p>
  81.             </div>
  82.             {% endif %}
  83.             {% if productDescription.conseil1 %}
  84.             <div class="section rte advices">
  85.                 <div class="title-ctn">
  86.                     <div class="title">{% trans %}Conseils et astuces{% endtrans %}</div>
  87.                 </div>
  88.                 {{ productDescription.conseil1|raw }}
  89.             </div>
  90.             {% endif %}
  91.             {% if product.video %}
  92.             <div class="tab-content rte section" id="video">
  93.                 <div class="title-ctn">
  94.                     <div class="title">{% trans %}Vid&Eacute;o{% endtrans %}</div>
  95.                     <hr>
  96.                 </div>
  97.                 <div class="video-ctn">
  98.                     {{ product.video|raw }}
  99.                 </div>
  100.             </div>
  101.             {% endif %}
  102.         </div>
  103.         {% if associates %}
  104.             {% include 'front/catalog/product/carousel.html.twig' with {products:associates, title:'Produits associés'|trans, withWrapper:true} %}
  105.         {% endif %}
  106.         <div class="ctn" style="padding: 30px 0;">
  107.             {% if inCategory %}
  108.             {% include 'front/catalog/product/carousel.html.twig' with {products:inCategory, title:'Dans la même catégorie'|trans, withWrapper:false} %}
  109.             {% endif %}
  110.         </div>
  111.         {{ render(controller(
  112.             'App\\Controller\\Front\\Modules\\SeenProductsController::block',
  113.             { 'request': app.request }
  114.         )) }}
  115.         <div class="ctn">
  116.             {% if pathTags %}
  117.             <div class="section rte tags">
  118.                 <div class="title-ctn">
  119.                     <div class="title">{% trans %}Craquez aussi pour...{% endtrans %}</div>
  120.                 </div>
  121.                 {{ pathTags|raw }}
  122.             </div>
  123.             {% endif %}
  124.         </div>
  125. {#        <div class="ctn">
  126.             <div class="section tags module-categories">
  127.                 <div class="title-ctn">
  128.                     <div class="title">{% trans %}No catégories{% endtrans %}</div>
  129.                 </div>
  130.                 <div class="content">
  131.                     {{ pathTags|raw }}
  132.                 </div>
  133.             </div>
  134.         </div>#}
  135.     </div>
  136. {%  endblock %}
  137. {% block javascripts %}
  138.     <script src="{{ asset('js/product.js') }}"></script>
  139.     <script>
  140.         $(document).ready(function(){
  141. {#            tabs.init();#}
  142.             product.init();
  143.         });
  144.         </script>
  145. {%  endblock %}