{% macro card(cart, product) %} {% set title = product.brand ~ format_dimensions(product.dimensions.x, product.dimensions.y, product.dimensions.z, ' ') ~ ' ' ~ product.weight ~ 'г' %} {% set amount = cart.products[product.getId()].amount ?? 0 %}
0 %} style="--hue-rotate-offset: {{ amount }}0deg;"{% endif %}> {{ product.name }}

{{ product.name }} {{ title | length > 45 ? title | slice(0, 45) ~ '...' : title }}

{% endmacro %} {% if products is not empty %}
{% for product in products %} {% if loop.index % 2 == 1 %} {{ _self.card(cart, product) }} {% endif %} {% endfor %}
{% for product in products %} {% if loop.index % 2 == 0 %} {{ _self.card(cart, product) }} {% endif %} {% endfor %}
{% endif %}