"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.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(', '));
}
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.sto
p'
};
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 request failed and we have cached settings (even if expired), use them as fallback
if (cachedSettings) {
console.debug('STOQ - using expired cached settings as fallback');
initializeScripts(cachedSettings);
} else {
console.error('S
HeadsetsCleaners, Degreasers and Lubrication
Accessories
Brakes
Custom Builds for sale
See MoreMaintenance
Custom Build Inspiration
You May Also Like
Complete Brakes
Recently viewed
Brake Rotors
Services
Sell Your Bike
See MoreBrake Pads
Contact Us
Brake Spares
Workshop
Finance
See MoreForks
See More
Open search bar
Workshop Prices
Front Suspension
Book a Service
Rear Suspension
Track Your ServiceSearch for products on our site
About UsSell Your BikeCape Verde (CVE$)
Contact UsContact Us
Central African Republic (XAFCFA)
BlogFinance
Chad (XAFCFA)
Track Service Progress
Log in
Building Your Bike From the Box
Comoros (KMFFr)
Create accountCongo - Brazzaville (XAFCFA)
Search
Privacy Policy
Congo - Kinshasa (CDFFr)
Cookie Policy
Terms of Service
Cart
Côte d’Ivoire (XOFFr)
0 items
Refund policy
Croatia (EUR€)
South Africa (GBP£)
Cyprus (EUR€)
Sorry, looks like we don't have enough of this product.
South Sudan (GBP£)
Open cart