templates/bundles/SyliusShopBundle/Product/Show/_addToCart.html.twig line 1

  1. {% set product = order_item.variant.product %}
  2. {% form_theme form 'bootstrap_4_layout.html.twig' %}
  3. <div class="ui segment" id="sylius-product-selecting-variant" {{ sylius_test_html_attribute('product-selecting-variant') }}>
  4.     {{ sylius_template_event('sylius.shop.product.show.before_add_to_cart', {'product': product, 'order_item': order_item}) }}
  5.     {{ form_start(form, {'action': path('sylius_shop_ajax_cart_add_item', {'productId': product.id}), 'attr': {'id': 'sylius-product-adding-to-cart', 'class': 'form product-form', 'novalidate': 'novalidate', 'data-redirect': path(configuration.getRedirectRoute('summary'))}}) }}
  6.     {{ form_errors(form) }}
  7.     <div class="ui red label bottom pointing hidden sylius-validation-error" id="sylius-cart-validation-error" {{ sylius_test_html_attribute('cart-validation-error') }}></div>
  8.     <table border="0" width="100%">
  9.         <tr>
  10.             <td>
  11.                 {% if not product.simple %}
  12.                     {% if product.variantSelectionMethodChoice %}
  13.                         {% include '@SyliusShop/Product/Show/_variants.html.twig' %}
  14.                     {% else %}
  15.                         {% include '@SyliusShop/Product/Show/_options.html.twig' %}
  16.                     {% endif %}
  17.                 {% endif %}
  18.             </td>
  19.         </tr>
  20.         <tr>
  21.             <td><br/></td>
  22.         </tr>
  23.     </table>
  24.     <div class="product-details__quantity">
  25.         <h3 class="product-details__quantity-title">Choose quantity</h3>
  26.         <div class="quantity-box">
  27.             <button type="button" class="sub text-white">
  28.                 <i class="fa fa-minus"></i>
  29.             </button>
  30.             <input type="number" id="1" value="1"/>
  31.             <button type="button" class="add text-white">
  32.                 <i class="fa fa-plus"></i>
  33.             </button>
  34.         </div>
  35.     </div>
  36.     {# <div class="form__count">
  37.                 <span class="form__minus"></span>
  38.                 {{ form_widget(form.cartItem.quantity, {'attr':{'class':'form__field'}}) }}
  39.                 <span class="form__plus"></span>
  40.             </div> #}
  41.     {# <div class="product-form__favorite">
  42.                 <svg class="icon">
  43.                   <use xlink:href="#heart"></use>
  44.                 </svg>
  45.               </div> #}
  46.     {# <button class="button button--green" type="submit" style="margin-left:5px;">
  47.                 <span>{{ 'sylius.ui.add_to_cart'|trans }}</span>
  48.                 <svg class="icon">
  49.                     <use xlink:href="#arrow"></use>
  50.                 </svg>
  51.             </button> #}
  52.     {{ sylius_template_event('sylius.shop.product.show.add_to_cart_form', {'product': product, 'order_item': order_item, 'form': form}) }}
  53.     {{ form_row(form._token) }}
  54.     {{ form_end(form, {'render_rest': false}) }}
  55.     <div class="product-details__buttons">
  56.         <div class="product-details__buttons-1">
  57.             <a href="shop-cart.html" class="theme-btn btn-style-one">
  58.                 <span class="btn-title">Add to Wishlist</span>
  59.             </a>
  60.         </div>
  61.         <div class="product-details__buttons-2">
  62.             <a href="shop-product-details.html" class="theme-btn btn-style-one">
  63.                 <span class="btn-title">Add to Wishlist</span>
  64.             </a>
  65.         </div>
  66.     </div>
  67.         <a class="button button--account" href="{{ path('app_frontend_quote_request_new', { 'product': product.id, '_locale':product.translation.locale })}}" style="color:yellow;"> <span>
  68.             <b>{{'app.ui.quote_request'|trans|upper}}</b>
  69.         </span>
  70.         <svg class="icon">
  71.             <use xlink:href="#arrow"></use>
  72.         </svg>
  73.     </a>
  74. </div>