Trek
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: {
'
id(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() {
const cfg = window._RestockRocketConfig;
return refreshShopConfig({
endpoint: 'selling_plans',
metafieldKey: 'cachedSellingPlans',
flag: 'enable_storefront_sell
Fidlock
ache stale)');
Promise.race([
Promise.all([refreshSellingPlans(), refreshIntegrations()]),
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 us
UTO
riptUrlCollectionBis;
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(hijackIntegration) {
createRestockRocketScript(preorderCollectionScriptUrl);
} else if(usePreorderBuild) {
createRestockRocketScript(preorderCollectionScriptUrl);
} else {
console.debug(`STOQ - no scripts enabled for ${pageType}`);
}
const wishlistIntegration = window._RestockRocketConfig.integrations.find(function(integration) { return integration.type === 'wishlist' && integration.enabled; });
Skip to content
();
document.addEventListener('shopify:section:load', loadWishlistHearts);
}
if (document.querySelector('[data-stoq-wishlist-page]')) {
createRestockRocketScript(window._RestockRocketConfig.scriptHost + 'restockrocket-wishlist-page.js');
}
try {
if (localStorage.getItem('stoq_wl_host') !== window._RestockRocketConfig.scriptHost) localStorage.setItem('stoq_wl_host', window._RestockRocketConfig.scriptHost);
} catch (e) {}
try {
const guestWishlist = window._RestockRocketConfig.customer && !localStorage.getItem('stoq_wl_c') && JSON.parse(localStorage.getItem('stoq_wl'));
if (Array.isArray(guestWishlist) && guestWishlist.length) {
createRestockRocketScript(window._RestockRocketConfig.scriptHost + 'restockrocket-wishlist-prompt.js');
}
} catch (e) {}
}
const appLoadedEvent = new CustomEvent('stoq:loaded', {
detail: {
pageType: window._RestockRocketConfig.page
/* Prevent CLS on page load */
:root {
--announcement-height: calc(0.75rem * 1.25 * 1.5 + 10px * 2 + var(--BORDER-WIDTH));
}
@media screen and (min-width: 768px) {
:root {
--announcement-height: calc(0.75rem * 1.25 * 1.5 + 10px * 2 + var(--BORDER-WIDTH));
}
}
@font-face {
font-family: Poppins;
font-weight: 400;
font-style: normal;
font-display: swap;
src: url("//projektride.co.uk/cdn/fonts/poppins/poppins_n4.0ba78fa5af9b0e1a374041b3ceaadf0a43b41362.woff2") format("woff2"),
url("//projektride.co.uk/cdn/fonts/poppins/poppins_n4.214741a72ff2596839fc9760ee7a770386cf16ca.woff") format("woff");
}
#announcement-bar--sections--31940533944703__announcement-bar .announcement {
--font-family: Poppins, sans-serif;
--font-style: normal;
--font-weight: 400;
--adjust-text-size: 1.25;
--padding: 10px;
--letter-spacing: 0.0em;
--line-height: 1.5;
--text: #272727;
--border: #c8c8c8;
}
#announcement-bar--sections--31940533944703__announcement-bar .flickity-enabled .ticker--animated,
#announcement-bar--sections--31940533944703__announcement-bar .announcement__ticker { padding: 0 30px; }
@media screen and (max-width: 767px) {
#announcement-bar--sections--31940533944703__announcement-bar .announcement { --adjust-text-size: 1.25; }
}
Ass Savers
Argon 18
Schwalbe
Bike Type