Header Image
<

< img src="//projektride.co.uk/cdn/shop/files/service_d6136318-c313-41d8-9715-521cd27ef85f_512x512.png?v=1690612630" alt="" class="icons-row__image">
< Comes with quick and easy to use connecting linka href="https://shopify.projektride.co.uk/collections/bikes?filter.p.vendor=Surly,surly,Surly+Bikes,surly+bikes" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2022-02-06_at_16.13.48_360x.png?v=1644164045); width: 160px; padding-top: 55.8%;"> EH9 1QN Logo image
Mon-Fri: 9:00 - 18:30 8 SpeedLogo image
div class="product-feature__image-bg product-feature__image-bg--square" style="background-image: url(//projektride.co.uk/cdn/shop/files/8A5BDC82-CAF8-4A46-9FF4-B5E6847EEDB3_1024x.jpg?v=1749892417);"> #IconsRow--template--15326745166050__icons-row { --bg: #ffffff }#IconsRow--template--15326745166050__icons-row { --text: #333333; --text-lighten: #333333; }#IconsRow--template--15326745166050__icons-row .icon { height: 105px; } #IconsRow--template--15326745166050__icons-row .icons-row__icon { width: 105px; } { "@context": "http://schema.org/", "@type": "Product", "name": "Shimano Chain 6\/7\/8 Speed CN-HG40", "url": "https:\/\/projektride.co.uk\/products\/shimano-chain-6-7-8-speed-cn-hg40","image": [ "https:\/\/projektride.co.uk\/cdn\/shop\/products\/Screenshot2021-12-17at12.58.51_1165x.png?v=1639747000" ],"description": "\n\nHyperglide (HG) series 6, 7, or 8-speed compatible chain, recommended for Altus and older Alivio \/ STX drivetrains\nHG technology has chamfered inner plates to optimise shifting performance on HG sprockets\nComes with quick and easy to use connecting link\nDurability is assured through the heat treatment of rollers, pins, and plates\nMushrooming of the pins gives unsurpassed side-plate retention, enabling the chain to far exceed the BS\/ISO standard for breaking force\n7.3 mm chain width, optimised for 7- and 8-speed HG drivetrains\n114 links, 335 grams\n\n\n\nSpeed\n6 Speed\n\n\nSpeed\n7 Speed\n\n\nSpeed\n8 Speed\n\n","sku": "CNHG40116Q","brand": { "@type": "Thing", "name": "Shimano" },"gtin8": "689228220348","gtin12": "689228220348","offers": [{ "@type" : "Offer","sku": "CNHG40116Q","availability" : "http://schema.org/InStock", "price" : 14.99, "priceCurrency" : "GBP", "url" : "https:\/\/projektride.co.uk\/products\/shimano-chain-6-7-8-speed-cn-hg40?variant=42170877313250" } ] }
Logo image
Would you like to add on any equipment?
img src="//projektride.co.uk/cdn/shop/files/care_512x512.png?v=1690618104" alt="" class="icons-row__image">
a href="https://projektride.co.uk/search?type=product&q=apidura" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_0249_360x.png?v=1693301190); width: 120px; padding-top: 57.4%;"> > Logo imageHire Lazer Compact Helmet a href="https://projektride.co.uk/search?type=product&q=benno" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2023-08-30_at_13.34.25_360x.png?v=1693401784); width: 120px; padding-top: 102.4%;"> > span class="visually-hidden">Hire Lazer Compact Helmet
>
> a href="https://projektride.co.uk/search?q=ESI&type=product" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2023-10-05_at_10.46.34_360x.png?v=1696499201); width: 120px; padding-top: 67.7%;">
Privacy Policy
These guys are great! Super helpful, affordable, and friendly. They don't talk down to you as a woman which I always appreciate!Tiki MuirMatt Wilkes>
Lucy Gaunt < ★★★★★Nicholas Paul Franksdiv class="product__media-hover-img product__media" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot2022-02-24at21.18.32_9d81277b-124e-4fdc-8a0f-fbfb40a9343d_600x.png?v=1691610357)">
Mon - Fri: 09:00 - 18:30Matias HugentoblerChristine Thompson
Sat: 9:00 - 16:00 £0.00
Sun: Closed Genesis Croix De Fer 10 Ex Demo Bike - Medium ★★★★★★★★★★ Absolutely fantastic bike shop. Always willing to help you out when you’re having a problem. Bought many bike components from them over the years and every time they go out of their way to fit them!Brilliant service. Andy listened to exactly what I needed and very kindly brought both bikes to my house for me to test ride, so helpful. Would definitely recommend.Hire Kryptolok Standard U-Lock & 4 foot Kryptoflex cable
Laura Grieve These fantastic guys saved our holiday. We were bike trekking around Scotland, and after 3 days, we had serious brake problems. The oil was coming out of the calliper. I called 2 days before our arrival, and they promised to make some time for us. They fixed the problem very fast and they totally didn't take advantage of our situation. I know the prices very well, because I have done all my maintenance myself for many years, and I was surprised by the low cost. Thanks a lot guys.★★★★★£0.00
Wim LintermansTop quality bike, top quality service - these are decent guys doing a great job. Thoroughly impressed with their knowledge and service. Recommend to anyone buying a bike - talk to them and they give you good advice. Amazing service and quick turnaround! Dropped my bike off at 6:30pm (closing time) one day and it had been fully serviced and sorted out by the next morning! Top service and reasonable prices. Will come back here for all bike servicing needs in the future no doubt! Guys are incredibly knowledgeable also.★★
#FeaturedImage--template--15326745395426__1645734801adfd4c07 { --overlay-opacity: 0.2; } SERVICES Logo image
Projektride's Student bike bundle! © 2025, Logo imagea href="https://www.straightcutdesign.com/" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2022-03-16_at_14.44.40_360x.png?v=1647443209); width: 170px; padding-top: 26.3%;">ProjektRide > . Logo image
a href="/pages/cycle-to-work-scheme" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/bike_to_work-removebg-preview_360x.png?v=1635889127); width: 120px; padding-top: 84.3%;">
> lid phone number","storefront_form_customer_name_placeholder":"Name","storefront_form_customer_name_error":"Please enter your name","storefront_form_did_you_mean_error":"Did you mean %{suggested_email}? Or use %{current_email}","form_customer_name_enabled":false,"form_customer_name_required":false,"css_config":"","js_config":null,"collect_promotion_consent":false,"storefront_form_promotion_consent_label":"Notify me about other news, sales, discounts & offers too","show_button_on_collection":false,"sms_default_country":"us","sms_restrict_country":false,"sms_default_channel":true,"optin_required":false,"optin_success_text":"Registration confirmed! You'll receive an alert when the product is restocked.","storefront_button_border_radius":0,"storefront_button_disable_tag_hides_button":true,"storefront_button_disable_tag_enabled":false,"quantity_required":false,"storefront_form_quantity_label":"Quantity","enable_alerts":true,"sms_allowed":false,"email_allowed":true,"collect_promotion_consent_default":true,"insert_b
,"insert_button_after_selector_collection_type":"afterend","show_channel_selector":false,"storefront_form_empty_error":"Please fill in one or more of the options above","storefront_form_push_input":"Send notification to your browser","insert_button_after_selector_page":null,"show_button_on_page":false,"insert_button_after_selector_search":null,"show_button_on_search":false,"app_proxy_path_prefix":"/apps/restockrocket-production","collection_link_selector":"","index_link_selector":"","page_link_selector":"","search_link_selector":"","collection_check_link_visibility":true,"collection_buttons_container":null,"index_buttons_container":null,"page_buttons_container":null,"search_buttons_container":null,"extension_enable_url_variant_detection":true,"extension_enable_value_variant_detection":true,"extension_value_variant_selector":"[name='id']","resubscribe_text":"This product is out of stock. Get notified when it's restocked again by entering your details below!","preorder_enabled":true,"preorder_buy_button_selectodiv class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/actlogo_360x.png?v=1635889127); width: 120px; padding-top: 65.5%;">
r":null,"preorder_add_to_cart_button_selector":"","preorder_badge_selector":"","preorder_button_out_of_stock_text":"Out of stock","preorder_button_add_to_cart_text":"Add to cart","preorder_form_selector":"form[action*=\"/cart/add\"]","preorder_collection_enabled":false,"preorder_collection_form_selector":"form[action*=\"/cart/add\"]","preorder_collection_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_index_enabled":false,"preorder_index_form_selector":"form[action*=\"/cart/add\"]","preorder_index_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_page_enabled":false,"preorder_page_form_selector":"form[action*=\"/cart/add\"]","preorder_page_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_search_enabled":false,"preorder_search_form_selector":"form[action*=\"/cart/add\"]","preorder_search_add_to_cart_button_selector":"form[action*=\"/cart/add\"] button","preorder_collection_badge_selector":null,"preorder_index_badge_selector":null, a href="https://projektride.co.uk/products/vecnum-freequence-suspension-stem-1?_pos=1&_sid=18e478687&_ss=r" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_0247_360x.png?v=1693300758); width: 120px; padding-top: 100.0%;"> filter_ids":[],"collection_id":null};window._RestockRocketConfig.cachedInStockVariantIds = { in_stock_variant_ids: [] };window._RestockRocketConfig.cachedOutOfStockVariantIds = { out_of_stock_variant_ids: [] };window._RestockRocketConfig.cachedVariantPreorderLimits = {"variant_preorder_limits":{},"updated_at":"2025-12-15T05:30:15Z","shopify_market_id":382140642,"market_locations_enabled":false}; window._RestockRocketConfig.cachedVariantPreorderLimitsMarketKey = "variant_preorder_limits_for_market_382140642";window._RestockRocketConfig.cachedVariantShippingTexts = {"variant_shipping_texts":{},"updated_at":"2025-12-15T05:30:15Z","shopify_market_id":382140642,"market_locations_enabled":false}; window._RestockRocketConfig.cachedVariantShippingTextsMarketKey = "variant_shipping_texts_for_market_382140642";window._RestockRocketConfig.sellingPlans = [{"shopify_selling_plan_group_id":98590196095,"shopify_selling_plan_id":713071886719,"enabled":true,"variant_ids":[55569933140351,55569712382335,55569712415103,5 Logo image£499.00ng_applies_to_all_products":true,"shipping_text":"Estimated to ship within 2 months","payment_type":"full","billing_checkout_charge_type":"percentage","billing_checkout_charge_amount":null,"billing_checkout_charge_percentage":"100.0","pricing_type":"no_discount","pricing_amount":null,"pricing_percentage":null,"discount_text":"Save {{ discount }}","billing_title":"Full payment","billing_description":null,"enable_billing_widget":false,"inventory_provider":"stoq","preorder_badge_enabled":false,"preorder_badge_text":"Preorder","preorder_badge_text_color":"#FFFFFF","preorder_badge_background_color":"#000000","preorder_discounted_price_enabled":null,"payment_line_item_property_enabled":false,"shipping_line_item_property_enabled":true,"custom_line_item_property_text":null,"preorder_button_text_color":"#ffffff","preorder_button_background_color":"#565557","preorder_button_colors_enabled":true,"markets_enabled":false,"market_id":13779632354,"shopify_market_ids":[],"use_shopify_selling_plan":true,"use_simplified_shippi
":"#f5f5f5","countdown_timer_border_radius":8,"countdown_timer_format":"DHMS","countdown_timer_use_schedule_dates":true,"countdown_timer_custom_start_date":null,"countdown_timer_custom_end_date":null,"countdown_timer_starts_text":null,"countdown_timer_ends_text":null,"updated_at":"2025-08-19T10:05:43.042Z","allow_mixed_cart":true}];window._RestockRocketConfig.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":7477700919522,"title":"Shimano Chain 6\/7\/8 Speed CN-HG40","handle":"shimana href="https://projektride.co.uk/collections/bikes?filter.p.vendor=Brother,Brother+Cycles,Brothers+Cycles,brother+cycles" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/cropped-brother-cycles-leaf-logo_360x.png?v=1688813290); width: 120px; padding-top: 100.0%;">
data-mce-fragment=\"1\"\u003e114 links, 335 grams\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cul class=\"attributesSpecification\" data-mce-fragment=\"1\"\u003e\n\u003cli data-mce-fragment=\"1\"\u003e\n\u003cdiv class=\"label\" data-mce-fragment=\"1\"\u003eSpeed\u003c\/div\u003e\n\u003cdiv class=\"value\" data-mce-fragment=\"1\"\u003e6 Speed\u003c\/div\u003e\n\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003e\n\u003cdiv class=\"label\" data-mce-fragment=\"1\"\u003eSpeed\u003c\/div\u003e\n\u003cdiv class=\"value\" data-mce-fragment=\"1\"\u003e7 Speed\u003c\/div\u003e\n\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003e\n\u003cdiv class=\"label\" data-mce-fragment=\"1\"\u003eSpeed\u003c\/div\u003e\n\u003cdiv class=\"value\" data-mce-fragment=\"1\"\u003e8 Speed\u003c\/div\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e","published_at":"2021-12-17T13:02:12+00:00","created_at":"2021-12-17T13:02:10+00:00","vendor":"Shimano","type":"","tags":["Chains","spo-cs-disabled","spo-default","spo-disabled","spo-notify-me-d>
< 165,"src":"\/\/projektride.co.uk\/cdn\/shop\/products\/Screenshot2021-12-17at12.58.51.png?v=1639747000"},"aspect_ratio":1.0,"height":1165,"media_type":"image","src":"\/\/projektride.co.uk\/cdn\/shop\/products\/Screenshot2021-12-17at12.58.51.png?v=1639747000","width":1165}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cul class=\"description-overview\" data-mce-fragment=\"1\"\u003e\n\u003cli data-mce-fragment=\"1\"\u003eHyperglide (HG) series 6, 7, or 8-speed compatible chain, recommended for Altus and older Alivio \/ STX drivetrains\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eHG technology has chamfered inner plates to optimise shifting performance on HG sprockets\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eComes with quick and easy to use connecting link\u003c\/li\u003e\n\u003cli data-mce-fragment=\"1\"\u003eDurability is assured through the heat treatment of rollers, pins, and plates\u003c\/li\u003e\n\u003cli data-mce-fragmeLogo imagediv class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_0248_360x.jpg?v=1693300961); width: 120px; padding-top: 57.9%;"> ttings 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 // Metafield 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 Logo image ter;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;fon
Logo image
a href="https://www.ortlieb.com/en_us/" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2022-07-06_at_22.44.45_360x.png?v=1657143901); width: 170px; padding-top: 32.4%;">
Delivery & Returns<a href="https://projektride.co.uk/collections/bikes?filter.p.vendor=Kona,KONA,Kona+Bikes,kona" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/KonaLogoOrbitVertBlack_360x.png?v=1672678563); width: 120px; padding-top: 112.5%;"> a href="https://projektride.co.uk/products/vecnum-freequence-suspension-stem-1?_pos=1&_sid=18e478687&_ss=r" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_0247_360x.png?v=1693300758); width: 120px; padding-top: 100.0%;">>
Yeti ASR T series full suspension XC bike - AXS T Type - Rockshox - EX DEMO <a href="https://projektride.co.uk/search?type=product&q=apidura" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/IMG_0249_360x.png?v=1693301190); width: 120px; padding-top: 57.4%;"> Tel
<
a href="https://projektride.co.uk/search?type=product&q=benno" class="logo-list__slide-image" style="background-image: url(//projektride.co.uk/cdn/shop/files/Screenshot_2023-08-30_at_13.34.25_360x.png?v=1693401784); width: 120px; padding-top: 102.4%;"> © 2025, ProjektRide
.
enabled":true,"markets_enabled":false,"market_id":13779632354,"shopify_market_ids":[],"use_shopify_selling_plan":true,"use_simplified_shipping_text":false,"translations":{},"payment_options":[{"billing_type":"no_remaining_balance","billing_checkout_charge_type":"percentage","billing_checkout_charge_amount":null,"billing_checkout_charge_percentage":"100.0","billing_at":"2025-07-26T09:20:38.472Z","billing_after_n_intervals":7,"billing_after_interval_type":"day","pricing_type":"no_discount","pricing_amount":null,"pricing_percentage":null,"billing_title":"Full payment","billing_description":null,"discount_text":"Save {{ discount }}","shopify_selling_plan_id":713071886719,"is_default":true,"type":"full","translations":{}}],"require_preorder_acknowledgement":false,"preorder_acknowledgement_text":"I acknowledge and agree to the preorder terms and conditions for this product.","preorder_min_quantity":null,"preorder_max_quantity":null,"countdown_timer_enabled":false,"countdown_timer_insert_selector":null,"countdown_ti mer_insert_selector_type":"afterend","countdown_timer_style":"text","countdown_timer_text_color":"#000000","countdown_timer_background_color":"#f5f5f5","countdown_timer_border_radius":8,"countdown_timer_format":"DHMS","countdown_timer_use_schedule_dates":true,"countdown_timer_custom_start_date":null,"countdown_timer_custom_end_date":null,"countdown_timer_starts_text":null,"countdown_timer_ends_text":null,"updated_at":"2025-08-19T10:05:43.042Z","allow_mixed_cart":true}];window._RestockRocketConfig.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.scriptUrlProduct = 'https://cdn.shopify.com/extensions/019b1405-52e0-7e89-a6c1-1ac7fea6dd8f/restock-rocket-shopify-410/assets/restockrocket-product.js' window._RestockRocketConfig.scriptUrlCollection = 'https://cdn.shopify.com/extensions/019b1405-52e0-7e89-a6c1-1ac7fea6dd8f/restock-rocket-shopify-410/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 // Metafield 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 n(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._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 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.updateCartSe llingPlans() .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