{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}{% block page_product_detail_buy_container %} <script> console.log("EasyCredit Ratenkauf: Buy widget form loaded"); document.addEventListener("DOMContentLoaded", () => { const observer = new MutationObserver(() => { const easyCreditBtn = document.querySelector("easycredit-express-button"); console.log(easyCreditBtn); if (!easyCreditBtn || !easyCreditBtn.shadowRoot) return; console.log("EasyCredit Ratenkauf: Shadow DOM found"); const longText = easyCreditBtn.shadowRoot.querySelector(".long"); const shortText = easyCreditBtn.shadowRoot.querySelector(".short"); if (longText && shortText) { console.log("applying styles"); longText.style.fontSize = "8pt"; shortText.style.fontSize = "8pt"; observer.disconnect(); // Stop observing once applied } }); observer.observe(document.body, { childList: true, subtree: true }); }); </script> <div itemprop="offers" class="detail-offers" itemscope itemtype="{% if page.product.calculatedPrices|length > 1 %}http://schema.org/AggregateOffer{% else %}http://schema.org/Offer{% endif %}"> {% block page_product_detail_data %} {% block page_product_detail_data_rich_snippet_url %} {{ parent() }} {% endblock %} {% block page_product_detail_data_rich_snippet_price_range %} {{ parent() }} {% endblock %} {% block page_product_detail_data_rich_snippet_price_currency %} {{ parent() }} {% endblock %} {% set remoteClickOptions = { selector: "#review-tab", scrollToElement: true } %} {% block page_product_detail_reviews %} {{ parent() }} {% endblock %} {% endblock %} {% block page_product_detail_configurator_include %} {% endblock %} {% block page_product_detail_price %} {{ parent() }} {% endblock %} {% block page_product_detail_tax %} <div class="product-detail-tax-container"> {% if context.taxState == "gross" %} {% if page.product.calculatedPrice.totalPrice >= 20 %} {% set taxText = "general.grossTaxInformationFree"|trans|sw_sanitize %} {% else %} {% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %} {% endif %} {% else %} {% if page.product.calculatedPrice.totalPrice >= 20 %} {% set taxText = "general.netTaxInformationFree"|trans|sw_sanitize %} {% else %} {% set taxText = "general.netTaxInformation"|trans|sw_sanitize %} {% endif %} {% endif %} <p class="product-detail-tax"> {% block page_product_detail_tax_link %} <a class="product-detail-tax-link" href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}" title="{{ taxText }}" data-toggle="modal" data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"> {{ taxText }} </a> {% endblock %} </p> </div> {% endblock %} {% block page_product_detail_delivery_informations %} <div class="product-detail-delivery-information"> <div class="product-detail-delivery-information__free"> {% sw_icon 'check_circle' style {'pack':'default', 'size': 'md'} %} {% if page.product.calculatedPrice.totalPrice >= 20 %} <span>{{ 'productDetailDelivery.Shipping'|trans|sw_sanitize }}</span> {% else %} <span>{{ 'productDetailDelivery.freeShipping'|trans|sw_sanitize }}</span> {% endif %} </div> <div class="product-detail-delivery-information__shipping {% if page.product.availableStock > 0 %} product-detail-delivery-information__shipping--available{% endif %}"> {% sw_icon 'delivery' style {'pack':'default', 'size': 'md'} %} {% if page.product.availableStock > 0 %} <div class="label">{{ 'productDetailDelivery.delivery'|trans|sw_sanitize }}</div> {% else %} <div class="label">{{ 'productDetailDelivery.nodelivery'|trans|sw_sanitize }}</div> {% endif %} </div> <div class="product-detail-delivery-information__time"> {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %} </div> </div> {% endblock %} {% if page.product.parentId and page.configuratorSettings|length > 0 %} <div class="product-detail-configurator-container"> {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %} </div> {% endif %} {{ parent() }} {% sw_include '@Storefront/storefront/component/wishlist/add_wishlist_modal/add-button.html.twig' ignore missing with {productId: page.product.id } %} </div>{% endblock %}{% block page_product_detail_ordernumber_container %} {# remove #}{% endblock %}