{
    "timestamp": "2026-02-04 17:09:14",
    "plugins": [
        "advanced-product-fields-for-woocommerce-pro\/advanced-product-fields-for-woocommerce-pro.php",
        "woocommerce\/woocommerce.php",
        "wp-migrate-db\/wp-migrate-db.php"
    ],
    "bricks_templates": [
        {
            "title": "FAQ",
            "type": "popup",
            "conditions": ""
        },
        {
            "title": "Warenkorb",
            "type": "wc_cart",
            "conditions": ""
        },
        {
            "title": "Fehlerseite",
            "type": "error",
            "conditions": ""
        },
        {
            "title": "Produktarchiv",
            "type": "wc_archive",
            "conditions": ""
        },
        {
            "title": "Vielen Dank",
            "type": "wc_thankyou",
            "conditions": ""
        },
        {
            "title": "Bezahlen",
            "type": "wc_form_pay",
            "conditions": ""
        },
        {
            "title": "leerer Warenkorb",
            "type": "wc_cart_empty",
            "conditions": ""
        },
        {
            "title": "Kasse",
            "type": "wc_form_checkout",
            "conditions": ""
        },
        {
            "title": "Variable Product Shirts & Hoodies",
            "type": "wc_product",
            "conditions": ""
        },
        {
            "title": "Footer",
            "type": "footer",
            "conditions": ""
        },
        {
            "title": "Header",
            "type": "header",
            "conditions": ""
        },
        {
            "title": "Hersteller Drawer",
            "type": "popup",
            "conditions": ""
        },
        {
            "title": "Farbauswahl-Popup",
            "type": "popup",
            "conditions": ""
        }
    ],
    "apf_product_fields": [
        {
            "group_title": "Druckpositionen_Shorts",
            "group_id": 2774,
            "config": ""
        },
        {
            "group_title": "Druckpositionen_Trainingshose",
            "group_id": 2773,
            "config": ""
        },
        {
            "group_title": "Druckpositionen_Gym_Bag",
            "group_id": 2772,
            "config": ""
        },
        {
            "group_title": "Druckpositionen_Teamleader_Bag",
            "group_id": 2771,
            "config": ""
        },
        {
            "group_title": "Druckpositionen_Beltbag",
            "group_id": 2759,
            "config": ""
        },
        {
            "group_title": "Druckpositionen_Shirts",
            "group_id": 20,
            "config": ""
        }
    ],
    "bricks_global_settings": {
        "colors": false,
        "theme_settings": {
            "postTypes": [
                "page"
            ],
            "smoothScroll": true,
            "enableQueryFilters": true,
            "wp_auth_url_behavior": "default",
            "remoteTemplates": [],
            "builderMode": "dark",
            "builderLocale": "site-default",
            "builderToolbarLogoLink": "current",
            "builderResponsiveControlIndicator": "any",
            "enableDynamicDataPreview": true,
            "builderGlobalClassesImport": "conflicts",
            "disableClassChaining": true,
            "executeCodeEnabled": true,
            "customCss": "\/* change scroll offset because I have a sticky header now *\/\r\nhtml {\r\n    scroll-behavior: smooth;\r\n    scroll-padding-top: 130px;\r\n}\r\n\/* adjust scroll offset for mobile header *\/\r\n@media( max-width: 767px){\r\n    html {\r\n        scroll-padding-top: 80px;\r\n    }  \r\n}",
            "customScriptsBodyHeader": "<script>\r\nwindow.farbe_pop_transfer = function(param) {\r\n    \/\/ Falls Bricks das \\'param\\' Objekt \u00fcbergibt, ist \\'param.source\\' das geklickte Element\r\n    const sourceElement = param.source || param.target; \r\n    if (!sourceElement) {\r\n        console.error(\\\"Matrix-Modul: Kein Quell-Element gefunden.\\\");\r\n        return;\r\n    }\r\n\r\n    const textElement = sourceElement.querySelector(\\'.meine-farb-bezeichnung\\');\r\n    const colorName = textElement ? textElement.innerText.trim() : \\\"Unbekannte Farbe\\\";\r\n    \r\n    \/\/ Slug extrahieren\r\n    const colorSlug = sourceElement.getAttribute(\\'data-color-slug\\');\r\n\r\n    if (!colorSlug) {\r\n        console.warn(\\\"Matrix-Modul: Attribut \\'data-color-slug\\' fehlt an der Kachel.\\\");\r\n    }\r\n\r\n    \/\/ 1. In den Parkplatz schreiben\r\n    const storage = document.querySelector(\\'#selected-color-storage\\');\r\n    if (storage) {\r\n        storage.innerText = colorName;\r\n        storage.setAttribute(\\'data-current-color-slug\\', colorSlug || colorName.toLowerCase());\r\n    }\r\n\r\n    \/\/ 2. Bildwechsel\r\n    const variationImg = sourceElement.querySelector(\\'img\\');\r\n    const mainImage = document.querySelector(\\'#main-product-image img\\') || document.querySelector(\\'#main-product-image\\');\r\n    \r\n    if (variationImg && mainImage) {\r\n        mainImage.src = variationImg.src;\r\n        mainImage.srcset = \\'\\'; \r\n    }\r\n\r\n    \/\/ 3. Popup schlie\u00dfen\r\n    if (typeof bricksClosePopup === \\'function\\') {\r\n        bricksClosePopup();\r\n    }\r\n    \r\n    console.log(\\\"Matrix-Modul: Transfer erfolgreich - \\\" + colorSlug);\r\n};\r\n<\/script>",
            "customScriptsBodyFooter": "<script>\r\n(function() {\r\n    const apfPriceMap = {\r\n        \\'b0b0745_5hydq\\': 1712, \\'b0b0745_73tnz\\': 1711, \\'b0b0745_lgv7m\\': 1713, \\'b0b0745_df2j9\\': 1714, \\'b0b0745_t3v0m\\': 1715,\r\n        \\'47cee19_73tnz\\': 2775, \\'f24d35c_73tnz\\': 2778, \\'da7c4fc_73tnz\\': 2780, \\'aafdf3c_73tnz\\': 2781, \\'5cec394_73tnz\\': 2783\r\n    };\r\n\r\n   const apfProductMap = {\r\n    \/\/ Vorhandene Upload-Felder\r\n    \\'wapf[field_e4003bd]\\': 1712, \\'wapf[field_fcfc602]\\': 1711, \\'wapf[field_ba4f2e5]\\': 1715,\r\n    \\'wapf[field_34f80aa]\\': 1714, \\'wapf[field_43a4392]\\': 1713, \\'wapf[field_0ede11f]\\': 1720,\r\n    \\'wapf[field_620307d]\\': 1721, \\'wapf[field_468a9ca]\\': 1716, \\'wapf[field_1af2caf]\\': 1717,\r\n    \\'wapf[field_f5085ee]\\': 1719, \\'wapf[field_c2cd581]\\': 2775, \\'wapf[field_3aff4ec]\\': 2776,\r\n    \\'wapf[field_fcb3adc]\\': 2778, \\'wapf[field_cc363e2]\\': 2777, \\'wapf[field_c4012b3]\\': 2780,\r\n    \\'wapf[field_f4ac266]\\': 2779, \\'wapf[field_cc10078]\\': 2781, \\'wapf[field_1e24564]\\': 2782,\r\n    \\'wapf[field_ee9c7df]\\': 2783, \\'wapf[field_7ea0ca4]\\': 2784,\r\n\r\n    \/\/ Master-Felder (Selektoren), die den Failsafe ausl\u00f6sen\r\n    \\'wapf[field_b0b0745]\\': true, \/\/ Oberbekleidung\r\n    \\'wapf[field_47cee19]\\': true, \/\/ Beltbag\r\n    \\'wapf[field_f24d35c]\\': true, \/\/ Teamleader Bag\r\n    \\'wapf[field_da7c4fc]\\': true, \/\/ Gym Bag\r\n    \\'wapf[field_aafdf3c]\\': true, \/\/ Laufshorts\r\n    \\'wapf[field_5cec394]\\': true  \/\/ Trainingshose\r\n};\r\n\r\n    const selectionSlugs = [\\'5hydq\\', \\'73tnz\\', \\'lgv7m\\', \\'df2j9\\', \\'t3v0m\\'];\r\n\r\n    function initDefaultColor() {\r\n        const storage = document.getElementById(\\'selected-color-storage\\');\r\n        if (storage && !storage.getAttribute(\\'data-current-color-slug\\')) {\r\n            storage.setAttribute(\\'data-current-color-slug\\', \\'black\\');\r\n            storage.setAttribute(\\'data-is-user-selected\\', \\'false\\'); \r\n            storage.innerText = \\'Schwarz\\';\r\n        }\r\n    }\r\n\r\n    function watchColorSelection() {\r\n        const storage = document.getElementById(\\'selected-color-storage\\');\r\n        if (!storage) return;\r\n        const observer = new MutationObserver((mutations) => {\r\n            mutations.forEach((mutation) => {\r\n                if (mutation.type === \\'attributes\\' && mutation.attributeName === \\'data-current-color-slug\\') {\r\n                    storage.setAttribute(\\'data-is-user-selected\\', \\'true\\');\r\n                }\r\n            });\r\n        });\r\n        observer.observe(storage, { attributes: true });\r\n    }\r\n\r\n    function handleMutualExclusion() {\r\n        const swatchSmall = document.querySelector(\\'input[value=\\\"73tnz\\\"]\\'); \r\n        const swatchBig = document.querySelector(\\'input[value=\\\"5hydq\\\"]\\');   \r\n        if (!swatchSmall || !swatchBig) return;\r\n        [swatchSmall, swatchBig].forEach(s => {\r\n            s.disabled = false;\r\n            s.closest(\\'.wapf-swatch\\')?.classList.remove(\\'is-locked\\');\r\n        });\r\n        if (swatchSmall.checked) {\r\n            swatchBig.checked = false; swatchBig.disabled = true;\r\n            swatchBig.closest(\\'.wapf-swatch\\')?.classList.add(\\'is-locked\\');\r\n        } else if (swatchBig.checked) {\r\n            swatchSmall.checked = false; swatchSmall.disabled = true;\r\n            swatchSmall.closest(\\'.wapf-swatch\\')?.classList.add(\\'is-locked\\');\r\n        }\r\n    }\r\n\r\n    function updateLiveTotals() {\r\n        let tSum = 0, tQty = 0, pSum = 0;\r\n        const color = document.getElementById(\\'selected-color-storage\\')?.getAttribute(\\'data-current-color-slug\\') || \\'black\\';\r\n        document.querySelectorAll(\\'input.matrix-quantity-input\\').forEach(i => {\r\n            const q = parseInt(i.value) || 0;\r\n            if (q > 0) {\r\n                tQty += q;\r\n                const s = i.closest(\\'[data-size-slug]\\')?.getAttribute(\\'data-size-slug\\');\r\n                const v = window.productVariations?.find(v => v.attributes[\\'attribute_pa_farbe\\'] === color && v.attributes[\\'attribute_pa_groesse\\'] === s?.toLowerCase());\r\n                if (v) tSum += q * parseFloat(v.display_price);\r\n            }\r\n        });\r\n        document.querySelectorAll(\\'input[name^=\\\"wapf[\\\"]:checked\\').forEach(sw => {\r\n            const fid = sw.getAttribute(\\'data-field-id\\');\r\n            const key = `${fid}_${sw.value}`;\r\n            if (apfPriceMap[key]) {\r\n                const up = window.printingPrices ? (window.printingPrices[apfPriceMap[key]] || 0) : 0;\r\n                pSum += up * tQty;\r\n            }\r\n        });\r\n        const f = (v) => v.toLocaleString(\\'de-DE\\', { style: \\'currency\\', currency: \\'EUR\\' });\r\n        if (document.getElementById(\\'display-textile-sum\\')) document.getElementById(\\'display-textile-sum\\').textContent = f(tSum);\r\n        if (document.getElementById(\\'display-printing-sum\\')) document.getElementById(\\'display-printing-sum\\').textContent = f(pSum);\r\n        if (document.getElementById(\\'display-total-sum\\')) document.getElementById(\\'display-total-sum\\').textContent = f(tSum + pSum);\r\n    }\r\n\r\n    document.addEventListener(\\'change\\', e => {\r\n        if (e.target.name?.startsWith(\\'wapf[\\') || e.target.classList.contains(\\'matrix-quantity-input\\')) {\r\n            handleMutualExclusion(); updateLiveTotals();\r\n        }\r\n    });\r\n\r\n    document.addEventListener(\\'click\\', e => {\r\n        const btn = e.target.closest(\\'#matrix-add-to-cart-button\\');\r\n        if (!btn) return;\r\n\r\n        const storage = document.getElementById(\\'selected-color-storage\\');\r\n        if (storage?.getAttribute(\\'data-is-user-selected\\') !== \\'true\\') {\r\n            e.preventDefault();\r\n            e.stopImmediatePropagation();\r\n            const trigger = document.querySelector(\\'.trigger-color-popup\\') || \r\n                            Array.from(document.querySelectorAll(\\'button, a\\')).find(el => el.textContent.includes(\\'Teamfarbe w\u00e4hlen\\'));\r\n            if (trigger) trigger.click(); else alert(\\'Bitte w\u00e4hlen Sie zuerst eine Teamfarbe aus.\\');\r\n            return;\r\n        }\r\n\r\n        let missingContent = false;\r\n        document.querySelectorAll(\\'[name^=\\\"wapf[\\\"]\\').forEach(el => {\r\n            if (el.offsetParent === null) return;\r\n            \r\n            \/\/ Normalisierung des Namens f\u00fcr den Map-Vergleich (entfernt [])\r\n            const baseName = el.name.replace(\\'[]\\', \\'\\');\r\n            if (!apfProductMap[baseName]) return;\r\n\r\n            const val = el.value ? el.value.trim() : \\\"\\\";\r\n            const isChecked = (el.type === \\'checkbox\\' || el.type === \\'radio\\') ? el.checked : (val !== \\\"\\\" && val !== \\\"0\\\");\r\n\r\n            if (isChecked && (!val || val === \\\"0\\\" || selectionSlugs.includes(val))) {\r\n                missingContent = true;\r\n            }\r\n        });\r\n\r\n        if (missingContent) {\r\n            alert(\\'Bitte laden Sie f\u00fcr alle gew\u00e4hlten Druckpositionen eine Datei hoch.\\');\r\n            e.preventDefault();\r\n            e.stopImmediatePropagation();\r\n            return;\r\n        }\r\n\r\n        e.preventDefault();\r\n        const items = []; let totalQty = 0;\r\n        const color = storage?.getAttribute(\\'data-current-color-slug\\');\r\n        \r\n        document.querySelectorAll(\\'input.matrix-quantity-input\\').forEach(i => {\r\n            const q = parseInt(i.value) || 0;\r\n            if (q > 0) {\r\n                totalQty += q;\r\n                const s = i.closest(\\'[data-size-slug]\\')?.getAttribute(\\'data-size-slug\\').toLowerCase();\r\n                const v = window.productVariations?.find(v => v.attributes[\\'attribute_pa_farbe\\'] === color && v.attributes[\\'attribute_pa_groesse\\'] === s);\r\n                if (v) items.push({ product_id: window.currentProductId, variation_id: v.variation_id, quantity: q, attributes: v.attributes });\r\n            }\r\n        });\r\n\r\n        if (totalQty === 0) return alert(\\'Bitte w\u00e4hlen Sie mindestens eine Menge aus.\\');\r\n\r\n        const processed = new Set();\r\n        document.querySelectorAll(\\'[name^=\\\"wapf[\\\"]\\').forEach(el => {\r\n            if (el.offsetParent === null) return;\r\n            \r\n            const baseName = el.name.replace(\\'[]\\', \\'\\');\r\n            const val = (el.type === \\'checkbox\\' || el.type === \\'radio\\') ? (el.checked ? el.value : \\\"\\\") : (el.value ? el.value.trim() : \\\"\\\");\r\n            \r\n            if (val && val !== \\\"0\\\" && !processed.has(el.name)) {\r\n                let pId = apfProductMap[baseName];\r\n                \r\n                \/\/ Dynamische Produkt-ID Aufl\u00f6sung f\u00fcr Multi-Selektoren (field_b0b0745)\r\n                if (pId === true) {\r\n                    const fieldId = baseName.replace(\\'wapf[field_\\', \\'\\').replace(\\']\\', \\'\\');\r\n                    pId = apfPriceMap[`${fieldId}_${val}`];\r\n                }\r\n\r\n                if (pId) {\r\n                    items.push({ product_id: pId, variation_id: 0, quantity: totalQty, wapf_data: { [el.name]: val } });\r\n                    processed.add(el.name);\r\n                }\r\n            }\r\n        });\r\n\r\n        const fd = new FormData(); \r\n        fd.append(\\'action\\', \\'matrix_add_to_cart\\'); \r\n        fd.append(\\'items_json\\', JSON.stringify(items));\r\n        \r\n        fetch(wc_add_to_cart_params.ajax_url, { method: \\'POST\\', body: fd })\r\n            .then(r => r.json())\r\n            .then(d => { if (d.success) location.reload(); });\r\n    });\r\n\r\n    initDefaultColor(); \r\n    watchColorSelection(); \r\n    handleMutualExclusion(); \r\n    updateLiveTotals();\r\n})();\r\n<\/script>",
            "woocommerceUseBricksWooNotice": true,
            "woocommerceBadgeSale": "percentage",
            "woocommerceEnableAjaxAddToCart": true
        }
    }
}