Ihr Warenkorb bei Zaunfachhandel24


(function () { "use strict"; if (window.__zzwClearBasketV1) return; window.__zzwClearBasketV1 = true; var clearing = false; document.addEventListener("click", async function (event) { var button = event.target instanceof Element ? event.target.closest("[data-zzw-clear-basket]") : null; if (!button) return; event.preventDefault(); if (clearing || (window.App && window.App.isShopBuilder)) return; var store = window.ceresStore; var basket = store && store.state && store.state.basket; var token = document.getElementById("csrf-token"); if (!basket || !Array.isArray(basket.items) || !token || !token.value) { window.alert("Der Warenkorb ist noch nicht bereit. Bitte die Seite neu laden."); return; } if (basket.isBasketLoading || basket.items.length === 0) return; if (!window.confirm("Möchten Sie wirklich alle Artikel aus Ihrem Warenkorb entfernen?")) return; clearing = true; button.disabled = true; button.setAttribute("aria-busy", "true"); button.textContent = "Warenkorb wird geleert …"; store.commit("setIsBasketLoading", true); var controller = new AbortController(); var timer = window.setTimeout(function () { controller.abort(); }, 60000); var diagnostic = "NETZWERK"; try { var response = await window.fetch("/rest/zzw-clear-basket/clear", { method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json", "Accept": "application/json", "X-Requested-With": "XMLHttpRequest", "X-CSRF-TOKEN": token.value }, body: JSON.stringify({ confirmed: true }), signal: controller.signal }); diagnostic = "HTTP " + response.status; var result; try { result = await response.json(); } catch (parseError) { diagnostic += " / KEINE JSON-ANTWORT"; throw parseError; } if (result && typeof result.stage === "string" && /^[a-z-]+$/.test(result.stage)) { diagnostic += " / " + result.stage; } if (result && Number.isInteger(result.remaining)) { diagnostic += " / verbleibend: " + result.remaining; } if (!response.ok || result.success !== true || result.remaining !== 0) { throw new Error("clear_not_confirmed"); } } catch (error) { if (error.name === "AbortError") diagnostic = "ZEITLIMIT 60 SEKUNDEN"; window.alert("Warenkorb leeren: " + diagnostic + ". Das vollständige Leeren konnte nicht bestätigt werden. Die Seite wird neu geladen; bitte prüfen Sie den Warenkorb. Bereits entfernte Artikel bleiben entfernt. Bei einer Zeitüberschreitung kann der Vorgang auf dem Server noch laufen."); } finally { window.clearTimeout(timer); window.location.reload(); } }); })();

Bitte beachten: Bestellungen mit mehreren Produkten werden in der Regel zusammen verschickt. Die Lieferzeit richtet sich dann nach dem Artikel mit der längsten Lieferzeit.

Die gewünschte Versandart fügen Sie bitte im nächsten Schritt hinzu.




Nur noch wenige Schritte: mit dem Klick auf den Button "Kasse" wird noch keine Bestellung getätigt.


(function () { "use strict"; if (window.__zzwBasketShareV1 || (window.App && window.App.isShopBuilder)) return; window.__zzwBasketShareV1 = true; var busy = false; var activeDialog = null; var previousFocus = null; var tokenPattern = /^[0-9]{10}-[a-f0-9]{48}$/; function paintYellow(node) { var background = !node.disabled && node.matches(":hover") ? "#ffd11d" : "#efbe00"; node.style.setProperty("background-color", background, "important"); node.style.setProperty("background-image", "none", "important"); node.style.setProperty("border-color", background, "important"); node.style.setProperty("color", "#000", "important"); node.style.setProperty("opacity", "1", "important"); node.style.setProperty("cursor", node.disabled ? "wait" : "pointer"); node.style.setProperty("outline", node.matches(":focus-visible") ? "2px solid #000" : "none", "important"); node.style.setProperty("outline-offset", "2px"); } function yellowButton(node) { if (node.hasAttribute("data-zzw-yellow")) return; node.setAttribute("data-zzw-yellow", ""); ["mouseenter", "mouseleave", "focus", "blur"].forEach(function (event) { node.addEventListener(event, function () { paintYellow(node); }); }); paintYellow(node); } function element(tag, text, className) { var node = document.createElement(tag); if (text !== undefined) node.textContent = text; if (className) node.className = className; if (node.classList.contains("btn-outline-secondary")) yellowButton(node); return node; } function button(text, action, primary) { var node = element("button", text, "btn " + (primary ? "btn-primary" : "btn-outline-secondary") + " m-1"); node.type = "button"; node.addEventListener("click", action); return node; } function dialog(title) { if (activeDialog) activeDialog.remove(); previousFocus = document.activeElement; var box = element("dialog", undefined, "zzw-share-dialog"); box.style.cssText = "box-sizing:border-box;width:min(680px,94vw);max-height:90vh;overflow:auto;overflow-wrap:anywhere;border:1px solid #ddd;border-radius:8px;padding:24px;color:#222;background:white;"; var heading = element("h2", title); heading.id = "zzw-share-heading"; box.setAttribute("aria-labelledby", heading.id); box.appendChild(heading); box.addEventListener("cancel", function (event) { if (busy) event.preventDefault(); }); box.addEventListener("close", function () { if (previousFocus && previousFocus.isConnected) previousFocus.focus(); }); document.body.appendChild(box); box.showModal(); activeDialog = box; return box; } function closeButton(box) { box.appendChild(button("Schließen", function () { box.close(); })); } function shareUrl(token) { var url = new URL(window.location.href); url.search = ""; url.hash = "share=" + token; return url.href; } function reloadBasket() { window.history.replaceState(null, "", window.location.pathname + window.location.search); window.location.reload(); } function basketLoading() { var basket = window.ceresStore && window.ceresStore.state && window.ceresStore.state.basket; return basket && basket.isBasketLoading; } function loading(value) { busy = value; if (window.ceresStore) window.ceresStore.commit("setIsBasketLoading", value); if (activeDialog) { activeDialog.setAttribute("aria-busy", String(value)); activeDialog.querySelectorAll("button, select").forEach(function (node) { node.disabled = value; }); } document.querySelectorAll("[data-zzw-share-basket]").forEach(function (node) { node.disabled = value; }); document.querySelectorAll("[data-zzw-yellow]").forEach(paintYellow); } async function request(path, data) { var csrf = document.getElementById("csrf-token"); if (!csrf || !csrf.value) throw new Error("Der Warenkorb ist noch nicht bereit. Bitte die Seite neu laden."); var controller = new AbortController(); var timer = window.setTimeout(function () { controller.abort(); }, 90000); try { var response = await window.fetch("/rest/zzw-clear-basket/share" + path, { method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json", "Accept": "application/json", "X-Requested-With": "XMLHttpRequest", "X-CSRF-TOKEN": csrf.value }, body: JSON.stringify(data), signal: controller.signal }); var result; try { result = await response.json(); } catch (error) { throw new Error("Keine gültige Serverantwort (HTTP " + response.status + ")."); } if (!response.ok) throw new Error(result.message || "Der Vorgang konnte nicht bestätigt werden."); return result; } finally { window.clearTimeout(timer); } } function withIcon(node, iconName) { var icon = element("i", undefined, "fa " + iconName); icon.setAttribute("aria-hidden", "true"); icon.style.cssText = "float:none!important;position:static!important;margin:0!important;order:0!important;flex:0 0 22px;width:22px;text-align:center;font-size:19px;line-height:1;"; var caption = element("span", node.textContent); caption.style.cssText = "order:1;min-width:0;"; node.textContent = ""; node.appendChild(icon); node.appendChild(caption); node.style.setProperty("display", "flex", "important"); node.style.setProperty("align-items", "center", "important"); node.style.setProperty("justify-content", "flex-start", "important"); node.style.setProperty("gap", "12px"); node.style.setProperty("margin", "0", "important"); node.style.setProperty("padding", "14px 18px", "important"); node.style.setProperty("border-radius", "6px", "important"); node.style.setProperty("font-size", "14px", "important"); node.style.setProperty("line-height", "1.4", "important"); node.style.setProperty("letter-spacing", "normal", "important"); node.style.setProperty("text-align", "left", "important"); node.style.setProperty("white-space", "normal", "important"); node.style.boxSizing = "border-box"; node.style.minHeight = "52px"; node.style.width = "100%"; return node; } function linkField(box, url, labelText) { var label = element("label", labelText); label.style.cssText = "display:block;margin:0 0 20px;font-size:14px;font-weight:600;letter-spacing:normal;"; var field = element("input", undefined, "form-control"); field.type = "text"; field.readOnly = true; field.value = url; field.style.cssText = "box-sizing:border-box;width:100%;min-width:0;height:44px;margin:8px 0 0;padding:10px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#f5f5f5;color:#505156;font-size:13px;font-weight:400;text-overflow:ellipsis;"; label.appendChild(field); box.appendChild(label); var actions = element("div"); actions.style.cssText = "display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px;align-items:stretch;margin:0;"; box.appendChild(actions); actions.appendChild(withIcon(button("Link kopieren", async function () { try { await navigator.clipboard.writeText(url); status.textContent = "Link kopiert."; } catch (error) { field.focus(); field.select(); status.textContent = "Bitte den markierten Link kopieren."; } }, true), "fa-copy")); function shareAction(text, href, newTab, iconName) { var link = withIcon(element("a", text, "btn btn-outline-secondary m-1"), iconName); link.href = href; link.style.whiteSpace = "normal"; if (newTab) { link.target = "_blank"; link.rel = "noopener noreferrer"; } actions.appendChild(link); } var shareText = "Hier ist mein Warenkorb bei Zaunfachhandel24:\n\n" + url; shareAction("Über WhatsApp teilen", "https://wa.me/?text=" + encodeURIComponent(shareText), true, "fa-whatsapp"); shareAction("Per E-Mail teilen", "mailto:?subject=" + encodeURIComponent("Mein Warenkorb bei Zaunfachhandel24") + "&body=" + encodeURIComponent(shareText), false, "fa-envelope-o"); var enquiry = "Guten Tag,\n\nich habe eine Anfrage zu folgendem Warenkorb:\n\n" + url + "\n\nMeine Frage / mein Anliegen:\n\n\nMit freundlichen Grüßen\n"; shareAction("Anfrage senden", "mailto:anfrage@zaunfachhandel24.de?subject=" + encodeURIComponent("Anfrage zu meinem Warenkorb") + "&body=" + encodeURIComponent(enquiry), false, "fa-commenting-o"); var status = element("p", ""); status.setAttribute("role", "status"); status.style.cssText = "margin:0;font-size:13px;line-height:1.6;color:#505156;"; box.appendChild(status); } async function createShare() { if (busy || basketLoading()) return; var box = dialog("Warenkorb teilen"); box.appendChild(element("p", "Der Link enthält alle Artikel, Mengen, eingegebenen Bestelleigenschaften und den Gutscheincode. Jeder mit diesem Link kann diese Angaben sehen. Kundenkonto, Adressen und Zahlungsdaten werden nicht übernommen.")); box.appendChild(element("p", "Der Warenkorb wird als Momentaufnahme gespeichert. Der Link ist 30 Tage gültig.")); var message = element("p", ""); message.setAttribute("role", "status"); box.appendChild(message); box.appendChild(button("Warenkorb bereitstellen", async function () { if (busy || basketLoading()) return; loading(true); message.textContent = "Warenkorb wird bereitgestellt …"; try { var data = await request("", { confirmed: true }); box = dialog("Warenkorb-Link ist bereit"); box.style.padding = "clamp(20px,4vw,32px)"; box.style.borderRadius = "12px"; box.style.boxShadow = "0 16px 64px rgba(0,0,0,.2)"; var heading = box.querySelector("h2"); heading.style.cssText = "margin:0 0 24px;font-size:clamp(21px,4vw,26px);line-height:1.25;font-weight:600;letter-spacing:normal;text-transform:none!important;color:#505156;"; linkField(box, shareUrl(data.token), "Diesen Link weitergeben:"); var note = element("p", "Der Warenkorb ist als Momentaufnahme gespeichert. Der Link ist 30 Tage gültig."); note.style.cssText = "margin:24px 0 0;padding:16px 0 0;border-top:1px solid #e8e8e8;color:#505156;font-size:13px;line-height:1.6;letter-spacing:normal;"; box.appendChild(note); var footer = element("div"); footer.style.cssText = "display:flex;justify-content:flex-end;margin-top:20px;"; var close = button("Schließen", function () { box.close(); }); close.style.setProperty("margin", "0", "important"); close.style.setProperty("padding", "10px 20px", "important"); close.style.setProperty("border-radius", "6px", "important"); footer.appendChild(close); box.appendChild(footer); } catch (error) { message.textContent = error.message; } finally { loading(false); } }, true)); closeButton(box); } function renderItems(parent, items) { var list = element("ul"); items.forEach(function (item) { var entry = element("li"); entry.appendChild(element("strong", item.quantity + " × " + item.name)); entry.appendChild(element("div", "Varianten-ID: " + item.variationId, "small text-muted")); (item.basketItemOrderParams || []).forEach(function (param) { var value = typeof param.value === "object" ? JSON.stringify(param.value) : String(param.value); var line = element("div", (param.name || "Eigenschaft " + param.propertyId) + ": " + value, "small"); line.style.whiteSpace = "pre-wrap"; line.style.overflowWrap = "anywhere"; entry.appendChild(line); }); ["inputWidth", "inputLength", "inputHeight"].forEach(function (key, index) { if (item[key]) entry.appendChild(element("div", ["Breite", "Länge", "Höhe"][index] + ": " + item[key], "small")); }); if (item.setComponents) renderItems(entry, item.setComponents); if (item.bundleComponents) renderItems(entry, item.bundleComponents); entry.style.marginBottom = "12px"; list.appendChild(entry); }); parent.appendChild(list); } function outcome(result) { if (result.state === "already-processed") result = result.receipt; var box = dialog(result.state === "complete" ? "Warenkorb übernommen" : "Warenkorb bitte prüfen"); var text = result.state === "complete" ? "Die Artikel wurden übernommen. Im Warenkorb sehen Sie die aktuellen Preise." : result.state === "partial" ? "Einige Artikel konnten nicht übernommen werden. Die übrigen Artikel wurden hinzugefügt." : "Die Übernahme wurde begonnen, konnte aber nicht vollständig bestätigt werden. Bitte nicht erneut auslösen; der Server kann noch arbeiten."; box.appendChild(element("p", text)); (result.failed || []).forEach(function (item) { box.appendChild(element("p", item.name + " (" + item.variationId + "): " + item.message)); }); if (result.coupon === "rejected") box.appendChild(element("p", "Der gewünschte Gutschein konnte nicht übernommen werden. Bitte prüfen Sie den Gutschein und die Summen im Warenkorb.")); if (result.backupToken) { linkField(box, shareUrl(result.backupToken), "Sicherung Ihres Warenkorbs vor dem Ersetzen (30 Tage gültig):"); } box.appendChild(button("Warenkorb anzeigen", reloadBasket, true)); closeButton(box); } async function preview() { var match = /^#(?:share|zzw-share)=(.+)$/.exec(window.location.hash); if (!match || busy) return; var token = match[1]; var box = dialog("Geteilter Warenkorb"); if (!tokenPattern.test(token)) { box.appendChild(element("p", "Dieser Warenkorb-Link ist ungültig.")); closeButton(box); return; } box.appendChild(element("p", "Vorschau wird geladen …")); loading(true); try { var data = await request("/preview", { token: token }); if (data.receipt) { outcome(data.receipt); return; } var attempted = false; try { attempted = window.sessionStorage.getItem("zzw-share-attempt-" + token) === "1"; } catch (ignored) {} if (attempted) { outcome({ state: "uncertain" }); return; } box = dialog("Geteilter Warenkorb"); renderItems(box, data.items); box.appendChild(element("p", "Preise und Verfügbarkeit werden bei der Übernahme neu geprüft. Nicht verfügbare Artikel werden anschließend aufgeführt.")); var choice = null; if (data.coupon) { box.appendChild(element("p", "Mitgegebener Gutschein: " + data.coupon)); if (data.currentCoupon && data.currentCoupon.toUpperCase() !== data.coupon.toUpperCase()) { var label = element("label", "In Ihrem Warenkorb ist bereits der Gutschein „" + data.currentCoupon + "“ hinterlegt:"); choice = element("select", undefined, "form-control"); [["", "Bitte auswählen"], ["keep", "Meinen Gutschein behalten"], ["shared", "Durch den mitgegebenen Gutschein ersetzen"]].forEach(function (entry) { var option = element("option", entry[1]); option.value = entry[0]; choice.appendChild(option); }); label.appendChild(choice); box.appendChild(label); } } var message = element("p", ""); message.setAttribute("role", "status"); box.appendChild(message); async function apply(mode) { if (busy || basketLoading()) return; if (choice && !choice.value) { message.textContent = "Bitte zuerst einen Gutschein auswählen."; choice.focus(); return; } if (mode === "replace" && !window.confirm("Ihren bisherigen Warenkorb ersetzen? Nicht verfügbare Artikel aus dem Link können fehlen. Ihr bisheriger Warenkorb wird zuvor als Wiederherstellungslink gesichert.")) return; loading(true); message.textContent = "Artikel werden übernommen …"; try { try { window.sessionStorage.setItem("zzw-share-attempt-" + token, "1"); } catch (ignored) {} var result = await request("/apply", { token: token, confirmed: true, mode: mode, couponChoice: choice ? choice.value : (data.coupon ? "shared" : "keep"), fingerprint: data.fingerprint }); if (result.state === "changed") { try { window.sessionStorage.removeItem("zzw-share-attempt-" + token); } catch (ignored) {} loading(false); await preview(); activeDialog.appendChild(element("p", "Ihr Warenkorb wurde zwischenzeitlich geändert. Bitte die aktualisierte Auswahl erneut bestätigen.")); return; } outcome(result); } catch (error) { box = dialog("Übernahme nicht bestätigt"); box.appendChild(element("p", error.message + " Bitte nicht erneut übernehmen. Bereits verarbeitete Artikel bleiben im Warenkorb; der Server kann noch arbeiten.")); box.appendChild(button("Status prüfen", function () { preview(); }, true)); box.appendChild(button("Warenkorb anzeigen", reloadBasket)); } finally { loading(false); } } box.appendChild(button(data.hasItems ? "Zu meinem Warenkorb hinzufügen" : "In meinen Warenkorb übernehmen", function () { apply("add"); }, true)); if (data.hasItems) box.appendChild(button("Warenkorb ersetzen", function () { apply("replace"); })); closeButton(box); } catch (error) { box.appendChild(element("p", error.message)); closeButton(box); } finally { loading(false); } } document.addEventListener("click", function (event) { var target = event.target instanceof Element ? event.target.closest("[data-zzw-share-basket]") : null; if (target) { event.preventDefault(); createShare(); } }); window.addEventListener("hashchange", preview); function initialize() { document.querySelectorAll("[data-zzw-share-basket]").forEach(yellowButton); preview(); } if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", initialize, { once: true }); else initialize(); })();

Sie haben Fragen oder wünschen ein Angebot zu den Artikeln in Ihrem Warenkorb? Kein Problem! Mit einem Klick auf den folgenden Button können Sie uns eine E-Mail mit dem Inhalt Ihres Warenkorbs und Ihrer Frage senden.

document.addEventListener('DOMContentLoaded', function() { var mailtoButton = document.getElementById('mailto'); // Button deaktiviert lassen, bis die Artikel geladen sind mailtoButton.classList.add('disabled'); mailtoButton.setAttribute('title', 'Bitte warten, bis die Artikel geladen sind.'); // Funktion zur Überprüfung, ob die Artikel geladen sind function checkIfArticlesLoaded() { var productElements = document.getElementsByClassName('item-name'); // Artikel-Elemente if (productElements.length > 0) { // Artikel sind geladen, Button aktivieren mailtoButton.classList.remove('disabled'); mailtoButton.setAttribute('title', 'Fragen offen? Kein Problem! Ab die Post...'); mailtoButton.setAttribute('href', '#'); // Platzhalter mailtoButton.onclick = myFunction; // Klick-Event setzen clearInterval(checkInterval); // Stoppe die Überprüfung } } // Intervall einrichten, um regelmäßig zu prüfen, ob die Artikel geladen sind var checkInterval = setInterval(checkIfArticlesLoaded, 500); // Funktion zur Generierung der E-Mail function myFunction(event) { event.preventDefault(); // Standard-Click-Verhalten verhindern var email = 'anfrage@zaunfachhandel24.de'; var body = 'Hallo Zaunfachhandel24-Team' + '\n' + 'Bitte erstellen Sie mir ein Angebot über die Artikel in meinem Warenkorb.' + '\n\n' + 'Mein Warenkorb:' + '\n'; var contact = '\nLieferung gewünscht: ja/nein\n\n' + 'Bitte ausfüllen:\n\n' + 'Firmenname (falls vorhanden):\n' + 'Ansprechpartner:\n' + 'Anschrift:\n' + 'Lieferanschrift (falls abweichend):\n' + 'Telefonnummer:\n'; // Produkte auslesen und in den E-Mail-Text einfügen var productname = document.getElementsByClassName('item-name'); var productqty = document.getElementsByClassName('qty-input'); var productatt = document.getElementsByClassName('position-relative w-100'); var ulElements = document.querySelectorAll('ul[data-testing="order-property-list"]'); for (var index = 0; index < productname.length; index++) { var produktDetails = productatt[index]; // Entfernen der unerwünschten Inhalte basierend auf Klassen var basePrices = produktDetails.getElementsByClassName('item-base-price small'); var perMeterPrices = produktDetails.getElementsByClassName('text-muted small'); var deliveryTimes = produktDetails.getElementsByClassName('kjv-basket-item-availability-text'); Array.from(basePrices).forEach((element) => element.innerText = ''); Array.from(perMeterPrices).forEach((element) => element.innerText = ''); Array.from(deliveryTimes).forEach((element) => element.innerText = ''); // Bereinigte Details extrahieren var cleanDetails = produktDetails.innerText.trim(); // Optionen auslesen var ulContent = ulElements[index] ? ulElements[index].innerText.replace(/\n/g, '\n') : ''; // Produkte und Optionen zusammenfassen body += '\n' + productqty[index].value + 'x ' + cleanDetails + '\n'; if (ulContent.trim() !== '') { body += 'Ausgewählte Option:\n' + ulContent + '\n'; } } var subject = 'Anfrage Warenkorb'; // URL anpassen mailtoButton.setAttribute('href', 'mailto:' + email + '?body=' + encodeURIComponent(body + contact) + '&subject=' + encodeURIComponent(subject)); // Simuliere einen Klick, um die E-Mail zu öffnen window.location.href = mailtoButton.getAttribute('href'); } });

Wenn Sie sich unsicher sind, ob die von Ihnen zusammengestellten Produkte das Richtige für Sie sind, stehen Ihnen unsere Zaun Experten von Zaunfachhandel24 gerne zur Verfügung. Egal ob mit einer persönlichen Beratung in unserer Musterausstellung, per Telefon oder per Email - wir helfen Ihnen gerne weiter und beraten Sie persönlich bei der Auswahl Ihres neuen Zauns oder Zaunzubehörs.