#productTemplate--template--26482384994687__main { --PT: 60px; --PB: 30px; }Isle of Man (GBP£)
Header Image
Italy (EUR€)
Kenya (KESKSh)
  • Kosovo (EUR€)
  • Latvia (EUR€)
Lesotho (GBP£)
Liberia (GBP£)

San Marino (EUR€) Senegal (XOFFr)
Slovakia (EUR€)
Slovenia (EUR€) South Africa (GBP£) South Sudan (GBP£)
Spain (EUR€)
St. Helena (SHP£) Svalbard & Jan Mayen (GBP£) Sweden (SEKkr)
  •  
  •  
  • window.appBlockPlacements ||= []; if (window.klarnaAppBlocksManager) { window.klarnaAppBlocksManager.push({ productVariants: [{"id":55060180205951,"title":"Blue \/ 80mm","option1":"Blue","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217820918143,"product_id":14928150921599,"position":4,"created_at":"2025-02-01T13:09:28+00:00","updated_at":"2025-02-01T13:09:31+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.23.png?v=1738415371","variant_ids":[55060180205951]},"available":true,"name":"Hope RX Stem - Blue \/ 80mm","public_title":"Blue \/ 80mm","options":["Blue","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079609266559,"position":4,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.23.png?v=1738415371"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180238719,"title":"Black \/ 80mm","option1":"Black","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217818493311,"product_id":14928150921599,"position":2,"created_at":"2025-02-01T13:09:13+00:00","updated_at":"2025-02-01T13:09:16+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.08.png?v=1738415356","variant_ids":[55060180238719]},"available":true,"name":"Hope RX Stem - Black \/ 80mm","public_title":"Black \/ 80mm","options":["Black","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079607464319,"position":2,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.08.png?v=1738415356"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180271487,"title":"Orange \/ 80mm","option1":"Orange","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217819672959,"product_id":14928150921599,"position":3,"created_at":"2025-02-01T13:09:20+00:00","updated_at":"2025-02-01T13:09:24+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.15.png?v=1738415364","variant_ids":[55060180271487]},"available":true,"name":"Hope RX Stem - Orange \/ 80mm","public_title":"Orange \/ 80mm","options":["Orange","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079608447359,"position":3,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.15.png?v=1738415364"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180304255,"title":"Purple \/ 80mm","option1":"Purple","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217823113599,"product_id":14928150921599,"position":5,"created_at":"2025-02-01T13:09:36+00:00","updated_at":"2025-02-01T13:09:40+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.31.png?v=1738415380","variant_ids":[55060180304255]},"available":true,"name":"Hope RX Stem - Purple \/ 80mm","public_title":"Purple \/ 80mm","options":["Purple","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079610577279,"position":5,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.31.png?v=1738415380"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180337023,"title":"Silver \/ 80mm","option1":"Silver","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217824358783,"product_id":14928150921599,"position":6,"created_at":"2025-02-01T13:09:44+00:00","updated_at":"2025-02-01T13:09:48+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.39.png?v=1738415388","variant_ids":[55060180337023]},"available":true,"name":"Hope RX Stem - Silver \/ 80mm","public_title":"Silver \/ 80mm","options":["Silver","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079611003263,"position":6,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.39.png?v=1738415388"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180369791,"title":"Red \/ 80mm","option1":"Red","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217830683007,"product_id":14928150921599,"position":7,"created_at":"2025-02-01T13:10:11+00:00","updated_at":"2025-02-01T13:10:16+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.10.06.png?v=1738415416","variant_ids":[55060180369791]},"available":true,"name":"Hope RX Stem - Red \/ 80mm","public_title":"Red \/ 80mm","options":["Red","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079614443903,"position":7,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.10.06.png?v=1738415416"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}], templateName: 'product', dataKey: 'top-strip-promotion-badge', storefrontCurrency: 'GBP', storefrontCountry: 'GB', storefrontLanguage: 'en', shopLocale: 'en', shopDomain: 'projektride.co.uk', variantPrice: '11500', cartPrice: '0', selector: 'shopify-osm-AZkxmY3VSTnFmNnNiW__klarna_on_site_messaging_app_block_k6rYHt', topPadding: '0', bottomPadding: '0', }); } else { window.appBlockPlacements.push({ productVariants: [{"id":55060180205951,"title":"Blue \/ 80mm","option1":"Blue","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217820918143,"product_id":14928150921599,"position":4,"created_at":"2025-02-01T13:09:28+00:00","updated_at":"2025-02-01T13:09:31+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.23.png?v=1738415371","variant_ids":[55060180205951]},"available":true,"name":"Hope RX Stem - Blue \/ 80mm","public_title":"Blue \/ 80mm","options":["Blue","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079609266559,"position":4,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.23.png?v=1738415371"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180238719,"title":"Black \/ 80mm","option1":"Black","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217818493311,"product_id":14928150921599,"position":2,"created_at":"2025-02-01T13:09:13+00:00","updated_at":"2025-02-01T13:09:16+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.08.png?v=1738415356","variant_ids":[55060180238719]},"available":true,"name":"Hope RX Stem - Black \/ 80mm","public_title":"Black \/ 80mm","options":["Black","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079607464319,"position":2,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.08.png?v=1738415356"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180271487,"title":"Orange \/ 80mm","option1":"Orange","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217819672959,"product_id":14928150921599,"position":3,"created_at":"2025-02-01T13:09:20+00:00","updated_at":"2025-02-01T13:09:24+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.15.png?v=1738415364","variant_ids":[55060180271487]},"available":true,"name":"Hope RX Stem - Orange \/ 80mm","public_title":"Orange \/ 80mm","options":["Orange","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079608447359,"position":3,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.15.png?v=1738415364"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180304255,"title":"Purple \/ 80mm","option1":"Purple","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217823113599,"product_id":14928150921599,"position":5,"created_at":"2025-02-01T13:09:36+00:00","updated_at":"2025-02-01T13:09:40+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.31.png?v=1738415380","variant_ids":[55060180304255]},"available":true,"name":"Hope RX Stem - Purple \/ 80mm","public_title":"Purple \/ 80mm","options":["Purple","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079610577279,"position":5,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.31.png?v=1738415380"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180337023,"title":"Silver \/ 80mm","option1":"Silver","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217824358783,"product_id":14928150921599,"position":6,"created_at":"2025-02-01T13:09:44+00:00","updated_at":"2025-02-01T13:09:48+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.39.png?v=1738415388","variant_ids":[55060180337023]},"available":true,"name":"Hope RX Stem - Silver \/ 80mm","public_title":"Silver \/ 80mm","options":["Silver","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079611003263,"position":6,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.09.39.png?v=1738415388"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":55060180369791,"title":"Red \/ 80mm","option1":"Red","option2":"80mm","option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":73217830683007,"product_id":14928150921599,"position":7,"created_at":"2025-02-01T13:10:11+00:00","updated_at":"2025-02-01T13:10:16+00:00","alt":null,"width":2412,"height":1780,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.10.06.png?v=1738415416","variant_ids":[55060180369791]},"available":true,"name":"Hope RX Stem - Red \/ 80mm","public_title":"Red \/ 80mm","options":["Red","80mm"],"price":11500,"weight":0,"compare_at_price":null,"inventory_management":null,"barcode":null,"featured_media":{"alt":null,"id":64079614443903,"position":7,"preview_image":{"aspect_ratio":1.355,"height":1780,"width":2412,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2025-02-01at13.10.06.png?v=1738415416"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}], templateName: 'product', shopLocale: 'en', dataKey: 'top-strip-promotion-badge', storefrontCurrency: 'GBP', storefrontCountry: 'GB', storefrontLanguage: 'en', shopDomain: 'projektride.co.uk', variantPrice: '11500', cartPrice: '0', selector: 'shopify-osm-AZkxmY3VSTnFmNnNiW__klarna_on_site_messaging_app_block_k6rYHt', topPadding: '0', bottomPadding: '0', }); }
