Built to go the distance.
A modern classic, the Croix de Fer keeps on turning and this interpretation is our most rounded model yet.FAQ
At its heart is the ever faithful Reynolds 725 tubing. Featured throughout, this is thin in comparison to regular chromoly, saving a little weight and enhancing the ride quality. Matched to our steel fork, this is a bike which gives a reassuring ride, even when loaded.Questions and answers
That theme continues with a refined gravel & adventure suitable groupset providing a reliable shifting on and off road. We've gone for a 46/30T chainset with Shimano GRX shifters and hydraulic brake callipers to match.
The ability to run up to a 45mm rear tyre and a 50mm front tyre on the provided 700c rims increase the all-terrain ability of the Croix - and it doesn't end there. If you want to experiment with 650B wheels, you could run up to a 44mm rear tyre and a 50mm front tyre.
Thru-axles front and rear, tubeless ready rims and tyres, flat mount disc brakes, a third bottle mount, rack and guard mounts and fixings for Anything Cages on the forks complete the package.
I'm looking to find out more information about a product, where can I find this?
Please get in touch with a member of the team either by phone (
<
Location
ntage":false}],"disabled_plan_ids":[713813721471,713176482175],"cached_at":"2026-02-18T08:36:42Z"};
if (cachedData && typeof cachedData === 'object' && cachedData.cached_at) {
// Find the maximum updated_at from all items in old array
const oldPlans = window._RestockRocketConfig.sellingPlans;
const maxUpdatedAt = Array.isArray(oldPlans) && oldPlans.length > 0
? oldPlans.reduce(function(max, plan) {
// Parse dates for proper comparison (handles mixed ISO formats)
if (plan.updated_at) {
const planDate = new Date(plan.updated_at);
const maxDate = max ? new Date(max) : null;
return (!maxDate || (planDate && !isNaN(planDate) && planDate > maxDate)) ? plan.updated_at : max;
}
return max;
}, '')
: null;
// Use cached if old array is empty/has no timestamps, or cached is newer
// Parse dates for comparison to handle format differences (
+00:00 vs .000Z)
const cachedDate = new Date(cachedData.cached_at);
const maxDate = maxUpdatedAt ? new Date(maxUpdatedAt) : null;
const useCached = !maxUpdatedAt || (cachedDate && !isNaN(cachedDate) && (!maxDate || cachedDate > maxDate));
if (useCached) {
if (Array.isArray(cachedData.plans)) {
window._RestockRocketConfig.sellingPlans = cachedData.plans;
// Only use disabled_plan_ids when using cached plans
window._RestockRocketConfig.disabledSellingPlanIds = cachedData.disabled_plan_ids || [];
console.debug('[RR] Using selling plans from cachedSellingPlans (cached_at: ' + cachedData.cached_at + ')');
}
} else {
// When using old format (stale cache), don't trust disabled_plan_ids
window._RestockRocketConfig.disabledSellingPlanIds = [];
console.debug('[RR] Using selling plans from old format (max updated_at: ' + maxUpdatedAt + ')');
}
}
})();window._Restoc
kRocketConfig.integrations = [{"id":"15c94526-b6b8-4de1-9bc1-23b1ca52ddb0","shop_id":38436,"enabled":true,"page_types":["product","collection","index","search","page","cart","list-collections","article","blog"],"configuration":{"toastDuration":10000,"toastPosition":"bottom-right","enableXHRHijack":true,"enableFetchHijack":true,"quantityLimitDisabled":false},"type":"hijack","css_config":null,"js_config":null,"created_at":"2025-07-26T09:16:04.076Z","updated_at":"2025-07-26T09:16:04.076Z"}];window._RestockRocketConfig.obfuscateInventoryQuantity = false;window._RestockRocketConfig.product = {"id":8677451890914,"title":"Genesis Croix De Fer 20","handle":"genesis-croix-de-fer-22","description":"\u003cul class=\"description-overview\"\u003e\n\u003cli\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv data-content-type=\"row\" data-appearance=\"contained\" data-element=\"main\"\u003e\n\u003cdiv class=\"col-pr-4\" data-enable-parallax=\"0\" data-parallax-speed=\"0.5\" data-background-images=\"{}\" data-background-ty
pe=\"image\" data-video-loop=\"true\" data-video-play-only-visible=\"true\" data-video-lazy-load=\"true\" data-video-fallback-src=\"\" data-element=\"inner\" data-pb-style=\"BFHJ9QH\"\u003e\n\u003cdiv class=\"pagebuilder-column-group\" data-background-images=\"{}\" data-content-type=\"column-group\" data-appearance=\"default\" data-grid-size=\"12\" data-element=\"main\" data-pb-style=\"XGCTCKU\"\u003e\n\u003cdiv class=\"pagebuilder-column-line\" data-content-type=\"column-line\" data-element=\"main\" data-pb-style=\"N6CC18O\"\u003e\n\u003cdiv class=\"pagebuilder-column\" data-content-type=\"column\" data-appearance=\"full-height\" data-background-images=\"{}\" data-element=\"main\" data-pb-style=\"LAL6A0W\"\u003e\n\u003ch2 data-content-type=\"heading\" data-appearance=\"default\" data-element=\"main\"\u003eOne Bike Many Hats\u003c\/h2\u003e\n\u003cdiv data-content-type=\"text\" data-appearance=\"default\" data-element=\"main\"\u003e\n\u003cp\u003e\u003cspan\u003eOur most popular model within the Croix De Fer
range, the 20 is a fantastically adaptable all-rounder.\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003eMudguard \u0026amp; rack mounts, generous tyre clearance, dynamo cable routing and cage options galore. This super versatile machine is as adept at the morning rush as it is a week long quest.\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv\u003e\n\u003csection class=\"carousel\" dir=\"ltr\" aria-label=\"Gallery\" tabindex=\"0\"\u003e\n\u003cdiv class=\"carousel__viewport\"\u003e\n\u003col class=\"carousel__track\"\u003e\n\u003cli class=\"carousel__slide carousel__slide--clone\" aria-hidden=\"true\"\u003e\n\u003cdiv class=\"carousel__item pagebuilder-column\" data-content-type=\"slide\"\u003e\n\u003cfigure class=\"pagebuilder-image\" data-content-type=\"image\" data-appearance=\"full-width\" data-element=\"main\" data-pb-style=\"D3LLYH4\"\u003e\u003cpicture\u003e\u003csource media=\"(max-width: 768px)\" srcset=\"https:\/\
/www.freewheel.co.uk\/media\/headless_websites\/genesis\/cdf\/cdf_20\/800x1000-cdf20-keyfeature-a.jpg\" data-element=\"lazy_mobile_image\"\u003e\u003cimg alt=\"\" title=\"\" src=\"https:\/\/www.freewheel.co.uk\/media\/headless_websites\/genesis\/cdf\/cdf_20\/800x1000-cdf20-keyfeature-a.jpg\" data-element=\"lazy_image\"\u003e\u003c\/picture\u003e\u003c\/figure\u003e\n\u003ch3 class=\"text-xl font-medium\" data-content-type=\"heading\" data-appearance=\"default\" data-element=\"main\" data-pb-style=\"CH8F2A9\"\u003eShimano GRX\u003c\/h3\u003e\n\u003cdiv class=\"h-40\" data-content-type=\"text\" data-appearance=\"default\" data-element=\"main\" data-pb-style=\"RDB7V4A\"\u003e\n\u003cp id=\"NM8TUA9\"\u003eA Shimano GRX 2 x 10-speed drivetrain combined with Tiagra levers delivers great ratios for gravel riding, longer adventures and urban riding.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/li\u003e\n\u003cli class=\"carousel__slide carousel__slide--clone\" aria-hidden=\"true\"\u003e\n\u003cdiv cl"barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_01.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_02.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_03.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_04.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_05.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_06.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_07.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_08.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_09.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_10.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_11.jpg?v=1723720272","\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_12.jpg?v=1723720272","
\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_13.jpg?v=1723720273"],"featured_image":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_01.jpg?v=1723720272","options":["Size"],"media":[{"alt":null,"id":34464617824482,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_01.jpg?v=1723720272"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_01.jpg?v=1723720272","width":1800},{"alt":null,"id":34464617857250,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_02.jpg?v=1723720272"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_02.jpg?v=1723720272","width":1800},{"alt":null,"id":34464617890018,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1800,"width":1800,"src":"\/\/projektride.co
.uk\/cdn\/shop\/files\/gn10810_detail_03.jpg?v=1723720272"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_03.jpg?v=1723720272","width":1800},{"alt":null,"id":34464617922786,"position":4,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_04.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_04.jpg?v=1723720272","width":1800},{"alt":null,"id":34464617955554,"position":5,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_05.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_05.jpg?v=1723720272","width":1800},{"alt":null,"id":34464617988322,"position":6,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src
":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_06.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_06.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618021090,"position":7,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_07.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_07.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618053858,"position":8,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_08.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_08.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618086626,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1
800,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_09.jpg?v=1723720272"},"aspect_ratio":1.0,"height":1800,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_09.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618119394,"position":10,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_10.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_10.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618152162,"position":11,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_11.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_11.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618184930,"position":12,"preview_image":{"aspect
_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_12.jpg?v=1723720272"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_12.jpg?v=1723720272","width":1800},{"alt":null,"id":34464618217698,"position":13,"preview_image":{"aspect_ratio":1.503,"height":1198,"width":1800,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_13.jpg?v=1723720273"},"aspect_ratio":1.503,"height":1198,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/gn10810_detail_13.jpg?v=1723720273","width":1800}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cul class=\"description-overview\"\u003e\n\u003cli\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv data-content-type=\"row\" data-appearance=\"contained\" data-element=\"main\"\u003e\n\u003cdiv class=\"col-pr-4\" data-enable-parallax=\"0\" data-parallax-speed=\"0.5\" data-background-images=\"{}\" data-background-typss_websites\/genesis\/cdf\/cdf_20\/800x1000-cdf20-keyfeature-a.jpg\" data-element=\"lazy_mobile_image\"\u003e\u003c\/picture\u003e\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"carousel__item pagebuilder-column\" data-content-type=\"slide\"\u003e\u003cbr\u003e\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c!----\u003e"};
window._RestockRocketConfig.variantsInventoryPolicy = {45817753338082 : "deny",45817753370850 : "deny",45817753403618 : "deny",45817753436386 : "deny",45817753469154 : "deny",};
window._RestockRocketConfig.variantsInventoryQuantity = {45817753338082 : parseInt("1"),45817753370850 : parseInt("0"),45817753403618 : parseInt("0"),45817753436386 : parseInt("0"),45817753469154 : parseInt("0"),};
window._RestockRocketConfig.variantsPreorderCount = {45817753338082 : parseInt(""),45817753370850 : parseInt(""),458177534
03618 : parseInt(""),45817753436386 : parseInt(""),45817753469154 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderCountForMarket = {45817753338082 : null,45817753370850 : null,45817753403618 : null,45817753436386 : null,45817753469154 : null,};
window._RestockRocketConfig.variantsPreorderMaxCount = {45817753338082 : parseInt(""),45817753370850 : parseInt(""),45817753403618 : parseInt(""),45817753436386 : parseInt(""),45817753469154 : parseInt(""),};
window._RestockRocketConfig.variantsPreorderMaxCountForMarket = {45817753338082 : null,45817753370850 : null,45817753403618 : null,45817753436386 : null,45817753469154 : null,};
window._RestockRocketConfig.variantsShippingText = {45817753338082 : "",45817753370850 : "",45817753403618 : "",45817753436386 : "",45817753469154 : "",};
window._RestockRocketConfig.variantsShippingTextForMarket = {45817753338082 : null,45817753370850 : null,45817753403618 : null,45817753436386 : null,45817753469154 : null,};
window._RestockRocketConf
ig.selected_variant_id = 45817753338082;
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/019cb0b4-f8c1-740a-9811-1284dd89b0c8/restock-rocket-shopify-464/assets/restockrocket-product.js'
window._RestockRocketConfig.scriptUrlCollection = 'https://cdn.shopify.com/extensions/019cb0b4-f8c1-740a-9811-1284dd89b0c8/restock-rocket-shopify-464/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
const LIQUID_CACHE_MAX_AGE = 2 * 60 * 60; // 2 hours in seconds
// Calculate Liq
uid cache freshness once at initialization
const liquidRenderedAt = window._RestockRocketConfig.liquidRenderedAt;
// Validate timestamp and calculate cache age
if (!liquidRenderedAt || typeof liquidRenderedAt !== 'number' || isNaN(liquidRenderedAt)) {
console.debug('STOQ - Invalid 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
<
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 ];
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) {
// Setup listener regardless - updateCartSellingPlans has its own guards
// This ensures cleanup happens even when preorders are disabled globally
// Listen for stoq:inventory-data-loaded event dispatched by api.js
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.debug('STOQ - no cart selling plan updates needed');
}
})
.catch(error => {
console.error('STOQ - error updating cart selling plans:', 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.S
hopify.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');
initializeScripts(cac
hedSettings);
} 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}`);
// Setup cart selling plan updater BEFORE loading any scripts to avoid 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._RestockRocketCon
fig.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 scripts enab
led for ${window._RestockRocketConfig.pageType}`);
}
// Dispatch custom event when app is loaded
// Cart selling plan updates will be triggered by stoq:inventory-data-loaded event
const appLoadedEvent = new CustomEvent('stoq:loaded', {
detail: {
pageType: window._RestockRocketConfig.pageType,
enabled: settings.enable_app,
settings: settings,
preorderEnabled: settings.preorder_enabled
}
});
console.debug('STOQ - dispatching app loaded event');
window.dispatchEvent(appLoadedEvent);
}
}