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. <a class="text-capitalize table-rbt-txt color-black mb-3 text-center"
  22. href="{{ path('mdl_app_product_index', {
  23. 'categories': [product.category ? product.category.id : null]
  24. }) }}"
  25. target="_blank"
  26. >{{ product.category ? product.category.translate().name|capitalize : '' }}</a>
  27. <a class="color-black mb-4 text-center" href="{{ path('mdl_app_product_filter', {
  28. 'innerDiameter': product.innerDiameterMin,
  29. 'outerDiameter': product.outerDiameterMin,
  30. 'width': product.widthMin,
  31. 'precision': 0
  32. }) }}">{{ product.dimensions }}</a>
  33. {% set hasActiveDepot = false %}
  34. {% for depot in product.quantities %}
  35. {% if depot.quantity > 0 %}
  36. {% set hasActiveDepot = true %}
  37. {% endif %}
  38. {% endfor %}
  39. {%- set firstDepot = product.quantities|first -%}
  40. {%- set restDepots = product.quantities[1:] -%}
  41. <div class="large-icon-price d-flex align-items-center mb-1">
  42. {% if is_granted('ROLE_CLIENT') %}
  43. <strong>{{ firstDepot|depot_product_price(app.user, true)|number_format(2) }} {{ currency_code(app.user) }}</strong>
  44. {% else %}
  45. <strong>{{ firstDepot|depot_product_price(app.user)|number_format(2) }} {{ currency_code(app.user) }}</strong>
  46. {% endif %}
  47. {% if is_granted('ROLE_CLIENT') %}
  48. {% set depotProduct = firstDepot %}
  49. {% if depotProduct.price > 0 %}
  50. {% include 'ECommerce/App/Product/form_add_to_cart.html.twig' %}
  51. {% else %}
  52. <a class="btn btn-link float-right ml-2 mr-2"
  53. data-toggle="tooltip"
  54. data-html="true"
  55. {% if app.user and app.user.client %}
  56. title="call: {{ app.user.client.firm.phones|first }}"
  57. href="tel:{{ app.user.client.firm.phones|first }}"
  58. {% endif %}
  59. >
  60. <i class="material-icons">call</i>
  61. </a>
  62. {% endif %}
  63. {% else %}
  64. {% set depotProduct = firstDepot %}
  65. {% include 'ECommerce/App/Product/form_add_to_individual_order.html.twig' %}
  66. {% endif %}
  67. </div>
  68. </div>
  69. {% endfor %}
  70. </div>