Apple Pay
Shop Pay
Kosovo (EUR€)
Helmets
.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.debu
Ascension Island (SHP£)
.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.metafield.value;
if (!value) { throw new Error('Storefront API returned no ' + key + ' metafield value'); }
return JSON.parse(value);
});
}
(function loadStorefrontSettings() {
const cfg = window._RestockRocketConfig;
if (!cfg.storefrontAccessToken || cfg.disableStorefrontApi === true) return;
function run() {
// The live-settings read is one more shopBelarus (GBP£)
Seychelles (GBP£)
Complete WheelsHungary (HUFFt)
Tools & MaintenanceMastercardItaly (EUR€)
PayPal
ProjektRide Merchandise
Gloves
Latvia (EUR€)
Search
Country
GBP£
Morocco (MADد.م.)
Lesotho (GBP£)
Moldova (MDLL)
- Socks Liberia (GBP£)
- Libya (GBP£) Essentials See More
- Liechtenstein (CHFCHF) Cleaners, Degreasers and Lubrication
- Lithuania (EUR€) Accessories Luxembourg (EUR€) Maintenance
- Madagascar (GBP£)
- Sell Your Bike Malawi (MWKMK) Contact Us
- Mali (XOFFr) Finance Close
- Malta (EUR€) Mauritania (GBP£)
- Log inMauritius (MUR₨)
- Create accountMayotte (EUR€)
e.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 not ok');
}
return response.json();
})
.then(function(settings) {
initializeScripts(settings);
})
.catch(function(error) {
if (cachedSettings) {
console.debug('STOQ - using expired cached settings
Portugal (EUR€)
d 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);
r
iptUrlCollectionBis;
const productScriptUrl = usePreorderBuild
? window._RestockRocketConfig.scriptUrlProduct
: window._RestockRocketConfig.scriptUrlProductBis;
const pageType = window._RestockRocketConfig.pageType;
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(hijackIntegration) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(usePreorderBuild) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else {
console.debug(`STOQ - no scripts enabled for ${pageType}`);
}
const appLoadedEvent = new CustomEvent('stoq:loaded', {
detBelgium (EUR€)
-
Belarus (GBP£)
- DAILY is a classic steel basket equipped with our AVS system and a comfortable carrying handle. Benin (XOFFr)
- If you have a traditional pannier rack, you can simply add an adapter to attach any AVS accessories to your bicycle.Romania (RONLei) Belgium (EUR€)
-
Rwanda (RWFFRw)
Product Type Benin (XOFFr)Botswana (BWPP)BasketsSan Marino (EUR€)
Bosnia & Herzegovina (BAMКМ)
-
British Indian Ocean Territory (USD$)
ColourSão Tomé & Príncipe (STDDb)Black Botswana (BWPP)Bulgaria (EUR€)
-
Senegal (XOFFr)
Size British Indian Ocean Territory (USD$)Burkina Faso (XOFFr)22 litresSerbia (RSDРСД)
Bulgaria (EUR€)
Burundi (BIFFr)
Cape Verde (CVE$)
Slovenia (EUR€)
Cyprus (EUR€)
Slovakia (EUR€)
Central African Republic (XAFCFA)
-
Cape Verde (CVE$)
Somalia (GBP£)
Please get in touch with a member of the team either by phone ( Central African Republic (XAFCFA) 01313745324 Comoros (KMFFr) ) or email ( [email protected]South Africa (GBP£) ) where on of the team will be more than happy to help. Chad (XAFCFA)
- Comoros (KMFFr)










Ireland (EUR€)
Isle of Man (GBP£)