5-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_p
_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-08-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_progres
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_prontil_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-08-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_
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 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
"description":"\u003ch3\u003eTake advantage of our Student Bike Bundle!\u003c\/h3\u003e\n\u003cp\u003eWhat’s included?\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eRidgeback Velocity\u003c\/li\u003e\n\u003cli\u003eKryptonite Keeper Lock\u003c\/li\u003e\n\u003cli\u003eLazer Helmet\u003c\/li\u003e\n\u003cli\u003eFree Running in service\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eThe cornerstone of our utility range the Velocity combines reliability, comfort and quality in an easy to understand package that is perfect for the first-time buyer. Designed to provide everything you need in a bike, without any unnecessary distractions, the Velocity takes the complications out of bike ownership and leaves you free to enjoy the ride.\u003c\/p\u003e\n\u003cp\u003eThe aluminium frame is built to last and enjoys our limited lifetime warranty, while a single chainring and guard make for a clean ride.\u003c\/p\u003e\n\u003cp\u003e3x8 drivetrain with wide-ranging gears is perfect. This setup gives a perfect range for 3cbr\u003eEH9 1QN\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eEmail:\u003c\/p\u003e\n\u003cp\u003eedinburgh@projektride.co.uk\u003c\/p\u003e\n\u003cdiv class=\"rte\"\u003e\u003c\/div\u003e","published_at":"2025-09-13T12:45:18+01:00","created_at":"2025-09-13T12:30:12+01:00","vendor":"ProjektRide","type":"Bicycles","tags":["bike","BIKES","hybrid","second hand","spo-cs-disabled","spo-default","spo-disabled","spo-notify-me-disabled"],"price":49900,"price_min":49900,"price_max":49900,"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":56051529482623,"title":"Small","option1":"Small","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Projektride's Student bike bundle! - Small","public_title":"Small","options":["Small"],"price":49900,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":null,"requires_selling_
ipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Projektride's Student bike bundle! - Extra Large","public_title":"Extra Large","options":["Extra Large"],"price":49900,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":56051529613695,"title":"Extra Extra Large","option1":"Extra Extra Large","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Projektride's Student bike bundle! - Extra Extra Large","public_title":"Extra Extra Large","options":["Extra Extra Large"],"price":49900,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/B1B0CF04-02C0-4099-B685-92962FC479F2.jpg?v=1758108217","\/\/projektride.co.uk\/cdn\/shop\/files\/C685060D-D458-4A74-86F3-7C3E83F9F362.jpg?v=17581
p_f_freewheel_imagessportlinefwbikesrb21070_detail_05.jpg?v=1758108217","width":1534},{"alt":null,"id":67711545770367,"position":7,"preview_image":{"aspect_ratio":1.499,"height":1197,"width":1794,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/004202lockup.jpg?v=1758108217"},"aspect_ratio":1.499,"height":1197,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/004202lockup.jpg?v=1758108217","width":1794},{"alt":null,"id":67711549342079,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/ftp_f_freewheel_imagesmadisonfwaccessoriescz253011.jpg?v=1758108217"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/ftp_f_freewheel_imagesmadisonfwaccessoriescz253011.jpg?v=1758108217","width":1800}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003ch3\u003eTake advantage of our Student Bike Bundle!\u003c\/h3\u003e\n\u003cp\u003eWhat’s included?\u003c\/p\u003e\ selected wide tyres, a comfort saddle with pressure relief channel and ergonomically-shaped dual density grips.\u003c\/p\u003e\n\u003cp\u003ePracticality is another area where the Velocity really shines, with mounts for mudguards and racks.\u003c\/p\u003e\n\u003cp\u003eLooking for a similar bike, but for hillier terrain and with a wider range of gears? Be sure to take a look at the Ridgeback Motion.\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003eINFORMATION\u003c\/p\u003e\n\u003cp\u003eWorking Hours ;\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003eMon - Fri: 09:00 - 18:30\u003cbr\u003eSat: 9:00 - 16:00\u003cbr\u003eSun: Closed\u003cbr\u003e\u003c\/p\u003e\n\u003cp\u003eTel: \u003c\/p\u003e\n\u003cp\u003e0131 374 5324\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eLocation:\u003c\/p\u003e\n\u003cp\u003e82 Newington Road,\u003cbr\u003eEdinburgh,\u003cbr\u003eEH9 1QN\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eEmail:\u003c\/p\u003e\n\u003cp\u003eedinburgh@projektride.co.uk\u003c\/p\u0Int(""),56051529613695 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {56051529482623 : null,56051529515391 : null,56051529548159 : null,56051529580927 : null,56051529613695 : null,};
window._RestockRocketConfig.variantsShippingText = {56051529482623 : "",56051529515391 : "",56051529548159 : "",56051529580927 : "",56051529613695 : "",};
window._RestockRocketConfig.variantsShippingTextForMarket = {56051529482623 : null,56051529515391 : null,56051529548159 : null,56051529580927 : null,56051529613695 : null,};
window._RestockRocketConfig.selected_variant_id = 56051529482623;
window._RestockRocketConfig.selected_variant_available = window._RestockRocketConfig.product.variants.find(function(variant) { return variant.id == window._RestockRocketConfig.selected_variant_id }).available;window._RestockRocketConfig.scriptUrlProduct = 'https://cdn.shopify.com/extensions/019d2f20-306e-73e0-8f4f-46c37de1772b/restockrocket-1-470/assets/restockrocket-product.js'
windowte.now() / 1000); // Current time in seconds
const liquidCacheAge = now - liquidRenderedAt; // Age in seconds
// Handle client clock ahead of server
if (liquidCacheAge 0) {
console.debug(`STOQ - Client clock appears ahead of server by ${Math.abs(Math.round(liquidCacheAge / 60))} minutes, assuming cache fresh`);
window._RestockRocketConfig.isLiquidCacheFresh = true;
} else if (liquidCacheAge = LIQUID_CACHE_MAX_AGE) {
console.debug(`STOQ - Liquid cache is fresh (${Math.round(liquidCacheAge / 60)} minutes old)`);
window._RestockRocketConfig.isLiquidCacheFresh = true;
} else {
console.debug(`STOQ - Liquid cache is stale (${Math.round(liquidCacheAge / 60)} minutes old, max ${Math.round(LIQUID_CACHE_MAX_AGE / 60)} minutes)`);
window._RestockRocketConfig.isLiquidCacheFresh = false;
}
}
function checkSettingsExpiry(settings) {
try {
if (!settings || !settings.updated_at) {
console.debug('STOQ - Invalid settings data structure');
return null;
}
if (!settings.cache) {
console.debug('STOQ - settings caching disabled');
return null;
}
// Check if translations are enabled but missing from cache
// This handles the backfill period where DB has translations but metafield doesn't
if (settings.multi_language_enabled) {
if (!settings.translations) {
// Translations enabled but no
];
if (value !== null && value !== undefined && value !== '') {
settings[key] = value;
}
});
} else {
console.debug('STOQ - No translated fields found for locale:', normalizedLocale);
}
delete settings.translations;
return settings;
} catch (e) {
console.debug('STOQ - error applying translations:', e);
return settings;
}
}
// Setup event listener for cart selling plan updates
// This must be called before any scripts are loaded to avoid race conditions
function setupCartSellingPlanUpdater(settings) {
// Setup listener regardless - updateCartSellingPlans has its own guards
// This ensures cleanup happens even when preorders are disabled globally
// Listen for stoq:inventory-data-loaded event dispatched by api.js
window.addEventListener('stoq:inventory-data-loaded', function(event) {
console.debug('STOQ - Inventory data loaded, updating cart selling plans');
if (window._RestockRocket