Close
- Components
- E-bike Batteries and chargers
- Wheels
- Cookie Policy
- Terms of Service Sweden (SEKkr)
- Refund policy Switzerland (CHFCHF)
- Tanzania (TZSSh) Open cart
- Togo (XOFFr) Tristan da Cunha (GBP£)
- { "@context": "http://schema.org", "@type": "Organization", "name": "ProjektRide","logo": "https:\/\/projektride.co.uk\/cdn\/shop\/files\/logo-svg-white_1592x.svg?v=1676480383","sameAs": [ null, null, null, null, null, null, null ], "url": "https:\/\/projektride.co.uk" } Tunisia (GBP£)
- Close Türkiye (GBP£)
- Uganda (UGXUSh)
- Ukraine (UAH₴) United Kingdom (GBP£)
- United States (GBP£)
| Custom Builds for saleOther | Egypt (EGPج.م) See More | Custom Build Inspiration|
|---|---|---|
| Eritrea (GBP£) | See More
Insure Your Bike
Estonia (EUR€) WorkshopBook a Service |
Eswatini (GBP£)
See More
Close
Parts & Components Ethiopia (ETBBr) Workshop Prices |
See More
| Faroe Islands (DKKkr.) window._RestockRocketConfig = window._RestockRocketConfig || {} // Stoq is the current name of the app (RestockRocket is the legacy name). // Expose _Stoq / _StoqConfig as live aliases of the same objects so both names // work. Done here, before the JS bundles run, and the bundles only ever do // `window._RestockRocket = window._RestockRocket || {}` (never reassign), so // every method/config added later is visible on both names. window._RestockRocket = window._RestockRocket || {} window._Stoq = window._RestockRocket window._StoqConfig = window._RestockRocketConfig // Earliest nav-relative anchor for the whole pageview: performance.now() when our // inline ran. It's ms-since-navigation for THIS document — unlike liquid_rendered_at, // which on a cached render is the cache time, not this load's start (that gap is // what liquid_cache_age measures). Stamped in the inline (runs on every load, even // when the deferred bundle never does) so bundle_ready's stamps (bundle_loaded_at / // hijack_armed_at) are all on one clock and any delta between them is a plain // subtraction downstream — no need to emit the deltas. See #2875. try { window._RestockRocket.inlineRanAt = performance.now(); } catch (e) { /* no perf API */ } // Helper function to normalize locale format from hyphen to underscore (e.g., 'en-US' -> 'en_us') // This matches the backend's Mobility.normalize_locale behavior // Returns empty string if locale is empty or invalid (matches original behavior) function normalizeLocale(locale) { if (!locale || locale.trim() === '') { return ''; } return locale.toString().toLowerCase().replace(/-/g, '_'); } window._RestockRocketConfig.locale = 'en'; window._RestockRocketConfig.normalizedLocale = normalizeLocale('en'); window._RestockRocketConfig.shop = 'projektride.myshopify.com'; window._RestockRocketConfig.pageType = 'product'; window._RestockRocketConfig.liquidRenderedAt = 1785380876;window._RestockRocketConfig.marketId = 382140642;window._RestockRocketConfig.countryName = 'United Kingdom'; window._RestockRocketConfig.countryIsoCode = 'GB';window._RestockRocketConfig.cartInventoryQuantity = {};// cart.token falls back to the `cart` cookie when the Liquid context didn't carry one // (some page types render with cart={} until first interaction). if (!window._RestockRocketConfig.cartToken) { try { const m = document.cookie.match(/(?:^|;\s*)cart=([^;]+)/); if (m && m[1]) window._RestockRocketConfig.cartToken = decodeURIComponent(m[1]); } catch (e) { /* cookie unavailable */ } }window._RestockRocketConfig.cachedSettings = {"id":38500,"shop_id":38436,"currency":"GBP","created_at":"2025-07-26T09:13:57.337Z","updated_at":"2025-12-28T14:44:23.508Z","enable_app":true,"enable_signup_widget":false,"storefront_button_text":"Notify me when available","storefront_button_text_color":"#FFFFFF","storefront_button_background_color":"#202223","storefront_form_header":"Notify me","storefront_form_description":"Get a notification as soon as this product is back in stock by signing up below!","storefront_form_button_text":"Notify me when available","storefront_form_button_text_color":"#FFFFFF","storefront_form_button_background_color":"#202223","storefront_form_terms":"Promise we won't spam. You'll only receive notifications for this product.","storefront_form_error":"Please enter a valid email address","storefront_form_success":"Thank you! We will notify you when the product is available.","enable_powered_by":true,"show_button_on_preorder":true,"sms_enabled":false,"email_enabled":true,"storefront_button_disable_tag":"rocket-hide","theme_config":{"disableDebugLoggingForNonPreorderItem":false},"storefront_form_email_placeholder":"Email address","storefront_form_phone_placeholder":"SMS","storefront_form_phone_label":"Phone number","storefront_form_email_label":"Email","storefront_form_phone_error":"Please enter a valid phone number","storefront_form_customer_name_placeholder":"Name","storefront_form_customer_name_error":"Please enter your name","storefront_form_did_you_mean_error":"Did you mean %{suggested_email}? Or use %{current_email}","form_customer_name_enabled":false,"form_customer_name_required":false,"css_config":"","js_config":null,"collect_promotion_consent":false,"storefront_form_promotion_consent_label":"Notify me about other news, sales, discounts & offers too","show_button_on_collection":false,"sms_default_country":"us","sms_allowed_countries":[],"sms_restrict_country":false,"sms_default_channel":true,"optin_required":false,"optin_success_text":"Registration confirmed! You'll receive an alert when the product is restocked.","storefront_button_border_radius":0,"storefront_button_disable_tag_hides_button":true,"storefront_button_disable_tag_enabled":false,"quantity_required":false,"storefront_form_quantity_label":"Quantity","enable_alerts":true,"sms_allowed":false,"email_allowed":true,"collect_promotion_consent_default":true,"insert_button_after_selector":null,"insert_button_after_selector_type":"afterend","storefront_button_position_type":"float-right","storefront_form_duplicate_error":"You've already subscribed for alerts to this product.","storefront_mixed_cart_error":"This item needs to be purchased separately. Please check out or clear your cart before adding this item.","storefront_error_heading":"Error","default_locale":"en","collection_page_button_text_color":"#FFFFFF","collection_page_button_background_color":"#202223","show_button_if_any_out_of_stock":false,"show_button_if_any_variant_out_of_stock_collection":false,"show_button_on_index":false,"insert_button_after_selector_collection":null,"insert_button_after_selector_index":null,"push_enabled":false,"push_allowed":false,"storefront_form_push_label":"Push","storefront_form_push_description":"Click 'Allow' to be notified via push notification","storefront_form_push_error":"Permission rejected! Please review notification settings and try again","storefront_font_family":"OpenSans","insert_button_after_selector_collection_type":"afterend","show_channel_selector":false,"storefront_form_empty_error":"Please fill in one or more of the options above","storefront_form_push_input":"Send notification to your browser","insert_button_after_selector_page":null,"show_button_on_page":false,"insert_button_after_selector_search":null,"show_button_on_search":false,"app_proxy_path_prefix":"/apps/restockrocket-production","collection_link_selector":"","index_link_selector":"","page_link_selector":"","search_link_selector":"","collection_check_link_visibility":true,"collection_buttons_container":null,"index_buttons_container":null,"page_buttons_container":null,"search_buttons_container":null,"extension_enable_url_variant_detection":true,"extension_enable_value_variant_detection":true,"extension_value_variant_selector":"[name='id']","resubscribe_text":"This product is out of stock. Get notified when it's restocked again by entering your details below!","preorder_enabled":true,"preorder_buy_button_selector":null,"preorder_add_to_cart_button_selector":"","preorder_badge_selector":"","preorder_button_out_of_stock_text":"Out of stock","preorder_button_add_to_cart_text":"Add to cart","preorder_form_selector":"form[action*=\"/cart/add\"]","preorder_collection_enabled":false,"preorder_collection_form_selector":"form[action*=\"/cart/add\"]","preorder_collection_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_index_enabled":false,"preorder_index_form_selector":"form[action*=\"/cart/add\"]","preorder_index_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_page_enabled":false,"preorder_page_form_selector":"form[action*=\"/cart/add\"]","preorder_page_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_search_enabled":false,"preorder_search_form_selector":"form[action*=\"/cart/add\"]","preorder_search_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_collection_badge_selector":null,"preorder_index_badge_selector":null,"preorder_page_badge_selector":null,"preorder_search_badge_selector":null,"preorder_badge_selector_type":"afterend","preorder_collection_badge_selector_type":"afterend","preorder_button_child_selector":"span","preorder_button_disclaimer_insert_selector":"","preorder_button_disclaimer_insert_selector_type":"afterend","preorder_payment_insert_selector":"","preorder_payment_insert_selector_type":"afterend","preorder_price_container_selector":"","preorder_price_container_selector_insert_type":"afterend","preorder_terms_insert_selector":"","preorder_terms_insert_selector_type":"afterend","preorder_original_price_selector":"","preorder_price_format":"{{amount}} {{currency}}","show_badge_if_any_variant_is_preorder":false,"enable_console_debug":false,"inline_form_enabled":false,"inline_form_selector":null,"inline_form_selector_type":"afterend","storefront_form_prefill_customer":true,"storefront_form_show_image":false,"storefront_form_text_color":"#202223","storefront_form_background_color":"#FFFFFF","storefront_form_border_radius":0,"market_setup_type":"single_market","shopify_app_id":5940125,"preorder_progress_bar_insert_selector":null,"preorder_progress_bar_insert_selector_type":"beforebegin","countdown_timer_insert_selector":null,"countdown_timer_insert_selector_type":"afterend","cache":true,"cached_at":"2026-01-08T16:12:13.364Z","multi_language_enabled":false,"translation_locale":"en"};// STOQ shop-metafield namespace. `production` is substituted at build time // (webpack CopyPlugin), so | Track Your ServiceBrands See More Other |
See MoreHope
Enve Custom Builds |
| Insure Your BikeCockpit See More Book a Service |
Handlebars
Parts & ComponentsStems | See More
|
| 9,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-cyan-white-1.jpg?v=1720098273","width":1999},{"alt":null,"id":34187127161058,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-green-1.jpg?v=1720098274"},"aspect_ratio":1.0,"height":1999,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-green-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127193826,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-grey-1.jpg?v=1720098274"},"aspect_ratio":1.0,"height":1999,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-grey-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127226594,"position":4,"preview_image":{"aspect_ratio":1.0,"height":Headsets | Brandsde.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-orange-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127324898,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-red-1.jpg?v=1720098274"},"aspect_ratio":1.0,"height":1999,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-red-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127357666,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-tan-1.jpg?v=1720098274"},"aspect_ratio":1.0,"height":1999,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-tan-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127390434,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/
rey-1.jpg?v=1720098274","width":1999},{"alt":null,"id":34187127488738,"position":12,"preview_image":{"aspect_ratio":1.0,"height":1999,"width":1999,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-blue-1.jpg?v=1720098274"},"aspect_ratio":1.0,"height":1999,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-15-inch-nylon-buckle-blue-1.jpg?v=1720098274","width":1999}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cdiv class=\"woocommerce-tabs wc-tabs-wrapper\"\u003e\n\u003cdiv aria-labelledby=\"tab-title-description\" role=\"tabpanel\" id=\"tab-description\" class=\"woocommerce-Tabs-panel woocommerce-Tabs-panel--description panel entry-content wc-tab\"\u003e\n\u003cp\u003e\u003cspan\u003eThese Voile Straps® are made of tough stretch polyurethane, with a UV-resistant additive to increase their lifespan.\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003eTheir Super-Tough® nylon buckle is non-marring, non-conducti See Morec\/div\u003e\n\u003csection class=\"related products\"\u003e\u003c\/section\u003e\n\u003csection class=\"related products\"\u003e\u003c\/section\u003e\n\u003c!----\u003e"}; window._RestockRocketConfig.variantsInventoryPolicy = {45662746804450 : "deny",45662746837218 : "deny",45662746869986 : "deny",45662746902754 : "deny",45662746935522 : "deny",45662746968290 : "deny",45662747001058 : "deny",45662747033826 : "deny",45662747066594 : "deny",45662747099362 : "deny",45662747132130 : "deny",45662747164898 : "deny",45662747197666 : "deny",}; window._RestockRocketConfig.variantsInventoryQuantity = {45662746804450 : parseInt("1"),45662746837218 : parseInt("1"),45662746869986 : parseInt("1"),45662746902754 : parseInt("1"),45662746935522 : parseInt("1"),45662746968290 : parseInt("1"),45662747001058 : parseInt("1"),45662747033826 : parseInt("1"),45662747066594 : parseInt("1"),45662747099362 : parseInt("1"),45662747132130 : parseInt("1"),45662747164898 : parseInt("1"),45662747197666 : parseInt("1"),}; windowrseInt(""),45662747001058 : parseInt(""),45662747033826 : parseInt(""),45662747066594 : parseInt(""),45662747099362 : parseInt(""),45662747132130 : parseInt(""),45662747164898 : parseInt(""),45662747197666 : parseInt(""),}; window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {45662746804450 : null,45662746837218 : null,45662746869986 : null,45662746902754 : null,45662746935522 : null,45662746968290 : null,45662747001058 : null,45662747033826 : null,45662747066594 : null,45662747099362 : null,45662747132130 : null,45662747164898 : null,45662747197666 : null,}; window._RestockRocketConfig.variantsShippingText = {45662746804450 : "",45662746837218 : "",45662746869986 : "",45662746902754 : "",45662746935522 : "",45662746968290 : "",45662747001058 : "",45662747033826 : "",45662747066594 : "",45662747099362 : "",45662747132130 : "",45662747164898 : "",45662747197666 : "",}; window._RestockRocketConfig.variantsShippingTextForMarket = {45662746804450 : null,45662746837218 : null,45662746869986 estockRocketConfig; var _sqPlanEnabled = Array.isArray(_sqCfg.sellingPlans) && _sqCfg.sellingPlans.some(function (p) { return p && p.enabled; }); var _sqPreCount = ((_sqCfg.cachedPreorderVariantIds && _sqCfg.cachedPreorderVariantIds.preorder_variant_ids) || []).length; _sqCfg.preordersConfigured = !!(_sqPlanEnabled && _sqPreCount); } catch (e) { /* fail open */ } // STOQ-1612: block (not hide) Buy Now / Shop Pay until our JS runs, so a tap in the // load window can't bypass preorder. pointer-events via .stoq-buy-now-pending (no // reflow); timeout releases; renderPreorderButton / featured_product.js lift it. // Gated by the `block_accelerated_checkout` toggle (default OFF) for gradual rollout. // Armed ONLY when we're sure preorder is in play — product page: THIS product has a // preorder variant (never block a plain product's Shop Pay); featured: integration // enabled for this page type. Rationale: PR #2784. try { var _sqc = window._RestockRocketConfig; v |
il open */ }
window._RestockRocketConfig.scriptUrlProduct = 'https://cdn.shopify.com/extensions/019faf5b-94c9-7a24-9306-bf1118ca3099/restockrocket-1-554/assets/restockrocket-product.js'
window._RestockRocketConfig.scriptUrlCollection = 'https://cdn.shopify.com/extensions/019faf5b-94c9-7a24-9306-bf1118ca3099/restockrocket-1-554/assets/restockrocket-collection.js'
window._RestockRocketConfig.scriptUrlProductBis = 'https://cdn.shopify.com/extensions/019faf5b-94c9-7a24-9306-bf1118ca3099/restockrocket-1-554/assets/restockrocket-product-bis.js'
window._RestockRocketConfig.scriptUrlCollectionBis = 'https://cdn.shopify.com/extensions/019faf5b-94c9-7a24-9306-bf1118ca3099/restockrocket-1-554/assets/restockrocket-collection-bis.js'
window._RestockRocketConfig.scriptHost = window._RestockRocketConfig.scriptUrlProduct.substring(0, window._RestockRocketConfig.scriptUrlProduct.lastIndexOf('/') + 1)
// Canary override (STOQ-1287): prefer the Render host emitted into the
// metafield-cached settings (api_host)
Hope |
= 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
| onStorage.getItem('_stoq_pls') || '0', 10) || 0) + 1; window.sessionStorage.setItem('_stoq_pls', String(_stoqPageSeq)); } catch (e) { /* sessionStorage unavailable (private mode) — leave 0 */ } 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 || '', // Buyer's storefront country (localization.country.iso_code). Seeds the // pixel's extension_details blob so it rides forward onto Shopify's native // events too — a market can span countries, so this is the finer signal. country_code: _stoqInitConfig.countryIsoCode || '', detected_variant_ids: _stoqDetectedVariantIds, selected_variant_id: _stoqSelectedVariantId || '', page_load_seq: _stoqPageSeq, liquid_rendered_at: _stoqInitConfig.liquidRenderedAt || 0, app_version | rm so it's correct on collection/index/search too. block_accelerated_checkout // context (STOQ-1612) rides in `properties` (forwarded verbatim by the pixel, no schema // change): a buy_now click on a preorder variant while the gate was armed is a visible // bypass signal for order debug. Also sends page_url (top-level, like the pixel's native // events) and two preorder signals in properties (see below). try { var _sqTrack = window._RestockRocketConfig; if (_sqTrack.preordersConfigured) { document.addEventListener('click', function (e) { try { var t = e.target; if (!t || !t.closest) return; var host = t.closest('.shopify-payment-button, shopify-payment-terms'); if (!host) return; var channel = host.matches && host.matches('shopify-payment-terms') ? 'shop_pay_installments' : 'buy_now'; var form = host.closest('form'); var vidEl = form && form.querySelector('[name="id"]'); var variantId = Brake Rotorsk.marketId || '',
country_code: _sqTrack.countryIsoCode || '',
page_type: _sqTrack.pageType || '',
cart_token: _sqTrack.cartToken || '',
page_url: (window.location && window.location.href) || '',
properties: {
// Mirror the bundle's own preorder check (preorder.js checkInventoryProvider-
// WithCachedFallback): the live set config.preorderVariantIds (refreshed after
// page load by loadVariantInventoryData) OR the Liquid-injected
// cachedPreorderVariantIds — always present, so it covers clicks before the
// bundle loads (why this tracker is inline). ORing both (not preferring one)
// matches the bundle and is correct even if the live set is an empty array. Both
// hold integer ids; the click-time id comes off a DOM input (.value → string) or
// selected_variant_id, so coerce with Number for a like-typed compare.
is_preord
instock_variant: (function () { var has = function (a) { return Array.isArray(a) && a.indexOf(_sqVidNum) !== -1; }; return has(_sqTrack.inStockVariantIds) || has(_sqTrack.cachedInStockVariantIds && _sqTrack.cachedInStockVariantIds.in_stock_variant_ids); })(), // The enrolled plan's Shopify selling-plan id + inventory_provider (stoq = STOQ tracks // the OOS count; shopify = in-stock preorder). Tells order-debug what kind of preorder // the Buy Now bypassed, without a downstream lookup. enrolled_plan_id: (_sqPlan && (_sqPlan.shopify_selling_plan_id || _sqPlan.shopify_selling_plan_group_id)) || '', enrolled_plan_provider: (_sqPlan && _sqPlan.inventory_provider) || '', block_enabled: !!(_sqTrack.cachedSettings && _sqTrack.cachedSettings.block_accelerated_checkout), gate_armed: !!_sqTrack.acceleratedGateArmed, gate_active 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) { Brake Padsned `cachedSettings` comes from the app-embed Liquid render, which // Shopify edge-caches and can serve stale. Reading the same `settings` metafield // back over the Storefront API is a POST to /api/ version>/graphql.json — never // CDN-cached — so it returns the live value on every page load. We fetch it // best-effort and stash it on `window._RestockRocketConfig.storefrontSettings` // so individual behaviours can migrate onto the fresh value over time. This is // PURELY ADDITIVE: it does NOT change the resolution flow below, never blocks // init, and silently no-ops on any failure / missing token. (function loadStorefrontSettings() { const cfg = window._RestockRocketConfig; if (!cfg.storefrontAccessToken || cfg.disableStorefrontApi === true) return; // Deferred to browser idle so this best-effort read runs strictly AFTER the // critical init flow and never competes with it for a connection — the call // is a live, uncached Storefront round-trip and can be slow (multi-second // TTFB observed). Nothing on the critical path waits for it. function run() { const query = 'query StoqSettings($namespace: String!) { shop { metafield(namespace: $namespace, key: | refrontSettings = JSON.parse(value);
console.debug('STOQ - stored live settings from Storefront API on config.storefrontSettings');
})
.catch(function(e) {
console.debug('STOQ - Storefront settings fetch failed (non-fatal):', e && e.message);
});
}
if (typeof window.requestIdleCallback === 'function') {
window.requestIdleCallback(run, { timeout: 5000 });
} else {
setTimeout(run, 0);
}
})();
// 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.Shopify.shop,
'ngrok-skip-browser-warning': 'skiBrake SparesTOQ - 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) {
// Apply failures are programming bugs (e.g. response shape changed
// server-side and the assignment threw). Surface them as console.error
// so they're visible in browser logs, then re-throw to fall through
// to the same Liquid-cached fallback as a fetch failure.
console.error('STOQ - apply failed for ' +
ipts. Race against a 1000ms timeout so a slow // API can't block init indefinitely. If the timeout wins, the in-flight // fetches still complete and update window._RestockRocketConfig — the // bundle re-reads sellingPlans/integrations on every interaction, so the // late-arriving values benefit subsequent renders even though the first // paint may use the Liquid-cached values. On any failure the existing // Liquid-loaded values stay in place via fetchEmbedConfig's catch. if (!window._RestockRocketConfig.isLiquidCacheFresh && !settings.disable_refresh_on_stale_liquid) { console.debug('STOQ - Liquid cache stale, refreshing selling_plans + integrations'); Promise.race([ Promise.all([ fetchEmbedConfig('selling_plans', function(data) { if (data && Array.isArray(data.plans)) { window._RestockRocketConfig.sellingPlans = data.plans; window._RestockRocketConfig.disabledSellingPlanIds = data.disabled_plan_ids || []; n, // an enabled offer exists, or a disabled-but-kept plan id remains (cart sweep // must still strip those). Rationale in the PR. const hasEnabledOffer = Array.isArray(window._RestockRocketConfig.sellingPlans) && window._RestockRocketConfig.sellingPlans.some(function(plan) { return plan && plan.enabled; }); const hasDisabledPlanIds = Array.isArray(window._RestockRocketConfig.disabledSellingPlanIds) && window._RestockRocketConfig.disabledSellingPlanIds.length > 0; const usePreorderBuild = settings.preorder_enabled || hasEnabledOffer || hasDisabledPlanIds; const collectionScriptUrl = usePreorderBuild ? window._RestockRocketConfig.scriptUrlCollection : window._RestockRocketConfig.scriptUrlCollectionBis; const productScriptUrl = usePreorderBuild ? window._RestockRocketConfig.scriptUrlProduct : window._RestockRocketConfig.scriptUrlProductBis; const pageType = window._RestockRocketConfig.pageType; const collectiocketConfig.pageType, enabled: settings.enable_app, settings: settings, preorderEnabled: settings.preorder_enabled } }); console.debug('STOQ - dispatching app loaded event'); window.dispatchEvent(appLoadedEvent); } } Forks |
See More
| Front Suspension |
Rear Suspension
|
Finishing Kit | See More
| :root { --header-height: 60px; --header-sticky-height: 60px; --header-background-height: 60px; } :root { --full-height: calc(100vh - var(--header-sticky-height)); } .main-content > .shopify-section.supports-transparent-header:first-child [data-prevent-transparent-header] { --full-height: var(--content-full); } .site-header--has-border { --border-color: currentcolor; --border-opacity: 0.0; } | Open navigation menu | .logo__image-link { width: 100px; height: 28px; } .has-scrolled .logo__image-link { width: 100px; height: 28px; }Open search bar | Search for products on our site | Suggested search terms | About Us | Contact Us See MoreBlog | Track Service ProgressCleaners, Degreasers and Lubrication | AccessoriesMaintenance | Sell Your Bike | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|


Argon 18
See More