Frequently Asked Questions
) where on of the team will be more than happy to help.
ProjektRide Bike Shop Edinburgh
Postage is free on orders over £50. Orders under £50, our postage charge is £3.99.We also have a physical store, if you are local please pop in -
ProjektRide Bike Shop Edinburgh
82 Newington Road, EH91QN, Edinburgh.












  • er 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}];(function() { const cachedData = {"plans":[{"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_b

    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","pricing_amount":null,"pricing_percentage":null,"billing_title":"Full payment","billi
    r 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) { const oldPlans = window._RestockRocketConfig.sellingPlans; const maxUpdatedAt = Array.isArray(oldPlans) && oldPlans.length > 0 ? oldPlans.reduce(function(max, plan) { if (plan.updated_at) { const planDate = new Date(plan.updated_at); const maxDate = max ? new Date(max) : null; return (!maxDate || (planDate && !isNaN(pl
  • MeVariantIds = [];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":15093135343999,"title":"Gloria Bib Short x Gobik","handle":"gloria-bib-short-x-gobik","description":"\u003cp\u003e\u003cimg\u003e\u003c\/p\u003e","published_at":"2025-05-20T17:28:23+01:00","created_at":"2025-05-20T17:26:36+01:00","v

    = 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) { console.debug('STOQ - multi-language enabled but no translation data in cache, fetching fresh'); return null; } if (window._RestockRocketConfig.normalizedLocale &ProjektRide Bike Shop Edinburgh & !Object.prototype.hasOwnProperty.call(settings.translations, window._RestockRocketConfig.normalizedLocale)) { console.debug('STOQ - locale not explicitly translated, will use default language from cache'); } } const updatedAt = new Date(settings.updated_at); if (isNaN(updatedAt.getTime())) { console.debug('STOQ - Invalid updated_at date format in settings'); return null; } const age = Date.now() - updatedAt.getTime(); if (age

    < 82 Newington Road, EH91QN, Edinburgh.Workshop Prices Tristan da Cunha (GBP£) 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') try { const _stoqInitConfig = window._RestockRocketConfig; const _stoqDetectedVariantIds = (_stoqInitConfig.product && Array.isArray(_stoqI

    nitConfig.product.variants)) ? _stoqInitConfig.product.variants.map(function(v) { return v.id }) : []; const _stoqSelectedVariantId = _stoqInitConfig.selected_variant_id; var _stoqPageSeq = 0; try { _stoqPageSeq = (parseInt(window.sessionStorage.getItem('_stoq_pls') || '0', 10) || 0) + 1; window.sessionStorage.setItem('_stoq_pls', String(_stoqPageSeq)); } catch (e) { } 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 || '', country_code: _stoqInitConfig.countryIsoCode || '', detected_variant_ids: _stoqDetectedVariantIds, selected_variant_id: _stoqSelectedVariantId || '', page_load_seq: _stoqPageSeq, liquid_rendered_at: _stoqInitConfig.liquidRenderedAt || 0, app_version: _stoqInitConfig.appVersion || '', Lithuania (EUR€) liquid_cache_age: _stoqInitConfig.liquidCacheAge, inventory_policy: (_stoqInitConfig.variantsInventoryPolicy || {})[_stoqSelectedVariantId] || '', inventory_quantity: (_stoqInitConfig.variantsInventoryQuantity || {})[_stoqSelectedVariantId], }); } catch (e) { console.debug('STOQ - stoq_initialized publish failed:', e); } 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 = (vidEl && vidEl.value) || _sqTrack.selected_variant_id || '';
    var _sqVidNum = Number(variantId); var _sqPlan = null; var _sqPlans = Array.isArray(_sqTrack.sellingPlans) ? _sqTrack.sellingPlans : []; var _sqMktId = Number(_sqTrack.marketId); var _sqForVariant = function (pl) { return pl && pl.enabled && Array.isArray(pl.variant_ids) && pl.variant_ids.indexOf(_sqVidNum) !== -1; }; _sqPlans.forEach(function (pl) { if (!_sqPlan && _sqForVariant(pl) && pl.markets_enabled && Array.isArray(pl.shopify_market_ids) && pl.shopify_market_ids.indexOf(_sqMktId) !== -1) { _sqPlan = pl; } }); if (!_sqPlan) { _sqPlans.forEach(function (pl) { if (!_sqPlan && _sqForVariant(pl) && !pl.markets_enabled) { _sqPlan = pl; } }); } Shopify?.analytics?.publish?.('stoq_accelerated_checkout_clicked', { variant_id: variantId, product_id: (_sqTrack.product && _sqTra ck.product.id) || '', channel: channel, market_id: _sqTrack.marketId || '', country_code: _sqTrack.countryIsoCode || '', page_type: _sqTrack.pageType || '', cart_token: _sqTrack.cartToken || '', page_url: (window.location && window.location.href) || '', properties: { is_preorder_variant: (function () { var vid = Number(variantId); var has = function (a) { return Array.isArray(a) && a.indexOf(vid) !== -1; }; return has(_sqTrack.preorderVariantIds) || has(_sqTrack.cachedPreorderVariantIds && _sqTrack.cachedPreorderVariantIds.preorder_variant_ids); })(), in_enabled_plan: !!_sqPlan, is_instock_variant: (function () { var has = function (a) { return Array.isArray(a) && a.indexOf(_sqVidNum) !== -1; }; return has(_sqTrack.inStockVariantIds) || h
as(_sqTrack.cachedInStockVariantIds && _sqTrack.cachedInStockVariantIds.in_stock_variant_ids); })(), 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_at_click: !!(document.documentElement && document.documentElement.classList.contains('stoq-buy-now-pending')), blocked: (function () { try { var rr = window._RestockRocket; return !!(rr && typeof rr.willBlockAcceleratedClick === 'function' && rr.willBlockAcceleratedClick(e)); } catch (err) { return false; } })(), }, }); Cycle to Work } catch (err) { } }, true); } } catch (e) { } function applyTranslations(settings) { try { 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) { 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; } } function setupCartSellingPlanUpdater(settings) { window.addEventListener('stoq:inventory-data-loaded', function(event) { console.debug('STOQ - Inventory data loaded, updating cart selling plans'); if (window._RestockRocket && window._RestockRocket.updateCartSellingPlans) { window._RestockRocket.updateCartSellingPlans() .then(hasUpdates => { if (hasUpdates) { console.debug('STOQ - cart selling plans updated successfully'); } else { console.debug('STOQ Tunisia (GBP£) - no cart selling plan updates needed'); } }) .catch(error => { console.error('STOQ - error updating cart selling plans:', error); }); } }); } (function loadStorefrontSettings() { const cfg = window._RestockRocketConfig; if (!cfg.storefrontAccessToken || cfg.disableStorefrontApi === true) return; function run() { const query = 'query StoqSettings($namespace: String!) { shop { metafield(namespace: $namespace, key: "settings") { value } } }'; fetch( `https://${cfg.shop}/api/2025-07/graphql.json`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Shopify-Storefront-Access-Token': cfg.storefrontAccessToken, }, body: JSON.stringify({ query: query, variables: { namespace: cfg.metafieldNamespace } }), } ) .then(function(response) { if (!response.ok) { throw new Error('Storefront API HTTP ' + response.s
tatus); } return response.json(); }) .then(function(body) { if (body && body.errors && body.errors.length) { throw new Error('Storefront API errors: ' + body.errors.map(function(e) { return e && e.message; }).join(', ')); } const value = body && body.data && body.data.shop && body.data.shop.metafield && body.data.shop.metafield.value; if (!value) { throw new Error('Storefront API returned no settings metafield value'); } cfg.storefrontSettings = 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); } })(); const cachedSettings = window._RestockRocketConfig.cachedSett Luxembourg (EUR€) ings; 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': 'skip' }; if (window.Shopify?.theme?.role === 'main') { headers['X-Shopify-Theme-Schema-Name'] = window.Shopify.theme.schema_name; headers['X-Shopify-Theme-Schema-Version'] = window.Shopify.theme.schema_version; headers['X-Shopify-Theme-Store-Id'] = window.Shopify.theme.theme_store_id; } fetch( `${window._RestockRocketConfig.host}/api/v1/setting.json?translation_locale=${window._RestockRocketConfig.normalizedLocale}`, { headers } ) .then(function(response) { if (!response.ok) { throw new Error('Network response was n
Albania (ALLL) Zimbabwe (USD$)