{"id":1431,"date":"2026-09-20T17:25:30","date_gmt":"2026-09-20T17:25:30","guid":{"rendered":"https:\/\/www.olivke.de\/?page_id=1431"},"modified":"2026-09-20T19:36:40","modified_gmt":"2026-09-20T19:36:40","slug":"geschenke-verschenken","status":"publish","type":"page","link":"https:\/\/www.olivke.de\/?page_id=1431","title":{"rendered":"Genuss-Pr\u00e4sente gestalten"},"content":{"rendered":"\t<div class=\"olivke-gift-builder\" id=\"olivke-gift-builder\">\n\n\t\t<ol class=\"ogb-steps\">\n\t\t\t<li><span>1<\/span> Produkte ausw\u00e4hlen<\/li>\n\t\t\t<li><span>2<\/span> Geschenke zusammenstellen<\/li>\n\t\t\t<li><span>3<\/span> Bestellen &amp; verpacken lassen<\/li>\n\t\t<\/ol>\n\n\t\t<div class=\"ogb-layout\">\n\t\t\t<div class=\"ogb-catalog\">\n\t\t\t\t<div class=\"ogb-toolbar\">\n\t\t\t\t\t<label class=\"ogb-search-wrap\">\n\t\t\t\t\t\t<span class=\"screen-reader-text\">Produkt suchen<\/span>\n\t\t\t\t\t\t<input type=\"search\" class=\"ogb-search\" placeholder=\"Produkt suchen \u2026\" autocomplete=\"off\">\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<div class=\"ogb-cats\" role=\"group\" aria-label=\"Kategorien\"><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"ogb-grid\" aria-live=\"polite\"><\/div>\n\t\t\t<\/div>\n\n\t\t\t<aside class=\"ogb-panel\" aria-label=\"Ihre Geschenke\">\n\t\t\t\t<div class=\"ogb-tabs\" role=\"tablist\"><\/div>\n\t\t\t\t<div class=\"ogb-gift\"><\/div>\n\t\t\t\t<div class=\"ogb-summary\">\n\t\t\t\t\t<div class=\"ogb-total\"><span>Zwischensumme<\/span><strong class=\"ogb-total-value\">0,00&nbsp;\u20ac<\/strong><\/div>\n\t\t\t\t\t<p class=\"ogb-note\">Versand 4,90&nbsp;\u20ac \u2013 ab 99&nbsp;\u20ac kostenlos. Umsatzsteuerbefreit gem\u00e4\u00df \u00a7 19 UStG.<\/p>\n\t\t\t\t\t<button type=\"button\" class=\"ogb-submit\">Geschenke in den Warenkorb<\/button>\n\t\t\t\t\t<p class=\"ogb-feedback\" role=\"status\"><\/p>\n\t\t\t\t<\/div>\n\t\t\t<\/aside>\n\t\t<\/div>\n\n\t\t<button type=\"button\" class=\"ogb-mobile-bar\" hidden>\n\t\t\t<span class=\"ogb-mobile-count\">0 Artikel<\/span>\n\t\t\t<span class=\"ogb-mobile-total\">0,00&nbsp;\u20ac<\/span>\n\t\t\t<span class=\"ogb-mobile-cta\">Geschenke ansehen<\/span>\n\t\t<\/button>\n\t<\/div>\n\n\t<script type=\"application\/json\" id=\"ogb-config\">{\"products\":[{\"id\":770,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame Royal, Nachternte, 500ml\",\"price\":28,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET005-Recuerdame-500ml-web2-300x411.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-recuerdame-royal-nachternte-500ml\"},{\"id\":773,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame Deep Green, Nachternte, 500ml\",\"price\":28,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET010-Recuerdame-500ml-web-red-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-recuerdame-deep-green-nachternte-500ml\"},{\"id\":1176,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame, Nachternte, T\\u00fcrkis Edition, 500ml\",\"price\":27,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/120326-Produkte-web-ET018-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-recuerdame-nachternte-tuerkis-collection-500ml\"},{\"id\":690,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame, Nachternte, 250ml\",\"price\":13.9,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/ET002-Recuerdame-Moon-250ml-web-red-300x407.jpg\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=recuerdame-natives-olivenoel-extra-250ml-arbequina\"},{\"id\":764,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame, Nachternte, 250ml\",\"price\":13.9,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET003-Recuerdame-Moon-250ml-01-web2-300x411.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-recuerdame-nachternte-250ml\"},{\"id\":768,\"name\":\"Natives Oliven\\u00f6l extra - Recuerdame, Nachternte, 500ml\",\"price\":26,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET011-Recuerdame-Moon-500ml-web2-300x411.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-recuerdame-nachternte-500ml\"},{\"id\":776,\"name\":\"Natives Oliven\\u00f6l extra \\u2013 Familia Reserva, 500ml\",\"price\":24,\"cat\":\"Familia Reserva\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET001-OroVirgen-Extra-Familia-500ml-web-red-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-familia-reserva-500ml\"},{\"id\":778,\"name\":\"Natives Oliven\\u00f6l extra \\u2013 Pink Edition \\u2013 Sorte Frantoio\",\"price\":24,\"cat\":\"Recuerdame\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET016-OroVirgen-Frantoio-500ml-web-red-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-pink-edition-sorte-frantoio\"},{\"id\":780,\"name\":\"Natives Oliven\\u00f6l extra, 250ml\",\"price\":10.9,\"cat\":\"Natives Oliven\\u00f6l extra\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/ET015-OroVirgen-250ml-web-red-300x407.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=natives-olivenoel-extra-250ml\"},{\"id\":1291,\"name\":\"PA AMB OLI D'OLIVA - Feine Schokoladenspezialit\\u00e4t\",\"price\":11.9,\"cat\":\"Schokoladenspezialit\\u00e4t\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/030526-Produkte-web-ET019-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=pa-amb-oli-doliva-pralinen-schokoladenspezialitaet\"},{\"id\":1292,\"name\":\"FRUITS VERMELLS - Feine Schokoladenspezialit\\u00e4t\",\"price\":11.9,\"cat\":\"Schokoladenspezialit\\u00e4t\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/030526-Produkte-web-ET020-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=fruits-vermells-feine-schokoladenspezialitaet\"},{\"id\":783,\"name\":\"Gourmet Balsamico aus Spanien\",\"price\":11,\"cat\":\"Essig\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/150126-Produkte-web-ET007-red-300x401.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=gourmet-balsamico-aus-spanien\"},{\"id\":1164,\"name\":\"Kr\\u00e4uter-Meersalz in der Mahlm\\u00fchle\",\"price\":11,\"cat\":\"Salz\",\"img\":\"https:\\\/\\\/www.olivke.de\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/Gemini_Generated_Image_7x28y07x28y07x28_original-300x402.webp\",\"url\":\"https:\\\/\\\/www.olivke.de\\\/?product=kraeuter-meersalz-in-der-mahlmuehle\"}],\"cats\":[\"Recuerdame\",\"Familia Reserva\",\"Natives Oliven\\u00f6l extra\",\"Schokoladenspezialit\\u00e4t\",\"Essig\",\"Salz\"],\"occasions\":[\"Geburtstag\",\"Dankesch\\u00f6n\",\"Firmenpr\\u00e4sent\",\"Hochzeit\",\"Weihnachten\",\"Ostern\",\"Muttertag\",\"Einfach so\"],\"maxGifts\":8,\"cardMax\":200,\"endpoint\":\"\\\/?wc-ajax=olivke_gift_add\",\"nonce\":\"55598ff7ae\",\"currency\":\"\\u20ac\"}<\/script>\n\t<script>\n\t(function() {\n\t\t'use strict';\n\t\tvar root = document.getElementById('olivke-gift-builder');\n\t\tvar cfgEl = document.getElementById('ogb-config');\n\t\tif (!root || !cfgEl) return;\n\n\t\tvar CFG = JSON.parse(cfgEl.textContent);\n\t\tvar gifts = [newGift(1)];\n\t\tvar active = 0;\n\t\tvar filterCat = '';\n\t\tvar filterText = '';\n\n\t\tfunction newGift(nr) { return { nr: nr, anlass: '', karte: '', items: [] }; }\n\n\t\tfunction euro(v) {\n\t\t\treturn v.toFixed(2).replace('.', ',') + ' ' + CFG.currency;\n\t\t}\n\n\t\tfunction productById(id) {\n\t\t\tfor (var i = 0; i < CFG.products.length; i++) {\n\t\t\t\tif (CFG.products[i].id === id) return CFG.products[i];\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tfunction total() {\n\t\t\tvar sum = 0;\n\t\t\tgifts.forEach(function(g) {\n\t\t\t\tg.items.forEach(function(it) {\n\t\t\t\t\tvar p = productById(it.id);\n\t\t\t\t\tif (p) sum += p.price * it.qty;\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn sum;\n\t\t}\n\n\t\tfunction itemCount() {\n\t\t\tvar n = 0;\n\t\t\tgifts.forEach(function(g) { g.items.forEach(function(it) { n += it.qty; }); });\n\t\t\treturn n;\n\t\t}\n\n\t\t\/* ---------- Katalog ---------- *\/\n\t\tfunction renderCats() {\n\t\t\tvar wrap = root.querySelector('.ogb-cats');\n\t\t\tvar html = '<button type=\"button\" class=\"ogb-cat' + (filterCat === '' ? ' is-active' : '') + '\" data-cat=\"\">Alle<\/button>';\n\t\t\tCFG.cats.forEach(function(c) {\n\t\t\t\thtml += '<button type=\"button\" class=\"ogb-cat' + (filterCat === c ? ' is-active' : '') +\n\t\t\t\t\t'\" data-cat=\"' + escAttr(c) + '\">' + escHtml(c) + '<\/button>';\n\t\t\t});\n\t\t\twrap.innerHTML = html;\n\t\t}\n\n\t\tfunction renderGrid() {\n\t\t\tvar grid = root.querySelector('.ogb-grid');\n\t\t\tvar list = CFG.products.filter(function(p) {\n\t\t\t\tif (filterCat && p.cat !== filterCat) return false;\n\t\t\t\tif (filterText && p.name.toLowerCase().indexOf(filterText) === -1) return false;\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\tif (!list.length) {\n\t\t\t\tgrid.innerHTML = '<p class=\"ogb-empty\">Kein Produkt gefunden. Bitte Suche oder Kategorie \u00e4ndern.<\/p>';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tgrid.innerHTML = list.map(function(p) {\n\t\t\t\tvar qty = qtyInActive(p.id);\n\t\t\t\treturn '<article class=\"ogb-card' + (qty ? ' is-chosen' : '') + '\" data-id=\"' + p.id + '\">' +\n\t\t\t\t\t'<img class=\"ogb-card-img\" src=\"' + escAttr(p.img) + '\" alt=\"\" loading=\"lazy\" decoding=\"async\">' +\n\t\t\t\t\t'<h3 class=\"ogb-card-title\">' + escHtml(p.name) + '<\/h3>' +\n\t\t\t\t\t'<p class=\"ogb-card-price\">' + euro(p.price) + '<\/p>' +\n\t\t\t\t\t(qty\n\t\t\t\t\t\t? '<div class=\"ogb-stepper\"><button type=\"button\" class=\"ogb-minus\" aria-label=\"Weniger\">\u2212<\/button>' +\n\t\t\t\t\t\t  '<span class=\"ogb-qty\">' + qty + '<\/span>' +\n\t\t\t\t\t\t  '<button type=\"button\" class=\"ogb-plus\" aria-label=\"Mehr\">+<\/button><\/div>'\n\t\t\t\t\t\t: '<button type=\"button\" class=\"ogb-add\">Zum Geschenk ' + gifts[active].nr + '<\/button>') +\n\t\t\t\t\t'<\/article>';\n\t\t\t}).join('');\n\t\t}\n\n\t\tfunction qtyInActive(id) {\n\t\t\tvar it = gifts[active].items.find(function(i) { return i.id === id; });\n\t\t\treturn it ? it.qty : 0;\n\t\t}\n\n\t\tfunction changeQty(id, delta) {\n\t\t\tvar items = gifts[active].items;\n\t\t\tvar it = items.find(function(i) { return i.id === id; });\n\t\t\tif (!it) {\n\t\t\t\tif (delta > 0) items.push({ id: id, qty: 1 });\n\t\t\t} else {\n\t\t\t\tit.qty += delta;\n\t\t\t\tif (it.qty < 1) gifts[active].items = items.filter(function(i) { return i.id !== id; });\n\t\t\t}\n\t\t\trenderAll();\n\t\t}\n\n\t\t\/* ---------- Panel ---------- *\/\n\t\tfunction renderTabs() {\n\t\t\tvar wrap = root.querySelector('.ogb-tabs');\n\t\t\tvar html = gifts.map(function(g, i) {\n\t\t\t\tvar count = g.items.reduce(function(a, b) { return a + b.qty; }, 0);\n\t\t\t\treturn '<button type=\"button\" role=\"tab\" class=\"ogb-tab' + (i === active ? ' is-active' : '') +\n\t\t\t\t\t'\" data-i=\"' + i + '\" aria-selected=\"' + (i === active) + '\">Geschenk ' + g.nr +\n\t\t\t\t\t'<span class=\"ogb-tab-count\">' + count + '<\/span>' +\n\t\t\t\t\t(gifts.length > 1\n\t\t\t\t\t\t? '<span class=\"ogb-tab-del\" data-del=\"' + i + '\" role=\"button\" tabindex=\"0\" title=\"Geschenk ' + g.nr + ' entfernen\" aria-label=\"Geschenk ' + g.nr + ' entfernen\">\u00d7<\/span>'\n\t\t\t\t\t\t: '') +\n\t\t\t\t\t'<\/button>';\n\t\t\t}).join('');\n\t\t\tif (gifts.length < CFG.maxGifts) {\n\t\t\t\thtml += '<button type=\"button\" class=\"ogb-add-gift\">+ Geschenk<\/button>';\n\t\t\t}\n\t\t\twrap.innerHTML = html;\n\t\t}\n\n\t\tfunction renderGift() {\n\t\t\tvar g = gifts[active];\n\t\t\tvar box = root.querySelector('.ogb-gift');\n\t\t\tvar rows = g.items.map(function(it) {\n\t\t\t\tvar p = productById(it.id);\n\t\t\t\tif (!p) return '';\n\t\t\t\treturn '<li class=\"ogb-row\" data-id=\"' + p.id + '\">' +\n\t\t\t\t\t'<img decoding=\"async\" src=\"' + escAttr(p.img) + '\" alt=\"\" loading=\"lazy\">' +\n\t\t\t\t\t'<div class=\"ogb-row-main\"><span class=\"ogb-row-name\">' + escHtml(p.name) + '<\/span>' +\n\t\t\t\t\t'<span class=\"ogb-row-price\">' + it.qty + ' \u00d7 ' + euro(p.price) + '<\/span><\/div>' +\n\t\t\t\t\t'<button type=\"button\" class=\"ogb-remove\" aria-label=\"Entfernen\">\u00d7<\/button><\/li>';\n\t\t\t}).join('');\n\n\t\t\tvar opts = CFG.occasions.map(function(o) {\n\t\t\t\treturn '<option value=\"' + escAttr(o) + '\"' + (g.anlass === o ? ' selected' : '') + '>' + escHtml(o) + '<\/option>';\n\t\t\t}).join('');\n\n\t\t\tbox.innerHTML =\n\t\t\t\t(rows ? '<ul class=\"ogb-rows\">' + rows + '<\/ul>'\n\t\t\t\t      : '<p class=\"ogb-empty-gift\">Noch nichts ausgew\u00e4hlt. W\u00e4hlen Sie links Produkte f\u00fcr Geschenk ' + g.nr + '.<\/p>') +\n\t\t\t\t'<label class=\"ogb-field\"><span>Anlass<\/span>' +\n\t\t\t\t'<select class=\"ogb-anlass\"><option value=\"\">Bitte w\u00e4hlen<\/option>' + opts + '<\/select><\/label>' +\n\t\t\t\t'<label class=\"ogb-field\"><span>Kartentext (optional)<\/span>' +\n\t\t\t\t'<textarea class=\"ogb-karte\" maxlength=\"' + CFG.cardMax + '\" rows=\"3\" placeholder=\"Zum Beispiel: Alles Gute, liebe Anna!\">' + escHtml(g.karte) + '<\/textarea>' +\n\t\t\t\t'<small class=\"ogb-counter\">' + g.karte.length + '\/' + CFG.cardMax + '<\/small><\/label>' +\n\t\t\t\t(gifts.length > 1 ? '<button type=\"button\" class=\"ogb-delete-gift\">Geschenk ' + g.nr + ' l\u00f6schen<\/button>' : '');\n\t\t}\n\n\t\tfunction renderSummary() {\n\t\t\troot.querySelector('.ogb-total-value').textContent = euro(total());\n\t\t\tvar bar = root.querySelector('.ogb-mobile-bar');\n\t\t\tvar n = itemCount();\n\t\t\tbar.hidden = n === 0;\n\t\t\tbar.querySelector('.ogb-mobile-count').textContent = n + (n === 1 ? ' Artikel' : ' Artikel');\n\t\t\tbar.querySelector('.ogb-mobile-total').textContent = euro(total());\n\t\t}\n\n\t\tfunction removeGift(i) {\n\t\t\tif (gifts.length < 2 || !gifts[i]) return;\n\t\t\tgifts.splice(i, 1);\n\t\t\tgifts.forEach(function(g, n) { g.nr = n + 1; });\n\t\t\tif (active >= gifts.length) active = gifts.length - 1;\n\t\t\telse if (i < active) active--;\n\t\t\trenderAll();\n\t\t}\n\n\t\tfunction renderAll() { renderTabs(); renderGift(); renderGrid(); renderSummary(); }\n\n\t\t\/* ---------- Events ---------- *\/\n\t\troot.addEventListener('click', function(e) {\n\t\t\tvar t = e.target;\n\t\t\tvar card = t.closest('.ogb-card');\n\n\t\t\tif (t.closest('.ogb-add') || t.closest('.ogb-plus')) { changeQty(+card.dataset.id, 1); return; }\n\t\t\tif (t.closest('.ogb-minus')) { changeQty(+card.dataset.id, -1); return; }\n\n\t\t\tif (t.closest('.ogb-remove')) {\n\t\t\t\tvar id = +t.closest('.ogb-row').dataset.id;\n\t\t\t\tgifts[active].items = gifts[active].items.filter(function(i) { return i.id !== id; });\n\t\t\t\trenderAll(); return;\n\t\t\t}\n\t\t\tif (t.closest('.ogb-cat')) { filterCat = t.closest('.ogb-cat').dataset.cat; renderCats(); renderGrid(); return; }\n\n\t\t\tvar del = t.closest('.ogb-tab-del');\n\t\t\tif (del) { e.stopPropagation(); removeGift(+del.dataset.del); return; }\n\n\t\t\tif (t.closest('.ogb-tab')) { active = +t.closest('.ogb-tab').dataset.i; renderAll(); return; }\n\t\t\tif (t.closest('.ogb-add-gift')) {\n\t\t\t\tgifts.push(newGift(gifts.length + 1));\n\t\t\t\tactive = gifts.length - 1;\n\t\t\t\trenderAll(); return;\n\t\t\t}\n\t\t\tif (t.closest('.ogb-delete-gift')) { removeGift(active); return; }\n\t\t\tif (t.closest('.ogb-mobile-bar')) {\n\t\t\t\troot.querySelector('.ogb-panel').scrollIntoView({ behavior: 'smooth', block: 'start' });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (t.closest('.ogb-submit')) { submit(); }\n\t\t});\n\n\t\troot.addEventListener('input', function(e) {\n\t\t\tif (e.target.classList.contains('ogb-search')) {\n\t\t\t\tfilterText = e.target.value.toLowerCase().trim();\n\t\t\t\trenderGrid();\n\t\t\t}\n\t\t\tif (e.target.classList.contains('ogb-karte')) {\n\t\t\t\tgifts[active].karte = e.target.value;\n\t\t\t\tvar c = root.querySelector('.ogb-counter');\n\t\t\t\tif (c) c.textContent = e.target.value.length + '\/' + CFG.cardMax;\n\t\t\t}\n\t\t});\n\n\t\troot.addEventListener('keydown', function(e) {\n\t\t\tif (e.key !== 'Enter' && e.key !== ' ') return;\n\t\t\tvar del = e.target.closest ? e.target.closest('.ogb-tab-del') : null;\n\t\t\tif (del) { e.preventDefault(); removeGift(+del.dataset.del); }\n\t\t});\n\n\t\troot.addEventListener('change', function(e) {\n\t\t\tif (e.target.classList.contains('ogb-anlass')) {\n\t\t\t\tgifts[active].anlass = e.target.value;\n\t\t\t}\n\t\t});\n\n\t\t\/* ---------- Absenden ---------- *\/\n\t\tfunction submit() {\n\t\t\tvar btn = root.querySelector('.ogb-submit');\n\t\t\tvar msg = root.querySelector('.ogb-feedback');\n\t\t\tvar filled = gifts.filter(function(g) { return g.items.length; });\n\n\t\t\tif (!filled.length) {\n\t\t\t\tmsg.textContent = 'Bitte legen Sie mindestens ein Produkt in ein Geschenk.';\n\t\t\t\tmsg.className = 'ogb-feedback is-error';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbtn.disabled = true;\n\t\t\tbtn.setAttribute('data-ol-atc', 'loading'); \/\/ Ladebalken aus Modul 9\n\t\t\tmsg.textContent = 'Geschenke werden vorbereitet \u2026';\n\t\t\tmsg.className = 'ogb-feedback';\n\n\t\t\tvar body = new FormData();\n\t\t\tbody.append('nonce', CFG.nonce);\n\t\t\tbody.append('gifts', JSON.stringify(filled));\n\n\t\t\tfetch(CFG.endpoint, { method: 'POST', body: body, credentials: 'same-origin' })\n\t\t\t\t.then(function(r) { return r.json(); })\n\t\t\t\t.then(function(res) {\n\t\t\t\t\tif (res && res.success && res.data && res.data.redirect) {\n\t\t\t\t\t\twindow.location.href = res.data.redirect;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error((res && res.data && res.data.message) || 'Unbekannter Fehler');\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(function(err) {\n\t\t\t\t\tbtn.disabled = false;\n\t\t\t\t\tbtn.setAttribute('data-ol-atc', 'error');\n\t\t\t\t\tsetTimeout(function() { btn.removeAttribute('data-ol-atc'); }, 1200);\n\t\t\t\t\tmsg.textContent = 'Das hat leider nicht geklappt: ' + err.message + ' Bitte erneut versuchen oder uns kurz schreiben.';\n\t\t\t\t\tmsg.className = 'ogb-feedback is-error';\n\t\t\t\t});\n\t\t}\n\n\t\tfunction escHtml(s) {\n\t\t\treturn String(s).replace(\/[&<>\"']\/g, function(c) {\n\t\t\t\treturn { '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;', \"'\": '&#39;' }[c];\n\t\t\t});\n\t\t}\n\t\tfunction escAttr(s) { return escHtml(s); }\n\n\t\trenderCats();\n\t\trenderAll();\n\t})();\n\t<\/script>\n\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-1431","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/pages\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.olivke.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1431"}],"version-history":[{"count":3,"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/pages\/1431\/revisions"}],"predecessor-version":[{"id":1436,"href":"https:\/\/www.olivke.de\/index.php?rest_route=\/wp\/v2\/pages\/1431\/revisions\/1436"}],"wp:attachment":[{"href":"https:\/\/www.olivke.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}