custom/plugins/AtcCustom/src/Resources/views/storefront/component/buy-widget/buy-widget-form.html.twig line 1

Open in your IDE?
  1. {% extends '@Storefront/storefront/component/buy-widget/buy-widget-form.html.twig' %}
  2. {% if pageType == 'product_detail' %}
  3.     {% set customizedProductsTemplate = page.product.extensions.swagCustomizedProductsTemplate %}
  4. {% else %}
  5.     {% set customizedProductsTemplate = product.extensions.swagCustomizedProductsTemplate %}
  6. {% endif %}
  7. {% block buy_widget_buy_quantity_container %}
  8.     <div class="col-12 col-md-2 col-lg-2 {{ theme_config('productDetailBuyboxDisplayAmount') ? '' : 'd-none' }}">
  9.         {% block buy_widget_buy_quantity %}
  10.             {{ parent() }}
  11.         {% endblock %}
  12.     </div>
  13. {% endblock %}
  14. {% block buy_widget_buy_container %}
  15.     {% if customizedProductsTemplate %}
  16.         {% if pageType == 'product_detail' %}
  17.             {% if(theme_config('productDetailBuyboxDisplayCustomizedProducts')) %}
  18.                 {% sw_include '@parent/storefront/component/buy-widget/buy-widget-form-customized-products.html.twig' %}
  19.             {% endif %}
  20.             {{ parent() }}
  21.         {% else %}
  22.             <a class="btn btn-primary btn-block"
  23.                href="{{ seoUrl('frontend.detail.page', { 'productId': product.id }) }}"
  24.                title="{{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}"
  25.                aria-label="{{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}">
  26.                 {{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}
  27.             </a>
  28.         {% endif %}
  29.     {% else %}
  30.         {{ parent() }}
  31.     {% endif %}
  32. {% endblock %}
  33. {% block buy_widget_buy_button_container %}
  34.     <div class="{% if showQuantitySelect %} col-12 col-md-10 col-lg-10 {% endif %}">
  35.         {% block buy_widget_buy_button %}
  36.             {# @deprecated tag:v6.5.0 - Bootstrap v5 removes `btn-block` class, use `d-grid` wrapper instead #}
  37.             {% if feature('v6.5.0.0') %}
  38.                 <div class="d-grid">
  39.                     <button class="btn btn-primary btn-buy"
  40.                             title="{{ "detail.addProduct"|trans|striptags }}"
  41.                             aria-label="{{ "detail.addProduct"|trans|striptags }}">
  42.                         {{ "detail.addProduct"|trans|sw_sanitize }}
  43.                     </button>
  44.                 </div>
  45.             {% else %}
  46.                 <button class="btn btn-primary btn-block btn-buy"
  47.                         title="{{ "detail.addProduct"|trans|striptags }}"
  48.                         aria-label="{{ "detail.addProduct"|trans|striptags }}">
  49.                     <i class="fa fa-cart-flatbed-boxes "></i>
  50.                     {{ "detail.addProduct"|trans|sw_sanitize }}
  51.                 </button>
  52.             {% endif %}
  53.         {% endblock %}
  54.     </div>
  55. {% endblock %}
  56. {% block buy_widget_buy_form_action %}
  57.     {% apply spaceless %}
  58.         {% if customizedProductsTemplate and customizedProductsTemplate.active and customizedProductsTemplate.options|length %}
  59.             {{ path('frontend.checkout.customized-products.add') }}
  60.         {% else %}
  61.             {{ parent() }}
  62.         {% endif %}
  63.     {% endapply %}
  64. {% endblock %}
  65. {% block buy_widget_buy_form_inner_csrf %}
  66.     {% if customizedProductsTemplate and customizedProductsTemplate.active and customizedProductsTemplate.options|length %}
  67.         {{ sw_csrf('frontend.checkout.customized-products.add') }}
  68.     {% else %}
  69.         {{ parent() }}
  70.     {% endif %}
  71. {% endblock %}