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.         <input type="hidden"
  35.                name="lineItems[{{ product.id }}][listPrice]"
  36.                value="{{ page.product.calculatedPrice.listPrice.price }}">
  37.     {% endif %}
  38. {% endblock %}
  39. {% block buy_widget_product_buy_meta %}
  40.     {% if context.customer %}
  41.         <input type="hidden"
  42.                name="product-name"
  43.                value="{{ product.translated.name }}">
  44.         <input type="hidden"
  45.                name="brand-name"
  46.                value="{{ product.manufacturer.getName() }}">
  47.     {% endif %}
  48. {% endblock %}
  49. {% block buy_widget_buy_button %}
  50.     {% if context.customer %}
  51.         <button class="btn btn-primary btn-block btn-buy"
  52.                 title="{{ "detail.addProduct"|trans|striptags }}"
  53.                 aria-label="{{ "detail.addProduct"|trans|striptags }}">
  54.             {{ "detail.addProduct"|trans|sw_sanitize }}
  55.         </button>
  56.     {% else %}
  57.         <a href="{{ path('frontend.account.login.page') }}" title="{{ "detail.addProductGuest"|trans|striptags }}" class="btn btn-primary btn-block btn-buy">
  58.             {{ "detail.addProductGuest"|trans|striptags }}
  59.         </a>
  60.     {% endif %}
  61. {% endblock %}