templates/ECommerce/App/Product/large_icons.ajax.twig line 1

Open in your IDE?
  1. <div class="row p-5 grid-2-4 border-top-2 products-index-large-icons w-100">
  2. {% for product in products %}
  3. <div class="w-100 d-flex flex-column">
  4. {%- set photo = product.photos|first -%}
  5. {%- if photo is not empty and photo.url is not empty -%}
  6. <img src="{{ asset(photo.url)|imagine_filter('product_thumbnail') }}"
  7. class="product-image img-fluid d-block w-100 box-shadow-2"
  8. alt="{{ product.title }}" data-lity
  9. data-lity-target="{{ asset(photo.url)|imagine_filter('product_small') }}">
  10. {%- else -%}
  11. <img src="{{ asset('/assets/static/no-photo.jpg') }}" class="product-image img-fluid d-block w-100 box-shadow-2"
  12. alt="{{ product.title }}">
  13. {%- endif -%}
  14. <a href="{{ path('mdl_app_product_show', { 'id': product.id }) }}"
  15. rel="canonical"
  16. class="color-black mt-5 mb-1 text-center min-h-48">
  17. <b data-toggle="tooltip" data-html="true"
  18. title="{{ product.alternatives|join(', ') }}">{{ product.title }}
  19. {{ product.manufacturer }}</b>
  20. </a>
  21. {% if product.link %}
  22. <a class="text-capitalize table-rbt-txt color-black mb-3 text-center"
  23. href="{{ product.link }}"
  24. target="_blank"
  25. >{{ product.category ? product.category.translate().name|capitalize : '' }}</a>
  26. {% else %}
  27. <span class="table-rbt-txt mb-3 text-center">{{ product.category ? product.category.translate().name|capitalize : '' }}</span>
  28. {% endif %}
  29. <a class="color-black mb-4 text-center" href="{{ path('mdl_app_product_filter_by_size', {
  30. 'innerDiameter': product.innerDiameterMin,
  31. 'outerDiameter': product.outerDiameterMin,
  32. 'width': product.widthMin,
  33. 'precision': 0
  34. }) }}">{{ product.dimensions }}</a>
  35. {% set hasActiveDepot = false %}
  36. {% for depot in product.quantities %}
  37. {% if depot.quantity > 0 %}
  38. {% set hasActiveDepot = true %}
  39. {% endif %}
  40. {% endfor %}
  41. {%- set firstDepot = product.quantities|first -%}
  42. {%- set restDepots = product.quantities[1:] -%}
  43. <div class="large-icon-price d-flex align-items-center mb-1">
  44. {% if is_granted('ROLE_CLIENT') %}
  45. <strong>{{ firstDepot|depot_product_price(app.user, true)|number_format(2) }} {{ currency_code(app.user) }}</strong>
  46. {% else %}
  47. <strong>{{ firstDepot|depot_product_price(app.user)|number_format(2) }} {{ currency_code(app.user) }}</strong>
  48. {% endif %}
  49. {% if is_granted('ROLE_CLIENT') %}
  50. {% set depotProduct = firstDepot %}
  51. {% if depotProduct.price > 0 %}
  52. {% include 'ECommerce/App/Product/form_add_to_cart.html.twig' %}
  53. {% else %}
  54. <a class="btn btn-link float-right ml-2 mr-2"
  55. data-toggle="tooltip"
  56. data-html="true"
  57. {% if app.user and app.user.client %}
  58. title="call: {{ app.user.client.firm.phones|first }}"
  59. href="tel:{{ app.user.client.firm.phones|first }}"
  60. {% endif %}
  61. >
  62. <i class="material-icons">call</i>
  63. </a>
  64. {% endif %}
  65. {% else %}
  66. {% set depotProduct = firstDepot %}
  67. {% include 'ECommerce/App/Product/form_add_to_individual_order.html.twig' %}
  68. {% endif %}
  69. </div>
  70. </div>
  71. {% endfor %}
  72. </div>