{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
{% block page_product_detail_buy_form_inner %}
{# @var page \Shopware\Storefront\Page\Product\ProductPage #}
{# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
{% set product = page.product %}
<form
id="productDetailPageBuyProductForm"
class="show-form-loader show-form-loader-buy-btn"
action="{% block page_product_detail_buy_form_action %}{{ path('frontend.checkout.line-item.add') }}{% endblock %}"
method="post"
data-add-to-cart="true"
class="buy-widget">
{% block page_product_detail_buy_form_inner_csrf %}
{{ sw_csrf('frontend.checkout.line-item.add') }}
{% endblock %}
{% set buyable = product.available and product.childCount <= 0 and product.calculatedMaxPurchase > 0 %}
{% block page_product_detail_buy_container %}
{% if buyable %}
<div class="{{ formRowClass }} buy-widget-container">
{% block page_product_detail_buy_quantity_container %}
{# show quantity only if request only false #}
{% endblock %}
{% block page_product_detail_buy_redirect_input %}
{# fallback redirect back to detail page is deactivated via js #}
<input type="hidden"
name="redirectTo"
value="frontend.detail.page">
<input type="hidden"
name="redirectParameters"
data-redirect-parameters="true"
value='{"productId": "{{ product.id }}"}'>
{% endblock %}
{% block page_product_detail_buy_product_buy_info %}
<input type="hidden"
name="lineItems[{{ product.id }}][id]"
value="{{ product.id }}">
<input type="hidden"
name="lineItems[{{ product.id }}][type]"
value="product">
<input type="hidden"
name="lineItems[{{ product.id }}][referencedId]"
value="{{ product.id }}">
<input type="hidden"
name="lineItems[{{ product.id }}][stackable]"
value="1">
<input type="hidden"
name="lineItems[{{ product.id }}][removable]"
value="1">
{% endblock %}
{% block page_product_detail_product_buy_meta %}
<input type="hidden"
name="product-name"
value="{{ product.translated.name }}">
<input type="hidden"
name="brand-name"
value="{{ product.manufacturer.getName() }}">
{% endblock %}
{% block page_product_detail_buy_button_container %}
{% block page_product_detail_price %}
{% set requestOnly = product.translated.customFields.grimm_customfields_productRequest_only %}
{% if requestOnly %}
{# SD:4986 #}
{% set showUVP = product.translated.customFields.grimm_customfields_productRequest_showUVP %}
{% if showUVP %}
{% sw_include '@Storefront/solution360/grimm/product/request-only-uvp-display.html.twig' %}
{% else %}
<div class="product-detail-price-container">
<p class="product-detail-price">{{ "product.price.priceUponRequest"|trans|sw_sanitize }}</p>
</div>
{% endif %}
{% else %}
<div class="product-detail__discount-info w-100">
{% sw_include '@Storefront/storefront/component/product/card/price-uvp.html.twig' %}
{% sw_include '@Storefront/storefront/component/product/card/price-discount-amount.html.twig' %}
</div>
<div class="product-detail-price-container row mx-0 col-6 col-md-auto order-1">
{% sw_include '@Storefront/storefront/component/product/card/price-taxes.html.twig' %}
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
{% if page.product.purchaseSteps > 1%}
<span class="grm-price-per-unit" style="font-size: 12px; font-weight: 300;">, Preis pro Stück</span>
{% endif %}
</div>
{% endif %}
{% sw_include '@Storefront/storefront/component/product/price-unit-info.html.twig' with { 'product': page.product } %}
{# show if business customer and > 500 #}
{# Moved to Index #}
{# {% set requestOnly = product.translated.customFields.grimm_customfields_productRequest_only %}
{% if (product.calculatedPrice.unitPrice >= 500) and (context.taxState == "net") and (requestOnly == false) %}
{% sw_include '@Storefront/solution360/grimm/leasing/leasing-modal.html.twig'
with {
'price': product.calculatedPrice.unitPrice
}
%}
{% endif %} #}
{% endblock %}
{% block page_product_detail_buy_button %}
{# SD-4986 #}
{% if product.translated.customFields.grimm_customfields_productRequest_only %}
<button class="order-md-2 order-4 col-auto btn btn-request btn-primary font-weight-bold" title="{{ 'detail.requestProduct'|trans|sw_sanitize }}">
{{ "detail.requestProduct"|trans|sw_sanitize }}
</button>
{% else %}
<button class="order-md-2 order-4 col-auto btn btn-block btn-buy font-weight-bold justify-content-center">
<span class="d-sm-inline mr-3">in den Warenkorb</span>
{% sw_icon 'warenkorb' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'sm'} %}
</button>
{% endif %}
{% endblock %}
{% if product.translated.customFields.grimm_customfields_productRequest_only == false %}
{% block page_product_detail_buy_quantity %}
{% set counterPluginConfig = {
'minPurchase': product.minPurchase ? product.minPurchase : 1,
'maxPurchase': product.maxPurchase ? product.maxPurchase : 100,
'purchaseSteps': product.purchaseSteps ? product.purchaseSteps : 1
} %}
<div class="order-2 order-md-3 col-6 col-md-auto product-counter d-flex align-items-center" data-counter-plugin data-counter-plugin-options="{{ counterPluginConfig|json_encode }}">
<span class="d-none d-md-inline d-lg-none d-xl-inline product-detail__counter-label">{{ "detail.dataColumnQuantity"|trans|sw_sanitize }}</span>
<button type="button" class="product-counter__field product-counter__btn product-counter__btn--decrease disabled">-</button>
<input type="number"
value="{{ product.minPurchase }}"
min="{{ product.minPurchase }}"
max="{{ product.maxPurchase }}"
name="lineItems[{{ product.id }}][quantity]"
class="product-counter__field product-counter__amount"/>
<button type="button" class="product-counter__field product-counter__btn product-counter__btn--increase{% if product.translated.customFields.grimm_customfields_productRequest_only %} disabled{% endif %}" {% if product.translated.customFields.grimm_customfields_productRequest_only %}disabled{% endif %}>+</button>
</div>
{% endblock %}
{% endif %}
<ul class="order-4 d-none d-md-block product-detail__tools no-print col-auto">
{% if config('ShopmProductComparison') %}
<li>
{% sw_include '@Storefront/storefront/component/product/card/compare-button.html.twig' with {
navigationTree: page.header.navigation.tree,
categoryTree: page.product.categoryTree|last,
product: page.product
} only %}
</li>
{% endif %}
{# <li id="share">
<button type="button" class="share-btn">{% sw_include '@Storefront/solution360/grimm/product/sharing.html.twig' %}</button>
</li> #}
<li>
{% if config('core.cart.wishlistEnabled') %}
{% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
showText: false,
productId: page.product.id
} %}
{% endif %}
</li>
</ul>
<div class="order-3 product-detail__guarantee-delivery-container row d-flex d-md-none">
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
<span class="product-detail_guarantee-information">
{# {% sw_icon 'garantie' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %} #}
{{ "product.freeDelivery"|trans|sw_sanitize }}
</span>
</div>
{# {% sw_include '@Storefront/storefront/page/product-detail/delivery-info.html.twig' %} #}
</div>
{% if product.translated.customFields.grimm_customFields_guarantee %}
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
<span class="product-detail_guarantee-information">
{# {% sw_icon 'garantie' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %} #}
{{ product.translated.customFields.grimm_customFields_guarantee }}
</span>
</div>
</div>
{% endif %}
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
{# <span class="product-detail-delivery-information"> #}
{% sw_include '@Storefront/storefront/component/product/card/product-delivery-info.html.twig' %}
{# </span> #}
</div>
</div>
</div>
{% endblock %}
</div>
<div class="product-detail__guarantee-delivery-container row d-none d-md-flex">
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
<span class="product-detail_guarantee-information">
{# {% sw_icon 'garantie' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %} #}
{{ "product.freeDelivery"|trans|sw_sanitize }}
</span>
</div>
{# {% sw_include '@Storefront/storefront/page/product-detail/delivery-info.html.twig' %} #}
</div>
{% if product.translated.customFields.grimm_customFields_guarantee %}
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
<span class="product-detail_guarantee-information">
{# {% sw_icon 'garantie' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %} #}
{{ product.translated.customFields.grimm_customFields_guarantee }}
</span>
</div>
</div>
{% endif %}
<div class="col-md-4 text-center text-md-left my-1">
<div class="">
{# <span class="product-detail-delivery-information"> #}
{% sw_include '@Storefront/storefront/component/product/card/product-delivery-info.html.twig' %}
{# </span> #}
</div>
</div>
</div>
{% sw_include '@Storefront/storefront/component/buy-widget/buy-widget-form-customized-products.html.twig' %}
{% endif %}
{% endblock %}
</form>
{% endblock %}