Frog
null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":45662670487778,"title":"Red","option1":"Red","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Voile 12″ Nano Strap - Red","public_title":"Red","options":["Red"],"price":1300,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-black-scaled.jpg?v=1720097585","\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-blue-1-scaled.jpg?v=1720097585","\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-green-1-1024x1024.jpg?v=1720097585","\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-orange-1-scaled.jpg?v=1720097585","\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano
Kenda Booster 700 x 40c Tubeless Ready `${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._RestockRocketC
546,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-green-1-1024x1024.jpg?v=1720097585"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-green-1-1024x1024.jpg?v=1720097585","width":1024},{"alt":null,"id":34187030233314,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2560,"width":2560,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-orange-1-scaled.jpg?v=1720097585"},"aspect_ratio":1.0,"height":2560,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-orange-1-scaled.jpg?v=1720097585","width":2560},{"alt":null,"id":34187030266082,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2560,"width":2560,"src":"\/\/projektride.co.uk\/cdn\/shop\/files\/voile-straps-12-inch-nano-series-red-1-scaled.jpg?v=1720097585"},"aspect_ratio
as a ballpoint pen. They feature the same weatherproof and UV-resistant material that you know and love. They are textured for extra grip, and are fitted with a glass-filled nylon buckle. So when you need a tiny strap that will over deliver, the Nano Series helps you keep it together.\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003eLoad Circumference Min — Max: 1in — 10.4in \/ 2.5cm — 26.3cm\u003cbr\u003eMaterial: UV-Resistant Polyurethane\u003cbr\u003eBuckle: Super Tough Nylon\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003csection class=\"related products\"\u003e\u003c\/section\u003e\n\u003c!----\u003e"};
window._RestockRocketConfig.variantsInventoryPolicy = {45662670356706 : "deny",45662670389474 : "deny",45662670422242 : "deny",45662670455010 : "deny",45662670487778 : "deny",};
window._RestockRocketConfig.variantsInventoryQuantity = {45662670356706 : parseInt("0"),45662670389474 : parseInt("1"),45662670422242 : parseInt("1"),45662670455010 : par ];
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.Shopify?.them
.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 -
<
ebug('STOQ - API not loaded after max retries, skipping cart selling plan check');
}
}
attemptCartCheck();
}
:\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003e700c\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eBrake Levers :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eShimano Tiagra ST-4700 10 Speed\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eIntended Use
notify-me-disabled"],"price":110000,"price_min":110000,"price_max":110000,"available":true,"price_varies":false,"compare_at_price":169999,"compare_at_price_min":169999,"compare_at_price_max":169999,"compare_at_price_varies":false,"variants":[{"id":44891532853474,"title":"X-Small","option1":"X-Small","option2":null,"option3":null,"sku":"GN21040XS","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Genesis Croix De Fer 20 - X-Small","public_title":"X-Small","options":["X-Small"],"price":110000,"weight":0,"compare_at_price":169999,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":44891532886242,"title":"Small","option1":"Small","option2":null,"option3":null,"sku":"GN21040SM","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Genesis Croix De Fer 20 - Small","public_title":"Small","options":["Small"],"price":110000,"weight":0,"compare_at_price":169999,"inventory_management":"sho
,"sku":"GN21040XL","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Genesis Croix De Fer 20 - X-Large","public_title":"X-Large","options":["X-Large"],"price":110000,"weight":0,"compare_at_price":169999,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_side_v2.jpg?v=1709550485","\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_010.jpg?v=1709550485","\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_01_v2.jpg?v=1709550485","\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_02.jpg?v=1709550485","\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_03.jpg?v=1709550485","\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagess
age":"\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_side_v2.jpg?v=1709550485","options":["Size"],"media":[{"alt":null,"id":32991139463394,"position":1,"preview_image":{"aspect_ratio":1.534,"height":1000,"width":1534,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_side_v2.jpg?v=1709550485"},"aspect_ratio":1.534,"height":1000,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_side_v2.jpg?v=1709550485","width":1534},{"alt":null,"id":32991139496162,"position":2,"preview_image":{"aspect_ratio":1.534,"height":1000,"width":1534,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_010.jpg?v=1709550485"},"aspect_ratio":1.534,"height":1000,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_detail_010.jpg?v=1709550485","width":1534},{"alt":null,"i
lass=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eWheel Size :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003e700c\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eBrake Levers :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eShimano Tiagra ST-4700 10 Speed\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv clas
ass=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eCassette Freewheel :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eSunrace 11-34T\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eChain :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eKMC X10\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-headeBrandv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eFront Derailleur :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eShimano GRX FD-RX400\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eGrip Tape :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eGenesis\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=
"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003ePedals :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eNW-91K With Cage\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eRear Derailleur :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eShimano GRX RD-RX400 10 Speed\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv c
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Genesis Croix De Fer 20",
"url": "https:\/\/projektride.co.uk\/products\/genesis-croix-de-fer-20","image": [
"https:\/\/projektride.co.uk\/cdn\/shop\/products\/ftp_f_freewheel_imagessportlinefwbikesgn21040_side_v2_1534x.jpg?v=1709550485"
],"description": "One bike to rule them all.Our original do it all go anywhere bike is back and more capable than ever before!Commuting duties during the week then epic, multi-terrain adventures at the weekend, the Croix de Fer 20 is a capable and adaptable beast that rarely gets fazed whichever way you point it.The heart of the bike remains a complete Reynolds 725 frameset, defined by its reliability wherever you ride.We have however made a few updates to add to the Croix de Fer's versatility.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. If you want to experiment with 650B wheels, you could run up to a 44mm rear tyre and a 50mm front tyre.Standard QR dropouts mean your 9mm wheelsets can keep turning for another few years - and the practicalities don't end there.The drivetrain has been upgraded to Shimano's excellent GRX, featuring a 46\/30T double chainset, an 11-34T cassette and RX400 derailleurs for reliable, smooth shifting.Tubeless ready rims and tyres, a third bottle mount, rack and guard mounts and fixings for Anything Cages on the forks complete the package.\n\n\n\nBrake Type :\n Mechanical Disc\n\n\n\n\nFork Material :\n Chromoly\n\n\n\n\nFrame Material :\n Steel\n\n\n\n\nBottom Bracket :\n Shimano BB-RS500\n\n\n\n\nWheel Size :\n 700c\n\n\n\n\nBrake Levers :\n Shimano Tiagra ST-4700 10 Speed\n\n\n\n\nIntended Use :\n Adventure, Gravel\n\n\n\n\nBrakes :\n TRP Spyre-C Mechanical Disc\n\n\n\n\nCassette Freewheel :\n Sunrace 11-34T\n\n\n\n\nChain :\n KMC X10\n\n\n\n\nChain Set :\n Genesis RPL-521 46\/30T\n\n\n\n\nFork :\n Chromoly Disc Fork With Anything Cage Mounts\n\n\n\n\nFront Derailleur :\n Shimano GRX FD-RX400\n\n\n\n\nGrip Tape :\n Genesis\n\n\n\n\nHeadset :\n PT-1770 EC34 Upper \/ EC34 Lower\n\n\n\n\nHubs :\n KT-K08 \/ 6 Bolt\n\n\n\n\nPedals :\n NW-91K With Cage\n\n\n\n\nRear Derailleur :\n Shimano GRX RD-RX400 10 Speed\n\n\n\n\nRims :\n Jalco XCD21\n\n\n\n\nSaddle :\n Genesis\n\n\n\n\nSeat Post :\n Genesis Alloy 27.2 x 350 mm\n\n\n\n\nShifters :\n Shimano Tiagra ST-4700 10 Speed\n\n\n\n\nSpokes :\n Steel 14 g\n\n\n\n\nStem :\n Genesis Alloy 31.8mm -6 deg 100 mm\n\n\n\n\nTyres :\n Kenda Booster 700 x 40c Tubeless Ready\n\n\n\n\nFrame Shape :\n Crossbar\n\n\n\n\nGender :\n Mens, Womens\n\n\n\n\nSpecification Disclaimer :\n Genesis reserves the right to change product specifications without notice. Genesis will always ensure that these changes
GoldCondition
button type="submit" class="btn">Filter
>
12X142MM CLINCHER/SHIMANO
>
<a class="product__media product__media--featured"
href="/collections/second-hand-bikes/products/boardman-comp-x7-small"
title="Boardman Comp X7 - Small"
aria-label="Boardman Comp X7 - Small"
style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_5203_600x.jpg?v=1762355177)">
<
span class="visually-hidden">Boardman Comp X7 - Small
12/142 CLINCHER/SHIMANO/CERAMIC© 2025, Custom - Builds>
ProjektRide
Black/Gold / 12X142MM CLINCHER/XDR/CERAMIC - Sold OutBlack/Gold / 12/142 CLINCHER/SHIMANO - Sold Out
"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eShifters :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eShimano Tiagra ST-4700 10 Speed\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eSpokes :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eSteel 14 g\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card
Red / 12/142 CLINCHER/SHIMANO - Sold Out< grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eStem :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eGenesis Alloy 31.8mm -6 deg 100 mm\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"card grid-item\"\u003e\n\u003cdiv class=\"card-header pl-0 pr-0\" id=\"specheadingrims\"\u003e\n\u003cdiv class=\"btn btn-link pl-0 pr-0 text-center text-md-left collapsed text-uppercase\" aria-controls=\"specrims\" aria-expanded=\"true\" data-target=\"#specrims\" data-toggle=\"collapse\"\u003e\u003cstrong\u003eTyres :\u003c\/strong\u003e\u003c\/div\u003e\n\u003cspan\u003e \u003c\/span\u003e\u003cspan\u003eKenda Booster 700 x 40c Tubeless Ready\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\ 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 setindow._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.page=== '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 - dispatchi<
