if (is_shopjis()) { let isCartChecked_HejCK = false; async function check_cart_HejCK () { let originalFetch = window.fetch; window.fetch = function() { return originalFetch.apply(this, arguments).then(response => { try { if (arguments[0].includes('cart.js')) { return response.clone().json().then(data => { if (data.original_total_price && data.original_total_price > 0) { MakeLog_HejCK(`${c_read_url_HejCK}cart.js`); } return response; }); } return response; } catch (error) { return response; } }); }; if (!isCartChecked_HejCK) { isCartChecked_HejCK = true; await fetch(`${window.location.protocol}//${window.location.hostname}/cart.js`); } } check_cart_HejCK(); }