custom/plugins/theme/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_stylesheets %}
  3.     {{ parent() }}
  4. {% endblock %}
  5. {% block base_body %}
  6.     {# PayOne does not set controllerName and controllerAction -> fix that for easier styling #}
  7.     {% if activeRoute starts with 'frontend.account.payone.card' %}
  8.         {% set controllerName = 'payone' %}
  9.         {% set controllerAction = activeRoute|split('.')|last %}
  10.     {% endif %}
  11.     {% if activeRoute starts with 'frontend.beefclub.membership' %}
  12.         {% set controllerName = 'accountprofile' %}
  13.         {% set controllerAction = activeRoute|split('.')|last %}
  14.     {% endif %}
  15.     {% set doncarneConfig = config("DonCarneTheme.config") %}
  16.     {{ parent() }}
  17. {% endblock %}
  18. {% block base_header_inner %}
  19.     {% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' %}
  20.     {{ parent() }}
  21. {% endblock %}
  22. {% block base_footer %}
  23.     {% sw_include '@Storefront/solution360/newsletter.html.twig' %}
  24.     {{ parent() }}
  25. {% endblock %}
  26. {% block base_offcanvas_navigation %}
  27.     {% if page.header.navigation %}
  28.         {# always start with is root #}
  29.         <div class="d-none js-navigation-offcanvas-initial-content is-root">
  30.             {% block base_offcanvas_navigation_inner %}
  31.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/navigation.html.twig' with { navigation: page.header.navigation } %}
  32.             {% endblock %}
  33.         </div>
  34.     {% endif %}
  35. {% endblock %}
  36. {% block base_script_hmr_mode %}
  37.     {{ parent() }}
  38.     {# Custom CSS - Nach allen anderen Styles laden #}
  39.     <style>
  40.         /* Wishlist Button transparent machen */
  41.         .product-wishlist.wishlist-inline .product-wishlist-action-circle {
  42.             background-color: transparent !important;
  43.         }
  44.         .product-wishlist.wishlist-inline .product-wishlist-action-circle:hover,
  45.         .product-wishlist.wishlist-inline .product-wishlist-action-circle:focus,
  46.         .product-wishlist.wishlist-inline .product-wishlist-action-circle:active {
  47.             background-color: transparent !important;
  48.         }
  49.         .product-wishlist.wishlist-inline .product-card__wishlist-btn {
  50.             background-color: transparent !important;
  51.             border: none !important;
  52.         }
  53.         .product-wishlist.wishlist-inline .product-wishlist-btn {
  54.             background-color: transparent !important;
  55.             border: none !important;
  56.         }
  57.         /* ====================================================================== */
  58.         /* PRODUKTKARTEN: PREIS UND BOOKMARK AM UNTEREN RAND FIXIEREN */
  59.         /* ====================================================================== */
  60.         /* Listing-Row als Flexbox-Container */
  61.         .cms-element-product-listing .cms-listing-row,
  62.         .cms-listing-row {
  63.             display: flex !important;
  64.             flex-wrap: wrap !important;
  65.         }
  66.         /* Listing-Spalte (Grid-Container) auf volle Höhe */
  67.         .cms-listing-col {
  68.             display: flex !important;
  69.             flex-direction: column !important;
  70.         }
  71.         /* Product-Box (ist gleichzeitig .card) auf volle Höhe der Spalte */
  72.         .product-box.card {
  73.             display: flex !important;
  74.             flex-direction: column !important;
  75.             height: 100% !important;
  76.         }
  77.         /* Produkt-Bild: Feste Höhe, nicht mitwachsen lassen */
  78.         .product-box.card .product-image-wrapper,
  79.         .product-box.card .card-img-top {
  80.             flex-shrink: 0 !important;
  81.             flex-grow: 0 !important;
  82.         }
  83.         /* Mobile Zweispalten-Ansicht: Bilder auf 181px Höhe setzen (überschreibt all.css 140px) */
  84.         @media (max-width: 767.98px) {
  85.             html.mobile-two-column-view .cms-listing-col .product-box .product-image,
  86.             html.mobile-two-column-view .cms-listing-col .product-box .product-image.is-standard {
  87.                 height: 181px !important;
  88.                 object-fit: cover !important;
  89.             }
  90.         }
  91.         /* Card-Body innerhalb Product-Box auf volle Höhe setzen und als Flex-Container */
  92.         .product-box.card > .card-body {
  93.             display: flex !important;
  94.             flex-direction: column !important;
  95.             height: 100% !important;
  96.             flex: 1 !important;
  97.         }
  98.         /* Product-Info innerhalb Product-Box als Flex-Container mit voller Höhe */
  99.         .product-box.card .product-info {
  100.             display: flex !important;
  101.             flex-direction: column !important;
  102.             flex: 1 !important;
  103.             height: 100% !important;
  104.         }
  105.         /* Preis-Wishlist-Wrapper am unteren Rand fixieren */
  106.         .product-box.card .product-price-wishlist-wrapper {
  107.             margin-top: auto !important;
  108.             padding-bottom: 0 !important;
  109.         }
  110.         /* Preis: 10px Abstand zum unteren Rand */
  111.         .product-box.card .product-price-wishlist-wrapper .product-price-wrapper {
  112.             padding-bottom: 10px !important;
  113.         }
  114.         /* Bookmark: 15px Abstand zum unteren Rand */
  115.         .product-box.card .product-price-wishlist-wrapper .product-wishlist.wishlist-inline {
  116.             padding-bottom: 15px !important;
  117.         }
  118.         .product-card__wishlist-btn {
  119.             bottom: 15px;
  120.         }
  121.         /* ====================================================================== */
  122.         /* USP-LISTING: EINHEITLICHE HÖHE */
  123.         /* ====================================================================== */
  124.         /* USP-Listing auf einheitliche min-height setzen, damit alle Karten gleich hoch sind */
  125.         @media (min-width: 992px) {
  126.             .product-detail__usps-listing {
  127.                 min-height: 96px !important;
  128.             }
  129.         }
  130.         .payment-method-label .payment-method-description, .payment-method-label .shipping-method-description, .shipping-method-label .payment-method-description, .shipping-method-label .shipping-method-description {
  131.             width: 75%;
  132.         }
  133.         /* ====================================================================== */
  134.         /* CHECKOUT: PSEUDO-BUTTON-LOOK FÜR ZAHLUNGS- UND VERSANDARTEN */
  135.         /* ====================================================================== */
  136.         .payment-method,
  137.         .shipping-method {
  138.             margin-bottom: 12px;
  139.         }
  140.         .payment-method .payment-form-group,
  141.         .shipping-method .shipping-form-group {
  142.             margin-bottom: 0;
  143.         }
  144.         .payment-method .payment-method-radio,
  145.         .shipping-method .shipping-method-radio {
  146.             border-radius: 8px;
  147.             padding: 16px;
  148.             background-color: #e8e8e8;
  149.             border: 2px solid transparent;
  150.             transition: all 0.2s ease-in-out;
  151.             cursor: pointer;
  152.         }
  153.         /* Radio Button Position korrigieren */
  154.         .payment-method .payment-method-radio input[type="radio"],
  155.         .shipping-method .shipping-method-radio input[type="radio"] {
  156.             left: 0rem !important;
  157.             margin-right: 0.5rem;
  158.         }
  159.         .payment-method .payment-method-radio:hover,
  160.         .shipping-method .shipping-method-radio:hover {
  161.             background-color: #dcdcdc;
  162.             border-color: #c2ba9c;
  163.         }
  164.         /* Aktive/ausgewählte Option - Hintergrund */
  165.         .payment-method .payment-method-radio:has(input[type="radio"]:checked),
  166.         .shipping-method .shipping-method-radio:has(input[type="radio"]:checked) {
  167.             background-color: #f0ede4;
  168.             border-color: #A89968;
  169.         }
  170.         .payment-method .payment-method-radio:has(input[type="radio"]:checked):hover,
  171.         .shipping-method .shipping-method-radio:has(input[type="radio"]:checked):hover {
  172.             background-color: #ebe7db;
  173.         }
  174.         /* Aktive Option - Goldene Farbe für Titel */
  175.         .payment-method .payment-method-radio input[type="radio"]:checked ~ label .payment-method-description strong,
  176.         .shipping-method .shipping-method-radio input[type="radio"]:checked ~ label .shipping-method-description strong {
  177.             color: #A89968;
  178.         }
  179.         .payment-method .payment-method-label,
  180.         .shipping-method .shipping-method-label {
  181.             cursor: pointer;
  182.             margin-bottom: 0;
  183.             width: 100%;
  184.         }
  185.         .payment-method .payment-method-description strong,
  186.         .shipping-method .shipping-method-description strong {
  187.             transition: color 0.2s ease-in-out;
  188.         }
  189.         /* Logos wieder an die richtige Position */
  190.         .payment-method-image,
  191.         .shipping-method-image {
  192.             margin-right: 0.75rem;
  193.         }
  194.         /* "Termin wählen" Button verbessern */
  195.         .delivery-calendar-toggle {
  196.             display: inline-flex !important;
  197.             align-items: center !important;
  198.             gap: 6px !important;
  199.             padding: 6px 12px !important;
  200.             border: 1px solid #A89968 !important;
  201.             border-radius: 6px !important;
  202.             background: #f0ede4 !important;
  203.             text-decoration: none !important;
  204.             color: #A89968 !important;
  205.             font-size: 13px !important;
  206.             font-weight: 600 !important;
  207.             cursor: pointer !important;
  208.             transition: all 0.2s ease !important;
  209.             flex-shrink: 0 !important;
  210.             white-space: nowrap !important;
  211.             margin-top: 6px !important;
  212.         }
  213.         .delivery-calendar-toggle:hover {
  214.             background: #A89968 !important;
  215.             color: #282828 !important;
  216.             border-color: #A89968 !important;
  217.             text-decoration: none !important;
  218.             transform: translateY(-1px);
  219.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  220.         }
  221.         .delivery-calendar-toggle span:first-child {
  222.             font-size: 16px !important;
  223.             line-height: 1 !important;
  224.         }
  225.     </style>
  226.     {# Accessibility Fixes #}
  227.     {% sw_include '@Storefront/storefront/layout/header/accessibility-fix.html.twig' %}
  228.     {# Customer Group Information #}
  229.     {% if page.extensions.customerGroupInfo is defined %}
  230.         {% set customerGroupData = page.extensions.customerGroupInfo.all() %}
  231.         <div id="customerGroupInfo"
  232.              class="d-none"
  233.              data-customer-group-id="{{ customerGroupData.id|default('')|e('html_attr') }}"
  234.              data-customer-group-name="{{ customerGroupData.name|default('')|e('html_attr') }}"
  235.              data-is-logged-in="{{ customerGroupData.isLoggedIn|default(false) ? 'true' : 'false' }}">
  236.         </div>
  237.         <script>
  238.             (function() {
  239.                 var customerGroupInfo = document.getElementById('customerGroupInfo');
  240.                 if (customerGroupInfo) {
  241.                     window.customerGroupInfo = {
  242.                         id: customerGroupInfo.getAttribute('data-customer-group-id'),
  243.                         name: customerGroupInfo.getAttribute('data-customer-group-name'),
  244.                         isLoggedIn: customerGroupInfo.getAttribute('data-is-logged-in') === 'true'
  245.                     };
  246.                     // Setze Cookie mit Kundengruppen-Information
  247.                     if (window.customerGroupInfo.isLoggedIn && window.customerGroupInfo.id) {
  248.                         document.cookie = 'customer_group_id=' + window.customerGroupInfo.id + '; path=/; Secure; SameSite=Lax';
  249.                         document.cookie = 'customer_group_name=' + encodeURIComponent(window.customerGroupInfo.name) + '; path=/; Secure; SameSite=Lax';
  250.                     } else {
  251.                         // Lösche Cookies wenn nicht eingeloggt
  252.                         document.cookie = 'customer_group_id=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC; Secure; SameSite=Lax';
  253.                         document.cookie = 'customer_group_name=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC; Secure; SameSite=Lax';
  254.                     }
  255.                 }
  256.             })();
  257.         </script>
  258.     {% endif %}
  259.     {# SCG Shopping Cart Goals - Flyout Fix #}
  260.     <script>
  261.     {% verbatim %}
  262.         (function() {
  263.             // Warte bis PluginManager verfügbar ist
  264.             if (!window.PluginManager) {
  265.                 document.addEventListener('DOMContentLoaded', initSCGFix);
  266.                 return;
  267.             }
  268.             initSCGFix();
  269.             function initSCGFix() {
  270.                 // SCG Plugin mit Selector registrieren
  271.                 setTimeout(function() {
  272.                     if (window.PluginManager.getPlugin('SCGPlugin')) {
  273.                         const SCGPluginClass = window.PluginManager.getPlugin('SCGPlugin').get('class');
  274.                         // Override mit Selector
  275.                         window.PluginManager.deregister('SCGPlugin');
  276.                         window.PluginManager.register('SCGPlugin', SCGPluginClass, '[data-scg-plugin]');
  277.                         // Initialisiere auf allen vorhandenen Elementen
  278.                         document.querySelectorAll('[data-scg-plugin]').forEach(function(el) {
  279.                             window.PluginManager.initializePlugin('SCGPlugin', el);
  280.                         });
  281.                     }
  282.                 }, 100);
  283.                 // Observer für dynamisch geladene SCG-Elemente
  284.                 const observer = new MutationObserver(function(mutations) {
  285.                     mutations.forEach(function(mutation) {
  286.                         mutation.addedNodes.forEach(function(node) {
  287.                             if (node.nodeType === 1) {
  288.                                 // Prüfe ob Node selbst data-scg-plugin hat
  289.                                 if (node.getAttribute && node.getAttribute('data-scg-plugin') !== null) {
  290.                                     setTimeout(function() {
  291.                                         if (window.PluginManager.getPlugin('SCGPlugin')) {
  292.                                             window.PluginManager.initializePlugin('SCGPlugin', node);
  293.                                         }
  294.                                     }, 50);
  295.                                 }
  296.                                 // Prüfe ob Kind-Elemente data-scg-plugin haben
  297.                                 else if (node.querySelectorAll) {
  298.                                     const scgElements = node.querySelectorAll('[data-scg-plugin]');
  299.                                     if (scgElements.length > 0) {
  300.                                         setTimeout(function() {
  301.                                             scgElements.forEach(function(el) {
  302.                                                 if (window.PluginManager.getPlugin('SCGPlugin')) {
  303.                                                     window.PluginManager.initializePlugin('SCGPlugin', el);
  304.                                                 }
  305.                                             });
  306.                                         }, 50);
  307.                                     }
  308.                                 }
  309.                             }
  310.                         });
  311.                     });
  312.                 });
  313.                 // Beobachte Body für Änderungen
  314.                 observer.observe(document.body, {
  315.                     childList: true,
  316.                     subtree: true
  317.                 });
  318.             }
  319.         })();
  320.     {% endverbatim %}
  321.     </script>
  322. {% endblock %}