(function () {
var root = document.getElementById("gx-produktfinder");
if (!root) {
return;
}
if (root.getAttribute("data-gx-ready") === "1") {
return;
}
root.setAttribute("data-gx-ready", "1");
/* =========================================
GRUNDFUNKTIONEN
========================================= */
function createElement(tag, css, text) {
var element = document.createElement(tag);
if (css) {
element.style.cssText = css;
}
if (typeof text !== "undefined" && text !== null) {
element.textContent = text;
}
return element;
}
function append(parent, child) {
if (parent && child) {
parent.appendChild(child);
}
return child;
}
function clear(element) {
while (element.firstChild) {
element.removeChild(element.firstChild);
}
}
function track(eventName, data) {
window.dataLayer = window.dataLayer || [];
var eventData = data || {};
eventData.event = eventName;
window.dataLayer.push(eventData);
}
/* =========================================
PRODUKTBILDER
========================================= */
var productImageCache = {};
function normalizeImageUrl(url, baseUrl) {
if (!url) {
return "";
}
try {
return new URL(url, baseUrl || window.location.origin).href;
} catch (error) {
return url;
}
}
function findProductImageInJsonLd(value) {
var i;
var found;
if (!value) {
return "";
}
if (Array.isArray(value)) {
for (i = 0; i < value.length; i++) {
found = findProductImageInJsonLd(value[i]);
if (found) {
return found;
}
}
return "";
}
if (typeof value !== "object") {
return "";
}
if (value["@type"] === "Product" && value.image) {
if (Array.isArray(value.image)) {
return value.image.length ? value.image[0] : "";
}
if (typeof value.image === "string") {
return value.image;
}
if (value.image && typeof value.image.url === "string") {
return value.image.url;
}
}
if (value["@graph"]) {
found = findProductImageInJsonLd(value["@graph"]);
if (found) {
return found;
}
}
return "";
}
function extractFirstProductImage(html, productUrl) {
var parser = new DOMParser();
var doc = parser.parseFromString(html, "text/html");
var meta;
var scripts;
var i;
var data;
var imageUrl;
var candidates;
var src;
/* Plentymarkets setzt das Hauptproduktbild in der Regel als OG-Bild. */
meta = doc.querySelector('meta[property="og:image"]');
if (meta && meta.getAttribute("content")) {
return normalizeImageUrl(meta.getAttribute("content"), productUrl);
}
meta = doc.querySelector('meta[name="twitter:image"], meta[property="twitter:image"]');
if (meta && meta.getAttribute("content")) {
return normalizeImageUrl(meta.getAttribute("content"), productUrl);
}
/* Zweite Quelle: Product-JSON-LD. */
scripts = doc.querySelectorAll('script[type="application/ld+json"]');
for (i = 0; i < scripts.length; i++) {
try {
data = JSON.parse(scripts[i].textContent);
imageUrl = findProductImageInJsonLd(data);
if (imageUrl) {
return normalizeImageUrl(imageUrl, productUrl);
}
} catch (error) {
/* Ungültiges JSON-LD überspringen. */
}
}
/* Letzter Fallback: erstes wahrscheinlich echte Produktbild. */
candidates = doc.querySelectorAll(
'[itemprop="image"], .product-image img, .product-images img, .image-carousel img, .carousel img, main img'
);
for (i = 0; i < candidates.length; i++) {
src =
candidates[i].getAttribute("data-src") ||
candidates[i].getAttribute("data-original") ||
candidates[i].getAttribute("src");
if (
src &&
src.indexOf("data:image") !== 0 &&
src.toLowerCase().indexOf("logo") === -1 &&
src.toLowerCase().indexOf("icon") === -1
) {
return normalizeImageUrl(src, productUrl);
}
}
return "";
}
function loadFirstProductImage(product, imageElement, imageBox) {
var productUrl = normalizeImageUrl(product.url, window.location.origin);
if (productImageCache[product.id]) {
imageElement.src = productImageCache[product.id];
return;
}
fetch(productUrl, {
credentials: "same-origin"
})
.then(function (response) {
if (!response.ok) {
throw new Error("Produktseite konnte nicht geladen werden");
}
return response.text();
})
.then(function (html) {
var imageUrl = extractFirstProductImage(html, productUrl);
if (!imageUrl) {
throw new Error("Kein Produktbild gefunden");
}
productImageCache[product.id] = imageUrl;
imageElement.src = imageUrl;
})
.catch(function () {
/* Falls die Bildabfrage einmal fehlschlägt, bleibt die Ergebniskarte nutzbar. */
imageBox.style.display = "none";
});
}
/* =========================================
PRODUKTDATEN
========================================= */
var products = [
{
"id": "182014045",
"articleNumber": "182014045",
"name": "OFFROAD SPEED E-14R PT45 SM",
"badge": "45 km/h · Rohloff",
"url": "/offroad-speed-rohloff-e-14r-pt45_182014045_9405/",
"price": 7899,
"description": "Faltbares S-Pedelec mit Bosch Performance Line Speed, Rohloff E-14 und Gates-Riemen.",
"facts": [
"Bosch Performance Line Speed · 85 Nm · Smart System",
"Rohloff E-14 · Gates CDX Riemen",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 70 cm"
],
"bosch": true,
"midMotor": true,
"speed45": true,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"premium",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"longtour",
"hills",
"speed45"
],
"compactScore": 58,
"premiumScore": 100
},
{
"id": "182014016",
"articleNumber": "182014016",
"name": "Rohloff E-14R PT CX SM",
"badge": "CX · Rohloff · Smart System",
"url": "/rohloff-14-gang-nabenschaltung-mit-freilauf-smart-system-riemenantrieb_182014016_9173/",
"price": 6999,
"description": "High-End CX-Faltrad mit elektronischer Rohloff E-14 und wartungsarmem Gates-Riemen.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Rohloff E-14 2.0 · Gates CDN Riemen",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 70 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"premium",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 58,
"premiumScore": 100
},
{
"id": "182014002",
"articleNumber": "182014002",
"name": "Rohloff E-14R PP",
"badge": "Rohloff · PowerPack",
"url": "/rohloff-e-14-gang-nabenschaltung-mit-freilauf_182014002_9229/",
"price": 6499,
"description": "Premium-Tourenfaltrad mit Bosch CX, Rohloff E-14 und Gates-Riemenantrieb.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Rohloff E-14 · Gates CDN Riemen",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"premium",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 50,
"premiumScore": 98
},
{
"id": "182014011",
"articleNumber": "182014011",
"name": "Rohloff E-14R PT CX",
"badge": "CX · Rohloff",
"url": "/rohloff-14-gang-nabenschaltung-mit-freilauf-performance-line-cx-riemen_182014011_9161/",
"price": 6499,
"description": "Bosch-CX-Faltrad mit elektronischer Rohloff E-14 für Vielfahrer und anspruchsvolle Touren.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Rohloff E-14 · Gates CDN Riemen",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 70 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"premium",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 58,
"premiumScore": 98
},
{
"id": "182014001",
"articleNumber": "182014001",
"name": "Rohloff E-14K/R PP",
"badge": "Rohloff · 65 Nm",
"url": "/mobilemaster-offroad-gt-8g-mit-elektronischer-rohloff-e-14-schaltung-bosch-motor_182014001_9209/",
"price": 4999,
"description": "Rohloff-E-14-Faltrad mit Bosch Performance Line und Wahlmöglichkeit zwischen Kette und Riemen.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Rohloff E-14 · Kette oder Gates-Riemen",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"premium",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 92
},
{
"id": "182380001",
"articleNumber": "182380001",
"name": "N380R PP CX Vollautomatik",
"badge": "Vollautomatik · Stufenlos",
"url": "/mobilemaster-n380r-f-vollautomatik_182380001_9511/",
"price": 5799,
"description": "Komfortorientiertes CX-Faltrad mit Enviolo AutomatiQ und stufenloser Vollautomatik.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Enviolo N380 AutomatiQ · Gates CDX",
"500 Wh · ca. 120–140 km laut Produktseite",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 120,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"automatic",
"stepless",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": true,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 90
},
{
"id": "1900000902",
"articleNumber": "1900000902",
"name": "N380K/R PT/PP CX Stufenlos",
"badge": "CX · Stufenlos",
"url": "/mobilemaster-n380-pt-cx-stufenlos-performance-line-cx-85nm-enviolo-380_1900000902_9664/",
"price": 4099,
"description": "Bosch-CX-Faltrad mit stufenloser Enviolo N380; AutomatiQ ist optional.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Enviolo N380 · 380 % stufenlos",
"400/500 Wh · mit 500 Wh bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Kette oder Gates-Riemen"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"stepless",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": true,
"smartSystem": false,
"uses": [
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 78
},
{
"id": "182005041",
"articleNumber": "182005041",
"name": "N380K/R PP Manuell Stufenlos",
"badge": "Stufenlos · 65 Nm",
"url": "/mobilemaster-n380k-manuell-380-nabenschaltung-mit-freilauf-e-bike-klapprad-mit-bosch-mittelmotor_182005041_9193/",
"price": 4399,
"description": "Stufenloses Enviolo-Faltrad mit Bosch Performance Line und manueller Drehgriffbedienung.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Enviolo N380 · 380 % stufenlos",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Kette oder Gates CDX"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"stepless",
"classic"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": true,
"smartSystem": false,
"uses": [
"commute",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 76
},
{
"id": "182005042",
"articleNumber": "182005042",
"name": "N380K/R PP Vollautomatik",
"badge": "AutomatiQ · Stufenlos",
"url": "/enviolo-380-vollautomatische-nabenschaltung-mit-freilauf_182005042_9200/",
"price": 3999,
"description": "Komfortables Enviolo-Faltrad mit vollautomatischer, stufenloser AutomatiQ-Schaltung.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Enviolo N380 AutomatiQ · 380 %",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"automatic",
"stepless",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": true,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 82
},
{
"id": "1900000840",
"articleNumber": "1900000840",
"name": "E5R PT CX Automatik SM",
"badge": "CX · Di2 · Smart System",
"url": "/e5r-pt-cx-automatik-sm-performance-line-cx-riemen-nabenschaltung-mit-freilauf_1900000840_9506/",
"price": 5899,
"description": "Bosch-CX-Smart-System-Faltrad mit elektronischer Shimano E5 Di2 und Gates-Riemen.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Shimano Nexus E5 Di2 · Gates CDX",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"automatic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 84
},
{
"id": "1900000839",
"articleNumber": "1900000839",
"name": "JUNG E5R PT CX Automatik SM",
"badge": "Tiefeinstieg · CX · Di2",
"url": "/jung-e5r-pt-cx-automatik-sm_1900000839_9502/",
"price": 5799,
"description": "Tiefeinstiegsmodell mit Bosch CX Smart System, Shimano E5 Di2 und Gates-Riemen.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Shimano Nexus E5 Di2 · Gates CDX",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"automatic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 84
},
{
"id": "182005033",
"articleNumber": "182005033",
"name": "E5K/R PP F Automatik",
"badge": "Di2 · Automatik",
"url": "/e5k-automatik-f-kette-shimano-e5-gang-di2-nabenschaltung_182005033_9203/",
"price": 4499,
"description": "Bosch-Performance-Line-Faltrad mit elektronischer Shimano E5 Di2 und Automatikfunktion.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus E5 Di2 · Freilauf/Rücktritt",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 80 × 40 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"automatic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 52,
"premiumScore": 74
},
{
"id": "182001199",
"articleNumber": "182001199",
"name": "E11R PP F Automatik",
"badge": "Alfine 11 · Di2",
"url": "/e11r-pp-f-automatik-shimano-alfine-11-gang-di2-nabenschaltung_182001199_9562/",
"price": 4899,
"description": "CX-Faltrad mit elektronischer Shimano Alfine 11-Gang Di2 und großer Übersetzungsbandbreite.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Alfine 11-Gang Di2 · Gates-Riemen",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 35 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"automatic",
"premium"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"everyday",
"longtour",
"hills"
],
"compactScore": 62,
"premiumScore": 88
},
{
"id": "1900000833",
"articleNumber": "1900000833",
"name": "Mobilemaster LIGHT E8 SX",
"badge": "Leicht · Bosch SX",
"url": "/e8-light-sx55_1900000833_9516/",
"price": 4299,
"description": "Relativ leichtes Bosch-Faltrad mit Performance Line SX und Shimano Nexus 8-Gang.",
"facts": [
"Bosch Performance Line SX · bis 60 Nm · Smart System",
"Shimano Nexus 8-Gang · Riemen optional",
"545 Wh · bis ca. 140 km",
"ca. 19,3 kg ohne Akku · Faltmaß ca. 82 × 35 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 19.3,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 60,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 70,
"premiumScore": 72
},
{
"id": "182005004",
"articleNumber": "182005004",
"name": "JUNG E5R PT CX",
"badge": "Tiefeinstieg · CX",
"url": "/jung-e5r-cx-performance-line-kette-shimano-e5-gang-nabenschaltung-mit-ohne-ruecktritt_182005004_9168/",
"price": 4399,
"description": "Tiefeinstiegs-Faltrad mit Bosch CX und Shimano Nexus E5.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Nexus E5 5-Gang · Gates-Riemen",
"500 Wh · bis ca. 140 km",
"ca. 23,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 23.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"camper",
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 72
},
{
"id": "182005005",
"articleNumber": "182005005",
"name": "JUNG E5R F SM",
"badge": "Tiefeinstieg · Smart System",
"url": "/shimano-e5r-pp-f-sm-performance-line-75nm-smart-system_182005005_9221/",
"price": 4199,
"description": "Tiefeinstiegsmodell mit Bosch Performance Line Smart System und Shimano E5.",
"facts": [
"Bosch Performance Line · 75 Nm · Smart System",
"Shimano Nexus E5 5-Gang Di2",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 80 × 40 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 75,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 52,
"premiumScore": 74
},
{
"id": "182005010",
"articleNumber": "182005010",
"name": "E5K PP CX",
"badge": "CX · Preis-Leistung",
"url": "/e5k-f-cx-performance-line-cx-85nm-shimano-nexus-5-gang-freilauf_182005010_9484/",
"price": 3999,
"description": "Preisorientiertes Bosch-CX-Faltrad mit Shimano Nexus 5-Gang und Kettenantrieb.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Nexus 5-Gang · Kette",
"400 Wh serienmäßig · 500 Wh optional · bis ca. 140 km laut Seite",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 110,
"maxRangeKm": 140,
"torqueNm": 85,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"everyday",
"longtour",
"hills"
],
"compactScore": 48,
"premiumScore": 66
},
{
"id": "182005001",
"articleNumber": "182005001",
"name": "E5K PP F/RT",
"badge": "5-Gang · Allrounder",
"url": "/mobilemaster-e5k-f-rt_182005001_9012/",
"price": 3499,
"description": "Klassisches Bosch-Performance-Line-Faltrad mit Shimano Nexus 5-Gang.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus E5 5-Gang · Freilauf/Rücktritt",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 62
},
{
"id": "182008123",
"articleNumber": "182008123",
"name": "P8R RT Automatik (Di2)",
"badge": "8-Gang Di2 · Rücktritt",
"url": "/p8r-rt-automatik-performance-line-riemen-shimano-8-gang-di2-nabenschaltung-mit-ohne-ruecktritt_182008123_9121/",
"price": 4198,
"description": "Bosch-Faltrad mit Shimano Nexus 8-Gang Di2, Rücktritt und Gates-Riemen.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus 8-Gang Di2 · Gates CDN",
"500 Wh · bis ca. 140 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 140,
"maxRangeKm": 140,
"torqueNm": 65,
"shiftModes": [
"automatic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": true,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 72
},
{
"id": "182008135",
"articleNumber": "182008135",
"name": "P8K F SM",
"badge": "Smart System · 8-Gang",
"url": "/e-klapprad/offroad-gt-bosch/mobilemaster-p8k-f-sm-bosch-performance-line-smart-system-75nm-kettenantrieb-shimano-8-gang-nabenschaltung-e-bike-klapprad-mit-bosch-mittelmotor_182008135_9800/",
"price": 3599,
"description": "Bosch-Smart-System-Allrounder mit Shimano Nexus 8-Gang und 545-Wh-Akku.",
"facts": [
"Bosch Performance Line · 75 Nm · Smart System",
"Shimano Nexus 8-Gang · Kette · Riemen optional",
"545 Wh · bis ca. 150 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 150,
"maxRangeKm": 150,
"torqueNm": 75,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": true,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 70
},
{
"id": "182008121",
"articleNumber": "182008121",
"name": "P8K F/RT",
"badge": "8-Gang · Preis-Leistung",
"url": "/p8k-bosch-performance-line-freilauf-ruecktritt-mit-kettanantrieb_182008121_9093/",
"price": 2699,
"description": "Preisgünstiges Bosch-Faltrad mit Shimano Nexus 8-Gang und Freilauf oder Rücktritt.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus 8-Gang · Kette",
"400/500 Wh · bis ca. 110 km",
"ca. 21,9 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 110,
"maxRangeKm": 110,
"torqueNm": 65,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday"
],
"compactScore": 48,
"premiumScore": 58
},
{
"id": "1900000836",
"articleNumber": "1900000836",
"name": "Offroad SUV DualPower bis 1134 Wh",
"badge": "Bis 280 km · DualBattery",
"url": "/mobilemaster-offroad-suv-dualbattery-bis-1134-wh-cm-8g-bafang-mittelmotor-mit-max-80nm-zul-gesamtgewicht-160-kg-bis-zu-280-km_1900000836_9477/",
"price": 4899,
"description": "Reichweiten-Spezialist mit Bafang M400, Doppelakku und Shimano Nexus 8-Gang.",
"facts": [
"Bafang M400 Mittelmotor · 80 Nm",
"Shimano Nexus 8-Gang · Gates-Riemen",
"1008/1134 Wh DualBattery · bis ca. 280 km",
"ca. 24,6 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": false,
"midMotor": true,
"speed45": false,
"weightKg": 24.6,
"rangeKm": 280,
"maxRangeKm": 280,
"torqueNm": 80,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"camper",
"everyday",
"longtour",
"hills"
],
"compactScore": 46,
"premiumScore": 72
},
{
"id": "1820081012",
"articleNumber": "1820081012",
"name": "Offroad SUV DualPower 1000 Wh PT 8G",
"badge": "Bis 220 km · DualBattery",
"url": "/offroad-cm-8g/mobilemaster-offroad-plus-dualbattery-ueber-1000wh-cm-8g-mittelmotor-mit-max-80nm_1820081012_8997/",
"price": 4399,
"description": "Bafang-Offroad-Faltrad mit 1008-Wh-Doppelakku für sehr lange Touren.",
"facts": [
"Bafang M400 Mittelmotor · 80 Nm",
"Shimano 8-Gang Nabenschaltung · Kette/Riemen",
"1008 Wh DualBattery · bis ca. 220 km",
"ca. 24,6 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": false,
"midMotor": true,
"speed45": false,
"weightKg": 24.6,
"rangeKm": 220,
"maxRangeKm": 220,
"torqueNm": 80,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"camper",
"everyday",
"longtour",
"hills"
],
"compactScore": 46,
"premiumScore": 68
},
{
"id": "182008001",
"articleNumber": "182008001",
"name": "Offroad CM 8G Riemen",
"badge": "Bafang · Riemen",
"url": "/germanxia-elektrofahrrad-20-zoll-8gang-shimano-nabenschaltung_182008001_7653/",
"price": 3498,
"description": "Bafang-Mittelmotor-Faltrad mit Shimano 8-Gang und wartungsarmem Gates-Riemen.",
"facts": [
"Bafang M400 Mittelmotor · 80 Nm",
"Shimano 8-Gang Nabenschaltung · Gates-Riemen",
"468 Wh · bis ca. 100 km",
"ca. 21 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": false,
"midMotor": true,
"speed45": false,
"weightKg": 21.0,
"rangeKm": 100,
"maxRangeKm": 100,
"torqueNm": 80,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"hills"
],
"compactScore": 48,
"premiumScore": 60
},
{
"id": "1820081011",
"articleNumber": "1820081011",
"name": "Offroad SUV SinglePower PT 8G",
"badge": "Bafang · 80 Nm",
"url": "/offroad-plus-intube-single-battery-cm-8g-mittelmotor-mit-max-80nm_1820081011_8992/",
"price": 3299,
"description": "Kräftiges Bafang-SUV-Faltrad mit InTube-Akku; Doppelakku ist optional.",
"facts": [
"Bafang M400 Mittelmotor · 80 Nm",
"Shimano 8-Gang Nabenschaltung · Kette/Riemen",
"504 Wh · ca. 100 km · DualBattery optional",
"ca. 24,6 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": false,
"midMotor": true,
"speed45": false,
"weightKg": 24.6,
"rangeKm": 100,
"maxRangeKm": 220,
"torqueNm": 80,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"camper",
"everyday",
"longtour",
"hills"
],
"compactScore": 46,
"premiumScore": 60
},
{
"id": "182008101",
"articleNumber": "182008101",
"name": "Offroad CM 8G Kette",
"badge": "Bafang · Preis-Leistung",
"url": "/elektrofahrrad/premium-germanxia-mobilmaster-cm-8g-nabenschaltung-mit-drehmomentsensor_182008101_3050/",
"price": 2699,
"description": "Preisorientiertes Bafang-Mittelmotor-Faltrad mit Shimano 8-Gang und Drehmomentsensor.",
"facts": [
"Bafang M400 Mittelmotor · 80 Nm",
"Shimano 8-Gang Nabenschaltung · Kette",
"500 Wh · bis ca. 100 km",
"ca. 21,6 kg ohne Akku · Faltmaß ca. 82 × 41 × 92 cm"
],
"bosch": false,
"midMotor": true,
"speed45": false,
"weightKg": 21.6,
"rangeKm": 100,
"maxRangeKm": 100,
"torqueNm": 80,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"hills"
],
"compactScore": 48,
"premiumScore": 54
},
{
"id": "182008000",
"articleNumber": "182008000",
"name": "Light CF 3G V18",
"badge": "Leicht · 3-Gang",
"url": "/e-faltrad-3-gang-shimano-nabenschaltung-mit-oder-ohne-ruecktrittbremsen_182008000_3237/",
"price": 2199,
"description": "Leichtes E-Faltrad mit Shimano Nexus 3-Gang für Alltag, Reise und Wohnmobil.",
"facts": [
"xGerman Frontmotor · 45 Nm",
"Shimano Nexus 3-Gang · Riemen optional",
"374 Wh · bis ca. 90 km",
"ca. 18 kg ohne Akku · Faltmaß ca. 85 × 40 × 74 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 18.0,
"rangeKm": 90,
"maxRangeKm": 90,
"torqueNm": 45,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday"
],
"compactScore": 80,
"premiumScore": 48
},
{
"id": "1900000953",
"articleNumber": "1900000953",
"name": "Light CF 3G V16",
"badge": "Ca. 16 kg · Tiefeinstieg",
"url": "/e-klapprad/light-cf/mobilemaster-light-cf-3g-ultraleicht-e-faltrad-16kg-27cm-tiefeinstieg_1900000953_9805/",
"price": 2099,
"description": "Sehr leichtes Tiefeinstiegs-Faltrad mit 16-Zoll-Rädern und Shimano Nexus 3-Gang.",
"facts": [
"xGerman Frontmotor · 45 Nm",
"Shimano Nexus 3-Gang · Gates optional",
"374 Wh · bis ca. 90 km",
"ca. 16 kg ohne Akku · Faltmaß ca. 77 × 39 × 77 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 16.0,
"rangeKm": 90,
"maxRangeKm": 90,
"torqueNm": 45,
"shiftModes": [
"classic",
"simple"
],
"beltDrive": true,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday"
],
"compactScore": 94,
"premiumScore": 48
},
{
"id": "181607126",
"articleNumber": "181607126",
"name": "MINI-TOURING 7G 16 Zoll",
"badge": "16 Zoll · Kompakt",
"url": "/e-klapprad/klappfahrrad-mit-kettenschaltung/16-zoll-touring-7g-e-faltrad_181607126_8686/",
"price": 2599,
"description": "Kompaktes 16-Zoll-E-Faltrad mit 7-Gang-Kettenschaltung und hoher Reichweite.",
"facts": [
"xGerman Hinterradmotor · 50 Nm",
"Shimano Altus 7-Gang Kettenschaltung",
"470 Wh · bis ca. 130 km",
"ca. 17 kg ohne Akku · Faltmaß ca. 73 × 40 × 71 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 17.0,
"rangeKm": 130,
"maxRangeKm": 130,
"torqueNm": 50,
"shiftModes": [
"classic"
],
"beltDrive": false,
"hubShift": false,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 96,
"premiumScore": 52
},
{
"id": "181601016",
"articleNumber": "181601016",
"name": "Mobilemaster eFlow3.16",
"badge": "Extrem kompakt",
"url": "/e-klapprad/eflow3-16-mobilemaster-e-faltrad-16-zoll-mit-patentierter-falttechnik-nur-15-kg_181601016_9917/",
"price": 1369,
"description": "Extrem kompaktes 16-Zoll-E-Faltrad ohne klassische Gangschaltung für Pendeln und kleine Stauräume.",
"facts": [
"xGerman Hinterradmotor · 50 Nm",
"Keine klassische Gangschaltung",
"336 Wh · bis ca. 100 km laut Detailseite",
"15 kg ohne Akku · Faltmaß ca. 61 × 29,5/45 × 59 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 15.0,
"rangeKm": 100,
"maxRangeKm": 100,
"torqueNm": 50,
"shiftModes": [
"simple"
],
"beltDrive": false,
"hubShift": false,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday"
],
"compactScore": 100,
"premiumScore": 36
},
{
"id": "182007116",
"articleNumber": "182007116",
"name": "TOURING CH 7G Alu-Gussräder + Gasgriff",
"badge": "Touring · Gasgriff",
"url": "/touring-ch-7g-shimano-mit-alu-gussraedern_182007116_9305/",
"price": 2799,
"description": "Touring-Faltrad mit 7-Gang-Kettenschaltung, Alu-Gussrädern und Gasgriff.",
"facts": [
"xGerman Hinterradmotor · 50 Nm",
"Shimano 7-Gang Kettenschaltung",
"562 Wh · bis ca. 110 km",
"ca. 21 kg ohne Akku · Faltmaß ca. 85 × 43 × 75 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 21.0,
"rangeKm": 110,
"maxRangeKm": 110,
"torqueNm": 50,
"shiftModes": [
"classic"
],
"beltDrive": false,
"hubShift": false,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 58,
"premiumScore": 46
},
{
"id": "182009318",
"articleNumber": "182009318",
"name": "TOURING PLUS 9G",
"badge": "9-Gang · Touren",
"url": "/germanxia-elektrofaltrad-20-zoll-9gang-kettenschaltung-tiefeinstieg_182009318_3231/",
"price": 2299,
"description": "Touring-Allrounder mit Shimano Sora 9-Gang und Drehmomentsensor für Mittel- und Langstrecke.",
"facts": [
"xGerman Hinterradmotor · 50 Nm · Drehmomentsensor",
"Shimano Sora 9-Gang Kettenschaltung",
"562 Wh · Kategorie nennt bis ca. 120 km",
"ca. 21 kg ohne Akku · Faltmaß ca. 85 × 43 × 75 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 21.0,
"rangeKm": 120,
"maxRangeKm": 120,
"torqueNm": 50,
"shiftModes": [
"classic"
],
"beltDrive": false,
"hubShift": false,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"everyday",
"longtour"
],
"compactScore": 58,
"premiumScore": 52
},
{
"id": "182007316",
"articleNumber": "182007316",
"name": "TOURING CH 7G",
"badge": "Touring · Preis-Leistung",
"url": "/mobilemaster-touring-ch-7g-mit-gasgriff_182007316_8845/",
"price": 1999,
"description": "Preisorientiertes Touring-Faltrad mit 7-Gang-Kettenschaltung für Alltag und Mittelstrecke.",
"facts": [
"xGerman Hinterradmotor · 50 Nm",
"Shimano Altus 7-Gang Kettenschaltung",
"562 Wh · Kategorie nennt bis ca. 110 km",
"ca. 21 kg ohne Akku · Faltmaß ca. 85 × 43 × 75 cm"
],
"bosch": false,
"midMotor": false,
"speed45": false,
"weightKg": 21.0,
"rangeKm": 110,
"maxRangeKm": 110,
"torqueNm": 50,
"shiftModes": [
"classic"
],
"beltDrive": false,
"hubShift": false,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 58,
"premiumScore": 44
}
];
/* Artikelnummern-Sicherheitscheck – ohne sichtbare Änderung */
(function validateUniqueArticleNumbers() {
var seen = {};
products.forEach(
function (product) {
if (seen[product.articleNumber]) {
if (window.console && console.error) {
console.error(
"Doppelte GermanXia Artikelnummer im Produktfinder:",
product.articleNumber
);
}
}
seen[product.articleNumber] = true;
}
);
})();
/* =========================================
FRAGEN
========================================= */
var questions = [
{
id: "usage",
title: "Wofür möchten Sie Ihr E-Faltrad hauptsächlich nutzen?",
subtitle: "Wählen Sie den wichtigsten Einsatzzweck.",
options: [
{
value: "commute",
title: "Pendeln & ÖPNV",
text: "Arbeitsweg, Bahn und kurze Wege"
},
{
value: "camper",
title: "Wohnmobil & Urlaub",
text: "Kompakt im Camper oder Auto verstauen"
},
{
value: "everyday",
title: "Alltag & Stadt",
text: "Regelmäßige Fahrten, Einkäufe und Freizeit"
},
{
value: "longtour",
title: "Lange Touren & Steigungen",
text: "Viele Kilometer und anspruchsvollere Strecken"
}
]
},
{
id: "carry",
title: "Müssen Sie das E-Faltrad regelmäßig tragen oder anheben?",
subtitle: "Zum Beispiel für Bahn, Treppen, Kofferraum oder Wohnmobil.",
options: [
{
value: "often",
title: "Ja, regelmäßig",
text: "Geringes Gewicht ist sehr wichtig"
},
{
value: "sometimes",
title: "Manchmal",
text: "Zum Beispiel für Auto oder Wohnmobil"
},
{
value: "no",
title: "Eher nicht",
text: "Gewicht ist für mich zweitrangig"
}
]
},
{
id: "range",
title: "Welche Reichweite benötigen Sie typischerweise?",
subtitle: "Die tatsächliche Reichweite hängt von Fahrweise und Bedingungen ab.",
options: [
{
value: "short",
title: "Bis ca. 50 km",
text: "Vor allem kurze Strecken"
},
{
value: "medium",
title: "Ca. 50–100 km",
text: "Alltag und normale Touren"
},
{
value: "long",
title: "100 km und mehr",
text: "Längere Touren und häufige Nutzung"
},
{
value: "max",
title: "Maximale Reichweite",
text: "Sehr lange Strecken und möglichst selten nachladen"
}
]
},
{
id: "focus",
title: "Was ist Ihnen bei Ihrem E-Faltrad am wichtigsten?",
subtitle: "Wählen Sie den Punkt, der für Ihre Kaufentscheidung am wichtigsten ist.",
options: [
{
value: "lightcompact",
title: "Leicht & kompakt",
text: "Einfach tragen, falten und platzsparend verstauen"
},
{
value: "bosch",
title: "Bosch Mittelmotor",
text: "Bosch-Antrieb und natürliches Fahrgefühl"
},
{
value: "comfortshift",
title: "Vollautomatisch / stufenlos",
text: "Automatische oder stufenlose Schaltung für besonders komfortables Fahren"
},
{
value: "value",
title: "Preis-Leistung",
text: "Viel Ausstattung für ein attraktives Budget"
}
]
}
];
var answers = {};
var step = -1;
var finderMode = "questions";
var quickSearchCriteria = null;
var quickSearchQuery = "";
/* =========================================
HAUPTCONTAINER
========================================= */
root.style.cssText =
"max-width:1100px;" +
"margin:35px auto;" +
"padding:0 15px;" +
"box-sizing:border-box;" +
"font-family:Arial,Helvetica,sans-serif;";
var card = append(
root,
createElement(
"div",
"background:#ffffff;" +
"border:1px solid #dfe5eb;" +
"border-radius:14px;" +
"box-shadow:0 4px 18px rgba(25,45,65,0.07);" +
"overflow:hidden;"
)
);
var header = append(
card,
createElement(
"div",
"padding:28px 28px 22px;" +
"text-align:center;" +
"border-bottom:1px solid #e8edf2;"
)
);
append(
header,
createElement(
"div",
"color:#075eae;" +
"font-size:12px;" +
"font-weight:700;" +
"letter-spacing:0.08em;" +
"text-transform:uppercase;" +
"margin-bottom:7px;",
"GermanXia E-Faltrad-Beratung"
)
);
append(
header,
createElement(
"div",
"color:#252a30;" +
"font-size:28px;" +
"line-height:1.2;" +
"font-weight:700;" +
"margin-bottom:9px;",
"Welches E-Faltrad passt zu Ihnen?"
)
);
append(
header,
createElement(
"div",
"max-width:680px;" +
"margin:0 auto;" +
"color:#65717d;" +
"font-size:15px;" +
"line-height:1.55;",
"Beantworten Sie 4 kurze Fragen. Wir vergleichen Ihre Anforderungen mit unseren Mobilemaster-Modellen."
)
);
var progressArea = append(
card,
createElement(
"div",
"padding:20px 28px 0;"
)
);
var progressBackground = append(
progressArea,
createElement(
"div",
"height:6px;" +
"background:#e8edf2;" +
"border-radius:10px;" +
"overflow:hidden;"
)
);
var progressBar = append(
progressBackground,
createElement(
"div",
"width:0%;" +
"height:100%;" +
"background:#075eae;" +
"border-radius:10px;" +
"transition:width .25s ease;"
)
);
var progressText = append(
progressArea,
createElement(
"div",
"margin-top:7px;" +
"text-align:right;" +
"color:#7a848e;" +
"font-size:12px;",
"Start"
)
);
var content = append(
card,
createElement(
"div",
"padding:24px 28px 30px;"
)
);
/* =========================================
STARTSEITE
========================================= */
function renderStart() {
clear(content);
progressBar.style.width = "0%";
progressText.textContent = "Start";
var center = append(
content,
createElement(
"div",
"text-align:center;padding:12px 0 6px;"
)
);
var benefits = append(
center,
createElement(
"div",
"display:grid;" +
"grid-template-columns:repeat(auto-fit,minmax(220px,1fr));" +
"gap:14px;" +
"max-width:860px;" +
"margin:0 auto 26px;"
)
);
addBenefit(
benefits,
"4 kurze Fragen",
"In etwa 45 Sekunden"
);
addBenefit(
benefits,
"Ohne Anmeldung",
"Ergebnis sofort sehen"
);
addBenefit(
benefits,
"Persönliche Auswahl",
"Passend zu Ihrem Einsatz"
);
var startButton = append(
center,
createElement(
"button",
"display:block;" +
"width:100%;" +
"max-width:330px;" +
"margin:0 auto;" +
"border:0;" +
"border-radius:8px;" +
"background:#075eae;" +
"color:#ffffff;" +
"padding:16px 30px;" +
"font-size:17px;" +
"font-weight:700;" +
"cursor:pointer;" +
"box-sizing:border-box;",
"Produktfinder starten"
)
);
startButton.type = "button";
startButton.addEventListener(
"click",
function () {
answers = {};
step = 0;
finderMode = "questions";
quickSearchCriteria = null;
quickSearchQuery = "";
track(
"gx_product_finder_start",
{
mode: "questions"
}
);
renderQuestion();
}
);
var separator = append(
center,
createElement(
"div",
"display:flex;" +
"align-items:center;" +
"gap:12px;" +
"max-width:760px;" +
"margin:30px auto 18px;"
)
);
append(
separator,
createElement(
"div",
"height:1px;" +
"background:#e1e6eb;" +
"flex:1;"
)
);
append(
separator,
createElement(
"div",
"font-size:12px;" +
"font-weight:700;" +
"letter-spacing:.04em;" +
"text-transform:uppercase;" +
"color:#8a949d;" +
"white-space:nowrap;",
"oder als Schnellsuche"
)
);
append(
separator,
createElement(
"div",
"height:1px;" +
"background:#e1e6eb;" +
"flex:1;"
)
);
var quickBox = append(
center,
createElement(
"div",
"max-width:760px;" +
"margin:0 auto;" +
"padding:20px;" +
"border:1px solid #dfe5eb;" +
"border-radius:10px;" +
"background:#f8fafc;" +
"box-sizing:border-box;" +
"text-align:left;"
)
);
append(
quickBox,
createElement(
"div",
"font-size:18px;" +
"font-weight:700;" +
"line-height:1.35;" +
"color:#252a30;" +
"margin-bottom:6px;",
"Sie wissen schon ungefähr, was Sie suchen?"
)
);
append(
quickBox,
createElement(
"div",
"font-size:14px;" +
"line-height:1.5;" +
"color:#697580;" +
"margin-bottom:12px;",
"Beschreiben Sie Ihren Wunsch in einem Satz. Wir gleichen ihn mit den hinterlegten Mobilemaster-Modellen ab."
)
);
var quickInput = append(
quickBox,
createElement(
"textarea",
"display:block;" +
"width:100%;" +
"min-height:92px;" +
"resize:vertical;" +
"box-sizing:border-box;" +
"padding:13px 14px;" +
"border:1px solid #cfd8e1;" +
"border-radius:8px;" +
"background:#ffffff;" +
"color:#252a30;" +
"font-family:Arial,Helvetica,sans-serif;" +
"font-size:16px;" +
"line-height:1.45;" +
"outline:none;"
)
);
quickInput.placeholder =
"z. B. E-Faltrad für Urlaub und lange Touren, komfortable Schaltung, Bosch und ungefähr bis 5.000 €";
var quickError = append(
quickBox,
createElement(
"div",
"display:none;" +
"margin-top:8px;" +
"font-size:13px;" +
"line-height:1.4;" +
"color:#a23b3b;"
)
);
var quickButtonWrap = append(
quickBox,
createElement(
"div",
"margin-top:12px;" +
"text-align:center;"
)
);
var quickButton = append(
quickButtonWrap,
createElement(
"button",
"display:inline-block;" +
"width:100%;" +
"max-width:280px;" +
"box-sizing:border-box;" +
"padding:13px 18px;" +
"border:2px solid #075eae;" +
"border-radius:7px;" +
"background:#ffffff;" +
"color:#075eae;" +
"font-size:15px;" +
"font-weight:700;" +
"cursor:pointer;",
"Schnellsuche starten"
)
);
quickButton.type = "button";
function runQuickSearch() {
var query =
String(quickInput.value || "").trim();
if (query.length < 8) {
quickError.style.display = "block";
quickError.textContent =
"Bitte beschreiben Sie kurz, wofür Sie das E-Faltrad nutzen möchten.";
return;
}
quickError.style.display = "none";
finderMode = "quick";
quickSearchQuery = query;
quickSearchCriteria =
parseQuickSearchQuery(query);
answers = {};
step = -1;
track(
"gx_product_finder_start",
{
mode: "quick"
}
);
track(
"gx_product_finder_quick_search",
{
usage:
quickSearchCriteria.primaryUsage || "",
bosch:
quickSearchCriteria.requireBosch ? "yes" : "no",
automatic:
quickSearchCriteria.requireAutomatic ? "yes" : "no",
stepless:
quickSearchCriteria.requireStepless ? "yes" : "no",
max_budget:
quickSearchCriteria.maxBudget || 0,
min_range:
quickSearchCriteria.minRangeKm || 0
}
);
renderResults();
}
quickButton.addEventListener(
"click",
runQuickSearch
);
quickInput.addEventListener(
"keydown",
function (event) {
if (
event.key === "Enter" &&
!event.shiftKey
) {
event.preventDefault();
runQuickSearch();
}
}
);
}
function addBenefit(parent, title, text) {
var box = append(
parent,
createElement(
"div",
"display:grid;" +
"place-items:center;" +
"min-height:112px;" +
"padding:20px 18px;" +
"background:#f7f9fb;" +
"border:1px solid #e3e8ed;" +
"border-radius:10px;" +
"box-sizing:border-box;" +
"text-align:center;"
)
);
/*
* Falls ein Browser "display:grid" beim Erstellen des DIVs nicht
* übernimmt, bleiben die Inhalte dennoch vollständig sichtbar.
*/
box.style.display = "block";
append(
box,
createElement(
"div",
"font-weight:700;" +
"color:#252a30;" +
"font-size:18px;" +
"line-height:1.3;" +
"margin-bottom:7px;",
title
)
);
append(
box,
createElement(
"div",
"color:#6f7a84;" +
"font-size:14.5px;" +
"line-height:1.45;",
text
)
);
}
/* =========================================
FRAGEN
========================================= */
function renderQuestion() {
clear(content);
var question = questions[step];
var percentage =
((step + 1) / questions.length) * 100;
progressBar.style.width =
percentage + "%";
progressText.textContent =
"Frage " +
(step + 1) +
" von " +
questions.length;
var wrapper = append(
content,
createElement(
"div",
"max-width:850px;margin:0 auto;"
)
);
var questionHeader = append(
wrapper,
createElement(
"div",
"text-align:center;margin-bottom:22px;"
)
);
append(
questionHeader,
createElement(
"div",
"font-size:22px;" +
"font-weight:700;" +
"color:#252a30;" +
"line-height:1.3;",
question.title
)
);
append(
questionHeader,
createElement(
"div",
"margin-top:7px;" +
"color:#6e7984;" +
"font-size:14px;" +
"line-height:1.45;",
question.subtitle
)
);
var grid = append(
wrapper,
createElement(
"div",
"display:grid;" +
"grid-template-columns:repeat(auto-fit,minmax(220px,1fr));" +
"gap:11px;"
)
);
question.options.forEach(
function (option) {
var selected =
answers[question.id] === option.value;
var optionButton = append(
grid,
createElement(
"button",
"text-align:left;" +
"padding:16px;" +
"border-radius:9px;" +
"border:" +
(selected
? "2px solid #075eae;"
: "1px solid #dce3e9;") +
"background:" +
(selected
? "#eef5fc;"
: "#ffffff;") +
"cursor:pointer;" +
"min-height:92px;"
)
);
optionButton.type = "button";
append(
optionButton,
createElement(
"span",
"display:block;" +
"font-size:17px;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:6px;",
option.title
)
);
append(
optionButton,
createElement(
"span",
"display:block;" +
"font-size:14px;" +
"line-height:1.45;" +
"font-weight:400;" +
"color:#73808b;",
option.text
)
);
optionButton.addEventListener(
"click",
function () {
answers[question.id] =
option.value;
track(
"gx_product_finder_answer",
{
question: question.id,
answer: option.value
}
);
if (
step <
questions.length - 1
) {
step =
step + 1;
renderQuestion();
} else {
renderResults();
}
}
);
}
);
if (step > 0) {
var backArea = append(
wrapper,
createElement(
"div",
"margin-top:22px;"
)
);
var backButton = append(
backArea,
createElement(
"button",
"background:#ffffff;" +
"border:1px solid #cfd7df;" +
"color:#46515b;" +
"border-radius:6px;" +
"padding:10px 18px;" +
"font-size:13px;" +
"font-weight:600;" +
"cursor:pointer;",
"← Zurück"
)
);
backButton.type = "button";
backButton.addEventListener(
"click",
function () {
step =
step - 1;
renderQuestion();
}
);
}
}
/* =========================================
SCHNELLSUCHE: TEXT VERSTEHEN
========================================= */
function normalizeSearchText(value) {
return String(value || "")
.toLowerCase()
.replace(/ä/g, "ae")
.replace(/ö/g, "oe")
.replace(/ü/g, "ue")
.replace(/ß/g, "ss")
.replace(/\s+/g, " ")
.trim();
}
function searchHasAny(text, words) {
var i;
for (i = 0; i < words.length; i++) {
if (text.indexOf(words[i]) !== -1) {
return true;
}
}
return false;
}
function getProductSearchText(product) {
return normalizeSearchText(
[
product.name || "",
product.badge || "",
product.description || "",
product.facts
? product.facts.join(" ")
: ""
].join(" ")
);
}
function extractQuickBudget(text) {
var normalized =
String(text || "")
.toLowerCase()
.replace(/\s+/g, " ");
var hard =
/(?:bis|maximal|höchstens|hoechstens|unter|max\.?)\s*(?:ca\.?\s*|etwa\s*|ungefähr\s*|ungefaehr\s*)?\d/i
.test(normalized);
var match;
var value = 0;
match = normalized.match(
/(\d{1,2}(?:[.,]\d{1,2})?)\s*k\s*(?:€|eur|euro)?/i
);
if (match && match[1]) {
value =
parseFloat(
match[1].replace(",", ".")
) * 1000;
return {
value: Math.round(value),
hard: hard
};
}
match = normalized.match(
/(\d{1,3}(?:[.\s]\d{3})|\d{4,5})\s*(?:€|eur|euro)/i
);
if (match && match[1]) {
value =
parseInt(
match[1]
.replace(/\./g, "")
.replace(/\s/g, ""),
10
);
return {
value: value,
hard: hard
};
}
/*
* Fallback für Formulierungen wie "Budget 5000"
* ohne Euro-Zeichen.
*/
match = normalized.match(
/(?:budget|preis|kosten|bis|maximal|unter|höchstens|hoechstens)\D{0,12}(\d{4,5})/i
);
if (match && match[1]) {
value =
parseInt(
match[1],
10
);
return {
value: value,
hard: hard
};
}
return {
value: 0,
hard: false
};
}
function extractQuickRange(text) {
var normalized =
normalizeSearchText(text);
var regex =
/(\d{2,3})\s*(?:km|kilometer)/g;
var match;
var values = [];
while (
(
match =
regex.exec(normalized)
) !== null
) {
if (
match[1] &&
parseInt(match[1], 10) <= 350
) {
values.push(
parseInt(match[1], 10)
);
}
}
if (!values.length) {
return 0;
}
return Math.max.apply(
null,
values
);
}
function parseQuickSearchQuery(query) {
var text =
normalizeSearchText(query);
var budget =
extractQuickBudget(query);
var criteria = {
usageScores: {
commute: 0,
camper: 0,
everyday: 0,
longtour: 0,
hills: 0
},
primaryUsage: "",
carryMode: "",
minRangeKm:
extractQuickRange(query),
maxBudget:
budget.value,
budgetHard:
budget.hard,
requireBosch: false,
preferBosch: false,
preferBafang: false,
requireMidMotor: false,
requireAutomatic: false,
preferAutomatic: false,
requireStepless: false,
preferStepless: false,
preferComfort: false,
preferPremium: false,
preferValue: false,
preferLight: false,
preferCompact: false,
preferRohloff: false,
preferEnviolo: false,
preferDi2: false,
preferBelt: false,
preferSmartSystem: false,
preferLowEntry: false,
requireSpeed45: false
};
/* Einsatzzweck */
if (
searchHasAny(
text,
[
"pendel",
"arbeitsweg",
"oepnv",
"bahn",
"zug",
"bus",
"last mile"
]
)
) {
criteria.usageScores.commute += 90;
}
if (
searchHasAny(
text,
[
"wohnmobil",
"camper",
"caravan",
"urlaub",
"ferien",
"kofferraum",
"reise"
]
)
) {
criteria.usageScores.camper += 90;
}
if (
searchHasAny(
text,
[
"alltag",
"stadt",
"einkauf",
"freizeit",
"taeglich",
"jeden tag"
]
)
) {
criteria.usageScores.everyday += 80;
}
if (
searchHasAny(
text,
[
"lange tour",
"lange strecke",
"langstrecke",
"touren",
"ueberland",
"viele kilometer",
"weite strecke",
"mehrtag",
"radreise"
]
)
) {
criteria.usageScores.longtour += 100;
}
if (
searchHasAny(
text,
[
"berg",
"steigung",
"bergauf",
"huegelig",
"anspruchsvoll",
"alle strecken",
"alle moeglichen strecken",
"jedes terrain",
"gelaende"
]
)
) {
criteria.usageScores.hills += 100;
criteria.usageScores.longtour += 35;
}
if (
searchHasAny(
text,
[
"allround",
"vielseitig",
"verschiedene strecken",
"alles fahren"
]
)
) {
criteria.usageScores.everyday += 45;
criteria.usageScores.longtour += 45;
}
/* Gewicht / Faltmaß */
if (
searchHasAny(
text,
[
"sehr leicht",
"moeglichst leicht",
"tragen",
"heben",
"treppe",
"leichtes rad",
"leichtes e-faltrad"
]
)
) {
criteria.preferLight = true;
criteria.carryMode = "often";
}
if (
searchHasAny(
text,
[
"kompakt",
"platzsparend",
"kleines faltmass",
"klein falten",
"wenig platz",
"stauraum"
]
)
) {
criteria.preferCompact = true;
if (!criteria.carryMode) {
criteria.carryMode = "sometimes";
}
}
/* Motor */
if (text.indexOf("bosch") !== -1) {
criteria.requireBosch = true;
criteria.preferBosch = true;
}
if (text.indexOf("bafang") !== -1) {
criteria.preferBafang = true;
}
if (
searchHasAny(
text,
[
"mittelmotor",
"mittel motor"
]
)
) {
criteria.requireMidMotor = true;
}
/* Schaltung / Komfort */
if (
searchHasAny(
text,
[
"komfort",
"komfortabel",
"bequem",
"entspannt",
"bequeme ausstattung",
"komfortable ausstattung"
]
)
) {
criteria.preferComfort = true;
}
if (
searchHasAny(
text,
[
"vollautomatisch",
"vollautomatik",
"automatisch",
"automatik",
"nicht selbst schalten",
"nicht schalten"
]
)
) {
criteria.requireAutomatic = true;
criteria.preferAutomatic = true;
criteria.preferComfort = true;
}
if (
searchHasAny(
text,
[
"stufenlos",
"stufenlose schaltung"
]
)
) {
criteria.requireStepless = true;
criteria.preferStepless = true;
criteria.preferComfort = true;
}
if (text.indexOf("enviolo") !== -1) {
criteria.preferEnviolo = true;
criteria.preferStepless = true;
criteria.preferComfort = true;
}
if (text.indexOf("rohloff") !== -1) {
criteria.preferRohloff = true;
criteria.preferPremium = true;
}
if (text.indexOf("di2") !== -1) {
criteria.preferDi2 = true;
criteria.preferAutomatic = true;
criteria.preferComfort = true;
}
if (
searchHasAny(
text,
[
"riemen",
"gates"
]
)
) {
criteria.preferBelt = true;
}
if (
searchHasAny(
text,
[
"smart system",
"smartsystem",
"ebike flow",
"flow app"
]
)
) {
criteria.preferSmartSystem = true;
}
if (
searchHasAny(
text,
[
"tiefeinstieg",
"tiefer einstieg",
"niedriger einstieg"
]
)
) {
criteria.preferLowEntry = true;
}
/* Preis / Qualitätsfokus */
if (
searchHasAny(
text,
[
"preis-leistung",
"preis leistung",
"guenstig",
"preiswert",
"budget",
"moeglichst billig"
]
)
) {
criteria.preferValue = true;
}
if (
searchHasAny(
text,
[
"premium",
"hochwertig",
"beste ausstattung",
"high end",
"high-end"
]
)
) {
criteria.preferPremium = true;
}
/* S-Pedelec nur bei ausdrücklicher Nennung */
if (
searchHasAny(
text,
[
"s-pedelec",
"s pedelec",
"45 km/h",
"45km/h",
"bis 45"
]
)
) {
criteria.requireSpeed45 = true;
}
/* Reichweite aus sprachlichen Angaben ergänzen */
if (!criteria.minRangeKm) {
if (
searchHasAny(
text,
[
"maximale reichweite",
"sehr grosse reichweite",
"sehr große reichweite",
"so weit wie moeglich",
"extrem lange strecken"
]
)
) {
criteria.minRangeKm = 180;
} else if (
searchHasAny(
text,
[
"grosse reichweite",
"große reichweite",
"lange reichweite"
]
)
) {
criteria.minRangeKm = 120;
}
}
/* Haupt-Einsatzzweck bestimmen */
Object.keys(
criteria.usageScores
).forEach(
function (key) {
if (
!criteria.primaryUsage ||
criteria.usageScores[key] >
criteria.usageScores[
criteria.primaryUsage
]
) {
criteria.primaryUsage = key;
}
}
);
if (
criteria.usageScores[
criteria.primaryUsage
] <= 0
) {
criteria.primaryUsage = "";
}
return criteria;
}
function getQuickSearchScore(product) {
var criteria =
quickSearchCriteria || {};
var score = 0;
var productText =
getProductSearchText(product);
var effectiveRange =
getEffectiveRange(product);
var usageScores =
criteria.usageScores || {};
/* Fahrzeugklasse */
if (
criteria.requireSpeed45
) {
if (product.speed45) {
score += 700;
} else {
score -= 1200;
}
} else if (product.speed45) {
score -= 500;
}
/* Einsatzzwecke */
Object.keys(
usageScores
).forEach(
function (usage) {
var importance =
usageScores[usage] || 0;
if (!importance) {
return;
}
if (
arrayHas(
product.uses,
usage
)
) {
score +=
importance * 0.85;
} else if (
usage === "hills" &&
product.torqueNm >= 75
) {
score +=
importance * 0.45;
} else {
score -=
importance * 0.10;
}
}
);
if (
(usageScores.longtour || 0) > 0
) {
score +=
getRangeScore(
product,
"long"
) * 0.45;
if (product.torqueNm >= 85) {
score += 24;
} else if (product.torqueNm >= 75) {
score += 16;
} else if (product.torqueNm >= 65) {
score += 9;
}
}
if (
(usageScores.hills || 0) > 0
) {
if (product.torqueNm >= 85) {
score += 55;
} else if (product.torqueNm >= 75) {
score += 38;
} else if (product.torqueNm >= 65) {
score += 22;
} else {
score -= 25;
}
}
if (
(usageScores.camper || 0) > 0
) {
score +=
(product.compactScore || 0) *
0.28;
score +=
getWeightScore(
product.weightKg,
"sometimes"
) * 0.35;
}
/* Gewicht und Kompaktheit */
if (criteria.preferLight) {
score +=
getWeightScore(
product.weightKg,
"often"
) * 1.15;
}
if (criteria.preferCompact) {
score +=
(product.compactScore || 0) *
0.90;
}
/* Reichweite */
if (criteria.minRangeKm) {
if (
effectiveRange >=
criteria.minRangeKm
) {
score += 80;
score += Math.min(
28,
(
effectiveRange -
criteria.minRangeKm
) / 3
);
} else {
score -= Math.min(
220,
(
criteria.minRangeKm -
effectiveRange
) * 2.2
);
}
}
/* Budget */
if (
criteria.maxBudget &&
product.price
) {
if (
product.price <=
criteria.maxBudget
) {
score += 65;
score += Math.min(
18,
(
criteria.maxBudget -
product.price
) /
Math.max(
150,
criteria.maxBudget / 18
)
);
} else {
var overBudget =
product.price -
criteria.maxBudget;
score -=
criteria.budgetHard
? 180
: 100;
score -= Math.min(
220,
overBudget / 8
);
}
}
/* Motor */
if (criteria.requireBosch) {
if (
product.bosch &&
product.midMotor
) {
score += 190;
} else {
score -= 600;
}
}
if (
criteria.requireMidMotor
) {
if (product.midMotor) {
score += 100;
} else {
score -= 220;
}
}
if (
criteria.preferBafang
) {
if (
productText.indexOf(
"bafang"
) !== -1
) {
score += 190;
} else {
score -= 130;
}
}
/* Komfort und Schaltung */
if (criteria.preferComfort) {
if (
product.automatic &&
product.stepless
) {
score += 95;
} else if (
product.automatic
) {
score += 80;
} else if (
product.stepless
) {
score += 72;
} else if (
product.hubShift
) {
score += 25;
}
if (product.beltDrive) {
score += 20;
}
score +=
(product.premiumScore || 0) *
0.22;
}
if (
criteria.requireAutomatic
) {
if (product.automatic) {
score += 185;
} else {
score -= 260;
}
}
if (
criteria.requireStepless
) {
if (product.stepless) {
score += 185;
} else {
score -= 260;
}
}
if (
criteria.preferEnviolo
) {
if (
productText.indexOf(
"enviolo"
) !== -1 ||
productText.indexOf(
"n380"
) !== -1
) {
score += 220;
} else {
score -= 140;
}
}
if (
criteria.preferRohloff
) {
if (
productText.indexOf(
"rohloff"
) !== -1
) {
score += 240;
} else {
score -= 160;
}
}
if (
criteria.preferDi2
) {
if (
productText.indexOf(
"di2"
) !== -1
) {
score += 220;
} else {
score -= 140;
}
}
if (
criteria.preferBelt
) {
if (product.beltDrive) {
score += 90;
} else {
score -= 55;
}
}
if (
criteria.preferSmartSystem
) {
if (product.smartSystem) {
score += 115;
} else {
score -= 60;
}
}
if (
criteria.preferLowEntry
) {
if (
productText.indexOf(
"tiefeinstieg"
) !== -1 ||
productText.indexOf(
"jung"
) !== -1
) {
score += 120;
} else {
score -= 30;
}
}
/* Preis-Leistung und Premium */
if (criteria.preferValue) {
score +=
getValueScore(
product
) * 0.95;
}
if (criteria.preferPremium) {
score +=
(product.premiumScore || 0) *
0.85;
}
/*
* Bei sehr allgemeinen Eingaben verhindert eine kleine
* Grundbewertung, dass exotische Modelle zufällig vorne landen.
*/
if (
!criteria.primaryUsage &&
!criteria.requireBosch &&
!criteria.requireMidMotor &&
!criteria.requireAutomatic &&
!criteria.requireStepless &&
!criteria.preferLight &&
!criteria.preferCompact &&
!criteria.preferValue &&
!criteria.preferPremium
) {
score +=
getValueScore(
product
) * 0.25;
score +=
(product.premiumScore || 0) *
0.15;
}
return score;
}
function getQuickRecommendationText(product) {
var criteria =
quickSearchCriteria || {};
var reasons = [];
var effectiveRange =
getEffectiveRange(product);
var productText =
getProductSearchText(product);
if (
criteria.primaryUsage === "camper" &&
arrayHas(
product.uses,
"camper"
)
) {
reasons.push(
"gut zu Urlaub, Wohnmobil oder Auto passt"
);
}
if (
(
criteria.primaryUsage === "longtour" ||
(
criteria.usageScores &&
(
criteria.usageScores.longtour > 0 ||
criteria.usageScores.hills > 0
)
)
) &&
(
arrayHas(
product.uses,
"longtour"
) ||
arrayHas(
product.uses,
"hills"
)
)
) {
reasons.push(
"für längere und anspruchsvollere Strecken geeignet ist"
);
}
if (
criteria.primaryUsage === "commute" &&
arrayHas(
product.uses,
"commute"
)
) {
reasons.push(
"gut zum Pendeln und für regelmäßige Wege passt"
);
}
if (
criteria.requireBosch &&
product.bosch
) {
reasons.push(
"den gewünschten Bosch-Mittelmotor bietet"
);
}
if (
criteria.requireAutomatic &&
product.automatic
) {
reasons.push(
"automatisch schaltet"
);
} else if (
criteria.requireStepless &&
product.stepless
) {
reasons.push(
"eine stufenlose Schaltung bietet"
);
} else if (
criteria.preferComfort &&
product.automatic &&
product.stepless
) {
reasons.push(
"mit vollautomatischer, stufenloser Schaltung besonders komfortabel ist"
);
} else if (
criteria.preferComfort &&
product.automatic
) {
reasons.push(
"mit automatischer Schaltung hohen Bedienkomfort bietet"
);
} else if (
criteria.preferComfort &&
product.stepless
) {
reasons.push(
"stufenloses und komfortables Schalten ermöglicht"
);
}
if (
criteria.preferRohloff &&
productText.indexOf(
"rohloff"
) !== -1
) {
reasons.push(
"die gewünschte Rohloff E-14 nutzt"
);
}
if (
criteria.preferEnviolo &&
(
productText.indexOf(
"enviolo"
) !== -1 ||
productText.indexOf(
"n380"
) !== -1
)
) {
reasons.push(
"die gewünschte Enviolo-Technik bietet"
);
}
if (
criteria.preferDi2 &&
productText.indexOf(
"di2"
) !== -1
) {
reasons.push(
"eine passende Shimano-Di2-Schaltung bietet"
);
}
if (
criteria.preferLight &&
product.weightKg <= 19
) {
reasons.push(
"vergleichsweise leicht ist"
);
}
if (
criteria.preferCompact &&
product.compactScore >= 80
) {
reasons.push(
"sich besonders kompakt verstauen lässt"
);
}
if (
criteria.minRangeKm &&
effectiveRange >=
criteria.minRangeKm
) {
reasons.push(
"die gewünschte Reichweite abdeckt"
);
}
if (
criteria.maxBudget &&
product.price &&
product.price <=
criteria.maxBudget
) {
reasons.push(
"innerhalb Ihres genannten Budgets liegt"
);
}
if (
criteria.preferValue
) {
reasons.push(
"ein attraktives Verhältnis aus Preis, Reichweite und Ausstattung bietet"
);
}
if (
criteria.preferPremium &&
product.premiumScore >= 80
) {
reasons.push(
"hochwertige Komponenten kombiniert"
);
}
if (!reasons.length) {
reasons.push(
"Ihre beschriebenen Anforderungen insgesamt gut abdeckt"
);
}
return (
"Passt besonders, weil das Modell " +
reasons.slice(0, 3).join(", ") +
"."
);
}
function getCurrentRecommendationText(product) {
if (
finderMode === "quick"
) {
return getQuickRecommendationText(
product
);
}
return getRecommendationText(
product
);
}
/* =========================================
SCORING
========================================= */
function arrayHas(list, value) {
return (
Array.isArray(list) &&
list.indexOf(value) !== -1
);
}
function getEffectiveRange(product) {
return (
product.maxRangeKm ||
product.rangeKm ||
0
);
}
function getWeightScore(weight, mode) {
if (!weight) {
return 0;
}
if (mode === "often") {
if (weight <= 16) {
return 75;
}
if (weight <= 18) {
return 60;
}
if (weight <= 20) {
return 40;
}
if (weight <= 22) {
return 18;
}
return -35;
}
if (mode === "sometimes") {
if (weight <= 18) {
return 40;
}
if (weight <= 20) {
return 32;
}
if (weight <= 22) {
return 22;
}
if (weight <= 24) {
return 10;
}
return 0;
}
return 8;
}
function getRangeScore(product, mode) {
var range =
product.rangeKm ||
0;
if (mode === "max") {
range =
getEffectiveRange(product);
}
if (mode === "short") {
/*
* Bei kurzen Strecken wird hohe Reichweite nicht bestraft.
* Das verhindert, dass ein ansonsten sehr passendes Modell
* nur wegen eines größeren Akkus schlechter bewertet wird.
*/
if (range >= 50) {
return 35;
}
return -35;
}
if (mode === "medium") {
if (range >= 100) {
return 50;
}
if (range >= 80) {
return 35;
}
if (range >= 50) {
return 15;
}
return -40;
}
if (mode === "long") {
if (range >= 140) {
return 65;
}
if (range >= 120) {
return 55;
}
if (range >= 100) {
return 32;
}
return -50;
}
if (mode === "max") {
if (range >= 250) {
return 105;
}
if (range >= 200) {
return 90;
}
if (range >= 150) {
return 65;
}
if (range >= 130) {
return 45;
}
if (range >= 100) {
return 22;
}
return 0;
}
return 0;
}
function getValueScore(product) {
var score = 0;
var range = getEffectiveRange(product);
if (!product.price) {
return 0;
}
if (product.price <= 1800) {
score += 90;
} else if (product.price <= 2300) {
score += 82;
} else if (product.price <= 2800) {
score += 74;
} else if (product.price <= 3500) {
score += 62;
} else if (product.price <= 4300) {
score += 48;
} else if (product.price <= 5200) {
score += 35;
} else if (product.price <= 6500) {
score += 20;
} else {
score += 8;
}
/*
* Preis-Leistung soll nicht nur "möglichst billig" bedeuten.
* Deshalb fließen Reichweite und technische Ausstattung moderat ein.
*/
score += Math.min(
35,
range / 4
);
if (product.midMotor) {
score += 10;
}
if (product.beltDrive) {
score += 7;
}
if (product.smartSystem) {
score += 6;
}
score += Math.min(
10,
(product.premiumScore || 0) * 0.10
);
return score;
}
function getFocusScore(product, mode) {
if (mode === "lightcompact") {
return (
getWeightScore(
product.weightKg,
"often"
) * 0.80
) +
(
(product.compactScore || 0) *
0.78
);
}
if (mode === "bosch") {
if (
product.bosch &&
product.midMotor
) {
return 140;
}
return -220;
}
if (mode === "comfortshift") {
if (
product.automatic &&
product.stepless
) {
return 145;
}
if (product.automatic) {
return 130;
}
if (product.stepless) {
return 120;
}
/*
* Eine gekapselte Nabenschaltung ist zwar komfortabel,
* aber keine echte Automatik bzw. stufenlose Schaltung.
*/
if (product.hubShift) {
return 22;
}
return -55;
}
if (mode === "value") {
return getValueScore(product);
}
return 0;
}
function getProductScore(product) {
var score = 0;
/* -----------------------------------------
1. Einsatzzweck
----------------------------------------- */
if (answers.usage === "longtour") {
/*
* "Lange Touren & Steigungen" bündelt die bisher
* getrennten Antworten longtour und hills.
*/
if (
arrayHas(
product.uses,
"longtour"
)
) {
score += 68;
} else if (
arrayHas(
product.uses,
"hills"
)
) {
score += 48;
} else {
score += 3;
}
/*
* Für diese Nutzung werden Reichweite und ein kräftiger
* Motor zusätzlich berücksichtigt, ohne schwächere
* Tourenmodelle pauschal auszuschließen.
*/
score +=
getRangeScore(
product,
"long"
) * 0.35;
if (product.torqueNm >= 85) {
score += 24;
} else if (product.torqueNm >= 75) {
score += 16;
} else if (product.torqueNm >= 65) {
score += 9;
}
} else if (
arrayHas(
product.uses,
answers.usage
)
) {
score += 62;
} else {
score += 5;
}
if (
answers.usage === "camper"
) {
score +=
(product.compactScore || 0) *
0.28;
score +=
getWeightScore(
product.weightKg,
"sometimes"
) * 0.35;
}
/* -----------------------------------------
2. Tragen / Gewicht
----------------------------------------- */
score +=
getWeightScore(
product.weightKg,
answers.carry
);
/* -----------------------------------------
3. Reichweite
----------------------------------------- */
score +=
getRangeScore(
product,
answers.range
);
/* -----------------------------------------
4. Wichtigste Eigenschaft
----------------------------------------- */
score +=
getFocusScore(
product,
answers.focus
);
/*
* Das S-Pedelec ist bewusst nicht mehr Teil der vier Fragen.
* Daher soll es ohne ausdrücklichen 45-km/h-Wunsch nicht
* versehentlich unter den normalen E-Falträdern auftauchen.
*/
if (product.speed45) {
score -= 500;
}
return score;
}
/* =========================================
PRODUKTSPEZIFISCHE EINORDNUNG
========================================= */
function getRecommendationText(product) {
var reasons = [];
var effectiveRange =
getEffectiveRange(product);
/* Einsatzzweck */
if (
answers.usage === "longtour" &&
(
arrayHas(
product.uses,
"longtour"
) ||
arrayHas(
product.uses,
"hills"
)
)
) {
reasons.push(
"passt zu längeren Touren und anspruchsvolleren Strecken"
);
} else if (
arrayHas(
product.uses,
answers.usage
)
) {
reasons.push(
"passt gut zu Ihrem gewählten Einsatzzweck"
);
}
/* Tragen */
if (
answers.carry === "often" &&
product.weightKg <= 18
) {
reasons.push(
"ist besonders leicht zu tragen und zu verstauen"
);
} else if (
answers.carry === "sometimes" &&
product.weightKg <= 20
) {
reasons.push(
"bleibt für Auto oder Wohnmobil vergleichsweise handlich"
);
}
/* Reichweite */
if (
answers.range === "medium" &&
effectiveRange >= 80
) {
reasons.push(
"deckt den gewünschten mittleren Reichweitenbereich gut ab"
);
}
if (
answers.range === "long" &&
effectiveRange >= 120
) {
reasons.push(
"bietet eine hohe Reichweitenreserve"
);
}
if (
answers.range === "max" &&
effectiveRange >= 200
) {
reasons.push(
"ist auf besonders große Reichweite ausgelegt"
);
}
/* Fokus */
if (
answers.focus === "lightcompact"
) {
if (
product.weightKg <= 18 &&
product.compactScore >= 80
) {
reasons.push(
"kombiniert geringes Gewicht mit besonders kompaktem Faltmaß"
);
} else if (
product.compactScore >= 80
) {
reasons.push(
"lässt sich besonders kompakt verstauen"
);
} else if (
product.weightKg <= 19.5
) {
reasons.push(
"ist im Vergleich besonders leicht"
);
}
}
if (
answers.focus === "bosch" &&
product.bosch
) {
reasons.push(
"hat den gewünschten Bosch-Mittelmotor"
);
}
if (
answers.focus === "comfortshift"
) {
if (
product.automatic &&
product.stepless
) {
reasons.push(
"bietet eine vollautomatische und stufenlose Schaltung"
);
} else if (
product.automatic
) {
reasons.push(
"bietet eine automatische Schaltung"
);
} else if (
product.stepless
) {
reasons.push(
"bietet stufenloses Schalten"
);
}
}
if (
answers.focus === "value"
) {
reasons.push(
"bietet ein attraktives Verhältnis aus Preis, Ausstattung und Reichweite"
);
}
if (!reasons.length) {
reasons.push(
"erzielt über Ihre vier Antworten insgesamt eine hohe Übereinstimmung"
);
}
return (
"Passt besonders, weil das Modell " +
reasons.slice(0, 3).join(", ") +
"."
);
}
/* =========================================
TECHNISCHER PRODUKTVERGLEICH
========================================= */
function formatPrice(price) {
if (!price) {
return "–";
}
try {
return new Intl.NumberFormat(
"de-DE",
{
style: "currency",
currency: "EUR",
maximumFractionDigits: 0
}
).format(price);
} catch (error) {
return price + " €";
}
}
function getFactSegments(product, index) {
if (
!product.facts ||
typeof product.facts[index] !== "string"
) {
return [];
}
return product.facts[index]
.split("·")
.map(
function (segment) {
return segment.trim();
}
)
.filter(
function (segment) {
return segment.length > 0;
}
);
}
function getMotorTorqueText(product) {
var segments = getFactSegments(product, 0);
var motor = "";
if (segments.length) {
motor = segments[0];
} else if (product.bosch) {
motor = "Bosch Mittelmotor";
} else if (product.midMotor) {
motor = "Mittelmotor";
} else {
motor = "Motor";
}
if (product.torqueNm) {
return motor + " · " + product.torqueNm + " Nm";
}
return motor;
}
function getBatteryText(product) {
var i;
var j;
var segments;
var match;
if (!product.facts) {
return "–";
}
for (i = 0; i < product.facts.length; i++) {
segments = String(product.facts[i]).split("·");
for (j = 0; j < segments.length; j++) {
match = segments[j].match(
/(?:\d{3,4}\s*\/\s*)?\d{3,4}\s*Wh/i
);
if (match && match[0]) {
return match[0].replace(/\s*\/\s*/, "/");
}
}
}
return "–";
}
function getRangeText(product) {
var i;
var j;
var segments;
if (product.facts) {
for (i = 0; i < product.facts.length; i++) {
segments = String(product.facts[i]).split("·");
for (j = 0; j < segments.length; j++) {
if (
/km/i.test(segments[j]) &&
!/kg/i.test(segments[j])
) {
return segments[j].trim();
}
}
}
}
if (
product.rangeKm &&
product.maxRangeKm &&
product.rangeKm !== product.maxRangeKm
) {
return (
"ca. " +
product.rangeKm +
"–" +
product.maxRangeKm +
" km"
);
}
if (product.maxRangeKm) {
return "bis ca. " + product.maxRangeKm + " km";
}
if (product.rangeKm) {
return "ca. " + product.rangeKm + " km";
}
return "–";
}
function getWeightText(product) {
if (!product.weightKg) {
return "–";
}
return (
String(product.weightKg).replace(".", ",") +
" kg ohne Akku"
);
}
function getGearText(product) {
var segments = getFactSegments(product, 1);
if (segments.length) {
return segments[0];
}
if (product.automatic) {
return "Automatische Schaltung";
}
if (product.stepless) {
return "Stufenlose Schaltung";
}
return "–";
}
function getShiftTypeText(product) {
if (
product.automatic === true &&
product.stepless === true
) {
return "Vollautomatisch & stufenlos";
}
if (product.automatic === true) {
return "Automatisch";
}
if (product.stepless === true) {
return "Stufenlos";
}
return "Klassisch / manuell";
}
function getDriveText(product) {
var text = "";
var lower = "";
if (
product.facts &&
typeof product.facts[1] === "string"
) {
text = product.facts[1];
lower = text.toLowerCase();
}
if (
lower.indexOf("kette") !== -1 &&
(
lower.indexOf("riemen") !== -1 ||
lower.indexOf("gates") !== -1
)
) {
if (lower.indexOf("optional") !== -1) {
return "Kette · Riemen optional";
}
return "Kette oder Riemen";
}
if (
lower.indexOf("riemen") !== -1 ||
lower.indexOf("gates") !== -1
) {
return "Riemenantrieb";
}
if (lower.indexOf("kette") !== -1) {
return "Kettenantrieb";
}
if (product.beltDrive === true) {
return "Riemenantrieb verfügbar";
}
return "Kettenantrieb";
}
function getFoldSizeText(product) {
var i;
var fact;
var match;
if (!product.facts) {
return "–";
}
for (i = 0; i < product.facts.length; i++) {
fact = String(product.facts[i]);
match = fact.match(
/Faltmaß\s*(?:ca\.\s*)?(.+)$/i
);
if (match && match[1]) {
return match[1].trim();
}
}
return "Nicht angegeben";
}
function addTechnicalRow(
parent,
label,
value,
highlightText,
highlightType
) {
var row = append(
parent,
createElement(
"div",
"padding:11px 0;" +
"border-top:1px solid #e8edf2;"
)
);
append(
row,
createElement(
"div",
"margin-bottom:4px;" +
"font-size:11px;" +
"line-height:1.3;" +
"font-weight:700;" +
"letter-spacing:.04em;" +
"text-transform:uppercase;" +
"color:#78838e;",
label
)
);
append(
row,
createElement(
"div",
"font-size:14px;" +
"line-height:1.45;" +
"font-weight:600;" +
"color:#303840;",
value
)
);
if (highlightText) {
append(
row,
createElement(
"span",
"display:inline-block;" +
"margin-top:6px;" +
"padding:4px 7px;" +
"border-radius:20px;" +
"font-size:10.5px;" +
"line-height:1.2;" +
"font-weight:700;" +
(
highlightType === "price"
? "background:#eef8f2;color:#27704a;"
: "background:#eaf3fb;color:#075eae;"
),
highlightText
)
);
}
}
function renderCompareBox(
parent,
results
) {
if (!results || !results.length) {
return;
}
var productsToCompare =
results.map(
function (entry) {
return entry.product;
}
);
var prices = productsToCompare
.map(
function (product) {
return product.price || 0;
}
)
.filter(
function (price) {
return price > 0;
}
);
var weights = productsToCompare
.map(
function (product) {
return product.weightKg || 0;
}
)
.filter(
function (weight) {
return weight > 0;
}
);
var minPrice =
prices.length
? Math.min.apply(null, prices)
: 0;
var minWeight =
weights.length
? Math.min.apply(null, weights)
: 0;
var priceDifference =
prices.length > 1 &&
Math.max.apply(null, prices) !== minPrice;
var weightDifference =
weights.length > 1 &&
Math.max.apply(null, weights) !== minWeight;
var outer = append(
parent,
createElement(
"div",
"margin-top:22px;" +
"border:1px solid #dfe5eb;" +
"border-radius:11px;" +
"background:#ffffff;" +
"overflow:hidden;"
)
);
var intro = append(
outer,
createElement(
"div",
"padding:20px;" +
"text-align:center;" +
"background:#f8fafc;"
)
);
append(
intro,
createElement(
"div",
"font-size:19px;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:5px;",
"Die drei Empfehlungen direkt vergleichen"
)
);
append(
intro,
createElement(
"div",
"max-width:650px;" +
"margin:0 auto 14px;" +
"font-size:13.5px;" +
"line-height:1.45;" +
"color:#65717d;",
"Vergleichen Sie die wichtigsten technischen Daten, bevor Sie sich für ein Modell entscheiden."
)
);
var compareButton = append(
intro,
createElement(
"button",
"display:block;" +
"width:100%;" +
"max-width:360px;" +
"margin:0 auto;" +
"box-sizing:border-box;" +
"border:0;" +
"border-radius:7px;" +
"background:#075eae;" +
"color:#ffffff;" +
"padding:13px 18px;" +
"font-size:15px;" +
"font-weight:700;" +
"cursor:pointer;",
"Technische Daten vergleichen"
)
);
compareButton.type = "button";
var compareArea = append(
outer,
createElement(
"div",
"display:none;" +
"padding:16px;"
)
);
compareButton.addEventListener(
"click",
function () {
var isOpen =
compareArea.style.display !== "none";
if (isOpen) {
compareArea.style.display = "none";
compareButton.textContent =
"Technische Daten vergleichen";
} else {
compareArea.style.display = "block";
compareButton.textContent =
"Vergleich schließen";
track(
"gx_product_finder_compare_open",
{
recommendation:
productsToCompare.length
? productsToCompare[0].id
: "",
compared_products:
productsToCompare
.map(
function (product) {
return product.id;
}
)
.join(",")
}
);
}
}
);
append(
compareArea,
createElement(
"div",
"margin-bottom:12px;" +
"font-size:11.5px;" +
"line-height:1.4;" +
"color:#7a858f;" +
"text-align:center;",
"Hinweise wie „Günstigster Preis“ und „Leichtestes Modell“ beziehen sich auf diese drei Empfehlungen."
)
);
var compareGrid = append(
compareArea,
createElement(
"div",
"display:grid;" +
"grid-template-columns:repeat(auto-fit,minmax(240px,1fr));" +
"gap:12px;" +
"align-items:stretch;"
)
);
productsToCompare.forEach(
function (product, index) {
var compareCard = append(
compareGrid,
createElement(
"div",
"display:flex;" +
"flex-direction:column;" +
"min-width:0;" +
"padding:16px;" +
"border-radius:10px;" +
"background:" +
(index === 0 ? "#f8fbfe;" : "#ffffff;") +
"border:" +
(index === 0
? "2px solid #075eae;"
: "1px solid #dfe5eb;")
)
);
append(
compareCard,
createElement(
"div",
"font-size:11px;" +
"font-weight:700;" +
"text-transform:uppercase;" +
"letter-spacing:.05em;" +
"color:#075eae;" +
"margin-bottom:5px;",
index === 0
? "Unsere Empfehlung"
: "Empfehlung " + (index + 1)
)
);
append(
compareCard,
createElement(
"div",
"min-height:48px;" +
"font-size:17px;" +
"line-height:1.3;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:8px;",
product.name
)
);
addTechnicalRow(
compareCard,
"1. Preis",
formatPrice(product.price),
(
priceDifference &&
product.price === minPrice
)
? "Günstigster Preis"
: "",
"price"
);
addTechnicalRow(
compareCard,
"2. Motor & Drehmoment",
getMotorTorqueText(product),
"",
""
);
addTechnicalRow(
compareCard,
"3. Akku",
getBatteryText(product),
"",
""
);
addTechnicalRow(
compareCard,
"4. Reichweite",
getRangeText(product),
"",
""
);
addTechnicalRow(
compareCard,
"5. Gewicht",
getWeightText(product),
(
weightDifference &&
product.weightKg === minWeight
)
? "Leichtestes Modell"
: "",
"weight"
);
addTechnicalRow(
compareCard,
"6. Schaltung",
getGearText(product),
"",
""
);
addTechnicalRow(
compareCard,
"7. Automatik / stufenlos",
getShiftTypeText(product),
"",
""
);
addTechnicalRow(
compareCard,
"8. Riemen oder Kette",
getDriveText(product),
"",
""
);
addTechnicalRow(
compareCard,
"9. Smart System",
product.smartSystem === true
? "Ja"
: "Nein",
"",
""
);
addTechnicalRow(
compareCard,
"10. Faltmaß",
getFoldSizeText(product),
"",
""
);
var linkWrap = append(
compareCard,
createElement(
"div",
"margin-top:auto;" +
"padding-top:15px;"
)
);
var productLink = append(
linkWrap,
createElement(
"a",
"display:block;" +
"width:100%;" +
"box-sizing:border-box;" +
"padding:11px 12px;" +
"border-radius:6px;" +
"background:#075eae;" +
"color:#ffffff;" +
"font-size:13px;" +
"font-weight:700;" +
"text-align:center;" +
"text-decoration:none;",
"Produkt ansehen"
)
);
productLink.href = product.url;
productLink.addEventListener(
"click",
function () {
track(
"gx_product_finder_compare_product_click",
{
product:
product.id,
article_number:
product.articleNumber
}
);
}
);
}
);
}
/* =========================================
ERGEBNIS
========================================= */
function renderResults() {
clear(content);
progressBar.style.width =
"100%";
progressText.textContent =
finderMode === "quick"
? "Ihre Schnellsuche"
: "Ihre Empfehlung";
var ranked =
products
.map(
function (product) {
return {
product: product,
score:
finderMode === "quick"
? getQuickSearchScore(
product
)
: getProductScore(
product
)
};
}
)
.sort(
function (a, b) {
if (b.score !== a.score) {
return b.score - a.score;
}
return (
(a.product.price || 999999) -
(b.product.price || 999999)
);
}
);
if (
finderMode === "quick"
) {
var criteria =
quickSearchCriteria || {};
/*
* 45 km/h wird in der Schnellsuche nur berücksichtigt,
* wenn der Kunde es ausdrücklich nennt.
*/
if (
criteria.requireSpeed45
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.speed45 === true
);
}
);
} else {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.speed45 !== true
);
}
);
}
if (
criteria.requireBosch
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.bosch === true &&
entry.product.midMotor === true
);
}
);
}
if (
criteria.requireMidMotor
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.midMotor === true
);
}
);
}
if (
criteria.requireAutomatic
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.automatic === true
);
}
);
}
if (
criteria.requireStepless
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.stepless === true
);
}
);
}
/*
* Ein ausdrücklich genanntes Maximalbudget wird als harter
* Filter verwendet, wenn mindestens drei passende Modelle
* darunter vorhanden sind. Andernfalls bleiben Alternativen
* sichtbar und werden im Score deutlich abgestraft.
*/
if (
criteria.maxBudget &&
criteria.budgetHard
) {
var insideBudget =
ranked.filter(
function (entry) {
return (
entry.product.price &&
entry.product.price <=
criteria.maxBudget
);
}
);
if (
insideBudget.length >= 3
) {
ranked = insideBudget;
}
}
/*
* Dasselbe Prinzip bei ausdrücklich genannter Reichweite:
* Sind mindestens drei Modelle verfügbar, werden nur diese
* gezeigt. Sonst bleiben die besten Alternativen erhalten.
*/
if (
criteria.minRangeKm
) {
var enoughRange =
ranked.filter(
function (entry) {
return (
getEffectiveRange(
entry.product
) >=
criteria.minRangeKm
);
}
);
if (
enoughRange.length >= 3
) {
ranked = enoughRange;
}
}
} else {
/*
* Das S-Pedelec wird in der geführten 4-Fragen-Version
* nicht empfohlen, weil der ausdrückliche 45-km/h-Wunsch
* bewusst entfernt wurde.
*/
ranked =
ranked.filter(
function (entry) {
return (
entry.product.speed45 !== true
);
}
);
/*
* Wenn Bosch als wichtigste Eigenschaft gewählt wurde,
* werden nur echte Bosch-Mittelmotor-Modelle gezeigt.
*/
if (
answers.focus === "bosch"
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.bosch === true &&
entry.product.midMotor === true
);
}
);
}
/*
* Bei "Vollautomatisch / stufenlos" werden ausschließlich
* tatsächlich automatische oder stufenlose Modelle gezeigt.
*/
if (
answers.focus === "comfortshift"
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.automatic === true ||
entry.product.stepless === true
);
}
);
}
}
var results =
ranked.slice(0, 3);
var wrapper = append(
content,
createElement(
"div",
"max-width:900px;margin:0 auto;"
)
);
var titleArea = append(
wrapper,
createElement(
"div",
"text-align:center;" +
"margin-bottom:24px;"
)
);
append(
titleArea,
createElement(
"div",
"color:#075eae;" +
"font-size:12px;" +
"font-weight:700;" +
"text-transform:uppercase;" +
"letter-spacing:.07em;" +
"margin-bottom:6px;",
finderMode === "quick"
? "Ergebnis Ihrer Schnellsuche"
: "Ihre persönliche Auswahl"
)
);
append(
titleArea,
createElement(
"div",
"font-size:25px;" +
"font-weight:700;" +
"color:#252a30;" +
"line-height:1.25;",
finderMode === "quick"
? "Diese E-Falträder passen zu Ihrer Beschreibung"
: "Diese E-Falträder passen zu Ihren Anforderungen"
)
);
if (!results.length) {
append(
wrapper,
createElement(
"div",
"padding:20px;" +
"border:1px solid #dfe5eb;" +
"border-radius:10px;" +
"background:#f8fafc;" +
"text-align:center;" +
"font-size:15px;" +
"line-height:1.5;" +
"color:#5f6a74;",
"Für diese Kombination wurde kein passendes Modell gefunden. Starten Sie den Finder neu und formulieren Sie Ihre Anforderungen etwas allgemeiner."
)
);
} else {
results.forEach(
function (entry, index) {
renderProductCard(
wrapper,
entry.product,
index
);
}
);
renderCompareBox(
wrapper,
results
);
}
var restartArea = append(
wrapper,
createElement(
"div",
"text-align:center;" +
"margin-top:22px;"
)
);
var restart = append(
restartArea,
createElement(
"button",
"background:none;" +
"border:0;" +
"color:#075eae;" +
"font-size:16px;" +
"font-weight:700;" +
"cursor:pointer;" +
"text-decoration:underline;" +
"padding:9px 12px;",
"Finder neu starten"
)
);
restart.type =
"button";
restart.addEventListener(
"click",
function () {
answers = {};
step = -1;
finderMode = "questions";
quickSearchCriteria = null;
quickSearchQuery = "";
renderStart();
root.scrollIntoView(
{
behavior: "smooth",
block: "start"
}
);
}
);
track(
"gx_product_finder_complete",
{
mode: finderMode,
usage:
finderMode === "quick"
? (
quickSearchCriteria
? quickSearchCriteria.primaryUsage
: ""
)
: answers.usage,
carry:
finderMode === "quick"
? (
quickSearchCriteria
? quickSearchCriteria.carryMode
: ""
)
: answers.carry,
range:
finderMode === "quick"
? (
quickSearchCriteria
? quickSearchCriteria.minRangeKm
: 0
)
: answers.range,
focus:
finderMode === "quick"
? "quick_search"
: answers.focus,
recommendation:
results.length
? results[0].product.id
: ""
}
);
root.scrollIntoView(
{
behavior: "smooth",
block: "start"
}
);
}
function renderProductCard(
parent,
product,
index
) {
var cardCss =
"margin-bottom:14px;" +
"padding:19px;" +
"border-radius:11px;" +
"background:" +
(index === 0
? "#f8fbfe;"
: "#ffffff;") +
"border:" +
(index === 0
? "2px solid #075eae;"
: "1px solid #dce3e9;");
var productCard = append(
parent,
createElement(
"div",
cardCss
)
);
var label =
"Weitere passende Option";
if (index === 0) {
label =
"Unsere Empfehlung";
}
if (index === 1) {
label =
"Sehr gute Alternative";
}
append(
productCard,
createElement(
"div",
"color:#075eae;" +
"font-size:11px;" +
"font-weight:700;" +
"text-transform:uppercase;" +
"letter-spacing:.06em;" +
"margin-bottom:5px;",
label
)
);
var imageBox = append(
productCard,
createElement(
"div",
"margin:10px 0 14px;" +
"height:230px;" +
"display:flex;" +
"align-items:center;" +
"justify-content:center;" +
"overflow:hidden;" +
"background:#ffffff;" +
"border:1px solid #edf0f3;" +
"border-radius:8px;"
)
);
var productImage = append(
imageBox,
createElement(
"img",
"display:block;" +
"width:100%;" +
"height:100%;" +
"object-fit:contain;" +
"object-position:center;"
)
);
productImage.alt = product.name;
productImage.loading = "lazy";
productImage.decoding = "async";
loadFirstProductImage(
product,
productImage,
imageBox
);
append(
productCard,
createElement(
"div",
"font-size:20px;" +
"font-weight:700;" +
"color:#252a30;",
product.name
)
);
append(
productCard,
createElement(
"span",
"display:inline-block;" +
"margin-top:6px;" +
"padding:5px 9px;" +
"background:#eaf3fb;" +
"border-radius:20px;" +
"color:#075eae;" +
"font-size:11px;" +
"font-weight:700;",
product.badge
)
);
append(
productCard,
createElement(
"div",
"margin-top:12px;" +
"color:#5f6a74;" +
"font-size:14px;" +
"line-height:1.5;",
product.description
)
);
var factsGrid = append(
productCard,
createElement(
"div",
"display:grid;" +
"grid-template-columns:repeat(auto-fit,minmax(170px,1fr));" +
"gap:7px;" +
"margin-top:14px;"
)
);
product.facts.forEach(
function (fact) {
var factLine = append(
factsGrid,
createElement(
"div",
"font-size:12.5px;" +
"line-height:1.4;" +
"color:#4f5a64;"
)
);
append(
factLine,
createElement(
"span",
"color:#075eae;" +
"font-weight:700;",
"✓ "
)
);
append(
factLine,
document.createTextNode(
fact
)
);
}
);
var recommendationBox =
append(
productCard,
createElement(
"div",
"margin-top:14px;" +
"padding:11px 13px;" +
"background:#f5f7f9;" +
"border-radius:7px;" +
"font-size:13px;" +
"line-height:1.45;" +
"color:#4e5963;"
)
);
append(
recommendationBox,
createElement(
"strong",
"color:#252a30;",
"Unsere Einordnung: "
)
);
append(
recommendationBox,
document.createTextNode(
getCurrentRecommendationText(
product
)
)
);
var link =
append(
productCard,
createElement(
"a",
"display:inline-block;" +
"margin-top:15px;" +
"padding:11px 18px;" +
"background:#075eae;" +
"border-radius:6px;" +
"color:#ffffff;" +
"font-size:13px;" +
"font-weight:700;" +
"text-decoration:none;",
"Produkt ansehen"
)
);
link.href =
product.url;
link.addEventListener(
"click",
function () {
track(
"gx_product_finder_result_click",
{
product:
product.id,
article_number:
product.articleNumber
}
);
}
);
}
renderStart();
})();