(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 imageSourceUrl = String(product.url || "").replace(/^\/en\//, "/");
var productUrl = normalizeImageUrl(imageSourceUrl, 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("Product page could not be loaded");
}
return response.text();
})
.then(function (html) {
var imageUrl = extractFirstProductImage(html, productUrl);
if (!imageUrl) {
throw new Error("No product image found");
}
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": "182008111",
"articleNumber": "182008111",
"name": "MOBILEMASTER A8K F/RT",
"badge": "Active Line Plus · 50 Nm",
"url": "/en/a8k-freilauf-ruecktritt-bosch-active-line-plus-kettenantrieb_182008111_9084/",
"price": 2599,
"description": "Comfortable 20-inch folding e-bike with Bosch Active Line Plus, Shimano Nexus 8-speed hub gears and a choice of freewheel or coaster brake.",
"facts": [
"Bosch Active Line Plus · 50 Nm",
"Shimano Nexus 8-speed · chain drive",
"400 Wh · 500 Wh optional · up to approx. 140 km with 500 Wh",
"approx. 21.9 kg without battery · folded dimensions approx. 82 × 41 × 92 cm"
],
"bosch": true,
"midMotor": true,
"speed45": false,
"weightKg": 21.9,
"rangeKm": 0,
"maxRangeKm": 140,
"torqueNm": 50,
"shiftModes": [
"classic"
],
"beltDrive": false,
"hubShift": true,
"automatic": false,
"stepless": false,
"smartSystem": false,
"uses": [
"commute",
"camper",
"everyday",
"longtour"
],
"compactScore": 48,
"premiumScore": 66
},
{
"id": "182014045",
"articleNumber": "182014045",
"name": "OFFROAD SPEED E-14R PT45 SM",
"badge": "45 km/h · Rohloff",
"url": "/en/offroad-speed-rohloff-e-14r-pt45_182014045_9405/",
"price": 7899,
"description": "Folding S-pedelec with Bosch Performance Line Speed, Rohloff E-14 and Gates belt drive.",
"facts": [
"Bosch Performance Line Speed · 85 Nm · Smart System",
"Rohloff E-14 · Gates CDX belt",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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": "/en/rohloff-14-gang-nabenschaltung-mit-freilauf-smart-system-riemenantrieb_182014016_9173/",
"price": 6999,
"description": "High-end CX folding e-bike with electronic Rohloff E-14 and low-maintenance Gates belt drive.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Rohloff E-14 2.0 · Gates CDN belt",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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": "/en/rohloff-e-14-gang-nabenschaltung-mit-freilauf_182014002_9229/",
"price": 6499,
"description": "Premium touring folding e-bike with Bosch CX, Rohloff E-14 and Gates belt drive.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Rohloff E-14 · Gates CDN belt",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery"
],
"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": "/en/rohloff-14-gang-nabenschaltung-mit-freilauf-performance-line-cx-riemen_182014011_9161/",
"price": 6499,
"description": "Bosch CX folding e-bike with electronic Rohloff E-14 for frequent riders and demanding tours.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Rohloff E-14 · Gates CDN belt",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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": "/en/mobilemaster-offroad-gt-8g-mit-elektronischer-rohloff-e-14-schaltung-bosch-motor_182014001_9209/",
"price": 4999,
"description": "Rohloff E-14 folding e-bike with Bosch Performance Line and a choice of chain or belt drive.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Rohloff E-14 · chain or Gates belt",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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 Fully Automatic",
"badge": "Fully automatic · Stepless",
"url": "/en/mobilemaster-n380r-f-vollautomatik_182380001_9511/",
"price": 5799,
"description": "Comfort-focused CX folding e-bike with Enviolo AutomatiQ and fully automatic stepless shifting.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Enviolo N380 AutomatiQ · Gates CDX",
"500 Wh · approx. 120–140 km according to product page",
"approx. 21.9 kg without battery · folded dimensions approx. 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 Stepless",
"badge": "CX · Stepless",
"url": "/en/mobilemaster-n380-pt-cx-stepless-performance-line-cx-85nm-enviolo-380_1900000902_9664/",
"price": 4099,
"description": "Bosch CX folding e-bike with stepless Enviolo N380; AutomatiQ is optional.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Enviolo N380 · 380 % stepless",
"400/500 Wh · with 500 Wh up to approx. 140 km",
"approx. 23.9 kg without battery · chain or Gates belt"
],
"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 Manual Stepless",
"badge": "Stepless · 65 Nm",
"url": "/en/mobilemaster-n380k-manuell-380-nabenschaltung-mit-freilauf-e-bike-klapprad-mit-bosch-mittelmotor_182005041_9193/",
"price": 4399,
"description": "Stepless Enviolo folding e-bike with Bosch Performance Line and manual twist-grip control.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Enviolo N380 · 380 % stepless",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · chain or 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 Fully Automatic",
"badge": "AutomatiQ · Stepless",
"url": "/en/enviolo-380-vollautomatische-nabenschaltung-mit-freilauf_182005042_9200/",
"price": 3999,
"description": "Comfortable Enviolo folding e-bike with fully automatic, stepless AutomatiQ shifting.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Enviolo N380 AutomatiQ · 380 %",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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 Automatic SM",
"badge": "CX · Di2 · Smart System",
"url": "/en/e5r-pt-cx-automatik-sm-performance-line-cx-riemen-nabenschaltung-mit-freilauf_1900000840_9506/",
"price": 5899,
"description": "Bosch CX Smart System folding e-bike with electronic Shimano E5 Di2 and Gates belt drive.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Shimano Nexus E5 Di2 · Gates CDX",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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 Automatic SM",
"badge": "Low step-through · CX · Di2",
"url": "/en/jung-e5r-pt-cx-automatik-sm_1900000839_9502/",
"price": 5799,
"description": "Low step-through model with Bosch CX Smart System, Shimano E5 Di2 and Gates belt drive.",
"facts": [
"Bosch Performance Line CX · 85 Nm · Smart System",
"Shimano Nexus E5 Di2 · Gates CDX",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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 Automatic",
"badge": "Di2 · Automatic",
"url": "/en/e5k-automatik-f-kette-shimano-e5-gang-di2-nabenschaltung_182005033_9203/",
"price": 4499,
"description": "Bosch Performance Line folding e-bike with electronic Shimano E5 Di2 and automatic shifting function.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus E5 Di2 · freewheel/coaster brake",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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 Automatic",
"badge": "Alfine 11 · Di2",
"url": "/en/e11r-pp-f-automatik-shimano-alfine-11-gang-di2-nabenschaltung_182001199_9562/",
"price": 4899,
"description": "CX folding e-bike with electronic Shimano Alfine 11-speed Di2 and a wide gear range.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Alfine 11-speed Di2 · Gates belt",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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": "Lightweight · Bosch SX",
"url": "/en/e8-light-sx55_1900000833_9516/",
"price": 4299,
"description": "Relatively lightweight Bosch folding e-bike with Performance Line SX and Shimano Nexus 8-speed hub gears.",
"facts": [
"Bosch Performance Line SX · bis 60 Nm · Smart System",
"Shimano Nexus 8-speed · belt optional",
"545 Wh · up to approx. 140 km",
"approx. 19.3 kg without battery · folded dimensions approx. 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": "Low step-through · CX",
"url": "/en/jung-e5r-cx-performance-line-kette-shimano-e5-gang-nabenschaltung-mit-ohne-ruecktritt_182005004_9168/",
"price": 4399,
"description": "Low step-through folding e-bike with Bosch CX and Shimano Nexus E5.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Nexus E5 5-speed · Gates belt",
"500 Wh · up to approx. 140 km",
"approx. 23.9 kg without battery · folded dimensions approx. 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": "Low step-through · Smart System",
"url": "/en/shimano-e5r-pp-f-sm-performance-line-75nm-smart-system_182005005_9221/",
"price": 4199,
"description": "Low step-through model with Bosch Performance Line Smart System and Shimano E5.",
"facts": [
"Bosch Performance Line · 75 Nm · Smart System",
"Shimano Nexus E5 5-speed Di2",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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 · Value for money",
"url": "/en/e5k-f-cx-performance-line-cx-85nm-shimano-nexus-5-gang-freilauf_182005010_9484/",
"price": 3999,
"description": "Value-focused Bosch CX folding e-bike with Shimano Nexus 5-speed hub gears and chain drive.",
"facts": [
"Bosch Performance Line CX · 85 Nm",
"Shimano Nexus 5-speed · chain",
"400 Wh as standard · 500 Wh optional · up to approx. 140 km according to product page",
"approx. 21.9 kg without battery · folded dimensions approx. 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-speed · All-rounder",
"url": "/en/mobilemaster-e5k-f-rt_182005001_9012/",
"price": 3499,
"description": "Classic Bosch Performance Line folding e-bike with Shimano Nexus 5-speed hub gears.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus E5 5-speed · freewheel/coaster brake",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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 Automatic (Di2)",
"badge": "8-speed Di2 · Coaster brake",
"url": "/en/p8r-rt-automatik-performance-line-riemen-shimano-8-gang-di2-nabenschaltung-mit-ohne-ruecktritt_182008123_9121/",
"price": 4198,
"description": "Bosch folding e-bike with Shimano Nexus 8-speed Di2, coaster brake and Gates belt drive.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus 8-speed Di2 · Gates CDN",
"500 Wh · up to approx. 140 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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-speed",
"url": "/en/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 all-rounder with Shimano Nexus 8-speed hub gears and 545 Wh battery.",
"facts": [
"Bosch Performance Line · 75 Nm · Smart System",
"Shimano Nexus 8-speed · chain · belt optional",
"545 Wh · up to approx. 150 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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-speed · Value for money",
"url": "/en/p8k-bosch-performance-line-freilauf-ruecktritt-mit-kettanantrieb_182008121_9093/",
"price": 2699,
"description": "Affordable Bosch folding e-bike with Shimano Nexus 8-speed hub gears and freewheel or coaster brake.",
"facts": [
"Bosch Performance Line · 65 Nm",
"Shimano Nexus 8-speed · chain",
"400/500 Wh · up to approx. 110 km",
"approx. 21.9 kg without battery · folded dimensions approx. 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": "Up to 280 km · DualBattery",
"url": "/en/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": "Long-range specialist with Bafang M400, dual battery and Shimano Nexus 8-speed hub gears.",
"facts": [
"Bafang M400 mid-drive motor · 80 Nm",
"Shimano Nexus 8-speed · Gates belt",
"1008/1134 Wh DualBattery · up to approx. 280 km",
"approx. 24.6 kg without battery · folded dimensions approx. 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": "Up to 220 km · DualBattery",
"url": "/en/offroad-cm-8g/mobilemaster-offroad-plus-dualbattery-ueber-1000wh-cm-8g-mittelmotor-mit-max-80nm_1820081012_8997/",
"price": 4399,
"description": "Bafang off-road folding e-bike with a 1008 Wh dual battery for very long tours.",
"facts": [
"Bafang M400 mid-drive motor · 80 Nm",
"Shimano 8-speed hub gears · chain/belt",
"1008 Wh DualBattery · up to approx. 220 km",
"approx. 24.6 kg without battery · folded dimensions approx. 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 Belt",
"badge": "Bafang · Belt",
"url": "/en/germanxia-elektrofahrrad-20-zoll-8gang-shimano-nabenschaltung_182008001_7653/",
"price": 3498,
"description": "Bafang mid-drive folding e-bike with Shimano 8-speed hub gears and low-maintenance Gates belt drive.",
"facts": [
"Bafang M400 mid-drive motor · 80 Nm",
"Shimano 8-speed hub gears · Gates belt",
"468 Wh · up to approx. 100 km",
"approx. 21 kg without battery · folded dimensions approx. 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": "/en/offroad-plus-intube-single-battery-cm-8g-mittelmotor-mit-max-80nm_1820081011_8992/",
"price": 3299,
"description": "Powerful Bafang SUV folding e-bike with InTube battery; dual battery is optional.",
"facts": [
"Bafang M400 mid-drive motor · 80 Nm",
"Shimano 8-speed hub gears · chain/belt",
"504 Wh · approx. 100 km · DualBattery optional",
"approx. 24.6 kg without battery · folded dimensions approx. 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 Chain",
"badge": "Bafang · Value for money",
"url": "/en/elektrofahrrad/premium-germanxia-mobilmaster-cm-8g-nabenschaltung-mit-drehmomentsensor_182008101_3050/",
"price": 2699,
"description": "Value-focused Bafang mid-drive folding e-bike with Shimano 8-speed hub gears and torque sensor.",
"facts": [
"Bafang M400 mid-drive motor · 80 Nm",
"Shimano 8-speed hub gears · chain",
"500 Wh · up to approx. 100 km",
"approx. 21.6 kg without battery · folded dimensions approx. 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": "Lightweight · 3-speed",
"url": "/en/e-faltrad-3-gang-shimano-nabenschaltung-mit-oder-ohne-ruecktrittbremsen_182008000_3237/",
"price": 2199,
"description": "Lightweight folding e-bike with Shimano Nexus 3-speed hub gears for everyday use, travel and motorhomes.",
"facts": [
"xGerman front-hub motor · 45 Nm",
"Shimano Nexus 3-speed · belt optional",
"374 Wh · up to approx. 90 km",
"approx. 18 kg without battery · folded dimensions approx. 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": "Approx. 16 kg · Low step-through",
"url": "/en/e-klapprad/light-cf/mobilemaster-light-cf-3g-ultraleicht-e-faltrad-16kg-27cm-tiefeinstieg_1900000953_9805/",
"price": 2099,
"description": "Very lightweight low step-through folding e-bike with 16-inch wheels and Shimano Nexus 3-speed hub gears.",
"facts": [
"xGerman front-hub motor · 45 Nm",
"Shimano Nexus 3-speed · Gates optional",
"374 Wh · up to approx. 90 km",
"approx. 16 kg without battery · folded dimensions approx. 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 inch",
"badge": "16 inch · Compact",
"url": "/en/e-klapprad/klappfahrrad-mit-kettenschaltung/16-zoll-touring-7g-e-faltrad_181607126_8686/",
"price": 2599,
"description": "Compact 16-inch folding e-bike with 7-speed derailleur gears and long range.",
"facts": [
"xGerman rear-hub motor · 50 Nm",
"Shimano Altus 7-speed derailleur gears",
"470 Wh · up to approx. 130 km",
"approx. 17 kg without battery · folded dimensions approx. 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": "Extremely compact",
"url": "/en/e-klapprad/eflow3-16-mobilemaster-e-faltrad-16-zoll-mit-patentierter-falttechnik-nur-15-kg_181601016_9917/",
"price": 1369,
"description": "Extremely compact 16-inch folding e-bike without conventional gears, ideal for commuting and small storage spaces.",
"facts": [
"xGerman rear-hub motor · 50 Nm",
"No conventional gears",
"336 Wh · up to approx. 100 km according to product page",
"15 kg without battery · folded dimensions approx. 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 Cast Alloy Wheels + Throttle",
"badge": "Touring · Throttle",
"url": "/en/touring-ch-7g-shimano-mit-alu-gussraedern_182007116_9305/",
"price": 2799,
"description": "Touring folding e-bike with 7-speed derailleur gears, cast alloy wheels and throttle.",
"facts": [
"xGerman rear-hub motor · 50 Nm",
"Shimano 7-speed derailleur gears",
"562 Wh · up to approx. 110 km",
"approx. 21 kg without battery · folded dimensions approx. 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-speed · Touring",
"url": "/en/germanxia-elektrofaltrad-20-zoll-9gang-kettenschaltung-tiefeinstieg_182009318_3231/",
"price": 2299,
"description": "Touring all-rounder with Shimano Sora 9-speed derailleur gears and torque sensor for medium and long distances.",
"facts": [
"xGerman rear-hub motor · 50 Nm · torque sensor",
"Shimano Sora 9-speed derailleur gears",
"562 Wh · category states up to approx. 120 km",
"approx. 21 kg without battery · folded dimensions approx. 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 · Value for money",
"url": "/en/mobilemaster-touring-ch-7g-mit-gasgriff_182007316_8845/",
"price": 1999,
"description": "Value-focused touring folding e-bike with 7-speed derailleur gears for everyday use and medium-distance rides.",
"facts": [
"xGerman rear-hub motor · 50 Nm",
"Shimano Altus 7-speed derailleur gears",
"562 Wh · category states up to approx. 110 km",
"approx. 21 kg without battery · folded dimensions approx. 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(
"Duplicate GermanXia item number in product finder:",
product.articleNumber
);
}
}
seen[product.articleNumber] = true;
}
);
})();
/* =========================================
FRAGEN
========================================= */
var questions = [
{
id: "usage",
title: "What will you mainly use your folding e-bike for?",
subtitle: "Choose your main use case.",
options: [
{
value: "commute",
title: "Commuting & public transport",
text: "Commuting, trains and short everyday trips"
},
{
value: "camper",
title: "Motorhome & holidays",
text: "Compact storage in a motorhome or car"
},
{
value: "everyday",
title: "Everyday use & city",
text: "Regular rides, shopping and leisure"
},
{
value: "longtour",
title: "Long tours & hills",
text: "Long distances and more demanding routes"
}
]
},
{
id: "carry",
title: "Will you regularly need to carry or lift the folding e-bike?",
subtitle: "For example for trains, stairs, the car boot or a motorhome.",
options: [
{
value: "often",
title: "Yes, regularly",
text: "Low weight is very important"
},
{
value: "sometimes",
title: "Sometimes",
text: "For example for the car or motorhome"
},
{
value: "no",
title: "Not really",
text: "Weight is less important to me"
}
]
},
{
id: "range",
title: "What range do you typically need?",
subtitle: "Actual range depends on riding style and conditions.",
options: [
{
value: "short",
title: "Up to approx. 50 km",
text: "Mostly short trips"
},
{
value: "medium",
title: "Approx. 50–100 km",
text: "Everyday use and regular tours"
},
{
value: "long",
title: "100 km and more",
text: "Longer tours and frequent use"
},
{
value: "max",
title: "Maximum range",
text: "Very long distances with as little recharging as possible"
}
]
},
{
id: "focus",
title: "What matters most to you in a folding e-bike?",
subtitle: "Choose the factor that matters most for your purchase decision.",
options: [
{
value: "lightcompact",
title: "Lightweight & compact",
text: "Easy to carry, fold and store in a small space"
},
{
value: "bosch",
title: "Bosch mid-drive motor",
text: "Bosch drive system and a natural riding feel"
},
{
value: "comfortshift",
title: "Fully automatic / stepless",
text: "Automatic or stepless shifting for extra-comfortable riding"
},
{
value: "value",
title: "Value for money",
text: "Plenty of equipment at an attractive price"
}
]
}
];
var answers = {};
var step = -1;
var finderMode = "questions";
var quickSearchCriteria = null;
var quickSearchQuery = "";
var directCompareSelected = [];
var directCompareMotorFilter = "all";
/* =========================================
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 Folding E-Bike Advisor"
)
);
append(
header,
createElement(
"div",
"color:#252a30;" +
"font-size:28px;" +
"line-height:1.2;" +
"font-weight:700;" +
"margin-bottom:9px;",
"Which folding e-bike is right for you?"
)
);
append(
header,
createElement(
"div",
"max-width:680px;" +
"margin:0 auto;" +
"color:#65717d;" +
"font-size:15px;" +
"line-height:1.55;",
"Answer 4 quick questions. We compare your requirements with our Mobilemaster models."
)
);
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 quick questions",
"About 45 seconds"
);
addBenefit(
benefits,
"No registration",
"Instant results"
);
addBenefit(
benefits,
"Personal selection",
"Matched to your needs"
);
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;",
"Start folding e-bike finder"
)
);
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;",
"or use quick search"
)
);
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;",
"Already have an idea of what you are looking for?"
)
);
append(
quickBox,
createElement(
"div",
"font-size:14px;" +
"line-height:1.5;" +
"color:#697580;" +
"margin-bottom:12px;",
"Describe what you are looking for in one sentence. We will match it against the available Mobilemaster models."
)
);
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 =
"e.g. folding e-bike for holidays and long tours, comfortable shifting, Bosch and a budget of around €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;",
"Start quick search"
)
);
quickButton.type = "button";
function runQuickSearch() {
var query =
String(quickInput.value || "").trim();
if (query.length < 8) {
quickError.style.display = "block";
quickError.textContent =
"Please briefly describe how you plan to use the folding e-bike.";
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 =
"Question " +
(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;",
"← Back"
)
);
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 =
/(?:up to|max(?:imum)?|under|below|no more than)\s*(?:approx\.?\s*|around\s*|about\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|price|cost|up to|max(?:imum)?|under|below)\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,
[
"commut",
"work commute",
"public transport",
"train",
"rail",
"bus",
"last mile"
]
)
) {
criteria.usageScores.commute += 90;
}
if (
searchHasAny(
text,
[
"motorhome",
"camper",
"caravan",
"holiday",
"vacation",
"car boot",
"travel"
]
)
) {
criteria.usageScores.camper += 90;
}
if (
searchHasAny(
text,
[
"everyday",
"city",
"shopping",
"leisure",
"daily",
"every day"
]
)
) {
criteria.usageScores.everyday += 80;
}
if (
searchHasAny(
text,
[
"long tour",
"long distance",
"long-distance",
"touring",
"countryside",
"many miles",
"long ride",
"multi-day",
"bike trip"
]
)
) {
criteria.usageScores.longtour += 100;
}
if (
searchHasAny(
text,
[
"mountain",
"climb",
"uphill",
"hilly",
"demanding",
"all routes",
"all kinds of routes",
"any terrain",
"off-road"
]
)
) {
criteria.usageScores.hills += 100;
criteria.usageScores.longtour += 35;
}
if (
searchHasAny(
text,
[
"all-round",
"versatile",
"different routes",
"ride everything"
]
)
) {
criteria.usageScores.everyday += 45;
criteria.usageScores.longtour += 45;
}
/* Gewicht / Faltmaß */
if (
searchHasAny(
text,
[
"very light",
"as light as possible",
"carry",
"lift",
"stairs",
"lightweight bike",
"lightweight folding e-bike"
]
)
) {
criteria.preferLight = true;
criteria.carryMode = "often";
}
if (
searchHasAny(
text,
[
"compact",
"space-saving",
"small folded size",
"folds small",
"limited space",
"storage space"
]
)
) {
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,
[
"mid-drive",
"mid drive"
]
)
) {
criteria.requireMidMotor = true;
}
/* Schaltung / Komfort */
if (
searchHasAny(
text,
[
"comfort",
"comfortable",
"easy",
"relaxed",
"comfortable equipment",
"comfort equipment"
]
)
) {
criteria.preferComfort = true;
}
if (
searchHasAny(
text,
[
"fully automatic",
"full automatic",
"automatic",
"automatic shifting",
"no manual shifting",
"do not want to shift"
]
)
) {
criteria.requireAutomatic = true;
criteria.preferAutomatic = true;
criteria.preferComfort = true;
}
if (
searchHasAny(
text,
[
"stepless",
"stepless shifting"
]
)
) {
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,
[
"belt",
"gates"
]
)
) {
criteria.preferBelt = true;
}
if (
searchHasAny(
text,
[
"smart system",
"smartsystem",
"ebike flow",
"flow app"
]
)
) {
criteria.preferSmartSystem = true;
}
if (
searchHasAny(
text,
[
"low step-through",
"low step",
"step-through"
]
)
) {
criteria.preferLowEntry = true;
}
/* Preis / Qualitätsfokus */
if (
searchHasAny(
text,
[
"value for money",
"good value",
"affordable",
"good value",
"budget",
"lowest price"
]
)
) {
criteria.preferValue = true;
}
if (
searchHasAny(
text,
[
"premium",
"high quality",
"best equipment",
"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,
[
"maximum range",
"very long range",
"very long range",
"as far as possible",
"extremely long rides"
]
)
) {
criteria.minRangeKm = 180;
} else if (
searchHasAny(
text,
[
"long range",
"long range",
"long range"
]
)
) {
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(
"low step-through"
) !== -1 ||
productText.indexOf(
"jung"
) !== -1
) {
score += 120;
} else {
score -= 30;
}
}
/* Value for money 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(
"is well suited to holidays, motorhomes or car transport"
);
}
if (
(
criteria.primaryUsage === "longtour" ||
(
criteria.usageScores &&
(
criteria.usageScores.longtour > 0 ||
criteria.usageScores.hills > 0
)
)
) &&
(
arrayHas(
product.uses,
"longtour"
) ||
arrayHas(
product.uses,
"hills"
)
)
) {
reasons.push(
"is suitable for longer and more demanding routes"
);
}
if (
criteria.primaryUsage === "commute" &&
arrayHas(
product.uses,
"commute"
)
) {
reasons.push(
"is well suited to commuting and regular everyday journeys"
);
}
if (
criteria.requireBosch &&
product.bosch
) {
reasons.push(
"has the Bosch mid-drive motor you requested"
);
}
if (
criteria.requireAutomatic &&
product.automatic
) {
reasons.push(
"shifts automatically"
);
} else if (
criteria.requireStepless &&
product.stepless
) {
reasons.push(
"offers stepless shifting"
);
} else if (
criteria.preferComfort &&
product.automatic &&
product.stepless
) {
reasons.push(
"is especially comfortable thanks to fully automatic, stepless shifting"
);
} else if (
criteria.preferComfort &&
product.automatic
) {
reasons.push(
"offers a high level of convenience with automatic shifting"
);
} else if (
criteria.preferComfort &&
product.stepless
) {
reasons.push(
"provides smooth, stepless and comfortable shifting"
);
}
if (
criteria.preferRohloff &&
productText.indexOf(
"rohloff"
) !== -1
) {
reasons.push(
"uses the Rohloff E-14 you requested"
);
}
if (
criteria.preferEnviolo &&
(
productText.indexOf(
"enviolo"
) !== -1 ||
productText.indexOf(
"n380"
) !== -1
)
) {
reasons.push(
"offers the Enviolo system you requested"
);
}
if (
criteria.preferDi2 &&
productText.indexOf(
"di2"
) !== -1
) {
reasons.push(
"offers a suitable Shimano Di2 shifting system"
);
}
if (
criteria.preferLight &&
product.weightKg <= 19
) {
reasons.push(
"is comparatively lightweight"
);
}
if (
criteria.preferCompact &&
product.compactScore >= 80
) {
reasons.push(
"can be stored especially compactly"
);
}
if (
criteria.minRangeKm &&
effectiveRange >=
criteria.minRangeKm
) {
reasons.push(
"covers the range you requested"
);
}
if (
criteria.maxBudget &&
product.price &&
product.price <=
criteria.maxBudget
) {
reasons.push(
"fits within the budget you specified"
);
}
if (
criteria.preferValue
) {
reasons.push(
"offers an attractive balance of price, range and equipment"
);
}
if (
criteria.preferPremium &&
product.premiumScore >= 80
) {
reasons.push(
"combines high-quality components"
);
}
if (!reasons.length) {
reasons.push(
"matches your described requirements well overall"
);
}
return (
"A strong match because this model " +
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;
}
/*
* Value for money 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") {
/*
* "Long tours & hills" 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(
"is well suited to longer tours and more demanding routes"
);
} else if (
arrayHas(
product.uses,
answers.usage
)
) {
reasons.push(
"matches your selected use case well"
);
}
/* Tragen */
if (
answers.carry === "often" &&
product.weightKg <= 18
) {
reasons.push(
"is particularly easy to carry and store"
);
} else if (
answers.carry === "sometimes" &&
product.weightKg <= 20
) {
reasons.push(
"remains comparatively manageable for the car or motorhome"
);
}
/* Reichweite */
if (
answers.range === "medium" &&
effectiveRange >= 80
) {
reasons.push(
"covers your desired medium range well"
);
}
if (
answers.range === "long" &&
effectiveRange >= 120
) {
reasons.push(
"offers a generous range reserve"
);
}
if (
answers.range === "max" &&
effectiveRange >= 200
) {
reasons.push(
"is designed for especially long range"
);
}
/* Fokus */
if (
answers.focus === "lightcompact"
) {
if (
product.weightKg <= 18 &&
product.compactScore >= 80
) {
reasons.push(
"combines low weight with especially compact folded dimensions"
);
} else if (
product.compactScore >= 80
) {
reasons.push(
"can be stored especially compactly"
);
} else if (
product.weightKg <= 19.5
) {
reasons.push(
"is particularly lightweight compared with the other options"
);
}
}
if (
answers.focus === "bosch" &&
product.bosch
) {
reasons.push(
"has the Bosch mid-drive motor you requested"
);
}
if (
answers.focus === "comfortshift"
) {
if (
product.automatic &&
product.stepless
) {
reasons.push(
"offers fully automatic and stepless shifting"
);
} else if (
product.automatic
) {
reasons.push(
"offers automatic shifting"
);
} else if (
product.stepless
) {
reasons.push(
"offers stepless shifting"
);
}
}
if (
answers.focus === "value"
) {
reasons.push(
"offers an attractive balance of price, equipment and range"
);
}
if (!reasons.length) {
reasons.push(
"is a strong overall match across your four answers"
);
}
return (
"A strong match because this model " +
reasons.slice(0, 3).join(", ") +
"."
);
}
/* =========================================
TECHNISCHER PRODUKTVERGLEICH
========================================= */
function formatPrice(price) {
if (!price) {
return "–";
}
try {
return new Intl.NumberFormat(
"en-IE",
{
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 mid-drive motor";
} else if (product.midMotor) {
motor = "Mid-drive motor";
} 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 (
"approx. " +
product.rangeKm +
"–" +
product.maxRangeKm +
" km"
);
}
if (product.maxRangeKm) {
return "up to approx. " + product.maxRangeKm + " km";
}
if (product.rangeKm) {
return "approx. " + product.rangeKm + " km";
}
return "–";
}
function getWeightText(product) {
if (!product.weightKg) {
return "–";
}
return (
String(product.weightKg) +
" kg without battery"
);
}
function getGearText(product) {
var segments = getFactSegments(product, 1);
if (segments.length) {
return segments[0];
}
if (product.automatic) {
return "Automatic shifting";
}
if (product.stepless) {
return "Stepless shifting";
}
return "–";
}
function getShiftTypeText(product) {
if (
product.automatic === true &&
product.stepless === true
) {
return "Fully automatic & stepless";
}
if (product.automatic === true) {
return "Automatic";
}
if (product.stepless === true) {
return "Stepless";
}
return "Conventional / manual";
}
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("chain") !== -1 || lower.indexOf("kette") !== -1) &&
(
lower.indexOf("belt") !== -1 ||
lower.indexOf("gates") !== -1
)
) {
if (lower.indexOf("optional") !== -1) {
return "Chain · belt optional";
}
return "Chain or belt";
}
if (
lower.indexOf("belt") !== -1 ||
lower.indexOf("gates") !== -1
) {
return "Belt drive";
}
if ((lower.indexOf("chain") !== -1 || lower.indexOf("kette") !== -1)) {
return "Chain drive";
}
if (product.beltDrive === true) {
return "Belt drive available";
}
return "Chain drive";
}
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(
/(?:folded dimensions|Faltmaß)\s*(?:approx\.?\s*|ca\.\s*)?(.+)$/i
);
if (match && match[1]) {
return match[1].trim();
}
}
return "Not specified";
}
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,
options
) {
options = options || {};
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;",
options.direct
? "Compare your selected Bosch models"
: "Compare the three recommendations"
)
);
append(
intro,
createElement(
"div",
"max-width:650px;" +
"margin:0 auto 14px;" +
"font-size:13.5px;" +
"line-height:1.45;" +
"color:#65717d;",
options.direct
? "Compare the key technical specifications of your selected models."
: "Compare the key technical specifications before choosing a model."
)
);
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;",
"Compare technical specifications"
)
);
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 =
"Compare technical specifications";
} else {
compareArea.style.display = "block";
compareButton.textContent =
"Close comparison";
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;",
options.direct
? "Highlights such as “Lowest price” and “Lightest model” refer only to the currently selected models."
: "Highlights such as “Lowest price” and “Lightest model” refer to these three recommendations."
)
);
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;",
options.direct
? "Model " + (index + 1)
: (
index === 0
? "Our recommendation"
: "Recommendation " + (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. Price",
formatPrice(product.price),
(
priceDifference &&
product.price === minPrice
)
? "Lowest price"
: "",
"price"
);
addTechnicalRow(
compareCard,
"2. Motor & torque",
getMotorTorqueText(product),
"",
""
);
addTechnicalRow(
compareCard,
"3. Battery",
getBatteryText(product),
"",
""
);
addTechnicalRow(
compareCard,
"4. Range",
getRangeText(product),
"",
""
);
addTechnicalRow(
compareCard,
"5. Weight",
getWeightText(product),
(
weightDifference &&
product.weightKg === minWeight
)
? "Lightest model"
: "",
"weight"
);
addTechnicalRow(
compareCard,
"6. Gearing",
getGearText(product),
"",
""
);
addTechnicalRow(
compareCard,
"7. Automatic / stepless",
getShiftTypeText(product),
"",
""
);
addTechnicalRow(
compareCard,
"8. Belt or chain",
getDriveText(product),
"",
""
);
addTechnicalRow(
compareCard,
"9. Smart System",
product.smartSystem === true
? "Ja"
: "Nein",
"",
""
);
addTechnicalRow(
compareCard,
"10. Folded dimensions",
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;",
"View product"
)
);
productLink.href = product.url;
productLink.addEventListener(
"click",
function () {
track(
"gx_product_finder_compare_product_click",
{
product:
product.id,
article_number:
product.articleNumber
}
);
}
);
}
);
}
/* =========================================
DIREKTER PRODUKTVERGLEICH
========================================= */
function getDirectCompareMode() {
var params;
try {
params = new URLSearchParams(
window.location.search || ""
);
return String(
params.get("gx_compare") || ""
).toLowerCase();
} catch (error) {
return "";
}
}
function getBoschMotorFamily(product) {
var text =
getMotorTorqueText(product)
.toLowerCase();
if (
text.indexOf(
"active line plus"
) !== -1
) {
return "active";
}
if (
text.indexOf(
"performance line sx"
) !== -1
) {
return "sx";
}
if (
text.indexOf(
"performance line cx"
) !== -1
) {
return "cx";
}
if (
text.indexOf(
"performance line"
) !== -1
) {
return "performance";
}
return "other";
}
function getDirectCompareProducts(mode) {
if (mode === "bosch") {
return products.filter(
function (product) {
return (
product.bosch === true &&
product.midMotor === true &&
product.speed45 !== true
);
}
);
}
return products.filter(
function (product) {
return product.speed45 !== true;
}
);
}
function directCompareHasProduct(id) {
return (
directCompareSelected.indexOf(
String(id)
) !== -1
);
}
function toggleDirectCompareProduct(id) {
id = String(id);
var index =
directCompareSelected.indexOf(id);
if (index !== -1) {
directCompareSelected.splice(
index,
1
);
return true;
}
if (
directCompareSelected.length >= 3
) {
window.alert(
"You can compare up to 3 models at the same time."
);
return false;
}
directCompareSelected.push(id);
return true;
}
function removeDirectCompareModeFromUrl() {
try {
var url =
new URL(
window.location.href
);
url.searchParams.delete(
"gx_compare"
);
url.hash =
"gx-produktfinder";
window.history.replaceState(
{},
"",
url.pathname +
url.search +
url.hash
);
} catch (error) {
/* URL kann notfalls unverändert bleiben. */
}
}
function renderDirectCompareMode(mode) {
clear(content);
directCompareSelected = [];
directCompareMotorFilter = "all";
progressBar.style.width = "100%";
progressText.textContent =
mode === "bosch"
? "Bosch comparison"
: "Model comparison";
var allDirectProducts =
getDirectCompareProducts(mode);
var wrapper = append(
content,
createElement(
"div",
"max-width:980px;" +
"margin:0 auto;"
)
);
var intro = append(
wrapper,
createElement(
"div",
"text-align:center;" +
"margin-bottom:22px;"
)
);
append(
intro,
createElement(
"div",
"display:inline-block;" +
"padding:6px 10px;" +
"border-radius:20px;" +
"background:#eaf3fb;" +
"color:#075eae;" +
"font-size:11px;" +
"font-weight:700;" +
"text-transform:uppercase;" +
"letter-spacing:.06em;" +
"margin-bottom:9px;",
mode === "bosch"
? "Bosch filter active"
: "Product comparison"
)
);
append(
intro,
createElement(
"div",
"font-size:27px;" +
"line-height:1.2;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:8px;",
mode === "bosch"
? "Compare Bosch folding e-bikes"
: "Compare folding e-bikes"
)
);
append(
intro,
createElement(
"div",
"max-width:720px;" +
"margin:0 auto;" +
"font-size:14.5px;" +
"line-height:1.55;" +
"color:#65717d;",
mode === "bosch"
? "The Bosch filter is already active. Select 2 or 3 Mobilemaster models and compare motor, range, weight, gearing and other technical specifications."
: "Select 2 or 3 models and compare the key technical specifications directly."
)
);
var filterArea = append(
wrapper,
createElement(
"div",
"display:flex;" +
"flex-wrap:wrap;" +
"justify-content:center;" +
"gap:8px;" +
"margin:0 auto 18px;"
)
);
var filterDefinitions = mode === "bosch"
? [
{
value: "all",
label: "All Bosch"
},
{
value: "active",
label: "Active Line Plus"
},
{
value: "performance",
label: "Performance Line"
},
{
value: "sx",
label: "SX"
},
{
value: "cx",
label: "CX"
}
]
: [
{
value: "all",
label: "All models"
}
];
var selectionInfo = append(
wrapper,
createElement(
"div",
"margin:0 auto 14px;" +
"padding:11px 14px;" +
"max-width:720px;" +
"border-radius:8px;" +
"background:#f8fafc;" +
"border:1px solid #e2e7ec;" +
"text-align:center;" +
"font-size:14px;" +
"font-weight:600;" +
"color:#4f5a64;",
"No model selected yet · maximum 3"
)
);
var productGrid = append(
wrapper,
createElement(
"div",
"display:grid;" +
"grid-template-columns:repeat(auto-fit,minmax(230px,1fr));" +
"gap:12px;"
)
);
var compareAction = append(
wrapper,
createElement(
"div",
"margin-top:20px;" +
"text-align:center;"
)
);
var compareButton = append(
compareAction,
createElement(
"button",
"display:block;" +
"width:100%;" +
"max-width:350px;" +
"margin:0 auto;" +
"padding:14px 18px;" +
"box-sizing:border-box;" +
"border:0;" +
"border-radius:7px;" +
"background:#075eae;" +
"color:#ffffff;" +
"font-size:16px;" +
"font-weight:700;" +
"cursor:pointer;" +
"opacity:.45;",
"Select at least 2 models"
)
);
compareButton.type = "button";
compareButton.disabled = true;
var compareHolder = append(
wrapper,
createElement(
"div",
"margin-top:18px;"
)
);
var normalFinderButton = append(
compareAction,
createElement(
"button",
"display:inline-block;" +
"margin-top:12px;" +
"padding:8px 10px;" +
"border:0;" +
"background:transparent;" +
"color:#075eae;" +
"font-size:14px;" +
"font-weight:700;" +
"cursor:pointer;" +
"text-decoration:underline;",
"Back to the regular folding e-bike advisor"
)
);
normalFinderButton.type = "button";
function updateSelectionInfo() {
var count =
directCompareSelected.length;
if (!count) {
selectionInfo.textContent =
"No model selected yet · maximum 3";
} else {
selectionInfo.textContent =
count +
(
count === 1
? " model selected"
: " models selected"
) +
" · maximal 3";
}
if (count >= 2) {
compareButton.disabled = false;
compareButton.style.opacity = "1";
compareButton.textContent =
count +
" Compare models";
} else {
compareButton.disabled = true;
compareButton.style.opacity = ".45";
compareButton.textContent =
"Select at least 2 models";
}
}
function renderFilterButtons() {
clear(filterArea);
filterDefinitions.forEach(
function (filter) {
var active =
directCompareMotorFilter ===
filter.value;
var button = append(
filterArea,
createElement(
"button",
"border:" +
(
active
? "2px solid #075eae;"
: "1px solid #cfd8e1;"
) +
"border-radius:20px;" +
"background:" +
(
active
? "#eaf3fb;"
: "#ffffff;"
) +
"color:" +
(
active
? "#075eae;"
: "#4f5a64;"
) +
"padding:8px 13px;" +
"font-size:13px;" +
"font-weight:700;" +
"cursor:pointer;",
filter.label
)
);
button.type = "button";
button.addEventListener(
"click",
function () {
directCompareMotorFilter =
filter.value;
renderFilterButtons();
renderProductChoices();
}
);
}
);
}
function renderProductChoices() {
clear(productGrid);
clear(compareHolder);
var visibleProducts =
allDirectProducts.filter(
function (product) {
if (
directCompareMotorFilter ===
"all"
) {
return true;
}
return (
getBoschMotorFamily(
product
) ===
directCompareMotorFilter
);
}
);
if (!visibleProducts.length) {
append(
productGrid,
createElement(
"div",
"grid-column:1/-1;" +
"padding:20px;" +
"border:1px solid #dfe5eb;" +
"border-radius:8px;" +
"background:#f8fafc;" +
"text-align:center;" +
"color:#65717d;" +
"font-size:14px;",
"There are currently no models in the comparison data for this motor filter."
)
);
return;
}
visibleProducts.forEach(
function (product) {
var selected =
directCompareHasProduct(
product.id
);
var box = append(
productGrid,
createElement(
"div",
"display:flex;" +
"flex-direction:column;" +
"min-width:0;" +
"padding:15px;" +
"border-radius:10px;" +
"background:" +
(
selected
? "#f5faff;"
: "#ffffff;"
) +
"border:" +
(
selected
? "2px solid #075eae;"
: "1px solid #dfe5eb;"
) +
"box-sizing:border-box;"
)
);
append(
box,
createElement(
"div",
"font-size:16px;" +
"line-height:1.3;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:8px;",
product.name
)
);
append(
box,
createElement(
"div",
"font-size:12.5px;" +
"line-height:1.45;" +
"color:#65717d;" +
"margin-bottom:6px;",
getMotorTorqueText(
product
)
)
);
append(
box,
createElement(
"div",
"font-size:17px;" +
"font-weight:700;" +
"color:#252a30;" +
"margin-bottom:12px;",
formatPrice(
product.price
)
)
);
var chooseButton = append(
box,
createElement(
"button",
"margin-top:auto;" +
"width:100%;" +
"box-sizing:border-box;" +
"padding:10px 12px;" +
"border-radius:6px;" +
"border:" +
(
selected
? "2px solid #075eae;"
: "1px solid #075eae;"
) +
"background:" +
(
selected
? "#075eae;"
: "#ffffff;"
) +
"color:" +
(
selected
? "#ffffff;"
: "#075eae;"
) +
"font-size:13px;" +
"font-weight:700;" +
"cursor:pointer;",
selected
? "✓ Selected"
: "+ Add to comparison"
)
);
chooseButton.type =
"button";
chooseButton.addEventListener(
"click",
function () {
if (
toggleDirectCompareProduct(
product.id
)
) {
updateSelectionInfo();
renderProductChoices();
}
}
);
}
);
}
compareButton.addEventListener(
"click",
function () {
if (
directCompareSelected.length < 2
) {
return;
}
clear(compareHolder);
var chosenProducts =
directCompareSelected
.map(
function (id) {
var i;
for (
i = 0;
i < products.length;
i++
) {
if (
String(
products[i].id
) ===
String(id)
) {
return products[i];
}
}
return null;
}
)
.filter(
function (product) {
return !!product;
}
);
var directResults =
chosenProducts.map(
function (product) {
return {
product: product,
score: 0
};
}
);
renderCompareBox(
compareHolder,
directResults,
{
direct: true
}
);
var compareOpenButton =
compareHolder.querySelector(
"button"
);
if (compareOpenButton) {
compareOpenButton.click();
}
track(
"gx_product_compare_direct_open",
{
mode: mode,
compared_products:
directCompareSelected.join(",")
}
);
compareHolder.scrollIntoView(
{
behavior: "smooth",
block: "start"
}
);
}
);
normalFinderButton.addEventListener(
"click",
function () {
directCompareSelected = [];
directCompareMotorFilter =
"all";
removeDirectCompareModeFromUrl();
progressBar.style.width =
"0%";
progressText.textContent =
"Start";
renderStart();
root.scrollIntoView(
{
behavior: "smooth",
block: "start"
}
);
}
);
renderFilterButtons();
renderProductChoices();
updateSelectionInfo();
track(
"gx_product_compare_direct_start",
{
mode: mode
}
);
}
/* =========================================
ERGEBNIS
========================================= */
function renderResults() {
clear(content);
progressBar.style.width =
"100%";
progressText.textContent =
finderMode === "quick"
? "Your quick search"
: "Your recommendation";
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-Mid-drive motor-Modelle gezeigt.
*/
if (
answers.focus === "bosch"
) {
ranked =
ranked.filter(
function (entry) {
return (
entry.product.bosch === true &&
entry.product.midMotor === true
);
}
);
}
/*
* Bei "Fully automatic / stepless" 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"
? "Your quick-search results"
: "Your personal selection"
)
);
append(
titleArea,
createElement(
"div",
"font-size:25px;" +
"font-weight:700;" +
"color:#252a30;" +
"line-height:1.25;",
finderMode === "quick"
? "These folding e-bikes match your description"
: "These folding e-bikes match your requirements"
)
);
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;",
"No suitable model was found for this combination. Restart the finder and describe your requirements a little more broadly."
)
);
} 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;",
"Restart finder"
)
);
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 =
"Another suitable option";
if (index === 0) {
label =
"Our recommendation";
}
if (index === 1) {
label =
"Very good 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;",
"Why it fits: "
)
);
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;",
"View product"
)
);
link.href =
product.url;
link.addEventListener(
"click",
function () {
track(
"gx_product_finder_result_click",
{
product:
product.id,
article_number:
product.articleNumber
}
);
}
);
}
var initialCompareMode =
getDirectCompareMode();
if (
initialCompareMode === "bosch"
) {
renderDirectCompareMode(
"bosch"
);
} else {
renderStart();
}
})();