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

Open in your IDE?
  1. {% if product.caracteristics %}
  2. <div class="tab-content rte section caracteristics" style="padding: 30px 0;">
  3. <div class="title-ctn">
  4. <div class="title">{% trans %}Caractéristiques{% endtrans %}</div>
  5. <hr>
  6. </div>
  7. <table>
  8. <tbody>
  9. {% for attribute in product.caracteristics %}
  10. {% if attribute.value %}
  11. {% if attribute.attribute.code == 'origin_country' %}
  12. {% if attribute.value == 'France' %}
  13. <tr data-attr="{{ attribute.attribute.code }}" data-aid="{{ attribute.attribute.id }}" data-paid="{{ attribute.id }}">
  14. <td>{{ attribute.attribute.title }}</td>
  15. <td>{{ attribute.value }}</td>
  16. </tr>
  17. {% elseif attribute.value in ['Allemagne','Belgique','Espagne','Italie','Pologne','Roumanie','Grande Bretagne','Union Européenne'] %}
  18. <tr data-attr="{{ attribute.attribute.code }}" data-aid="{{ attribute.attribute.id }}" data-paid="{{ attribute.id }}">
  19. <td>{{ attribute.attribute.title }}</td>
  20. <td>Europe</td>
  21. </tr>
  22. {% endif %}
  23. {% elseif attribute.attribute.code == 'main_color' %}
  24. <tr data-attr="{{ attribute.attribute.code }}" data-aid="{{ attribute.attribute.id }}" data-paid="{{ attribute.id }}">
  25. <td>{{ attribute.attribute.title }}</td>
  26. <td>{{ attribute.entity.title }}</td>
  27. </tr>
  28. {% elseif attribute.attribute.code == 'product_brand' and product.manufacturer %}
  29. <tr data-attr="{{ attribute.attribute.code }}" data-aid="{{ attribute.attribute.id }}" data-paid="{{ attribute.id }}">
  30. <td>{{ attribute.attribute.title }}</td>
  31. <td><a href="{{ path('manufacturer', {id:product.manufacturer.id, url:product.manufacturer.url}) }}">{{ product.manufacturer.name }}</a></td>
  32. </tr>
  33. {% else %}
  34. <tr data-attr="{{ attribute.attribute.code }}" data-aid="{{ attribute.attribute.id }}" data-paid="{{ attribute.id }}">
  35. <td>{{ attribute.attribute.title }}</td>
  36. <td>
  37. {% if attribute %}
  38. {{ attribute.displayedValue }}
  39. {% elseif attribute.value == 1 %}
  40. {{ 'Oui' | trans }}
  41. {% elseif attribute.value == 0 %}
  42. {{ 'Non' | trans }}
  43. {% endif %}
  44. </td>
  45. </tr>
  46. {% endif %}
  47. {% endif %}
  48. {% endfor %}
  49. </tbody>
  50. </table>
  51. </div>
  52. {% endif %}