Track Service Progress // Parse dates for comparison to handle format differences (+00:00 vs .000Z)
const cachedDate = new Date(cachedData.cached_at);
const maxDate = maxUpdatedAt ? new Date(maxUpdatedAt) : null;
const useCached = !maxUpdatedAt || (cachedDate && !isNaN(cachedDate) && (!maxDate || cachedDate > maxDate));
if (useCached) {
if (Array.isArray(cachedData.plans)) {
window._RestockRocketConfig.sellingPlans = cachedData.plans;
// Only use disabled_plan_ids when using cached plans
window._RestockRocketConfig.disabledSellingPlanIds = cachedData.disabled_plan_ids || [];
console.debug('[RR] Using selling plans from cachedSellingPlans (cached_at: ' + cachedData.cached_at + ')');
}
} else {
// When using old format (stale cache), don't trust disabled_plan_ids
window._RestockRocketConfig.disabledSellingPlanIds = [];
console.debug('[RR] Using selling plans from old format (max updated_at: ' + m
44411592930,46044414509282,46044465627362,46044465660130,46044617867490,46044618064098,46044618096866,46044618129634,46044618326242,46044618784994,46044618817762,46044618850530,46044618883298,46044618916066,46044637495522,46044637528290,46044637561058,46044640149730,46044661350626,46044661448930,46044661481698,46044661612770,46044661743842,46044916842722,46044917530850,46044917956834,46044918022370,46046671077602,46046671175906,46046725374178,46046725406946,46046791434466,46046797856994,46046806573282,46047079465186,46047079530722,46047079661794,46047079727330,46047079792866,46047079858402,46057685909730,46057686008034,46057686171874,46057686204642,46057686630626,46057686761698,46057745645794,46057745678562,46057745776866,46066053218530,46066053578978,46066053611746,46066053742818,46066053939426,46081900839138,46081901887714,46081905656034,46081916862690,46081923907810,46081925447906,46081927971042,46081929216226,46081934819554,46081935507682,46081946353890,46081946878178,46081947009250,46081949597922,4608195E-bike Batteries and c
5627234,46081958346978,46081959428322,46081965424866,46081970438370,46081976402146,46081976926434,46081977221346,46081986986210,46081991672034,46081992294626,46081992753378,46081993179362,46081993572578,46081993867490,46082006384866,46082006876386,46082016051426,46082018967778,46082046689506,51888937337215,51888937369983,51888937402751,51888937435519,51982381121919,54900951253375,54900951286143,54901043134847,54901043167615,54901043200383,54945187430783,54945187463551,54945187496319,54945187529087,54945187561855,54945187594623,54945190117759,54945190150527,54945190183295,54945190216063,54945190248831,54945190281599,54945190314367,54945190347135,54945190379903,54945190412671,54945190445439,54945190478207,54945198080383,54945198113151,54945198145919,54945198178687,54945198211455,54945198244223,54945198276991,54945198309759,54945198342527,54945198375295,54945198408063,54945198440831,54945216364927,54945216397695,54945216430463,54945216463231,54945216495999,54945216528767,54945225310591,54945225343359,54945225376
,56518716883327,56518716916095,56518716948863,56518716981631,56518717014399,56518717047167,56518717079935,56518717112703,56518717145471,56518717374847,56518717440383,56518717473151,56518717538687,56518717571455,56518717604223,56518717636991,56518717669759,56518717833599,56518717866367,56518717899135,56518717931903,56518717964671,56518717997439,56518718030207,56518718062975,56518718095743,56518718128511,56518718161279,56518718194047,56518790545791,56518790578559,56518790611327,56518790644095,56518790676863,56518805651839,56518805684607,56518805717375,56518805750143,56518805782911,56561153933695,56766086054271,56766086185343,56766086250879,56766086381951,56766086447487,56766086513023,56766086840703,56766183342463,56766183375231,56766183407999,56766183440767,56766183473535,56766183506303,56766183539071,56766183571839,56766183637375,56766183670143,56766183768447,56766183801215,56766183833983,56766183932287,56766183965055,56766183997823,56766184030591,56766184096127,56766184128895,56766184161663,57284689789311,572
See More84689822079,57284689854847,57284689887615,57284689920383,57284689953151,57284689985919,57284690018687,57284690051455,57284690084223,57284690116991,57284690149759,57284690182527,57284690215295,57284690248063,57284690313599,57284690346367,57284690379135,57284690411903,57311934513535,57311934546303,57311934579071,57311934611839,57318991724927,57318991790463,57318991823231,57319008797055,57319008829823,57319008862591,57319008895359,57392715465087,57392715497855,57392715530623,57392715563391,57392715596159,57578627137919,57578627170687,57579681808767,57579681841535,57579681874303,57579681907071,57579681939839,57579773362559,57579773395327,57579773428095,57579773460863,57579773493631,57579861377407,57579861410175,57579861442943,57579861475711,57579861508479,57581101154687,57581101187455,57581101220223,57581101252991,57581101285759,57582419149183,57582419181951,57582419214719,57582419247487,57582419280255,57596170535295,57596170568063,57596170600831,57596170633599,57596170666367,57596170699135,57596170731903,5759617
0764671,57596170797439,57596170830207,57596170862975,57596170895743,57596171092351,57596171125119,57596171157887,57596171190655,57596171223423,57596171256191,57596171288959,57596171321727,57596171354495,57596171387263,57596171420031,57596171452799,57596175384959,57596175417727,57596175450495,57596175483263,57596176138623,57596176171391,57596176204159,57596176236927,57596176269695,57596176302463,57596176335231,57596176367999,57596176662911,57596176695679,57596176728447,57596176761215,57596176793983,57596176859519,57596176925055,57596177056127,57596177088895,57596177121663,57596177252735,57596177285503,57596177351039,57596177383807,57596177416575,57596177449343,57596177514879,57596177547647,57596177613183,57596177645951,57596177809791,57596177842559,57596177875327,57596177908095,57602995126655,57602995159423,57602995192191,57602995224959,57602995257727,57602995290495,57602995323263,57602995356031,57602995388799,57602995421567,57602995454335,57602995487103,57602995519871,57602995552639,57602995585407,57602995618
175,57602995650943,57602995683711,57602995716479,57602995749247,57602995782015,57602995814783,57602995847551,57602995880319,57602995913087,57602995945855,57602995978623,57602996011391,57602996044159,57602996076927,57602996109695,57602996142463,57602996175231,57602996207999,57602996240767,57602996273535,57602996306303,57602996339071,57602996371839,57602996404607,57602996437375,57602996470143,57602996502911,57602996535679,57602996568447,57602996601215,57602996633983,57602996666751,57602996699519,57602996732287,57602996765055,57602996797823,57602996830591,57602996863359,57602996928895,57602996961663,57602996994431,57602997027199,57602997059967,57602997092735,57602997223807,57602997256575,57602997289343,57602997322111,57602997354879,57602997387647,57602997420415,57602997453183,57602997485951,57602997518719,57602997715327,57602997879167,57602998075775,57602998206847,57602998239615,57602998337919,57602998370687,57602998403455,57602998501759,57602998534527,57602998600063,57602998894975,57602998960511,57602999026047,57602999124351,57602999157119,57602999189887,57602999222655,57603001090431,57603001123199,57603001155967,57603001188735,57603001221503,57603001254271,57603001287039,57603001647487,57603001713023,57603001745791,57603001778559,57603001844095,57603001876863,57603001942399,57603002007935,57603002040703,57603002073471,57603002106239,57603002204543,57603002237311,57603002270079,57603002302847,57603002335615,57603002368383,57603002466687,57603002499455,57603002532223,57603003089279,57603003122047,57603003154815,57603003187583,57603003220351,57603003253119,57603003285887,57603003318655,57603003351423,57603003384191],"updated_at":"2026-07-08T11:07:22Z","market_locations_enabled":false,"market_id":382140642,"preorder_location_filter_enabled":false,"preorder_location_filter_ids":[],"collection_id":null};window._RestockRocketConfig.cachedOutOfStockVariantIds = { out_of_stock_variant_ids: [] };window._RestockRocketConfig.cachedVariantPreorderLimits = {"variant_preorder_limits":{},"updated_at":"2026-07-08T21:17:56Z","shopi
fy_market_id":382140642,"market_locations_enabled":false};
window._RestockRocketConfig.cachedVariantPreorderLimitsMarketKey = "variant_preorder_limits_for_market_382140642";window._RestockRocketConfig.cachedVariantShippingTexts = {"variant_shipping_texts":{},"updated_at":"2026-07-08T21:17:56Z","shopify_market_id":382140642,"market_locations_enabled":false};
window._RestockRocketConfig.cachedVariantShippingTextsMarketKey = "variant_shipping_texts_for_market_382140642";window._RestockRocketConfig.sellingPlans = [{"shopify_selling_plan_group_id":98590196095,"shopify_selling_plan_id":713071886719,"enabled":true,"variant_ids":[55569712382335,55569712415103,55569712480639,55570017616255,55570017550719,55569712447871,55570017583487],"product_variants_source":"custom","name":"Preorder","preorder_button_text":"Preorder","preorder_button_description":"Note: This is a preorder. Items will ship based on the estimated delivery date.","preorder_button_description_enabled":true,"preorder_button_description_background_color":"#ebebeb","preorder_button_description_text_color":"#000000","preorder_button_description_border_radius":10,"preorder_button_description_show_quantity_limit":false,"preorder_button_description_quantity_limit_suffix":" units available for preorder","preorder_button_description_shipping_text_prefix":"Shipping: ","delivery_exact_time":null,"delivery_after_n_intervals":null,"delivery_at":"2025-07-26T09:20:18.169Z","delivery_type":"asap","quantity_limit_text":"{{ quantity }} units available for preorder","preorder_button_description_show_shipping":true,"preorder_button_description_icons_enabled":true,"preorder_shipping_text":"Shipping: {{ date }}","shipping_applies_to_all_products":true,"shipping_text":"Estimated to ship within 2 months","payment_type":"full","billing_checkout_charge_type":"percentage","billing_checkout_charge_amount":null,"billing_checkout_charge_percentage":"100.0","pricing_type":"no_discount","pricing_amount":null,"pricing_percentage":null,"discount_text":"Save {{ discount }}","billing
_title":"Full payment","billing_description":null,"enable_billing_widget":false,"inventory_provider":"stoq","preorder_badge_enabled":false,"preorder_badge_text":"Preorder","preorder_badge_text_color":"#FFFFFF","preorder_badge_background_color":"#000000","preorder_discounted_price_enabled":null,"payment_line_item_property_enabled":false,"shipping_line_item_property_enabled":true,"custom_line_item_property_text":null,"preorder_button_text_color":"#ffffff","preorder_button_background_color":"#565557","preorder_button_colors_enabled":true,"markets_enabled":false,"market_id":13779632354,"shopify_market_ids":[],"use_shopify_selling_plan":true,"use_simplified_shipping_text":false,"translations":{},"payment_options":[{"billing_type":"no_remaining_balance","billing_checkout_charge_type":"percentage","billing_checkout_charge_amount":null,"billing_checkout_charge_percentage":"100.0","billing_at":"2025-07-26T09:20:38.472Z","billing_after_n_intervals":7,"billing_after_interval_type":"day","pricing_type":"no_discount","pri":"day","pricing_type":"no_discount","pricing_amount":null,"pricing_percentage":null,"billing_title":"Full payment","billing_description":null,"discount_text":"Save {{ discount }}","shopify_selling_plan_id":713071886719,"is_default":true,"type":"full","translations":{}}],"require_preorder_acknowledgement":false,"preorder_acknowledgement_text":"I acknowledge and agree to the preorder terms and conditions for this product.","disable_button_until_acknowledged":false,"preorder_min_quantity":null,"preorder_max_quantity":null,"countdown_timer_enabled":false,"countdown_timer_style":"text","countdown_timer_text_color":"#000000","countdown_timer_background_color":"#f5f5f5","countdown_timer_border_radius":8,"countdown_timer_format":"DHMS","countdown_timer_use_schedule_dates":true,"countdown_timer_custom_start_date":null,"countdown_timer_custom_end_date":null,"countdown_timer_starts_text":null,"countdown_timer_ends_text":null,"schedule_offer":false,"schedule_start_date":null,"schedule_end_date":null,"updated_at":"2025-0
8-19T10:05:43.042Z","allow_mixed_cart":true,"mixed_cart_error_message":"Preorders must be purchased separately from regular items. Please complete your current order first, or clear your cart to continue.","b2b_enabled":true,"preorder_progress_bar_enabled":false,"preorder_progress_bar_text":"{{ sold }} of {{ total }} claimed","preorder_progress_bar_fill_color":"#000000","preorder_progress_bar_background_color":"#e5e5e5","preorder_progress_bar_text_color":"#FFFFFF","preorder_progress_bar_border_radius":4,"preorder_progress_bar_show_percentage":false}],"disabled_plan_ids":[713813721471,713176482175,714631872895],"cached_at":"2026-04-09T09:16:46Z"};
if (cachedData && typeof cachedData === '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(maxUpdatedAt) : null;
const useCached = !maxUpdatedAt || (cachedDate && !isNaN(cachedDate) && (!maxDate || cachedDate > maxDate));
if (useCached) {
if (Array.isArray(cachedData.plans)) {
window._RestockRocketConfig.sellingPlans = cachedData.plans;
// Only use disabled_plan_ids when using cache
d plans
window._RestockRocketConfig.disabledSellingPlanIds = cachedData.disabled_plan_ids || [];
console.debug('[RR] Using selling plans from cachedSellingPlans (cached_at: ' + cachedData.cached_at + ')');
}
} else {
// When using old format (stale cache), don't trust disabled_plan_ids
window._RestockRocketConfig.disabledSellingPlanIds = [];
console.debug('[RR] Using selling plans from old format (max updated_at: ' + maxUpdatedAt + ')');
}
}
})();window._RestockRocketConfig.enabledNotifyMeVariantIds = [];window._RestockRocketConfig.disabledNotifyMeVariantIds = [];window._RestockRocketConfig.backInStockTemplates = [];window._RestockRocketConfig.restockNotes = {};window._RestockRocketConfig.integrations = [{"id":"15c94526-b6b8-4de1-9bc1-23b1ca52ddb0","shop_id":38436,"enabled":true,"page_types":["product","collection","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":8684066373858,"title":"Trek District+ 1","handle":"trek-district-1","description":"\u003cp\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cspan\u003eDistrict+ 1 is a dependable electric bike built to make getting around your city super fun and easy. It has low-maintenance internal gearing, a reliable Bosch e-bike system and hydraulic disc brakes for all-weather stopping power. Plus, it comes with all the utility features you need for daily rides, like mudguards, lights and a rear rack.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cul class=\"grid-x grid-margin-x\"\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003cdl data-
Tubelessv-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eFrame\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eAlpha Smooth Aluminum, internal cable routing, post-mount disc\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eFork\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eSR Suntour NEX, coil spring, preload, 50mm travel, 100x5mm QR\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003c\/li\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003ch4 data-v-05762449=\"\" class=\"details-list__item-header header-xsmall mb-25\"\u003eWheels\u003c\/h4\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eFront hub\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eAlloy, centerlock disc, 100mm thru axle\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0
sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eRear hub\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eShimano Nexus 7-speed\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eRims\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eAlex Rims DP23, 36-hole\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eTyres\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eSchwalbe Energizer Active Plus, Puncture Guard, Twin Skin, 700x50c\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003c\/li\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003ch4 data-v-05762449=\"\" class=\"details-list__item-header header-xsmall mb-25\"\u003eDrivetrain\u003c\/h4\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eShifters\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eShimano Nexus Revo
Shifter 7-speed\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eCrank\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003e38T\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eCassette\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003e18T\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eChain\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eShimano HG40\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003ePedals\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medi
Tools & Maintenanceum-9 large-10 py-1 text-xs\"\u003eVP Black with reflectors\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003c\/li\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003ch4 data-v-05762449=\"\" class=\"details-list__item-header header-xsmall mb-25\"\u003eComponents\u003c\/h4\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eSaddle\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eSelle Royal Nuvola\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003c
er Comp Flex 18\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003c\/li\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003ch4 data-v-05762449=\"\" class=\"details-list__item-header header-xsmall mb-25\"\u003eWeight\u003c\/h4\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eWeight\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eL - 23.20 kg \/ 51.15 lbs (excluding battery)\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003cdiv data-v-05762449=\"\" class=\"separator border-b border-gray-10\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\
See More"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eWeight limit\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eThis bike has a maximum total weight limit (combined weight of bicycle, rider and cargo) of 136 kg (300 lb).\u003c\/dd\u003e\n\u003c\/dl\u003e\n\u003c\/li\u003e\n\u003c\/ul\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","published_at":"2024-10-10T15:17:54+01:00","created_at":"2024-08-23T16:33:10+01:00","vendor":"Trek","type":"bike","tags":["District"],"price":232750,"price_min":232750,"price_max":232750,"available":true,"price_varies":false,"compare_at_price":245000,"compare_at_price_min":245000,"compare_at_price_max":245000,"compare_at_price_varies":false,"variants":[{"id":45844333854946,"title":"Medium","option1":"Medium","option2":null,"option3":null,"sku":"5255166","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Trek District+ 1 - Medium","public_title":"Medium","options":["Medium"],"price":232750,"weight":0,"compare_at_price":245000,"inventory_management":"shopify","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":45844333887714,"title":"Large","option1":"Large","option2":null,"option3":null,"sku":"5255167","requires_shipping":true,"tax
able":true,"featured_image":null,"available":true,"name":"Trek District+ 1 - Large","public_title":"Large","options":["Large"],"price":232750,"weight":0,"compare_at_price":245000,"inventory_management":"shopify","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/DistrictPlus1_21_33481_A_Primary.webp?v=1724426445"],"featured_image":"\/\/projektride.co.uk\/cdn\/shop\/files\/DistrictPlus1_21_33481_A_Primary.webp?v=1724426445","options":["Size"],"media":[{"alt":null,"id":34507950883042,"position":1,"preview_image":{"aspect_ratio":1.333,"height":768,"width":1024,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/DistrictPlus1_21_33481_A_Primary.webp?v=1724426445"},"aspect_ratio":1.333,"height":768,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/DistrictPlus1_21_33481_A_Primary.webp?v=1724426445","width":1024}],"requires_selling_plan":false,"selling_plan_groups":[],"cont
ent":"\u003cp\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cspan\u003eDistrict+ 1 is a dependable electric bike built to make getting around your city super fun and easy. It has low-maintenance internal gearing, a reliable Bosch e-bike system and hydraulic disc brakes for all-weather stopping power. Plus, it comes with all the utility features you need for daily rides, like mudguards, lights and a rear rack.\u003c\/span\u003e\u003cspan\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cul class=\"grid-x grid-margin-x\"\u003e\n\u003cli data-v-05762449=\"\" class=\"cell mb-1\"\u003e\n\u003cdl data-v-05762449=\"\" class=\"details-list__item grid-x grid-margin-x\"\u003e\n\u003cdt data-v-05762449=\"\" class=\"details-list__title cell medium-3 large-2 sm:pb-0 sm:pt-1 md:py-1 text-xs font-semibold text-gray-70\"\u003eFrame\u003c\/dt\u003e\n\u003cdd data-v-05762449=\"\" class=\"details-list__definition cell medium-9 large-10 py-1 text-xs\"\u003eAlpha Smooth Aluminum, internal cable routing, post-mount disc\u003c\/dd\u003e\
version>/assets/...
// Trailing digits (e.g. ".../restockrocket-1-521/assets/" -> "521"). Kept numeric to
// match ParseStoqData, so funnel app_version lines up with the order-attribution
// app_version. Reflects the ACTUAL deployed build. This is the SINGLE source of the
// parsed version — preorder.js getAppVersion() reads it back off config rather than
// re-parsing, so the regex lives in exactly one place.
try {
const _stoqVersionMatch = window._RestockRocketConfig.scriptHost.match(/(\d+)\/?(?:assets\/?)?$/);
window._RestockRocketConfig.appVersion = (_stoqVersionMatch && _stoqVersionMatch[1]) || '';
} catch (e) {
window._RestockRocketConfig.appVersion = '';
}
const SETTINGS_CACHE_DURATION = 15 * 60 * 1000; // 15 minutes in milliseconds
const LIQUID_CACHE_MAX_AGE = 15 * 60; // 15 minutes in seconds
// Calculate Liquid cache freshness once at initialization
const liquidRenderedAt = window._RestockRocketConfig.liquidRenderedAt;
// Validate timestamp and calculate ca
<
<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 <tomer interaction.
// Detected variants: the variants present in this page's Liquid context (product page has them;
// collection/index/etc. don't expose variants from Liquid). Used to disambiguate "embed didn't
// load" vs "embed loaded but the variant wasn't a preorder/BIS candidate" in order debug.
try {
const _stoqInitConfig = window._RestockRocketConfig;
const _stoqDetectedVariantIds = (_stoqInitConfig.product && Array.isArray(_stoqInitConfig.product.variants))
? _stoqInitConfig.product.variants.map(function(v) { return v.id })
: [];
const _stoqSelectedVariantId = _stoqInitConfig.selected_variant_id;
Shopify?.analytics?.publish?.('stoq_initialized', {
cart_token: _stoqInitConfig.cartToken || '',
page_url: window.location.href,
page_type: _stoqInitConfig.pageType || '',
shop_domain: _stoqInitConfig.shop || '',
market_id: _stoqInitConfig.marketId || '',
detected_variant_ids: _stoqDetectedVariantIds,
selected_variant_id: _stoqSele
onPageTypes = ['collection', 'index', 'search', 'page'];
if(collectionPageTypes.indexOf(pageType) !== -1 && (settings[`show_button_on_${pageType}`] || settings[`preorder_${pageType}_enabled`])) {
createRestockRocketScript(collectionScriptUrl);
} else if(pageType === 'product') {
createRestockRocketScript(productScriptUrl);
} else if(hijackIntegration) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(usePreorderBuild) {
// cart/article/blog/list-collections: full build so the cart sweep runs.
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else {
console.debug(`STOQ - no scripts enabled for ${pageType}`);
}
// Dispatch custom event when app is loaded
// Cart selling plan updates will be triggered by stoq:inventory-data-loaded event
const appLoadedEvent = new CustomEvent('stoq:loaded', {
detail: {
pageType: window._RestockR