templates/product/public/_show.html.twig line 1

Open in your IDE?
  1. <section class="{{ productConfig.design.section_class_show }}">
  2.   <div class="grid grid-col-3 col-gap-4 row-gap-4 p-2 w-100" data-desktop="grid grid-col-3 col-gap-4 row-gap-4 p-2 w-100" data-tablet="column-reverse p-2" data-mobil="column-reverse p-1">
  3.     <div class="col-span-1">
  4.       {% if productConfig.design.gallery_model == 'model1' %}
  5.         {% include 'product/public/_gallery_model1.html.twig' %}
  6.       {% endif %}
  7.       {% if productConfig.design.gallery_model == 'model2' %}
  8.         {% include 'product/public/_gallery_model2.html.twig' %}
  9.       {% endif %}
  10.       {% if productConfig.design.gallery_model == 'model3' %}
  11.         {% include 'product/public/_gallery_model3.html.twig' %}
  12.       {% endif %}
  13.       {% if productConfig.design.gallery_model == 'model4' %}
  14.         {% include 'product/public/_gallery_model4.html.twig' %}
  15.       {% endif %}
  16.     </div>
  17.     <div class="{{ productConfig.design.column_information_show }} col-span-2" data-desktop="{{ productConfig.design.column_information_show }} col-span-2" data-tablet="{{ productConfig.design.column_information_show }}" data-mobil="{{ productConfig.design.column_information_show }}">
  18.       <h1 class="{{ productConfig.design.title_class_show }}">{{ product.name }}</h1>
  19.       {% if productConfig.design.is_reference_show == true %}
  20.         {% if product.reference %}
  21.           <div class="">
  22.             <p class="{{ productConfig.design.reference_class_show }}">Référence : {{ product.reference }}</p>
  23.           </div>
  24.         {% endif %}
  25.       {% endif %}
  26.       {% if productConfig.design.is_price_show == true %}
  27.         {% if product.price %}
  28.           <span class="{{ productConfig.design.price_class_show }}">{{ product.price|number_format(2, ',', ' ') }} €</span>
  29.         {% endif %}
  30.       {% endif %}
  31.       {% if productConfig.design.is_description_show == true %}
  32.         {% if product.preview %}
  33.           <p class="{{ productConfig.design.description_class_show }}">{{ product.preview|nl2br }}</p>
  34.         {% endif %}
  35.       {% endif %}
  36.       {% if productConfig.design.is_category_show == true %}
  37.         <div class="flex-row p-1 wrap">
  38.           {% for cat in categories %}
  39.             <div class="{{ productConfig.design.category_class_show }}">{{ cat.name }}</div>
  40.           {% endfor %}
  41.         </div>
  42.       {% endif %}
  43.       {% if productConfig.design.is_brand_show == true %}
  44.         {% if product.brand %}
  45.           <p class="{{ productConfig.design.brand_class_show }}">Marque : {{ product.brand.name }}</p>
  46.           {% if product.brand.logo %}
  47.             <div class="">
  48.               <img style="height: 60px;" src="{{ product.brand.logo }}" alt="{{ product.brand.name }}" />
  49.             </div>
  50.           {% endif %}
  51.         {% endif %}
  52.       {% endif %}
  53.       {% if productConfig.design.is_attribute_show == true %}
  54.         {% if product.productAttributeValues %}
  55.           <div class="grid grid-col-2 p-1">
  56.             {% for attribute in product.productAttributeValues %}
  57.               <div class="{{ productConfig.design.attribute_class_show }}">
  58.                 {% if attribute.attribute.icon is not null %}
  59.                   <div class="svg-100 m-r-1" style="width: 32px;">{{ attribute.attribute.icon|raw }}</div>
  60.                 {% else %}
  61.                 {% endif %}
  62.                 {{ attribute.attribute.name }} : {{ attribute.value }}
  63.               </div>
  64.             {% endfor %}
  65.           </div>
  66.         {% endif %}
  67.       {% endif %}
  68.       {% if productConfig.design.is_pdf_show == true %}
  69.         {% if product.pdfName is not empty %}
  70.           <div class="w-100 flex-row">
  71.             <a data-parent="" class="{{ productConfig.design.pdf_class_show }}" target="_blank" href="/uploads/documents/{{ product.pdfName }}">{{ productConfig.design.pdf_text }}</a>
  72.           </div>
  73.         {% endif %}
  74.       {% endif %}
  75.     </div>
  76.   </div>
  77. </section>
  78. {{ product.content|raw }}
  79. {% if productConfig.design.is_similar_show == true %}
  80.   {% if product.similarProducts == null %}
  81.   {% else %}
  82.     <div class="w-max-l p-1 x-auto">
  83.       <h5 class="p-1 txt-m2">Produits similaires</h5>
  84.       <section class="{{ productConfig.listClass }}" data-desktop="{{ productConfig.listClass }}" data-mobil="{{ productConfig.listClassMobile }}" data-tablet="{{ productConfig.listClassTablet }}">
  85.         {% if productConfig.template == 'Classic' %}
  86.           {% for product in products %}
  87.             {% include 'product/templates/_classic.html.twig' %}
  88.           {% endfor %}
  89.         {% endif %}
  90.         {% if productConfig.template == 'Card' %}
  91.           {% for product in products %}
  92.             {% include 'product/templates/_card.html.twig' %}
  93.           {% endfor %}
  94.         {% endif %}
  95.         {% if productConfig.template == 'Banner' %}
  96.           {% for product in products %}
  97.             {% include 'product/templates/_banner.html.twig' %}
  98.           {% endfor %}
  99.         {% endif %}
  100.       </section>
  101.     </div>
  102.   {% endif %}
  103. {% endif %}