The John Muir The John Muir
Country StoreCountry Store
Select from our Range of Select from our Range of
Accompaniments
Privacy Notice
function createEcomSendMainStyleEle() {
const ele = document.createElement("link");
ele.rel = "stylesheet";
ele.href = 'https://cdn.shopify.com/extensions/0199cc51-79a9-7683-9ccd-23cc01a7d5f7/ecomsend-app-88/assets/style.css';
ele.dataset.ecomsendTag = "load-alternate-css";
return ele;
};
if (window.EcomSendApps?.enableAlternateCSSLoading ?? false) {
document.head.appendChild(createEcomSendMainStyleEle());
};
try {
function checkMarketingEvent() {
const urlParams = new URLSearchParams(window.location.search)
const marketingId = urlParams.get("es_marketingId")
if (marketingId && window.localStorage) {
window.localStorage.setItem("ecomsend_marketingId", marketingId)
}
}
checkMarketingEvent()
} catch (e) {}
let isEcomSendInitialized = false;
function createEcomSendMainJSEle() {
if (isEcomSendInitialized) return;
if (!window.React || !window.ReactDOM || !window.React.useContext) {
return false;
}
const ele = document.createElement("script");
ele.defer = true;
ele.id = "ecomsend-main-js";
ele.src = 'https://cdn.shopify.com/extensions/0199cc51-79a9-7683-9ccd-23cc01a7d5f7/ecomsend-app-88/assets/ecomsend.js';
if (null === document.getElementById(ele.id)) {
document.head.appendChild(ele);
isEcomSendInitialized = true;
return true;
}
return false;
};
function EcomsendOnMobxLoaded() {
setTimeout(() => {
createEcomSendMainJSEle();
}, 100);
};
let checkCount = 0;
const maxChecks = 20;
function EcomsendBackupCheck() {
if (isEcomSendInitialized) return;
checkCount++;
if (window.React &&
window.ReactDOM &&
window.React.useContext &&
window.React.createElement &&
window.ReactDOM.createRoot) {
if (createEcomSendMainJSEle()) {
return;
}
}
if (checkCount <
maxChecks) {
setTimeout(EcomsendBackupCheck, 1000);
} else {
createEcomSendMainJSEle();
}
}
setTimeout(EcomsendBackupCheck, 2000);
Apple Jelly
Copyright 2025. All Rights Reserved by The John Muir Country Store. Site by
Fifth House
£4.50
//EcomSend APPS COMMON JS CODE
window.EcomSendApps = window.EcomSendApps || {}
window.EcomSendApps.design_mode = false
window.EcomSendApps.common = window.EcomSendApps.common || {}
window.EcomSendApps.common.shop = {
permanent_domain: 'john-muir-country.myshopify.com',
currency: "GBP",
money_format: "£{{amount}}",
id: 80637690163,
}
window.EcomSendApps.common.customer = {
id: null,
tags: null,
email: null,
accepts_marketing: null,
first_name: null,
}
window.EcomSendApps.common.template = 'collection'
window.shopLocale = 'en'
function loadReactDependencies() {
return new Promise((resolve, reject) => {
const reactScript = document.createElement('script');
reactScript.defer = true;
reactScript.src = 'https://cdn.shopify.com/extensions/0199cc51-79a9-7683-9ccd-23cc01a7d5f7/ecomsend-app-88/assets/react_react-dom.min.js';
reactScript.onload = () => {
if (window.React && window.ReactDOM) {
resolve();
} else {
reject(new Error('React not properly loaded'));
}
};
reactScript.onerror = () => {
reject(new Error('Failed to load React'));
};
document.head.appendChild(reactScript);
});
}
function loadMobxDependencies() {
return new Promise((resolve, reject) => {
const mobxScript = document.createElement('script');
mobxScript.defer = true;
mobxScript.src = 'https://cdn.shopify.com/extensions/0199cc51-79a9-7683-9ccd-23cc01a7d5f7/ecomsend-app-88/assets/mobx_react-custom-roulette.min.js';
mobxScript.onload = () => {
resolve();
};
mobxScript.onerror = () => {
reject(new Error('Failed to load MobX'));
};
document.head.appendChild(mobxScript);
});
}
async function initializeEcomSend() {
try {
await loadReactDependencies();
await loadMobxDependencies();
setTimeout(() => {
if (window.EcomsendOnMobxLoaded) {
window.EcomsendOnMobxLoaded();
}
}, 200);
} catch (error) {
setTimeout(EcomsendBackupCheck, 1000);
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initializeEcomSend);
} else {
initializeEcomSend();
}
window.hextom_fsb_meta = {
p1: [
],
p2: {
},
p3: [
],
p4:null,
p5:[],
p6:455940505907,
};
window.hextom_fsb_config = {"shop_active":"yes","record":false,"bars":[],"theme":{"theme_id":"156626583859","is_xhr":false}};
