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