= 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;
}
if (settings.multi_language_enabled) {
if (!settings.translations)
flag: 'enable_storefront_integrations_read',
isValid: function(value) { return Array.isArray(value); },
apply: function(data) {
cfg.integrations = data;
}
});
}
function refreshSellingPlans(embedOnly) {
const cfg = window._RestockRocketConfig;
return refreshShopConfig({
embedOnly: embedOnly === true,
endpoint: 'selling_plans',
metafieldKey: 'cachedSellingPlans',
flag: 'enable_storefront_selling_plans_read',
isValid: function(value) { return !!value && Array.isArray(value.plans); },
apply: function(data) {
cfg.sellingPlans = data.plans;
cfg.disabledSellingPlanIds = data.disabled_plan_ids || [];
if (data && data.read_flags && typeof data.read_flags === 'object' && !Array.isArray(data.read_flags)) {
cfg.readFlags = data.read_flags;
}
}
});
}
function initializeScripts(settings) {
settings = applyTranslations(settings);
window._RestockRocketConfig.settings = setting
Brake PadsCustom Build Inspiration
Brake Spares
Services
Forks
See MoreBook a Service
See More
Made 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.See More
- Rails: Oval Carbon Rails Front SuspensionWorkshop
- 132mm: Lx275mm, Wx132mm, Hx55mm, Weight: 259g See More
- 145mm: Lx275mm, Wx145mm, Hx55mm, Weight: 295gRear Suspension
- 158mm: Lx275mm, Wx158mm, Hx55mm, Weight: 310g Workshop Prices
Tubeless
Complete Wheels
SaddlesCustom Builds
Seat Posts & ClampsCycle To Work SchemesFrequently Asked Questions
-
Components
Please get in touch with a member of the team either by phone ( Gears & Drivetrain See More
-
E-bike Batteries and chargers

DESCRIPTION

See More
Enve
See More
See More


Terms of Service
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

as fallback');
initializeScripts(cachedSettings);
} else {
console.error('STOQ - failed to load settings:', error);
}
})
.catch(function(e) {
console.error(e)
})
}
function fetchEmbedConfig(endpoint, apply) {
return fetch(
`${window._RestockRocketConfig.host}/api/v1/embed/${endpoint}.json`,
{
headers: {
'X-Shopify-Shop-Domain': window._RestockRocketConfig.shop || window.Shopify.shop,
'ngrok-skip-browser-warning': 'skip'
}
}
)
.then(function(response) {
if (!response.ok) throw new Error(`Failed to fetch ${endpoint}`);
return response.json();
})
.then(function(data) {
try {
apply(data);
} catch (applyError) {
console.error('STOQ - apply failed for ' + endpoint + ':', applyError);
throw applyError;
}
})
.catch(function(error) {
console.debug(`STOQ - using cached ${endpoint}:`, error.message);
});
}
function refres