":{}}],"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-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,"p
reorder_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}];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":8055058923746,"title":"Brooks C15 Cambium Carved All-Weather","handle":"brooks-c15-cambium-carved-all-weather","descri
- ption":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv class=\"col\"\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eMade for years of hard riding. The Cambium All Weather is a durable and comfortable saddle that is “ready to ride”, thanks to a vulcanised natural rubber top for flexible performance requiring no breaking in period. From freezing rain to blazing sunshine, the waterproof, weatherproof nylon cover is made to perform flawlessly in all conditions. Additionally the updated back plate has loops for a saddle bag or other accessory.\u003c\/p\u003e\n\u003cp\u003eThis carved model features a hole for pressure relief helping to eliminate contact point discomfort.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eRails: Black Steel\u003c\/li\u003e\n\u003cli\u003eLx283mm, Wx140mm, Hx52mm\u003c\/li\u003e\n\u003cli\u003eWeight: 432g\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"col\"\u003e\n\u003cdiv class=\"features\"\u003e\u003c\/div\u003e\n\u003c\/div\
u003e","published_at":"2025-01-07T16:36:51+00:00","created_at":"2023-03-18T11:22:11+00:00","vendor":"ProjektRide","type":"Apparel \u0026 Accessories","tags":["Accessories","brooks","Saddles","spo-cs-disabled","spo-default","spo-disabled","spo-notify-me-disabled"],"price":11499,"price_min":11499,"price_max":11499,"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":43936017449186,"title":"140mm","option1":"140mm","option2":null,"option3":null,"sku":"C205C00A06300","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Brooks C15 Cambium Carved All-Weather - 140mm","public_title":"140mm","options":["140mm"],"price":11499,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/products\/26196-pm.png?v=1679138533","\/\/projektride.co.uk\/cdn\/shop\/products\/26197-pm.png?v=1679138534","\/\/projektride.co.uk\/cdn\/shop\/products\/26195-pm.png?v=1679138534","\/\/projektride.co.uk\/cdn\/shop\/products\/26199-pm.png?v=1679138533","\/\/projektride.co.uk\/cdn\/shop\/products\/26198-pm.png?v=1679138534","\/\/projektride.co.uk\/cdn\/shop\/products\/26200-pm.png?v=1679138533","\/\/projektride.co.uk\/cdn\/shop\/products\/26201-pm.png?v=1679138534"],"featured_image":"\/\/projektride.co.uk\/cdn\/shop\/products\/26196-pm.png?v=1679138533","options":["Size"],"media":[{"alt":null,"id":31694647427298,"position":1,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26196-pm.png?v=1679138533"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26196-pm.png?v=1679138533","width":776},{"alt":null,"id":31694647460066,"position":2,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26197-pm.png?v=1679Front Suspension138534"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26197-pm.png?v=1679138534","width":776},{"alt":null,"id":31694647492834,"position":3,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26195-pm.png?v=1679138534"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26195-pm.png?v=1679138534","width":776},{"alt":null,"id":31694647525602,"position":4,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26199-pm.png?v=1679138533"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26199-pm.png?v=1679138533","width":776},{"alt":null,"id":31694647558370,"position":5,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26198-pm.png?v=1679138534"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26198-pm.png?v=1679138534","width":776},{"alt":null,"id":31694647591138,"position":6,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26200-pm.png?v=1679138533"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26200-pm.png?v=1679138533","width":776},{"alt":null,"id":31694647623906,"position":7,"preview_image":{"aspect_ratio":1.0,"height":776,"width":776,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26201-pm.png?v=1679138534"},"aspect_ratio":1.0,"height":776,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/26201-pm.png?v=1679138534","width":776}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv class=\"col\"\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eMade for years of hard riding. The Cambium All Weather is a dura
ble and comfortable saddle that is “ready to ride”, thanks to a vulcanised natural rubber top for flexible performance requiring no breaking in period. From freezing rain to blazing sunshine, the waterproof, weatherproof nylon cover is made to perform flawlessly in all conditions. Additionally the updated back plate has loops for a saddle bag or other accessory.\u003c\/p\u003e\n\u003cp\u003eThis carved model features a hole for pressure relief helping to eliminate contact point discomfort.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eRails: Black Steel\u003c\/li\u003e\n\u003cli\u003eLx283mm, Wx140mm, Hx52mm\u003c\/li\u003e\n\u003cli\u003eWeight: 432g\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"col\"\u003e\n\u003cdiv class=\"features\"\u003e\u003c\/div\u003e\n\u003c\/div\u003e"};
window._RestockRocketConfig.variantsInventoryPolicy = {43936017449186 : "continue",};
window._RestockRocketConfig.variantsInventoryQuantity = {43936017449186 : parseInt("5"),
- };
window._RestockRocketConfig.variantsPreorderCount = {43936017449186 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderCountForMarket = {43936017449186 : null,};
window._RestockRocketConfig.variantsPreorderMaxCount = {43936017449186 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {43936017449186 : null,};
window._RestockRocketConfig.variantsShippingText = {43936017449186 : "",};
window._RestockRocketConfig.variantsShippingTextForMarket = {43936017449186 : null,};
window._RestockRocketConfig.selected_variant_id = 43936017449186;
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/019bf9e0-3016-7510-aaea-4318e35b6645/restock-rocket-shopify-436/assets/restockrocket-product.js'
window._RestockRock
etConfig.scriptUrlCollection = 'https://cdn.shopify.com/extensions/019bf9e0-3016-7510-aaea-4318e35b6645/restock-rocket-shopify-436/assets/restockrocket-collection.js'
window._RestockRocketConfig.scriptHost = window._RestockRocketConfig.scriptUrlProduct.substring(0, window._RestockRocketConfig.scriptUrlProduct.lastIndexOf('/') + 1)
window._RestockRocketConfig.host = 'https://app.restockrocket.io'
const SETTINGS_CACHE_DURATION = 15 * 60 * 1000; // 15 minutes in milliseconds
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 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 Rear Suspensionsettings');
return null;
}
const age = Date.now() - updatedAt.getTime();
if (age <
SETTINGS_CACHE_DURATION) {
console.debug('STOQ - settings changed recently, skipping cache');
return null;
}
return settings;
} catch (error) {
console.debug('STOQ - Error checking settings cache:', error);
return null;
}
}
function createRestockRocketContainer() {
const restockRocketContainer = document.createElement('div');
restockRocketContainer.id = 'restock-rocket';
document.body.appendChild(restockRocketContainer);
}
function createRestockRocketScript(scriptUrl) {
const restockRocketScriptElement = document.createElement('script');
restockRocketScriptElement.setAttribute('defer', 'defer');
restockRocketScriptElement.src = scriptUrl;
document.body.appendChild(restockRocketScriptElement);
}
createRestockRocketContainer()
console.debug('STOQ - extension activated')
function applyTranslations(settings) {
try {
// Skip translation logic entirely if multi-language is not enabled
if (!settings ||
!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
];
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) {
if (!settings || !settings.preorder_enabled) {
return;
}
// Listen for stoq:preorder-api-ready event dispatched by preorder.js
window.addEventListener('stoq:preorder-api-ready', function(event) {
console.debug('STOQ - Preorder API ready, updating cart selling plans');
if (window._RestockRocket && window._RestockRocket.updateCartSellingPlans) {
window._RestockRocket.updat