.hedData === 'object' && cachedData.cached_at) {
// Find the maximum updated_at from all items in old array
const oldPlans = window._RestockRocketConfig.sellingPlans;
const maxUpdatedAt = Array.isArray(oldPlans) && oldPlans.length > 0
? oldPlans.reduce(function(max, plan) {
// Parse dates for proper comparison (handles mixed ISO formats)
if (plan.updated_at) {
const planDate = new Date(plan.updated_at);
const maxDate = max ? new Date(max) : null;
return (!maxDate || (planDate && !isNaN(planDate) && planDate > maxDate)) ? plan.updated_at : max;
}
return max;
}, '')
: null;
// Use cached if old array is empty/has no timestamps, or cached is newer
// Parse dates for comparison to handle format differences (+00:00 vs .000Z)
const cachedDate = new Date(cachedData.cached_at);
const maxDate = maxUpdatedAt ? new Date(maxUpdatedA
.ection","index","search","page","cart","list-collections","article","blog"],"configuration":{"toastDuration":10000,"toastPosition":"bottom-right","enableXHRHijack":true,"enableFetchHijack":true,"quantityLimitDisabled":false},"type":"hijack","css_config":null,"js_config":null,"created_at":"2025-07-26T09:16:04.076Z","updated_at":"2025-07-26T09:16:04.076Z"}];window._RestockRocketConfig.obfuscateInventoryQuantity = false;window._RestockRocketConfig.product = {"id":8734592827618,"title":"Trek Allant+ 7 Lowstep","handle":"trek-allant-7-lowstep","description":"\u003cp\u003eThe Allant+ 7 Lowstep is an award-winning e-bike built for riders and commuters who want a stylish, durable e-bike with the added road-smoothing benefits of a suspension fork. A powerful Bosch drive system that assists up to 20 mph (25 km\/h in Europe), quality parts and a wealth of thoughtful design details make this electric bike a smart solution for getting around town every day.\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e\u00
tbody\u003e\n\u003c\/table\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv data-v-05762449=\"\" class=\"rider-sizing__dots\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003csection data-v-05762449=\"\" id=\"GeometryComponent\" data-magellan-target=\"GeometryComponent\" class=\"sizing-and-fit-aftermarket-component sizing-table grid-container mb-6\"\u003e\u003c\/section\u003e","published_at":"2025-09-09T12:22:00+01:00","created_at":"2024-10-11T10:21:29+01:00","vendor":"Trek","type":"Bicycles","tags":["Allant"],"price":365000,"price_min":365000,"price_max":365000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":46044414509282,"title":"Medium","option1":"Medium","option2":null,"option3":null,"sku":"592650","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Trek Allant+ 7 Lowstep - Medium","public_title":"Medium","options":Brother
road-smoothing benefits of a suspension fork. A powerful Bosch drive system that assists up to 20 mph (25 km\/h in Europe), quality parts and a wealth of thoughtful design details make this electric bike a smart solution for getting around town every day.\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eIt's right for you if...\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eYou know the advantages of commuting and getting around your city by e-bike, and don't want to waste your time sitting in traffic or searching for a parking space. You’re looking for an e-bike with equal parts performance, comfort and sleek looks.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe tech you get\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eA sleek hydroformed aluminium frame with a lowstep design that makes it easier to hop on and off, a fully-integrated 500 Wh Bosch PowerTube battery, a powerful Bosch Performance Line CX (250 W, 85 Nm) drive unit that helps y
pot where the bottom of the book is touching the wall. The distance from the marked spot to the floor is your height.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhat is your inside leg?\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eHow to measure: Stand barefoot with your back straight and against a wall. Tuck a ruler or something that extends to the floor between your legs. Using both hands, and keeping it level, pull the ruler up into your crotch as if you were sitting on the saddle. Measure the distance from the top edge of the ruler to the ground to find your inside leg measurement. Your inside leg is very important to your final bike size so please measure carefully.\u003c\/p\u003e\n\u003csection data-v-05762449=\"\" id=\"SizingComponent\" data-magellan-target=\"SizingComponent\" class=\"sizing-and-fit-aftermarket-component sizing-table grid-container mb-6\"\u003e\n\u003cdiv data-v-05762449=\"\" class=\"rider-sizing mb-2\"\u003e\n\u003cdiv data-v-4052fbf6=\"\" data-v-05762449=\"\"\u0
<
To measure your height, stand up straight, barefoot, with your back, heels, shoulders and head all touching a wall. While looking straight ahead, place a book or straight edge on your head and slowly push it against the wall. Your straight edge should be parallel with the floor. Mark the spot where the bottom of the book is touching the wall. The distance from the marked spot to the floor is your height.<
translation data in metafield
// Metafield hasn't been backfilled yet - force refresh
console.debug('STOQ - multi-language enabled but no translation data in cache, fetching fresh');
return null;
}
// Translations object exists in metafield - cache is valid
// If current locale isn't translated, applyTranslations will gracefully use default locale from base fields
if (window._RestockRocketConfig.normalizedLocale &&
!Object.prototype.hasOwnProperty.call(settings.translations, window._RestockRocketConfig.normalizedLocale)) {
console.debug('STOQ - locale not explicitly translated, will use default language from cache');
}
// Don't return null - continue using cache even for untranslated locales
}
const updatedAt = new Date(settings.updated_at);
if (isNaN(updatedAt.getTime())) {
console.debug('STOQ - Invalid updated_at date format in settings');
return null;
}
const
<
!settings.multi_language_enabled) {
return settings;
}
if (!settings.translations) {
console.debug('STOQ - No translations found, skipping translation');
return settings;
}
const normalizedLocale = window._RestockRocketConfig.normalizedLocale;
const translations = settings.translations;
if (!normalizedLocale) {
// No matching locale has translations; drop payload to save memory
console.debug('STOQ - No matching locale for translations. Available:', Object.keys(translations || {}));
delete settings.translations;
return settings;
}
console.debug(`STOQ - Applying translations for normalized locale: ${normalizedLocale} (original: ${window._RestockRocketConfig.locale})`);
const translatedFields = translations[normalizedLocale];
if (translatedFields && typeof translatedFields === 'object') {
Object.keys(translatedFields).forEach(function(key) {
const value = translatedFields[key
&& window._RestockRocket.updateCartSellingPlans) {
window._RestockRocket.updateCartSellingPlans()
.then(hasUpdates => {
if (hasUpdates) {
console.debug('STOQ - cart selling plans updated successfully');
} else {
console.debug('STOQ - no cart selling plan updates needed');
}
})
.catch(error => {
console.error('STOQ - error updating cart selling plans:', error);
});
}
});
}
// First try to get settings from metafields with expiry check
const cachedSettings = window._RestockRocketConfig.cachedSettings;
const validCachedSettings = cachedSettings ? checkSettingsExpiry(cachedSettings) : null;
if (validCachedSettings) {
console.debug('STOQ - using cached settings');
initializeScripts(validCachedSettings);
} else {
console.debug('STOQ - fetching fresh settings');
const headers = {
'X-Shopify-Shop-Domain': window._RestockRocketConfig.shop || window.S
es.com\/gb\/en_GB\/p\/W504513\"\u003eSpanninga SOLO for e-bike\u003c\/a\u003e\n\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr data-v-05762449=\"\"\u003e\n\u003ctd data-v-05762449=\"\"\u003e\n\u003cspan data-v-05762449=\"\"\u003eSize:\u003c\/span\u003e\u003cspan\u003e \u003c\/span\u003eM, L, XL\u003cbr data-v-05762449=\"\"\u003eHerrmans H-Black MR8-E, 180 Lumen, 60 Lux, LED, headlight\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr data-v-05762449=\"\"\u003e\n\u003cth data-v-05762449=\"\" rowspan=\"1\" scope=\"row\"\u003eKickstand\u003c\/th\u003e\n\u003ctd data-v-05762449=\"\"\u003ePletscher Comp Flex 18\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr data-v-05762449=\"\"\u003e\n\u003cth data-v-05762449=\"\" rowspan=\"1\" scope=\"row\"\u003eCargo rack\u003c\/th\u003e\n\u003ctd data-v-05762449=\"\"\u003e\u003ca data-v-05762449=\"\" href=\"https:\/\/www.trekbikes.com\/gb\/en_GB\/p\/W5284844\"\u003eMIK-compatible alloy rear rack, maximum load 25 kg\u003c\/a\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr data-v-05762449iv\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"mb-1\"\u003e\n\u003cp\u003eWe reserve the right to make changes to the product information contained on this site at any time without notice, including with respect to equipment, specifications, models, colours, materials and pricing. Due to supply chain issues, compatible parts may be substituted at any time without notice. The prices shown are the manufacturer's suggested retail prices.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"mb-1\"\u003e\n\u003cp\u003eBike and frame weights are based on pre-production painted frames at time of publication. Weights may vary in final production.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c!----\u003e","published_at":"2024-10-10T15:18:33+01:00","created_at":"2024-08-20T10:04:28+01:00","vendor":"Trek","type":"bike","tags":["Allant"],"price":470000,"price_min":470000,"price_max":470000,"available":false,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compa
eatured_image":null,"available":false,"name":"Trek Allant+ 9 - Extra Large","public_title":"Extra Large","options":["Extra Large"],"price":470000,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/Allant_Plus_9_Men_23_36936_A_Primary.webp?v=1724144483","\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt1.webp?v=1724144492","\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt3.webp?v=1724144506","\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt5.webp?v=1724144516","\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt6.jpg?v=1724144537"],"featured_image":"\/\/projektride.co.uk\/cdn\/shop\/files\/Allant_Plus_9_Men_23_36936_A_Primary.webp?v=1724144483","options":["Size"],"media":[{"alt":null,"id":34480061710562,"position":1,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projekt
0063807714,"position":4,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt5.webp?v=1724144516"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt5.webp?v=1724144516","width":1440},{"alt":null,"id":34480064790754,"position":5,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt6.jpg?v=1724144537"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/AllantPlus9_23_36936_A_Alt6.jpg?v=1724144537","width":1440}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cspan\u003eThe Allant+ 9 is a high-end e-bike built for riders who value high performance, style and capability. Bosch's smart system delivers the power
rview-2\"\u003e\n\u003ch3 class=\"header--md mb-1\"\u003eThe tech you get\u003c\/h3\u003e\n\u003cp\u003eAn Alpha Silver Aluminium frame with 20” wheels and smooth 2” tyres that offer plenty of grip and speed on pavement. Tons of gears to pick from with an 8-speed microSHIFT drivetrain and stopping power they can count on thanks to V-brakes with hand levers.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"kf-block--intro cell small-12 large-4 mb-4\" qaid=\"product-overview-3\"\u003e\n\u003ch3 class=\"header--md mb-1\"\u003eThe final word\u003c\/h3\u003e\n\u003cp\u003eWahoo 20 Path is a versatile and light bike perfect for getting kids out riding and building confidence. It’s light and practical and has smooth tyres that help them ride faster, with plenty of traction for pavement and paths.\u003c\/p\u003e\n\u003cdiv data-v-05762449=\"\" id=\"comp_sizingTabB2BInstructionsHeightOnly_Wrapper\" data-magellan-target=\"comp_sizingTabB2BInstructionsHeightOnly_Wrapper\"\u003e\n\u003cdiv data-v-05762449=\"\"
e book is touching the wall. The distance from the marked spot to the floor is your height.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c\/article\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003csection data-v-05762449=\"\" id=\"SizingComponent\" data-magellan-target=\"SizingComponent\" class=\"sizing-and-fit-aftermarket-component sizing-table grid-container mb-6\"\u003e\n\u003ch2 data-v-05762449=\"\" class=\"header--lg mb-1 cell small-12\"\u003eSizing\u003c\/h2\u003e\n\u003cdiv data-v-05762449=\"\" class=\"rider-sizing mb-2\"\u003e\n\u003cdiv data-v-4052fbf6=\"\" data-v-05762449=\"\"\u003e\n\u003cdiv data-v-4052fbf6=\"\" class=\"size-table\"\u003e\n\u003ctable data-v-3ac87600=\"\" data-v-4052fbf6=\"\" class=\"trek-table trek-table--hstripe trek-table--borderless trek-table--centered trek-table--small trek-table--sticky-headers trek-table--row-headers\" qaid=\"size-table\"\u003e\n\u003ccaption data-v-3ac87600=\"\" class=\"sr-only\"\u003esize-table\u003c\/caption\u003e\