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.attribute.code == 'origin_country' %}
  11. {% if attribute.value == 'France' %}
  12. <tr data-attr="{{ attribute.attribute.code }}">
  13. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  14. <td>{{ attribute.value }}</td>
  15. </tr>
  16. {% elseif attribute.value in ['Allemagne','Belgique','Espagne','Italie','Pologne','Roumanie','Grande Bretagne','Union Européenne'] %}
  17. <tr data-attr="{{ attribute.attribute.code }}">
  18. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  19. <td>Europe</td>
  20. </tr>
  21. {% endif %}
  22. {% elseif attribute.attribute.code == 'main_color' %}
  23. <tr data-attr="{{ attribute.attribute.code }}">
  24. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  25. <td>{{ attribute.entity.title }}</td>
  26. </tr>
  27. {% elseif attribute.attribute.code == 'product_brand' and product.manufacturer %}
  28. <tr data-attr="{{ attribute.attribute.code }}">
  29. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  30. <td><a href="{{ path('manufacturer', {id:product.manufacturer.id, url:product.manufacturer.url}) }}">{{ product.manufacturer.name }}</a></td>
  31. </tr>
  32. {% elseif attribute.attribute.code in ['height', 'length', 'width'] %}
  33. <tr data-attr="{{ attribute.attribute.code }}">
  34. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  35. <td>{{ attribute.value }}mm</td>
  36. </tr>
  37. {% else %}
  38. <tr data-attr="{{ attribute.attribute.code }}">
  39. <td>{{ attribute.attribute.getAttributeDescription('fr').title }}</td>
  40. <td>
  41. {% if attribute.getDescription('fr') %}
  42. {{ attribute.getDescription('fr').value }}
  43. {% elseif attribute.value == 1 %}
  44. {{ 'Oui' | trans }}
  45. {% elseif attribute.value == 0 %}
  46. {{ 'Non' | trans }}
  47. {% else %}
  48. {{ attribute.displayedValue }}
  49. {% endif %}
  50. </td>
  51. </tr>
  52. {% endif %}
  53. {% endfor %}
  54. </tbody>
  55. </table>
  56. </div>
  57. {% endif %}