templates/front/catalog/product/view/list-item.html.twig line 1

Open in your IDE?
  1. {% if productTitleTag is not defined %}
  2. {% set productTitleTag = 'div' %}
  3. {% endif %}
  4. {% if priceGroup is not defined %}
  5. {% set priceGroup = customerMgr.getPriceContext() %}
  6. {% endif %}
  7. <li class="product" data-pid="{{ product.id }}">
  8. {% if removeBt is defined %}
  9. <a class="{{ removeBt }}" data-product="{{ product.id }}">
  10. <svg xmlns="http://www.w3.org/2000/svg" id="Calque_2" viewBox="0 0 11.25 11.05">
  11. <line style="fill:none;stroke:#000;stroke-miterlimit:10;" x1=".56" y1=".35" x2="10.9" y2="10.69"/>
  12. <line style="fill:none;stroke:#000;stroke-miterlimit:10;" x1="10.69" y1=".35" x2=".35" y2="10.69"/>
  13. </svg>
  14. </a>
  15. {% endif %}
  16. <div class="picture">
  17. {% if product.pictures|length > 0 %}
  18. <img src="{{ asset(attribute(product.pictures,0).webPath) | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
  19. {% else %}
  20. <img src="{{ asset('img/img-default.png') | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
  21. {% endif %}
  22. </div>
  23. <div class="manufacturer">
  24. {% if product.manufacturer %}
  25. {% set slug = product.manufacturer.getUrl(app.request.locale) %}
  26. <a href="{{ path('manufacturer',{id:product.manufacturer.id,url:slug}) }}">
  27. {{ product.manufacturer.name }}
  28. </a>
  29. {% endif %}
  30. </div>
  31. {% set productUrl = product_path(product) %}
  32. <{{ productTitleTag }} class="title"><a href="{{ productUrl }}">{{ product.name|excerpt(60,'') | raw }}</a></{{ productTitleTag }}>
  33. {% if customerMgr.canSeePrices() and product.hasPrice(customerMgr.priceContext) %}
  34. {% set country = customerMgr.getCustomerCountry() %}
  35. {% if product.isAvailableForCountry(country) %}
  36. {% if customerMgr.isExpert() %}
  37. {% if not product.isGift() %}
  38. <div class="price-ctn cf">
  39. {% if product.hasChildren() and product.getFromPrice(true, priceGroup, true) %}
  40. <div class="from-price">
  41. <span class="from">{% trans %}A partir de :{% endtrans %}</span>
  42. <span class="price">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  43. </div>
  44. <span class="price-tax-incl">{{ product.getFromPrice(true, priceGroup, true)|price }}<sup>{{ 'ttc' | trans }}</sup></span>
  45. {% else %}
  46. <span class="price">{{ product.getPrice(true, priceGroup)|price }}</span>
  47. <span class="price-tax-incl">{{ product.getPrice(true, priceGroup, true)|price }}<sup>{{ 'ttc' | trans }}</sup></span>
  48. {% endif %}
  49. </div>
  50. {% endif %}
  51. {% else %}
  52. {% set normalPrice = product.getPrice(true, priceGroup) %}
  53. {% set reducedPrice = priceMgr.getPrice(product, 1, false) %}
  54. {% set showDiscount = true %}
  55. <div class="price-ctn cf">
  56. {% if product.hasChildren() and product.getFromPrice(true, priceGroup) %}
  57. {% set showDiscount = false %}
  58. <span class="from">{% trans %}A partir de :{% endtrans %}</span>
  59. <span class="price">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  60. {% elseif product.getPrice(false, priceGroup) %}
  61. {% if reducedPrice < normalPrice %}
  62. <span class="price old-price">{{ normalPrice|price }}</span>
  63. <span class="price reduced-price">{{ reducedPrice|price }}</span>
  64. {% else %}
  65. <span class="price">{{ normalPrice|price }}</span>
  66. {% endif %}
  67. {% endif %}
  68. </div>
  69. {% if showDiscount and discounts is defined and discounts and product.price and (product.id in discounts|keys) %}
  70. {% if product.id in discounts|keys %}
  71. <div class="discount">
  72. {{ attribute(discounts,product.id) | raw }}
  73. </div>
  74. {% elseif reducedPrice!=normalPrice %}
  75. <div class="discount">
  76. {% trans %}Remise de{% endtrans %} {{ (((reducedPrice-normalPrice) / normalPrice) * 100) | percent }}
  77. </div>
  78. {% endif %}
  79. {% endif %}
  80. {% endif %}
  81. {% endif %}
  82. {% endif %}
  83. {% if productItemFooter is defined and productItemFooter %}
  84. {{ productItemFooter|raw }}
  85. {% endif %}
  86. </li>