templates/front/catalog/model/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 }}" data-mid="{{ model.code }}">
  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. {% elseif product.parent and product.parent.pictures|length > 0 %}
  20. <img src="{{ asset(attribute(product.parent.pictures,0).webPath) | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
  21. {% else %}
  22. <img src="{{ asset('img/img-default.png') | imagine_filter('product_medium') }}" width="300" height="300" alt="{{ product.name }}">
  23. {% endif %}
  24. </div>
  25. <div class="manufacturer">
  26. {% if product.manufacturer %}
  27. {% set slug = product.manufacturer.getUrl(app.request.locale) %}
  28. <a href="{{ path('manufacturer',{id:product.manufacturer.id,url:slug}) }}">
  29. {{ product.manufacturer.name }}
  30. </a>
  31. {% endif %}
  32. </div>
  33. {% if product.hasParent() %}
  34. {% set productUrl = path('product',{id:product.parent.id,url:product.parent.url}) %}
  35. {% else %}
  36. {% set productUrl = path('product',{id:product.id,url:product.url}) %}
  37. {% endif %}
  38. <{{ productTitleTag }} class="title"><a href="{{ productUrl }}">{{ product.name|excerpt(60,'') | raw }}</a></{{ productTitleTag }}>
  39. {% if customerMgr.canSeePrices() and product.hasPrice(customerMgr.priceContext) %}
  40. {% set country = customerMgr.getCustomerCountry() %}
  41. {% if product.isAvailableForCountry(country) %}
  42. {% if customerMgr.isExpert() %}
  43. {% if not product.isGift() %}
  44. <div class="price-ctn cf">
  45. {% if model.hasChildren() and model.getFromPrice(true, priceGroup, true) %}
  46. <div class="from-price">
  47. <span class="from">{% trans %}A partir de :{% endtrans %}</span>
  48. <span class="price">{{ model.getFromPrice(true, priceGroup)|price }}</span>
  49. </div>
  50. <span class="price-tax-incl">{{ model.getFromPrice(true, priceGroup, true)|price }}<sup>{{ 'ttc' | trans }}</sup></span>
  51. {% else %}
  52. <span class="price">{{ model.getPrice(true, priceGroup)|price }}</span>
  53. <span class="price-tax-incl">{{ model.getPrice(true, priceGroup, true)|price }}<sup>{{ 'ttc' | trans }}</sup></span>
  54. {% endif %}
  55. </div>
  56. {% endif %}
  57. {% else %}
  58. <div class="price-ctn cf">
  59. {% if model.getFromPrice(true, priceGroup) %}
  60. <span class="from">{% trans %}A partir de :{% endtrans %}</span>
  61. <span class="price">{{ model.getFromPrice(true, priceGroup)|price }}</span>
  62. {% endif %}
  63. </div>
  64. {% endif %}
  65. {% endif %}
  66. {% endif %}
  67. {% if productItemFooter is defined and productItemFooter %}
  68. {{ productItemFooter|raw }}
  69. {% endif %}
  70. </li>