custom/plugins/ProcDisableCheckout/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. {% block buy_widget_buy_redirect_input %}
  3.     {% if context.customer %}
  4.         {# fallback redirect back to detail page is deactivated via js #}
  5.         <input type="hidden"
  6.                name="redirectTo"
  7.                value="frontend.detail.page">
  8.         <input type="hidden"
  9.                name="redirectParameters"
  10.                data-redirect-parameters="true"
  11.                value='{"productId": "{{ product.id }}"}'>
  12.     {% endif %}
  13. {% endblock %}
  14. {% block buy_widget_buy_product_buy_info %}
  15.     {% if context.customer %}
  16.         <input type="hidden"
  17.                name="lineItems[{{ product.id }}][id]"
  18.                value="{{ product.id }}">
  19.         <input type="hidden"
  20.                name="lineItems[{{ product.id }}][type]"
  21.                value="product">
  22.         <input type="hidden"
  23.                name="lineItems[{{ product.id }}][referencedId]"
  24.                value="{{ product.id }}">
  25.         <input type="hidden"
  26.                name="lineItems[{{ product.id }}][stackable]"
  27.                value="1">
  28.         <input type="hidden"
  29.                name="lineItems[{{ product.id }}][removable]"
  30.                value="1">
  31.         <input type="hidden"
  32.                name="lineItems[{{ product.id }}][unitPrice]"
  33.                value="{{ page.product.calculatedPrice.unitPrice }}">
  34.     {% endif %}
  35. {% endblock %}
  36. {% block buy_widget_product_buy_meta %}
  37.     {% if context.customer %}
  38.         <input type="hidden"
  39.                name="product-name"
  40.                value="{{ product.translated.name }}">
  41.         <input type="hidden"
  42.                name="brand-name"
  43.                value="{{ product.manufacturer.getName() }}">
  44.     {% endif %}
  45. {% endblock %}
  46. {% block buy_widget_buy_button %}
  47.     {% if context.customer %}
  48.         <button class="btn btn-primary btn-block btn-buy"
  49.                 title="{{ "detail.addProduct"|trans|striptags }}"
  50.                 aria-label="{{ "detail.addProduct"|trans|striptags }}">
  51.             {{ "detail.addProduct"|trans|sw_sanitize }}
  52.         </button>
  53.     {% elseif config('ProclaneWegmannTheme.config.activateContactForm') and config('ProclaneWegmannTheme.config.selectedCategoriesForContactForm') %}
  54.         {% set contactFormCategory = config('ProclaneWegmannTheme.config.selectedCategoriesForContactForm') %}
  55.         {% set productName = product.translated.name %}
  56.         {% set productNumber = product.productNumber %}
  57.         <a href="{{ seoUrl('frontend.navigation.page', { navigationId: contactFormCategory, 'productName': productName, 'productNumber': productNumber }) }}" title="" class="btn btn-primary btn-block btn-buy">
  58.             {{ "proclane-wegmann-theme.contactFormOnPDP"|trans|sw_sanitize }}
  59.         </a>
  60.     {% else %}        
  61.         <a href="{{ path('frontend.account.login.page') }}" title="{{ "detail.addProductGuest"|trans|striptags }}" class="btn btn-primary btn-block btn-buy">
  62.             {{ "detail.addProductGuest"|trans|striptags }}
  63.         </a>
  64.     {% endif %}
  65. {% endblock %}