Header Image

= 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 &Restrap Bar Bag - Small & !Object.prototype.hasOwnProperty.call(settings.translations, window._RestockRocketCo

nfig.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 Components<
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.crossOrigin = 'anonymous'; restockRocketScriptElement.onerror = function () { restockRocketScriptElement.onerror = null; const plainScriptElement = document.createElement('script'); plainScriptElement.setAttribute('defer', 'defer'); plainScriptElement.src = scriptUrl; document .body.appendChild(plainScriptElement); }; restockRocketScriptElement.src = scriptUrl; document.body.appendChild(restockRocketScriptElement); } createRestockRocketContainer() console.debug('STOQ - extension activated') try { const _stoqInitConfig = window._RestockRocketConfig; const _stoqDetectedVariantIds = (_stoqInitConfig.product && Array.isArray(_stoqInitConfig.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.origin + window.location.pathname, 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 || '', 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 _sqOffersOn = !!(_sqTrack.readFlags && _sqTrack.readFlags.enable_storefront_plan_offers === true); var _sqAlloc = _sqOffersOn ? ((_sqTrack.offerAllocations && _sqTrack.offerAllocations[_sqVidNum]) || (_sqTrack.variantSellingPlanIds && _sqTrack.variantSellingPlanIds[_sqVidNum])) : null; var _sqPlanIds = function (pl)
{ var ids = [pl.shopify_selling_plan_id, pl.default_shopify_selling_plan_id]; (Array.isArray(pl.payment_options) ? pl.payment_options : []).forEach(function (o) { ids.push(o && o.shopify_selling_plan_id); }); return ids.filter(function (id) { return id != null; }).map(Number); }; var _sqForVariant = function (pl) { if (!pl || !pl.enabled) return false; if (Array.isArray(_sqAlloc)) { var ids = _sqPlanIds(pl); return _sqAlloc.some(function (id) { return ids.indexOf(Number(id)) !== -1; }); } return 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) { E-bike Batteries and chargers _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 && _sqTrack.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.origin + window.location.pathname) || '', 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) || (_sqTrack.inlinePreorderIdsDropped === true && (_sqTrack.variantsInventoryPolicy || {})[vid] === 'continue' && (_sqTrack.variantsInventoryQuantity || {})[vid] <
= 0); })(), in_enabled_plan: !!_sqPlan, is_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); })(), 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 === false) && !(_sqTrack.readFlags && _sqTrack.readFlags.accelerated_block_off === true), gate_armed: !!_sqTrack.acceleratedGateArmed, gate_active_at_click: !!(document.documentElement && document.documentElement.c lassList.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; } })(), }, }); } 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 - no cart selling plan updates needed'); } }) .catch(error => { console.error('STOQ - error updating cart selling plans:', error); }); } }); } function storefrontGraphql(query, variables) { const cfg = window._RestockRocketConfig; if (!cfg.storefrontAccessToken || cfg.disableStorefrontApi === true) { return Promise.reject(new Error('Storefront API unavailable')); } return fetch( `https://${cfg.shop}/api/${cfg.storefrontApiVersion}/graphql.json`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Shopify-Storefront-Access-Token': cfg.storefrontAccessToken, }, body: JSON.stringify({ query: query, variables: variables }), } ) .then(function(response) { if (!response.ok) { throw new Error('Storefront API HTTP ' + response.status); } 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(', ')); } return body && body.data; }); } function fetchStorefrontShopMetafield(key) { const cfg = window._RestockRocketConfig; const query = 'query StoqShopMetafield($namespace: String!, $key: String!) { shop { metafield(namespace: $namespace, key: $key) { value } } }'; return storefrontGraphql(query, { namespace: cfg.metafieldNamespace, key: key }) .then(function(data) { const value = data && data.shop && data.shop.metafield && data.shop.metaColour field.value; if (!value) { throw new Error('Storefront API returned no ' + key + ' metafield value'); } return JSON.parse(value); }); } function fetchStorefrontSettings() { const query = 'query StoqSettings($namespace: String!) { shop { settings: metafield(namespace: $namespace, key: "settings") { value } translations: metafield(namespace: $namespace, key: "settings_translations") { value } } }'; return storefrontGraphql(query, { namespace: window._RestockRocketConfig.metafieldNamespace }) .then(function(data) { const settings = JSON.parse(data.shop.settings.value); if (!settings.updated_at) { throw new Error('settings metafield is not a settings payload'); } if (settings.single_locale_translations_inline) { settings.translations = data.shop.translations && JSON.parse(data.shop.translations.value); } if (settings.multi_language_enabled && !settings.translations) { throw new Error('settings metafield carries no translations'); } return settings; }); } 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': '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; } const storefrontRead = window._RestockRocketConfig.readFlags?.enable_storefront_settings_read === true ? Promise.race([ fetchStorefrontSettings(), new Promi se(function(_, reject) { setTimeout(function() { reject(new Error('timed out')); }, 1500); }) ]).catch(function(error) { console.debug('STOQ - Storefront settings read failed, using setting.json:', error.message); }) : Promise.resolve(); storefrontRead .then(function(settings) { return settings || 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 not ok'); } return response.json(); }); }) .then(function(settings) { initializeScripts(settings); }) .catch(function(error) { if (cachedSettings) { console.debug('STOQ - using expired cached settings 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 refreshShopConfig(source) { const cfg = window._RestockRocketConfig; const viaEmbed = function() { return fetchEmbedConfig(source.endpoint, source.apply); }; const flagOn = !!cfg.readFlags && cfg.readFlags[source.flag] === true; if (!flagOn || source.embedOnly === true) { return viaEmbed(); } return fetchStorefrontShopMetafield(source.metafieldKey) .then(function(value) { if (!source.isValid(value)) { throw new Error(source.metafieldKey + ' metafield is not a valid ' + source.endpoint + ' payload'); } source.apply(value); console.debug('STOQ - refreshed ' + source.endpoint + ' from the Storefront API'); }) .catch(function(error) { console.debug('STOQ - Storefront ' + source.endpoint + ' read failed, using embed:', error.message); return viaEmbed(); }); } function refreshIntegrations() { const cfg = window._RestockRocketConfig; return refreshShopConfig({ endpoint: 'integrations', metafieldKey: 'integrations', 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 = settings; console.debug(`STOQ - settings configured for ${window._RestockRocketConfig.pageType}`); const forceEmbedSellingPlans = settings.fo Wheelsrce_embed_selling_plans === true; const staleRefresh = !window._RestockRocketConfig.isLiquidCacheFresh && !settings.disable_refresh_on_stale_liquid; if (forceEmbedSellingPlans || staleRefresh) { console.debug('STOQ - refreshing selling_plans' + (staleRefresh ? ' + integrations (Liquid cache stale)' : ' (force_embed_selling_plans)')); const refreshes = [refreshSellingPlans(forceEmbedSellingPlans)]; if (staleRefresh) { refreshes.push(refreshIntegrations()); } Promise.race([ Promise.all(refreshes), new Promise(function(resolve) { setTimeout(resolve, 1000); }) ]).then(function() { loadScripts(settings); }); return; } loadScripts(settings); } function loadScripts(settings) { setupCartSellingPlanUpdater(settings); if(settings.enable_app) { const hijackIntegration = window._RestockRocketConfig.integrations.find(function(integration) { return integration.type === 'hijack' && integration.enabled && integration.page_types.includes(window._RestockRocketConfig.pageType); }) 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 pageType = window._RestockRocketConfig.pageType; const preorderUiOnPage = (settings.preorder_enabled && settings[`preorder_${pageType}_enabled`]) || window._RestockRocketConfig.integrations.some(function(integration) { return (integration.type === 'quick_buy' || integration.type === 'featured_product') && integration.enabled && integration.page_types.includes(pageType); }) || /\b(renderPreorderButton|updateAddToCartButton|updateAddToC artForms|setupAddToCartForm|teardownAddToCartForm|addDiscountedPrice|removeDiscountedPrice)\b/.test(settings.js_config || ''); const preorderCollectionScriptUrl = preorderUiOnPage ? window._RestockRocketConfig.scriptUrlCollectionFull : window._RestockRocketConfig.scriptUrlCollection; const collectionScriptUrl = usePreorderBuild ? preorderCollectionScriptUrl : window._RestockRocketConfig.scriptUrlCollectionBis; const productScriptUrl = usePreorderBuild ? window._RestockRocketConfig.scriptUrlProduct : window._RestockRocketConfig.scriptUrlProductBis; const collectionPageTypes = ['collection', 'index', 'search', 'page']; if(collectionPageTypes.indexOf(pageType) !== -1 && (settings[`show_button_on_${pageType}`] || settings[`preorder_${pageType}_enabled`])) { createRestockRocketScript(collectionScriptUrl); } else if(pageType === 'product') { createRestockRocketScript(productScriptUrl); } else if(hijackIntegra Complete Wheels
Clothing and Protection
See MoreQuantity Log in Search
Country
GBP£
Angola (GBP£)
Armenia (AMDդր.)

Our Bar Bag is an ideal and hassle free luggage solution for bikepacking, touring or commuting on road, gravel and mountain bikes. With no rack, mounts or tools required, the bag attaches to any bike in seconds. Foam spacers and spring-loaded cam locks provide an easy and reliable attachment to your handlebars, whilst two lower retention straps wrap around the crown of the fork for added stability.Austria (EUR€)

The 14L Double Roll Dry Bag is made of tape-sealed and waterproof coated 6oz nylon and elasticated shock cord on the front of the holster provides additional accessible storage for jackets, gloves and other accessories. The tough textured nylon holster and robust webbing straps mean that our Bar Bags can be depended on, no matter how demanding the terrain you’re traversing.

Handmade in our Yorkshire workshop and finished with the classic vegan-friendly PU leather Restrap label.

Weight - 385g
Capacity - 14LBelarus (GBP£)

(Dry bag included)

Belgium (EUR€)
Bosnia & Herzegovina (BAMКМ)

Frequently Asked Questions

Botswana (BWPP)
  • British Indian Ocean Territory (USD$)

    Please get in touch with a member of the team either by phone ( 01313745324 ) or email ( [email protected]Bulgaria (EUR€) ) where on of the team will be more than happy to help.

    ProjektRide Bike Shop Edinburgh

    Burkina Faso (XOFFr)
  • Burundi (BIFFr)

    If the item is showing in stock, we aim to post the product within 24 hours. Please allow 5 working days to receive the item.

    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 EdinburghCameroon (XAFCFA)

    82 Newington Road, EH91QN, Edinburgh.

Cape Verde (CVE$)