{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %} {# ThemeWare: Buy widget component on cms product page #} {# INFO: Please note this is also available as "page/product-detail/buy-widget.html.twig" since SW6.4 #} {# ---------------- START: SET TEMPLATE VARS ---------------- #} {# ThemeWare: Set theme variables #} {% set twtProductDetailAvailablestockShow = theme_config('twt-product-detail-availablestock-show') %} {% set twtProductDetailEanShow = theme_config('twt-product-detail-ean-show') %} {% set twtProductDetailHeightShow = theme_config('twt-product-detail-height-show') %} {% set twtProductDetailLengthShow = theme_config('twt-product-detail-length-show') %} {% set twtProductDetailManufacturerShow = theme_config('twt-product-detail-manufacturer-show') %} {% set twtProductDetailManufacturernumberShow = theme_config('twt-product-detail-manufacturernumber-show') %} {% set twtProductDetailMaxpurchaseShow = theme_config('twt-product-detail-maxpurchase-show') %} {% set twtProductDetailMinpurchaseShow = theme_config('twt-product-detail-minpurchase-show') %} {% set twtProductDetailPaymentLogosShow = theme_config('twt-product-detail-payment-logos-show') %} {% set twtProductDetailPaymentLogosPosition = theme_config('twt-product-detail-payment-logos-position') %} {% set twtProductDetailSharingLinksShow = theme_config('twt-product-detail-sharing-links-show') %} {% set twtProductDetailWeightShow = theme_config('twt-product-detail-weight-show') %} {% set twtProductDetailWidthShow = theme_config('twt-product-detail-width-show') %} {# ---------------- END: SET TEMPLATE VARS ---------------- #} {# ThemeWare: Adjustments on ordernumber container #} {# TODO: Use includes... #} {% block buy_widget_ordernumber_container %} {# ThemeWare: Add payment logos to buy-widget #} {% if twtProductDetailPaymentLogosShow == 2 and twtProductDetailPaymentLogosPosition == 1 %} {% sw_include '@Storefront/storefront/themeware/twt-product-detail-payment-logos.html.twig' ignore missing with { type: 'buy-widget', position: 'top' } %} {% endif %} {# Default block #} {{ parent() }} {# ThemeWare: Product specifications in buy-widget #} {% sw_include '@Storefront/storefront/themeware/twt-product-detail-specifications.html.twig' ignore missing with { type: 'buy-widget' } %} {% endblock %} {% block buy_widget %} {# Default block #} {{ parent() }} {# ThemeWare: Add payment logos to buy-widget #} {% if twtProductDetailPaymentLogosShow == 2 and twtProductDetailPaymentLogosPosition == 2 %} {% sw_include '@Storefront/storefront/themeware/twt-product-detail-payment-logos.html.twig' ignore missing with { type: 'buy-widget', position: 'bottom' } %} {% endif %} {# ThemeWare: Add sharing links to buy-widget #} {% if twtProductDetailSharingLinksShow == 2 %} {% sw_include '@Storefront/storefront/themeware/twt-sharing-links.html.twig' ignore missing with { type: 'buy-widget' } %} {% endif %} {% endblock %}