Can I hire in store?
Yes - you can come in store to hire a bike and can even pay with cash too! However, it would be best to
= 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;
}
// Check if translations are enabled but missing from cache
// This handles the backfill period where DB has translations but metafield doesn't
if (settings.multi_language_enabled) {
if (!settings.translations) {
return null;
}
const age = Date.now() - updatedAt.getTime();
if (age Close 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')
function applyTranslations(settings) {
try {
// Skip translation logic entirely if multi-language is not enabled
if (!settings ||
];
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;
}
}
// Setup event listener for cart selling plan updates
// This must be called before any scripts are loaded to avoid race conditions
function setupCartSellingPlanUpdater(settings) {
if (!settings || !settings.preorder_enabled) {
return;
}
// Listen for stoq:preorder-api-ready event dispatched by preorder.js
window.addEventListener('stoq:preorder-api-ready', function(event) {
console.debug('STOQ - Preorder API ready, updating cart selling plans');
if (window._Res 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')
function applyTranslations(settings) {
try {
// Skip translation logic entirely if multi-language is not enabled
if (!settings || ];
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;
}
}
// Setup event listener for cart selling plan updates
// This must be called before any scripts are loaded to avoid race conditions
function setupCartSellingPlanUpdater(settings) {
if (!settings || !settings.preorder_enabled) {
return;
}
// Listen for stoq:preorder-api-ready event dispatched by preorder.js
window.addEventListener('stoq:preorder-api-ready', function(event) {
console.debug('STOQ - Preorder API ready, updating cart selling plans');
if (window._RestockRocket && window._RestockRocket.updateCartSellingPlans) {
window._RestockRocket.updat
| es\/MadoneSLR9AXS-25-46151-G-Alt4.webp?v=1728659348","width":1440},{"alt":null,"id":34799456354530,"position":4,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-G-Alt2.webp?v=1728659335"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-G-Alt2.webp?v=1728659335","width":1440},{"alt":null,"id":34799423357154,"position":5,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-A-Primary.webp?v=1728659237"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-A-Primary.webp?v=1728659237","width":1440},{"alt":null,"id":34799425814754,"position":6,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-B-Primary.webp?v=172 | ,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-D-Primary.webp?v=1728659293"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-D-Primary.webp?v=1728659293","width":1440},{"alt":null,"id":34799446032610,"position":10,"preview_image":{"aspect_ratio":1.333,"height":1080,"width":1440,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-H-Primary.webp?v=1728659309"},"aspect_ratio":1.333,"height":1080,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/MadoneSLR9AXS-25-46151-H-Primary.webp?v=1728659309","width":1440}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003eThe Madone SLR 9 AXS Gen 8 is built for dominating the roads with equal parts light weight and aerodynamic speed. It's crafted from our highest-level 900 Series OCLV Carbon that's not only insanely light, but delivers aerodynamic shapes for crushing descents andtechnology and RSL Aero Bottles and Cages that save watts. SRAM's latest RED AXS E1 ultra-light drivetrain and power meter for training with data. A universal derailleur hanger so you can get a replacement from anywhere. Plus, it's topped off with Bontrager Aeolus RSL 51 tubeless carbon wheels and a Trek Aero RSL one-piece bar\/stem.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe final word\u003c\/strong\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003cp\u003eThe Madone SLR 9 AXS Gen 8 is our lightest, most aero, top-performing Madone that's ready to deliver superbike performance absolutely everywhere. It's crafted with a supremely light 900 Series OCLV Carbon frame for rocketing up climbs, aero tube shaping for slicing through windy descents and IsoFlow comfort tech to keep you feeling good through it all. It's spec'd with the top components and doesn't make any compromises.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow tall are you?\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cbr\u003eTo measureFinance | 449=\"\" id=\"SizingComponent\" data-magellan-target=\"SizingComponent\" class=\"sizing-and-fit-aftermarket-component sizing-table grid-container mb-6\"\u003e\n\u003cdiv data-v-05762449=\"\" class=\"rider-sizing mb-2\"\u003e\n\u003cdiv data-v-4052fbf6=\"\" data-v-05762449=\"\"\u003e\n\u003cdiv data-v-4052fbf6=\"\" class=\"size-table\"\u003e\n\u003ctable data-v-3ac87600=\"\" data-v-4052fbf6=\"\" class=\"trek-table trek-table--hstripe trek-table--borderless trek-table--centered trek-table--small trek-table--sticky-headers trek-table--row-headers\" qaid=\"size-table\"\u003e\n\u003cthead data-v-3ac87600=\"\"\u003e\n\u003ctr data-v-3ac87600=\"\"\u003e\n\u003cth data-v-3ac87600=\"\" scope=\"col\" class=\"font-bold\" qaid=\"size-table-column-header-Size\"\u003eSize\u003c\/th\u003e\n\u003cth data-v-3ac87600=\"\" scope=\"col\" class=\"font-bold\" qaid=\"size-table-column-header-Rider Height\"\u003eRider Height\u003c\/th\u003e\n\u003cth data-v-3ac87600=\"\" scope=\"col\" class=\"font-bold\" qaid=\"size-table-column-hea
|---|---|
| Create account044917203170 : parseInt("0"),46044917235938 : parseInt("0"),46044917268706 : parseInt("0"),46044917301474 : parseInt("0"),46044917334242 : parseInt("0"),46044917367010 : parseInt("0"),46044917399778 : parseInt("0"),46044917432546 : parseInt("0"),46044917465314 : parseInt("0"),46044917498082 : parseInt("0"),46044917530850 : parseInt("1"),46044917563618 : parseInt("0"),46044917596386 : parseInt("0"),46044917629154 : parseInt("0"),46044917661922 : parseInt("0"),46044917694690 : parseInt("0"),46044917727458 : parseInt("0"),46044917760226 : parseInt("0"),46044917792994 : parseInt("0"),46044917825762 : parseInt("0"),46044917858530 : parseInt("0"),46044917891298 : parseInt("0"),46044917924066 : parseInt("0"),46044917956834 : parseInt("1"),46044917989602 : parseInt("0"),46044918022370 : parseInt("2"),}; window._RestockRocketConfig.variantsPreorderCount = {46044916678882 : parseInt(""),46044916711650 : parseInt(""),46044916744418 : parseInt(""),46044916777186 : parseInt(""),46044916809954 : parseInt(""),4604491684 | Search : parseInt(""),46044917989602 : parseInt(""),46044918022370 : parseInt(""),}; window._RestockRocketConfig.variantsPreorderCountForMarket = {46044916678882 : null,46044916711650 : null,46044916744418 : null,46044916777186 : null,46044916809954 : null,46044916842722 : null,46044916875490 : null,46044916908258 : null,46044916941026 : null,46044916973794 : null,46044917006562 : null,46044917039330 : null,46044917072098 : null,46044917104866 : null,46044917137634 : null,46044917170402 : null,46044917203170 : null,46044917235938 : null,46044917268706 : null,46044917301474 : null,46044917334242 : null,46044917367010 : null,46044917399778 : null,46044917432546 : null,46044917465314 : null,46044917498082 : null,46044917530850 : null,46044917563618 : null,46044917596386 : null,46044917629154 : null,46044917661922 : null,46044917694690 : null,46044917727458 : null,46044917760226 : null,46044917792994 : null,46044917825762 : null,46044917858530 : null,46044917891298 : null,46044917924066 : null,46044917956834 : nullparseInt(""),46044917694690 : parseInt(""),46044917727458 : parseInt(""),46044917760226 : parseInt(""),46044917792994 : parseInt(""),46044917825762 : parseInt(""),46044917858530 : parseInt(""),46044917891298 : parseInt(""),46044917924066 : parseInt(""),46044917956834 : parseInt(""),46044917989602 : parseInt(""),46044918022370 : parseInt(""),}; window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {46044916678882 : null,46044916711650 : null,46044916744418 : null,46044916777186 : null,46044916809954 : null,46044916842722 : null,46044916875490 : null,46044916908258 : null,46044916941026 : null,46044916973794 : null,46044917006562 : null,46044917039330 : null,46044917072098 : null,46044917104866 : null,46044917137634 : null,46044917170402 : null,46044917203170 : null,46044917235938 : null,46044917268706 : null,46044917301474 : null,46044917334242 : null,46044917367010 : null,46044917399778 : null,46044917432546 : null,46044917465314 : null,46044917498082 : null,46044917530850 : null,46044917563618 | 27458 : "",46044917760226 : "",46044917792994 : "",46044917825762 : "",46044917858530 : "",46044917891298 : "",46044917924066 : "",46044917956834 : "",46044917989602 : "",46044918022370 : "",}; window._RestockRocketConfig.variantsShippingTextForMarket = {46044916678882 : null,46044916711650 : null,46044916744418 : null,46044916777186 : null,46044916809954 : null,46044916842722 : null,46044916875490 : null,46044916908258 : null,46044916941026 : null,46044916973794 : null,46044917006562 : null,46044917039330 : null,46044917072098 : null,46044917104866 : null,46044917137634 : null,46044917170402 : null,46044917203170 : null,46044917235938 : null,46044917268706 : null,46044917301474 : null,46044917334242 : null,46044917367010 : null,46044917399778 : null,46044917432546 : null,46044917465314 : null,46044917498082 : null,46044917530850 : null,46044917563618 : null,46044917596386 : null,46044917629154 : null,46044917661922 : null,46044917694690 : null,46044917727458 : null,46044917760226 : null,46044917792994 :
| 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 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');
initializeS
Spend kRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'index' && (settings.show_button_on_index || settings.preorder_index_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'search' && (settings.show_button_on_search || settings.preorder_search_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'page' && (settings.show_button_on_page || settings.preorder_page_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'product') {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlProduct);
} else if(hijackIntegration) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else {
console.debug(`STOQ - no sc
Congratulations! Your order qualifies for free shippingflex:1;cursor:pointer;}.restock-rocket-preorder-countdown-timer{display:flex;flex-direction:column;align-items:center;padding:16px;margin:8px 0;font-family:inherit;}.restock-rocket-preorder-countdown-timer .countdown-header{font-size:16px;margin-bottom:6px;text-align:center}.restock-rocket-preorder-countdown-timer .countdown-units{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}.restock-rocket-preorder-countdown-timer .countdown-unit{display:flex;flex-direction:column;align-items:center;gap:6px}.restock-rocket-preorder-countdown-timer .countdown-box{min-width:40px;padding:10px 6px;text-align:center;font-size:20px;line-height:1}.restock-rocket-preorder-countdown-timer .countdown-label{font-size:14px;font-weight:500;text-align:center;text-transform:capitalize;opacity:.7}@media (max-width:768px){.restock-rocket-preorder-countdown-timer{padding:14px}.restock-rocket-preorder-countdown-timer .countdown-box{min-width:55px;padding:14px 10px;font-size:26px}.restock-rocket-preorder-countdown-timer .countdow
left{left:0;transform:translateX(-100%);-webkit-transform:translateX(-100%);border-radius:0 10px 10px 0}.restock-rocket-toast-left.slide-out{-webkit-animation:.5s forwards slide-out-left;animation:.5s forwards slide-out-left}.restock-rocket-toast-right{right:0;transform:translateX(100%);-webkit-transform:translateX(100%);border-radius:10px 0 0 10px}.restock-rocket-toast-right.slide-out{-webkit-animation:.5s forwards slide-out-right;animation:.5s forwards slide-out-right}@keyframes slide{100%{transform:translateX(0)}}@-webkit-keyframes slide{100%{-webkit-transform:translateX(0)}}@keyframes slide-out-left{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}@-webkit-keyframes slide-out-left{0%{-webkit-transform:translateX(0)}100%{-webkit-transform:translateX(-100%)}}@keyframes slide-out-right{0%{transform:translateX(0)}100%{transform:translateX(100%)}}@-webkit-keyframes slide-out-right{0%{-webkit-transform:translateX(0)}100%{-webkit-transform:translateX(100%)}}.restock-rocket-preorder-progress-bar{paddi
ng cache even for untranslated locales
}
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
sing 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 not ok');
}
return response.json();
})
.then(function(settings) {
initializeScripts(settings);
})
.catch(function(error)
= 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;
}
// Check if translations are enabled but missing from cache
// This handles the backfill period where DB has translations but metafield doesn't
if (settings.multi_language_enabled) {
if (!settings.translations) {
// Translations enabled but no fig.pageType);
})
if(window._RestockRocketConfig.pageType === 'collection' && (settings.show_button_on_collection || settings.preorder_collection_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'index' && (settings.show_button_on_index || settings.preorder_index_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'search' && (settings.show_button_on_search || settings.preorder_search_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'page' && (settings.show_button_on_page || settings.preorder_page_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'product') {
createRestockRocketScript
ckground-image:none!important;box-shadow:none!important;padding:15px 20px;font-size:16px;width:100%;font-family:inherit}@font-face{font-family:OpenSans;font-weight:200;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-Light.woff)}@font-face{font-family:OpenSans;font-weight:300;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-Regular.woff)}@font-face{font-family:OpenSans;font-weight:600;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-SemiBold.woff)}.restock-rocket-button-container{position:relative;z-index:1;width:100%}.restock-rocket-button-container-float-right{position:fixed;z-index:123123;top:calc(50% - 200px);right:0;transform:rotate(270deg);transform-origin:bottom right}.restock-rocket-button-container-float-left{position:fixed;z-index:123123;top:calc(50% - 200px);left:40px;transform:rotate(90deg);transform-origin:top left}.restock-rocket-button-container-float-left:hover,.restock-rocket-button-container-float-right:hover,.restock-rocket-button-container:hover,.restign-items:center;gap:5px;padding:15px 20px;}.restock-rocket-payment-option:not(:last-child){border-bottom:1px solid #ebebeb;}.restock-rocket-payment-input-container{flex:1 1 auto;min-width:0}.restock-rocket-preorder-discount-badge{background:#ebebeb;height:25px;line-height:25px;padding:0 15px;border-radius:25px;font-size:0.8rem;flex:0 0 auto}.restock-rocket-payment-input{margin-right:10px;margin-top:-3px;vertical-align:middle;margin-left:0;accent-color:#202223}.restock-rocket-payment-description{margin-top:4px;flex:1 1 100%}.restock-rocket-preorder-badge{font-size:13px;line-height:1;padding:5px 13px 6px;border-radius:40px;height:auto;border:none;width:auto;z-index:2;margin:0;background:0 0}.preorder-badge-collection{position:absolute;top:10px;right:10px}.preorder-badge-product{margin-left:10px}.restock-rocket-price-strike{text-decoration:line-through;color: #666666;}.restock-rocket-discounted-price{margin-left:10px;}.restock-rocket-acknowledgement-checkbox{margin-bottom:12px;display:flex;align-items:flex-star
0) {
console.debug(`STOQ - Client clock appears ahead of server by ${Math.abs(Math.round(liquidCacheAge / 60))} minutes, assuming cache fresh`);
window._RestockRocketConfig.isLiquidCacheFresh = true;
} else if (liquidCacheAge dth:768px){.restock-rocket-preorder-countdown-timer{padding:14px}.restock-rocket-preorder-countdown-timer .countdown-box{min-width:55px;padding:14px 10px;font-size:26px}.restock-rocket-preorder-countdown-timer .countdown-label{font-size:11px}}@media (max-width:480px){.restock-rocket-preorder-countdown-timer{padding:12px}.restock-rocket-preorder-countdown-timer .countdown-units{width:100%;gap:10px}.restock-rocket-preorder-countdown-timer .countdown-box{width:100%;min-width:50px;padding:12px 8px;font-size:24px}.restock-rocket-preorder-countdown-timer .countdown-label{font-size:10px}}.restock-rocket-toast{position:fixed;cursor:pointer;background:#fff;border:0;min-width:40px;min-height:40px;box-shadow:0 0 15px rgba(0,0,0,.1)!important;z-index:622004;padding:20px 30px;font-family:inherit;font-size:inherit;color:#000;display:flex;justify-content:center;align-items:center}.restock-rocket-toast a{text-decoration:none;font-weight:700;color:#000}.restock-rocket-toast .dismiss{margin-left:15px;z-index:1;font-size:20px;}
lid or missing liquidRenderedAt timestamp, assuming fresh');
window._RestockRocketConfig.isLiquidCacheFresh = true;
} else {
const now = Math.floor(Date.now() / 1000); // Current time in seconds
const liquidCacheAge = now - liquidRenderedAt; // Age in seconds
// Handle client clock ahead of server
if (liquidCacheAge age = Date.now() - updatedAt.getTime();
if (age
.restock-rocket-button,.restock-rocket-button-float{opacity:1!important;border:none!important;cursor:pointer!important;background-image:none!important;box-shadow:none!important;padding:15px 20px;font-size:16px;width:100%;font-family:inherit}@font-face{font-family:OpenSans;font-weight:200;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-Light.woff)}@font-face{font-family:OpenSans;font-weight:300;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-Regular.woff)}@font-face{font-family:OpenSans;font-weight:600;src:url(https://d382hokyqag45a.cloudfront.net/assets/OpenSans-SemiBold.woff)}.restock-rocket-button-container{position:relative;z-index:1;width:100%}.restock-rocket-button-container-float-right{position:fixed;z-index:123123;top:calc(50% - 200px);right:0;transform:rotate(270deg);transfer-description-details{margin-bottom:0;display:flex;flex-direction:column;gap:10px;}.preorder-detail-item{display:flex;flex-direction:row;justify-content:start;gap:8px;align-items:center;}.restock-rocket-payment-widget{border:1px solid #ebebeb;margin-bottom:20px;}.restock-rocket-payment-option{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:15px 20px;}.restock-rocket-payment-option:not(:last-child){border-bottom:1px solid #ebebeb;}.restock-rocket-payment-input-container{flex:1 1 auto;min-width:0}.restock-rocket-preorder-discount-badge{background:#ebebeb;height:25px;line-height:25px;padding:0 15px;border-radius:25px;font-size:0.8rem;flex:0 0 auto}.restock-rocket-payment-input{margin-right:10px;margin-top:-3px;vertical-align:middle;margin-left:0;accent-color:#202223}.restock-rocket-payment-description{margin-top:4px;flex:1 1 100%}.restock-rocket-preorder-badge{font-size:13px;line-height:1;padding:5px 13px 6px;border-radius:40px;height:auto;border:none;width:auto;z-index:2;margin:0;background:0 0}
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
});
console.debug('STOQ - dispatching app loaded event');
window.dispatchEvent(appLoadedEvent);
}
}
// No matching locale has translations; drop payload to save memory
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:',
error);
});
}
});
}
// First try to get settings from metafields with expiry check
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;
}
fetch(
`${window._RestockRocketConfig.host}/api/v1/setting.json?translation_locale=${windoavoid race conditions
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);
})
if(window._RestockRocketConfig.pageType === 'collection' && (settings.show_button_on_collection || settings.preorder_collection_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'index' && (settings.show_button_on_index || settings.preorder_index_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection);
} else if(window._RestockRocketConfig.pageType === 'search' && (settings.show_button_on_search || settings.preorder_search_enabled)) {
createRestockRocketScript(window._RestockRocketConfig.scriptUrlCollection



<