templates/application/calc/product-block.html.twig line 1

Open in your IDE?
  1. {% set product = item.product %}
  2. {% if readonly is not defined %}
  3.     {% set readonly = false %}
  4. {% endif %}
  5. <div class="calculator-tbl__item" data-id="{{ product.id }}">
  6.     <div class="calculator-tbl__main">
  7.         <div class="order-tbl__product">
  8.             <div class="order-tbl__product-photo">
  9.                 {{ include('application/partial/picture.html.twig', {image: product.image, width: 80, height: 80}) }}
  10.             </div>
  11.             <div class="order-tbl__product-detail">
  12.                 <div class="order-tbl__product-title"><a href="{{ documentUrl(product) }}">{{ product.name(app.request.locale) }}</a></div>
  13.                 {% if noQuantity is not defined or not noQuantity %}
  14.                     <div class="product-block-count">
  15.                         <div class="count">
  16.                             {% if not readonly %}
  17.                                 <button data-value="-1" class="count__minus" {% if item.quantity == 1 %}disabled{% endif %}>
  18.                                     <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  19.                                         <path d="M1 8a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H2a1 1 0 0 1-1-1z"/>
  20.                                     </svg>
  21.                                 </button>
  22.                             {% endif %}
  23.                             <input type="text" class="cart-quantity count__control countedInput" value="{{ item.quantity }}" {% if readonly %}readonly{% endif %}>
  24.                             {% if not readonly %}
  25.                                 <button data-value="1" class="count__plus">
  26.                                     <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  27.                                         <path d="M1 8a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H2a1 1 0 0 1-1-1z"/>
  28.                                         <path d="M8 1a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V2a1 1 0 0 1 1-1z"/>
  29.                                     </svg>
  30.                                 </button>
  31.                             {% endif %}
  32.                         </div>
  33.                         <span class="price__unit">&nbsp;шт.</span>
  34.                     </div>
  35.                 {% endif %}
  36.             </div>
  37.         </div>
  38.     </div>
  39.     {% if not readonly %}
  40.         <div class="calculator-tbl__remove">
  41.             <button class="remove__link">
  42.                 <span class="remove__icon"><svg width="24" height="24" viewBox="0 0 24 24" fill="none"
  43.                                                 xmlns="http://www.w3.org/2000/svg"><path
  44.                                 d="M3 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 5.25zM9.75 9a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-6A.75.75 0 0 1 9.75 9zM14.25 9a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 .75-.75z"></path><path
  45.                                 d="M5.25 4.5a.75.75 0 0 1 .75.75V19.5h12V5.25a.75.75 0 0 1 1.5 0V19.5A1.5 1.5 0 0 1 18 21H6a1.5 1.5 0 0 1-1.5-1.5V5.25a.75.75 0 0 1 .75-.75z"></path><path
  46.                                 d="M8.159 2.159A2.25 2.25 0 0 1 9.75 1.5h4.5a2.25 2.25 0 0 1 2.25 2.25v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0-.75.75v1.5a.75.75 0 0 1-1.5 0v-1.5c0-.597.237-1.169.659-1.591z"></path></svg></span>
  47.             </button>
  48.         </div>
  49.     {% endif %}
  50. </div>