3810029945215,"position":4,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.37.png?v=1736263042"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":54939167883647,"title":"Spotty","option1":"Spotty","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":72808896266623,"product_id":14904946459007,"position":1,"created_at":"2025-01-07T15:17:22+00:00","updated_at":"2025-01-07T15:17:22+00:00","alt":null,"width":2052,"height":1396,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042","variant_ids":[54939167883647]},"available":false,"name":"Frog 44 - Spotty","public_title":"Spotty","options":["Spotty"],"price":39000,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":63810029814143,"position":1,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052
,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":54939167916415,"title":"Orange","option1":"Orange","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":72808896430463,"product_id":14904946459007,"position":6,"created_at":"2025-01-07T15:17:22+00:00","updated_at":"2025-01-07T15:17:22+00:00","alt":null,"width":2052,"height":1396,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.42.png?v=1736263042","variant_ids":[54939167916415]},"available":false,"name":"Frog 44 - Orange","public_title":"Orange","options":["Orange"],"price":39000,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":63810030010751,"position":6,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.42.png?v=1736
- 263042"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":54939167949183,"title":"Green","option1":"Green","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":72808896397695,"product_id":14904946459007,"position":5,"created_at":"2025-01-07T15:17:22+00:00","updated_at":"2025-01-07T15:17:22+00:00","alt":null,"width":2052,"height":1396,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.40.png?v=1736263042","variant_ids":[54939167949183]},"available":false,"name":"Frog 44 - Green","public_title":"Green","options":["Green"],"price":39000,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":63810029977983,"position":5,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.40.png?v=1736263042"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":54939167981951,"ti
tle":"Red","option1":"Red","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":{"id":72808896332159,"product_id":14904946459007,"position":3,"created_at":"2025-01-07T15:17:22+00:00","updated_at":"2025-01-07T15:17:22+00:00","alt":null,"width":2052,"height":1396,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.19.png?v=1736263042","variant_ids":[54939167981951]},"available":false,"name":"Frog 44 - Red","public_title":"Red","options":["Red"],"price":39000,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":63810029912447,"position":3,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.19.png?v=1736263042"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042","\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.08.png?v=1736263042","\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.19.png?v=1736263042","\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.37.png?v=1736263042","\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.40.png?v=1736263042","\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.42.png?v=1736263042"],"featured_image":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042","options":["Color"],"media":[{"alt":null,"id":63810029814143,"position":1,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.26.59.png?v=1736263042","width":2052},{"alt":null,"id":63810029846911,"position":2,"preview_image":{"aspect_ratio":1.47,"heTyresight":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.08.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.08.png?v=1736263042","width":2052},{"alt":null,"id":63810029912447,"position":3,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.19.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.19.png?v=1736263042","width":2052},{"alt":null,"id":63810029945215,"position":4,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.37.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.37.png?v=1736263042","width":2052},{"alt":null,"id":63810029977983,"position":5,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.40.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.40.png?v=1736263042","width":2052},{"alt":null,"id":63810030010751,"position":6,"preview_image":{"aspect_ratio":1.47,"height":1396,"width":2052,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.42.png?v=1736263042"},"aspect_ratio":1.47,"height":1396,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/Screenshot2024-01-09at15.27.42.png?v=1736263042","width":2052}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv class=\"tab general\" data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003eWhy buy a Frog 44? \u003c\/strong\u003e\u003c\/div\u003e\n\u0
03cul data-mce-fragment=\"1\"\u003e\n\u003cli data-mce-fragment=\"1\"\u003eLightweight 16-inch kids’ bike that is easy to manoeuvre and easy for parents to carry\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eWinner of the Creative Play Outdoor Toys Award 2023\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eSmall, easy-to-reach brake levers for better control and improved rider confidence\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003ePatented Frog cranks for more effortless pedalling, increasing efficiency and comfort\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003e\u003ca href=\"https:\/\/www.frogbikes.co.uk\/warranty\" data-mce-fragment=\"1\" data-mce-href=\"https:\/\/www.frogbikes.co.uk\/warranty\" target=\"_blank\"\u003eFree 10-year extended warranty on frames and forks\u003c\/a\u003e\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eReflectors, mudguard and bell included\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eSuitable for 4 to 5 years with a recommend
- ed inside leg of 40cm-53cm\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp data-mce-fragment=\"1\"\u003e\u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe first pedal Frog 44 kids’ bike is a great value 16-inch bike for 4 to 5-year-olds and is perfect for transitioning from a balance bike to pedals. This premium first-pedal children’s bike has a lightweight, sturdy aluminium frame, weighing just 6.39kg, making the bike easy to manoeuvre and easy for parents to carry. \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe Frog 44 kids’ bike is equipped with high-spec age-specific components, designed for comfort and longevity, including a child-sized saddle for the perfect riding experience, and Tektro brakes with small, easy-to-reach brake levers, which means better control and improved confidence for young riders. It also comes wit
h Kenda small block eight tyres for maximum stability and grip and our patented Frog cranks, for more effortless pedalling, which reduces the distance between the pedals increasing efficiency and comfort for children. \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003eNot ready for pedals yet?\u003c\/strong\u003e\u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eOur lightweight first pedal bikes are a great confidence booster and can also be used as a balance bike for a taller child by simply removing the pedals.\u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003eGet sized for cycling success\u003c\/strong\u003e\u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe Frog 44 first pedal bike is suitable for 4 to 5 years with a recommended inside leg measurement of 40cm-53cm.\u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e \u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eOne of the biggest temptations is to buy a child's first bike that they will grow into. However, this will likely have the opposite effect and put your child off bikes and cycling altogether! Another common mistake is to purchase a budget kids' bike but these models are often as heavy as a child which can lead to frustration at not being able to cycle. That’s why Frog bikes are lightweight and designed to specifically accommodate the anatomy of children.\u003c\/span\u003e \u003cbr data-mce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e \u003c\/span\u003e \u003cbr data-mTubesce-fragment=\"1\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eThe data obtained during our child-specific frame design research has helped us create a helpful kids’ bike sizing app. View our \u003c\/span\u003e\u003ca href=\"https:\/\/www.frogbikes.co.uk\/fitting\" data-mce-fragment=\"1\" data-mce-href=\"https:\/\/www.frogbikes.co.uk\/fitting\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003ebike sizing guide\u003c\/strong\u003e\u003c\/span\u003e\u003c\/a\u003e\u003cspan data-mce-fragment=\"1\"\u003e to discover the best-sized bike for your child or alternatively speak to one of our \u003c\/span\u003e\u003ca href=\"https:\/\/www.frogbikes.co.uk\/frogbikes-stores\" data-mce-fragment=\"1\" data-mce-href=\"https:\/\/www.frogbikes.co.uk\/frogbikes-stores\"\u003e\u003cspan data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003elocal stockists\u003c\/strong\u003e\u003c\/span\u003e\u003c\/a\u003e\u003cspan data-mce-fragment=\"1\"\u003e about our children’s bike range.\u003c\/span\u003e \u003c\/p\u003e\n\u003cp data-mce-fragment=\"1\"\u003ePlease note, that while not pictured, all Frog First Pedal bikes are supplied with chain guards installed to comply with ISO8098 safety standards.\u003cbr data-mce-fragment=\"1\"\u003e \u003c\/p\u003e\n\u003cp data-mce-fragment=\"1\"\u003e\u003cstrong data-mce-fragment=\"1\"\u003eAvailable colours*:\u003c\/strong\u003e Electric Blue, Green, Orange, Pink, Red and Spotty\u003c\/p\u003e\n\u003cdiv class=\"tab general\" data-mce-fragment=\"1\"\u003e\u003csmall data-mce-fragment=\"1\"\u003e*Actual colours may vary. This is due to the fact that every computer monitor has a different capability to display colours and that everyone sees these co\u003c\/small\u003e\u003c\/div\u003e"};
window._RestockRocketConfig.variantsInventoryPolicy = {54939167818111 : "deny",54939167850879 : "deny",54939167883647 : "deny",54939167916415 : "deny",54939167949183 : "deny",54939167981951 : "deny",};
window._RestockRocketConfig.variants
InventoryQuantity = {54939167818111 : parseInt("0"),54939167850879 : parseInt("0"),54939167883647 : parseInt("0"),54939167916415 : parseInt("0"),54939167949183 : parseInt("0"),54939167981951 : parseInt("0"),};
window._RestockRocketConfig.variantsPreorderCount = {54939167818111 : parseInt(""),54939167850879 : parseInt(""),54939167883647 : parseInt(""),54939167916415 : parseInt(""),54939167949183 : parseInt(""),54939167981951 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderCountForMarket = {54939167818111 : null,54939167850879 : null,54939167883647 : null,54939167916415 : null,54939167949183 : null,54939167981951 : null,};
window._RestockRocketConfig.variantsPreorderMaxCount = {54939167818111 : parseInt(""),54939167850879 : parseInt(""),54939167883647 : parseInt(""),54939167916415 : parseInt(""),54939167949183 : parseInt(""),54939167981951 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {54939167818111 : null,54939167850879 : null,54939167883647 :
- null,54939167916415 : null,54939167949183 : null,54939167981951 : null,};
window._RestockRocketConfig.variantsShippingText = {54939167818111 : "",54939167850879 : "",54939167883647 : "",54939167916415 : "",54939167949183 : "",54939167981951 : "",};
window._RestockRocketConfig.variantsShippingTextForMarket = {54939167818111 : null,54939167850879 : null,54939167883647 : null,54939167916415 : null,54939167949183 : null,54939167981951 : null,};
window._RestockRocketConfig.selected_variant_id = 54939167949183;
window._RestockRocketConfig.selected_variant_available = window._RestockRocketConfig.product.variants.find(function(variant) { return variant.id == window._RestockRocketConfig.selected_variant_id }).available;window._RestockRocketConfig.scriptUrlProduct = 'https://cdn.shopify.com/extensions/019af0d1-c518-7a22-bdbf-9ceff49063ad/restockrocket-1-402/assets/restockrocket-product.js'
window._RestockRocketConfig.scriptUrlCollection = 'https://cdn.shopify.com/extensions/019af0d1-c518-7a22-bdbf-9ce
ff49063ad/restockrocket-1-402/assets/restockrocket-collection.js'
window._RestockRocketConfig.scriptHost = window._RestockRocketConfig.scriptUrlProduct.substring(0, window._RestockRocketConfig.scriptUrlProduct.lastIndexOf('/') + 1)
window._RestockRocketConfig.host = 'https://app.restockrocket.io'
const SETTINGS_CACHE_DURATION = 15 * 60 * 1000; // 15 minutes in milliseconds
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 translation data in metafield
// MetafiTubelesseld hasn't been backfilled yet - force refresh
console.debug('STOQ - multi-language enabled but no translation data in cache, fetching fresh');
return null;
}
// Translations object exists in metafield - cache is valid
// If current locale isn't translated, applyTranslations will gracefully use default locale from base fields
if (window._RestockRocketConfig.normalizedLocale &&
!Object.prototype.hasOwnProperty.call(settings.translations, window._RestockRocketConfig.normalizedLocale)) {
console.debug('STOQ - locale not explicitly translated, will use default language from cache');
}
// Don't return null - continue using 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
<
- 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 ||
!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) {
// 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:', e);
return settings;
}
}
// 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.ShopifySaddles?.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('STOQ - failed to load settings:',
error);
}
})
.catch(function(e) {
console.error(e)
})
}
function initializeScripts(settings) {
settings = applyTranslations(settings);
window._RestockRocketConfig.settings = settings;
console.debug(`STOQ - settings configured for ${window._RestockRocketConfig.pageType}`);
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._RestockRocketCo
- nfig.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 scripts enabled for ${window._RestockRocketConfig.pageType}`);
}
// Check and update cart selling plans after scripts are loaded
if (settings.preorder_enabled) {
updateCartSellingPlans();
}
//
Dispatch custom event when app is loaded
const appLoadedEvent = new CustomEvent('stoq:loaded', {
detail: {
pageType: window._RestockRocketConfig.pageType,
enabled: settings.enable_app,
settings: settings
}
});
console.debug('STOQ - dispatching app loaded event');
window.dispatchEvent(appLoadedEvent);
}
}
function updateCartSellingPlans() {
// Wait for the API to be available with retries
const maxRetries = 10;
const retryDelay = 500;
function attemptCartCheck(attempt = 1) {
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);
});
} else if (attempt Seat Posts & Clamps<
-
.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);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,.restock-rocket-button-float:hover,.restock-rocket-button:hover{opacity:.8}.restock-rocket-button{min-height:50px;margin-top:10px;margin-bottom:10px}.restock-rocket-button-collection{position:relative;font-size:13px;line-height:1;padding:7px;height:auto;z-index:3}.restock-rocket-wrapper{background-color:rgba(0,0,0,.5);z-index:123123123;width:100%;height:100%;overflow:auto;position:fixed;right:0;top:0;transition-property:all;transition-duration:.3s;display:flex;flex-direction:column;justify-content:center;}.restock-rocket-wrapper-inline{width:100%;height:100%;margin-top:20px}.restock-rocket-preorder-description{padding:10px 15px;margin-top:20px;display:flex;flex-direction:column;gap:10px;}.preorder-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}.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-start;gap:8px;font-size:14px;line-height: 1.5;}.restock-rocket-acknowledge-checkbox-input{width:18px;height:18px;margin-top:2px;cursor:pointer;flex-shrink:0;accent-color: #0d0d0d;}.restock-rocket-acknowledge-checkbox-label{flex: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 .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;}.restock-rocket-toast-top{top:60px}.restock-rocket-toast-bottom{bottom:75px}.restock-rocket-toast-left,.restock-rocket-toast-right{-webkit-animation:.5s forwards slide;animation:.5s forwards slide}.restock-rocket-toast-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-ou
t-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%)}}