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

Open in your IDE?
  1. {% sw_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_container %}
  8.     {% if customizedProductsTemplate %}
  9.         {% if pageType == 'product_detail' %}
  10.             {% sw_include '@Storefront/storefront/component/buy-widget/buy-widget-form-customized-products.html.twig' %}
  11.             {{ parent() }}
  12.         {% else %}
  13.             <a class="btn btn-primary btn-block"
  14.                href="{{ seoUrl('frontend.detail.page', { 'productId': product.id }) }}"
  15.                title="{{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}"
  16.                aria-label="{{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}">
  17.                 {{ 'customizedProducts.stepByStep.navigation.btnConfigureProduct'|trans|striptags }}
  18.             </a>
  19.         {% endif %}
  20.     {% else %}
  21.         {{ parent() }}
  22.     {% endif %}
  23. {% endblock %}
  24. {% block buy_widget_buy_form_action %}
  25.     {% apply spaceless %}
  26.         {% if customizedProductsTemplate and customizedProductsTemplate.active and customizedProductsTemplate.options|length %}
  27.             {{ path('frontend.checkout.customized-products.add') }}
  28.         {% else %}
  29.             {{ parent() }}
  30.         {% endif %}
  31.     {% endapply %}
  32. {% endblock %}
  33. {% block buy_widget_buy_form_inner_csrf %}
  34.     {% if customizedProductsTemplate and customizedProductsTemplate.active and customizedProductsTemplate.options|length %}
  35.         {{ sw_csrf('frontend.checkout.customized-products.add') }}
  36.     {% else %}
  37.         {{ parent() }}
  38.     {% endif %}
  39. {% endblock %}