custom/apps/zenitAppFloatingBuybox/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  2. {# ... add floatingBuyboxId to make form-id unique #}
  3. {% block page_product_detail_buy_form_inner %}
  4.     {# @var page \Shopware\Storefront\Page\Product\ProductPage #}
  5.     {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  6.     {% set product = page.product %}
  7.     <form
  8.         id="productDetailPageBuyProductForm{{ floatingBuyboxId }}"
  9.         action="{{ block('page_product_detail_buy_form_action') }}"
  10.         method="post"
  11.         class="buy-widget"
  12.         data-add-to-cart="true">
  13.         {{ block('page_product_detail_buy_form_inner_csrf') }}
  14.         {% set DOWNLOAD_STATE = constant('Shopware\\Core\\Content\\Product\\State::IS_DOWNLOAD') %}
  15.         {% set showQuantitySelect = not product.states is defined or DOWNLOAD_STATE not in product.states or (DOWNLOAD_STATE in product.states and product.maxPurchase !== 1) %}
  16.         {% set buyable = product.available and product.childCount <= 0 and product.calculatedMaxPurchase > 0 %}
  17.         {{ block('page_product_detail_buy_container') }}
  18.     </form>
  19. {% endblock %}