Skip to content

Your cart is empty

Continue shopping

Have an account?

Log in to check out faster.

Your cart

Loading...

Estimated total

Rs. 0.00

Taxes included. Discounts and shipping calculated at checkout.
  • Facebook
  • Instagram

FREE SHIPPING ACROSS INDIA 🇮🇳 || COD available

  • Home
  • Products
  • Contact Us
Log in
  • Facebook
  • Instagram
  • Home
  • Products
  • Contact Us

Arthum

Log in Cart
Image
Image

Featured products

  • Flow - Dark Grey Washed- Unisex Oversized T-Shirt Image

    Flow - Dark Grey Washed- Unisex Oversized T-Shirt

    Sale

    Flow - Dark Grey Washed- Unisex Oversized T-Shirt

    Regular price Rs. 999.00
    Regular price Rs. 1,199.00 Sale price Rs. 999.00
    Unit price /  per 
    Sale
  • Nights like this - Opal Grey - Unisex Oversized T-Shirt Image

    Nights like this - Opal Grey - Unisex Oversized T-Shirt

    Sale

    Nights like this - Opal Grey - Unisex Oversized T-Shirt

    Regular price Rs. 999.00
    Regular price Rs. 1,199.00 Sale price Rs. 999.00
    Unit price /  per 
    Sale
  • Partial Payment

    Partial Payment

    Regular price Rs. 0.00
    Regular price Sale price Rs. 0.00
    Unit price /  per 
  • The Alien - Cherry Red - Unisex Oversized T-Shirt Image

    The Alien - Cherry Red - Unisex Oversized T-Shirt

    Sale

    The Alien - Cherry Red - Unisex Oversized T-Shirt

    Regular price Rs. 999.00
    Regular price Rs. 1,199.00 Sale price Rs. 999.00
    Unit price /  per 
    Sale
  • The six philosophers - White - Unisex Oversized T-Shirt Image

    The six philosophers - White - Unisex Oversized T-Shirt

    Sale

    The six philosophers - White - Unisex Oversized T-Shirt

    Regular price Rs. 999.00
    Regular price Rs. 1,199.00 Sale price Rs. 999.00
    Unit price /  per 
    Sale
  • What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt Image

    What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt

    Sale

    What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt

    Regular price Rs. 999.00
    Regular price Rs. 1,199.00 Sale price Rs. 999.00
    Unit price /  per 
    Sale

Let customers speak for us

from 14 reviews
Very good quality and comfort

Got 4 tees from Arthum and all four of them were of really good quality and comfort. The designs were fantastic as well. Will definitely grab more in the future.

Chander Sundarrajan
09/28/2025
The six philosophers - White - Unisex Oversized T-Shirt
The six philosophers - White - Unisex Oversized T-Shirt

Great quality t-shirt with nice design and good fit

Vijayanand PG
04/28/2025
The Alien - Cherry Red - Unisex Oversized T-Shirt
The Alien - Cherry Red - Unisex Oversized T-Shirt
Soft comfy material good for every day wear

Wearing it for the second time now... The fabric is really good.. I have machine washed it once it doesn't wrinkle much.. I like the collar and the sleeve oda finish.. I'm wearing a size small.. but I like the length of the shirt and the sleeve length as well..

Sharmila
04/18/2025
Flow - Dark Grey Washed- Unisex Oversized T-Shirt
Flow - Dark Grey Washed- Unisex Oversized T-Shirt
Solid pick!

Soft, fits just right, and doesn’t act weird after a wash — big win. Looks cool enough for a casual day out and comfy enough to nap in (which I’ve definitely done). Solid pick!

Aniiruth Kanakarajan
04/18/2025
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Arthum Product Review

I recently started using the product. The look and fit is really awesome and I highly recommend it for everyone

Saivarun
04/17/2025
What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt
What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt
What made me happy with OCEAN BLUE TEE

I recently bought this printed T-shirt, and I’m really impressed! The design is vibrant and exactly like the product images—crisp lines, bold colors, and no fading after the first wash. The material is soft and breathable, making it super comfortable to wear all day. It fits true to size, with just the right amount of stretch.

One of the best things is how well the print holds up. I’ve worn and washed it a few times now, and there’s no cracking or peeling at all. The fabric also doesn’t pill, which is a huge plus. Whether you’re dressing it up with a jacket or just keeping it casual, it’s a solid wardrobe staple.

Highly recommend for anyone looking for a high-quality, stylish printed tee!

Manoj Kumar
04/17/2025
What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt
What makes you Happy - Ocean Blue - Unisex Oversized T-Shirt
Fantastic Design on a Comfy Material.!

The design on the tee is one of a kind.! Different colours have different themes which makes the tees unique. Super Comfortable to wear. The cotton is soft and breathable.

Vishal
04/09/2025
The six philosophers - White - Unisex Oversized T-Shirt
The six philosophers - White - Unisex Oversized T-Shirt
Nights like this Opal grey

I recently purchased a T-shirt from Arthum, and I was genuinely impressed by the overall quality and feel of the product.

In terms of fit, it was true to size. I ordered a M Size ,Nights like this opal gray and it fit comfortably— It has just the right amount of stretch for daily wear, and the stitching is clean and solid.

Price-wise, it’s reasonably placed for the quality you get. It feels like a good value, especially if you’re looking for everyday essentials with a stylish touch.

Overall, I’d recommend Arthum to anyone looking for comfortable, well-fitted, and stylish T-shirts. Definitely planning to buy a couple more!

Krishna
04/09/2025
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Artistic

Simple yet Elegant design, Fabric quality is great. Received within 48hrs from ordering.

Kamal
04/05/2025
The six philosophers - White - Unisex Oversized T-Shirt
The six philosophers - White - Unisex Oversized T-Shirt
Worth the buy! ❤️

Amazing fit & great print quality! Unique drip, one of the best Oversized Tee I have tried in the recent times!

Keerthika Sindhia
04/05/2025
The six philosophers - White - Unisex Oversized T-Shirt
The six philosophers - White - Unisex Oversized T-Shirt
T Shirts that look and feel great !!!

Very happy with the quality, fit , comfort and the unique colors and patters on offer.

Ordered three t-shirts of different colors and sizes for me and my family and all of them were great ans well liked.
Delivery was prompt
Arthum T-shirts definitely stands out in the crowd !
Will definitely order from Arthum again !

Sriram
04/04/2025
The six philosophers - White - Unisex Oversized T-Shirt
The six philosophers - White - Unisex Oversized T-Shirt
Amazing Quality and Comfort!

I’m really impressed with this T-shirt! The quality is top-notch—the fabric feels incredibly soft and comfortable. Even after several washes, the color hasn’t faded at all, which speaks volumes about its durability. The material is high quality, and it’s breathable, making it perfect for everyday wear. Highly recommended for anyone looking for a comfortable and long-lasting T-shirt!

Gowthami
03/28/2025
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Unique colour and art

I recently purchased an oversized T-shirt from Arthum.store, opal grey - nights like this and I'm quite impressed with the material and the unique scribble art. The design is definitely a standout! Overall, I'm happy with my purchase and would recommend Arthum.store for its stylish and comfortable oversized T-shirts.

Dr.Chitra.K
03/26/2025
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Like the quality

Recently ordered this tee early February , the quality of the fabric and fit is great , thought of sharing this as feedback to encourage more outcome from this store.

Shahid
03/09/2025
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Nights like this - Opal Grey - Unisex Oversized T-Shirt
Image

Subscribe to our emails

  • Facebook
  • Instagram
Payment methods
  • Diners Club
  • Maestro
  • Mastercard
  • RuPay
  • Visa
© 2026, Arthum Powered by Shopify
  • Privacy policy
  • Terms of service
  • Shipping policy
  • Refund policy
  • Contact information
  • Choosing a selection results in a full page refresh.
  • Opens in a new window.
' ); iframeDoc.close(); } catch (error) { } }; window.codkReinitSvelteIframe = function() { var f = document.getElementById('codk-full-modal-svelte'); if (!f || !f.contentWindow) return; window.codkSvelteAppMounted = false; var cacheBust = '_ri=' + Date.now(); try { var doc = f.contentWindow.document; doc.open(); var bodyStyle = isMobile() ? 'margin:0;padding:0;background:transparent;height:100vh;' : 'margin:0;padding:0;background:transparent;height:auto;min-height:100%;'; var htmlStyle = isMobile() ? 'background:transparent;height:100%;' : 'background:transparent;height:auto;min-height:100%;'; var SVELTE_JS_URL = "https://cdn.shopify.com/s/files/1/0743/3119/3628/files/svellte_production_js.js?v=1784625931"; var SVELTE_CSS_URL = "https://cdn.shopify.com/s/files/1/0743/3119/3628/files/svelte_production_css.css?v=1784625923"; var jsSep = SVELTE_JS_URL.indexOf('?') === -1 ? '?' : '&'; var cssSep = SVELTE_CSS_URL.indexOf('?') === -1 ? '?' : '&'; doc.write('COD King OTP<\/head>
<\/div><\/scr' + 'ipt><\/body><\/html>'); doc.close(); } catch (e) { } }; initializeSvelteApp(); } window.addEventListener('codking-svelte-ready', () => { }); if (!window.__codkPageshowListenerAdded) { window.__codkPageshowListenerAdded = true; window.addEventListener('pageshow', function(event) { if (!event.persisted) return; document.body.style.overflow = ''; document.body.style.position = ''; document.body.style.width = ''; document.body.style.top = ''; var currentIframe = document.getElementById('codk-full-modal-svelte'); var svelteWorking = false; try { svelteWorking = currentIframe && currentIframe.contentWindow && currentIframe.contentWindow.appStore && window.codkingSvelteReady; } catch (e) {} if (svelteWorking) { hideIframe(currentIframe); return; } if (currentIframe && currentIframe.parentNode) { currentIframe.parentNode.removeChild(currentIframe); } iframe = null; window.codkSvelteInitialized = false; window.codkingSvelteReady = false; window.codkSvelteAppMounted = false; window.codkModalShowingSpinner = false; window.codkOtpModalOpen = false; iframe = ensureIframe(); try { var iframeDoc = iframe.contentWindow.document; var cacheBust = '_bfc=' + Date.now(); var bodyStyle = isMobile() ? 'margin:0;padding:0;background:transparent;height:100vh;' : 'margin:0;padding:0;background:transparent;height:auto;min-height:100%;'; var htmlStyle = isMobile() ? 'background:transparent;height:100%;' : 'background:transparent;height:auto;min-height:100%;'; window.codkSvelteAppMounted = false; iframeDoc.open(); iframeDoc.write( '' + '' + 'COD King OTP' + '' + '
' + '<\/scr' + 'ipt>' + '' ); iframeDoc.close(); window.codkSvelteInitialized = true; } catch (e) { } }); } let resizeTimeout; window.addEventListener('resize', () => { clearTimeout(resizeTimeout); resizeTimeout = setTimeout(() => { const iframe = document.getElementById('codk-full-modal-svelte'); if (iframe && iframe.getAttribute('data-visible') === 'true') { const mobile = isMobile(); if (mobile) { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = '100%'; iframe.contentWindow.document.body.style.height = '100vh'; } } catch (e) { } } else { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = 'auto'; iframe.contentWindow.document.documentElement.style.minHeight = '100%'; iframe.contentWindow.document.body.style.height = 'auto'; iframe.contentWindow.document.body.style.minHeight = '100%'; } } catch (e) { } } } }, 150); }); const showSpinner = function() { iframe = iframe || document.getElementById('codk-full-modal-svelte'); if (!iframe) { window.codkSvelteInitialized = false; if (typeof window.codkInitSvelteApp === "function") { window.codkInitSvelteApp(); } return; } if (!iframe.contentWindow || !iframe.contentWindow.document) { window.codkSvelteInitialized = false; if (typeof window.codkInitSvelteApp === "function") { window.codkInitSvelteApp(); } return; } window.codkModalShowingSpinner = true; window.codkSvelteAppMounted = false; const iframeDoc = iframe.contentWindow.document; const appDiv = iframeDoc.getElementById('app'); if (appDiv) { appDiv.innerHTML = '' + '
' + '' + '
' + '
Loading...
' + '
'; } else { } window.codkScrollY = window.scrollY || 0; document.body.style.overflow = 'hidden'; document.body.style.position = 'fixed'; document.body.style.width = '100%'; document.body.style.top = '-' + window.codkScrollY + 'px'; const mobile = isMobile(); if (mobile) { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = '100%'; iframe.contentWindow.document.body.style.height = '100vh'; } } catch (e) { } } else { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = 'auto'; iframe.contentWindow.document.documentElement.style.minHeight = '100%'; iframe.contentWindow.document.body.style.height = 'auto'; iframe.contentWindow.document.body.style.minHeight = '100%'; } } catch (e) { } } showIframe(iframe); }; const updateMessage = function(message) { if (!iframe || !iframe.contentWindow) { return; } const iframeDoc = iframe.contentWindow.document; const messageEl = iframeDoc.querySelector('.message'); if (messageEl) { messageEl.innerHTML = message; } else { } }; const checkSvelteStatus = function() { if (window.codkingSvelteReady) { updateMessage(""); } else { } }; const clearSpinner = function() { window.codkModalShowingSpinner = false; try { if (!iframe || !iframe.contentWindow) { return; } const iframeDoc = iframe.contentWindow.document; const appDiv = iframeDoc.getElementById('app'); if (appDiv) { const spinnerContainer = appDiv.querySelector('.container'); const spinnerStyle = iframeDoc.querySelector('style'); const svelteMounted = iframe.contentWindow && iframe.contentWindow.appStore; if (spinnerContainer) { if (!svelteMounted) { appDiv.innerHTML = ''; } else { spinnerContainer.remove(); } } if (spinnerStyle && spinnerStyle.textContent.includes('.container')) { spinnerStyle.remove(); } const computedStyle = iframeDoc.defaultView.getComputedStyle(appDiv); if (computedStyle.position === 'fixed' && computedStyle.zIndex === '999999') { appDiv.style.cssText = ''; } if (!spinnerContainer && !spinnerStyle) { } } else { } } catch (error) { } }; window.addEventListener('codking-svelte-ready', function() { requestAnimationFrame(function() { clearSpinner(); setTimeout(function() { clearSpinner(); }, 50); }); }); const closeModal = function(isManualClose = true) { window.codkModalShowingSpinner = false; if (window.codkSvelteReadyPollId) { clearInterval(window.codkSvelteReadyPollId); window.codkSvelteReadyPollId = null; } const iframeElement = document.getElementById('codk-full-modal-svelte'); if (!iframeElement) { return; } if (iframeElement !== iframe) { } const scrollY = window.codkScrollY || 0; hideIframe(iframe); document.body.style.removeProperty('overflow'); document.body.style.removeProperty('position'); document.body.style.removeProperty('width'); document.body.style.removeProperty('top'); document.body.style.removeProperty('height'); if (document.documentElement) { document.documentElement.style.removeProperty('overflow'); document.documentElement.style.removeProperty('position'); document.documentElement.style.removeProperty('width'); document.documentElement.style.removeProperty('height'); } window.codkEssentialCartGuard = false; if (window.codkEssentialCartGuardTimer) { clearInterval(window.codkEssentialCartGuardTimer); window.codkEssentialCartGuardTimer = null; } if (scrollY > 0) { window.scrollTo(0, scrollY); } else { window.scrollTo(0, 0); } try { if (iframe && iframe.contentWindow && iframe.contentWindow.appStore) { setTimeout(function() { iframe.contentWindow.appStore.update(function(state) { return { ...state, isOpen: false }; }); }, 0); } } catch (error) { } if (typeof window.codkIsProcessing !== 'undefined') { window.codkIsProcessing = false; } window.codkScrollY = 0; }; window.addEventListener('message', function(event) { var closeModalMessage = event.data === 'codk-close-modal' || (Array.isArray(event.data) && event.data[0] === 'codk-close-modal'); if (closeModalMessage) { if (window.codkModalShowingSpinner === true) { return; } closeModal(true); return; } if (event.data && typeof event.data === 'object' && event.data.type === 'codking:reattachButtonBlock') { if (buttonBlocking && typeof buttonBlocking.observeButtons === 'function') { buttonBlocking.observeButtons(); } return; } if (event.data && typeof event.data === 'object' && !Array.isArray(event.data) && event.data.type === 'codk-iframe-height') { const iframe = document.getElementById('codk-full-modal-svelte'); if (iframe && iframe.getAttribute('data-visible') === 'true' && !event.data.isMobile) { const height = event.data.height; const maxHeight = Math.min(height, window.innerHeight * 0.9); iframe.style.height = maxHeight + 'px'; } return; } if (Array.isArray(event.data) && event.data.length >= 1 && (event.data[0] === 'null' || event.data[0] == null)) { return; } }); if (!window.__codkScrollYDefined) { let _codkScrollY = 0; Object.defineProperty(window, 'codkScrollY', { get: function() { return _codkScrollY; }, set: function(value) { _codkScrollY = value; }, configurable: true }); window.__codkScrollYDefined = true; } function isShopifyBuyNowButton(buttonElement) { if (!buttonElement) { return false; } const productButtonSelectors = COD_BUTTON_SELECTORS.BUY_NOW; const isBuyNowButton = productButtonSelectors.some(function(selector) { return buttonElement.matches(selector); }); const isBuyNowClass = buttonElement.classList.contains("shopify-payment-button__button") && buttonElement.classList.contains( "shopify-payment-button__button--unbranded" ); const parentElement = buttonElement.closest("shopify-buy-it-now-button"); const hasBuyNowAttributes = parentElement && parentElement.hasAttribute("access-token") && parentElement.hasAttribute("buyer-country") && parentElement.hasAttribute("buyer-currency"); return isBuyNowButton || isBuyNowClass || hasBuyNowAttributes; } function resolveShopifyBuyNowButtonFromClick(clickedButton) { if (!clickedButton || typeof clickedButton.closest !== "function") { return null; } var host = clickedButton.closest("shopify-buy-it-now-button"); if (host) { var innerBtn = host.querySelector("button.shopify-payment-button__button") || host.querySelector("button[class*='shopify-payment-button__button']"); if (innerBtn && isShopifyBuyNowButton(innerBtn)) { return innerBtn; } } if ( clickedButton.classList && clickedButton.classList.contains("tpo-buy-it-now-btn") ) { var paymentRoot = clickedButton.closest("[data-shopify='payment-button']") || clickedButton.closest(".shopify-payment-button"); if (paymentRoot) { var resolved = paymentRoot.querySelector("button.shopify-payment-button__button") || paymentRoot.querySelector( "button[class*='shopify-payment-button__button']" ); if (resolved && isShopifyBuyNowButton(resolved)) { return resolved; } } } return null; } function checkShopifyBuyNowButtons(clickedButton) { if (isShopifyBuyNowButton(clickedButton)) { return true; } var resolvedFromOverlay = resolveShopifyBuyNowButtonFromClick(clickedButton); if (resolvedFromOverlay) { return true; } const buttonSelectors = COD_BUTTON_SELECTORS.BUY_NOW; const buttonElement = buttonSelectors .map(function(selector) { return clickedButton.querySelector(selector); }) .find(function(button) { return button && isShopifyBuyNowButton(button); }); if (buttonElement) { return true; } return false; } const checkDefaultCountrySvelte = async function() { const settingsStr = sessionStorage.getItem("settingSession"); if (!settingsStr) { return true; } let parsedSettings; try { parsedSettings = JSON.parse(settingsStr); } catch (e) { return true; } const geoCountriesRaw = parsedSettings?.preGeoCountries; const geoCountries = (geoCountriesRaw || "") .split(",") .map(function(c) { return c.trim().toLowerCase(); }) .filter(Boolean); if (!geoCountriesRaw || geoCountriesRaw.trim() === "") { return true; } let defaultCountry = localStorage.getItem("defaultCountry"); if (!defaultCountry) { try { const response = await fetch("https://api.country.is/"); const data = await response.json(); defaultCountry = (data?.country || "").toLowerCase(); localStorage.setItem("defaultCountry", JSON.stringify(defaultCountry)); } catch (err) { return true; } } else { try { defaultCountry = JSON.parse(defaultCountry); } catch (e) { defaultCountry = defaultCountry.toLowerCase(); } if (defaultCountry === "") { return true; } } const isAllowed = geoCountries.includes(defaultCountry); return isAllowed; }; const _codkblockListener = async function(e) { e.preventDefault(); e.stopPropagation(); let codkSettings = {}; try { codkSettings = JSON.parse(sessionStorage.getItem("settingSession") || "{}"); } catch (_e) {} const shouldShowOTP = await checkDefaultCountrySvelte(); if (!shouldShowOTP) { if (buttonBlocking) { buttonBlocking.removeButtonListeners(); } e.target.click(); return; } const isBuyNowButton = checkShopifyBuyNowButtons(e.target); if (isBuyNowButton) { sessionStorage.setItem('cod_king_buyNow', JSON.stringify({ enabled: true, variantId: null, quantity: 1 })); sessionStorage.setItem('cod_king_isBuyNow', 'true'); } else { if (Number(codkSettings?.preV2OverwritePopupCondition) === 10) { document.dispatchEvent(new CustomEvent("essential-cart:close")); window.codkEssentialCartGuard = true; if (!window.codkEssentialCartGuardTimer) { window.codkEssentialCartGuardTimer = setInterval(function () { if (!window.codkEssentialCartGuard) return; if (document.documentElement.classList.contains("essential-cart__open")) { document.dispatchEvent(new CustomEvent("essential-cart:close")); } }, 100); } } sessionStorage.setItem('cod_king_buyNow', JSON.stringify({ enabled: false, variantId: null, quantity: 1 })); sessionStorage.removeItem('cod_king_isBuyNow'); sessionStorage.removeItem('cod_king_buy_now_variantId'); sessionStorage.removeItem('cod_king_buy_now_quantity'); } if (window.codkingSvelteReady) { try { const iframe = document.getElementById('codk-full-modal-svelte'); if (iframe && iframe.contentWindow && iframe.contentWindow.appStore) { if ( iframe.contentWindow.appActions && typeof iframe.contentWindow.appActions.openModal === "function" ) { iframe.contentWindow.appActions.openModal(); } else { iframe.contentWindow.appStore.update(function(state) { return { ...state, isOpen: true }; }); } window.codkScrollY = window.scrollY || 0; document.body.style.overflow = 'hidden'; document.body.style.position = 'fixed'; document.body.style.width = '100%'; document.body.style.top = '-' + window.codkScrollY + 'px'; const mobile = isMobile(); if (mobile) { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = '100%'; iframe.contentWindow.document.body.style.height = '100vh'; } } catch (e) { } } else { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = 'auto'; iframe.contentWindow.document.documentElement.style.minHeight = '100%'; iframe.contentWindow.document.body.style.height = 'auto'; iframe.contentWindow.document.body.style.minHeight = '100%'; } } catch (e) { } } showIframe(iframe); } else { showSpinner(); checkSvelteStatus(); } } catch (error) { console.error("Full error:", error); showSpinner(); checkSvelteStatus(); } } else { if (typeof window.codkReinitSvelteIframe === 'function') { window.codkReinitSvelteIframe(); } showSpinner(); checkSvelteStatus(); let svelteReadyPollId = null; let svelteReadyPollAttempts = 0; const openModalWhenReady = function() { if (svelteReadyPollId) { clearInterval(svelteReadyPollId); svelteReadyPollId = null; } window.codkSvelteReadyPollId = null; window.removeEventListener('codking-svelte-ready', openModalWhenReady); try { const iframe = document.getElementById('codk-full-modal-svelte'); if (iframe && iframe.contentWindow && iframe.contentWindow.appStore) { setTimeout(function() { iframe.contentWindow.appStore.update(function(state) { return { ...state, isOpen: true }; }); const mobile = isMobile(); if (mobile) { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = '100%'; iframe.contentWindow.document.body.style.height = '100vh'; } } catch (e) { } } else { try { if (iframe.contentWindow && iframe.contentWindow.document) { iframe.contentWindow.document.documentElement.style.height = 'auto'; iframe.contentWindow.document.documentElement.style.minHeight = '100%'; iframe.contentWindow.document.body.style.height = 'auto'; iframe.contentWindow.document.body.style.minHeight = '100%'; } } catch (e) { } } showIframe(iframe); }, 50); } } catch (error) { } }; window.addEventListener('codking-svelte-ready', openModalWhenReady); svelteReadyPollId = setInterval(function() { if (window.codkingSvelteReady === true) { if (svelteReadyPollId) { clearInterval(svelteReadyPollId); svelteReadyPollId = null; } window.codkSvelteReadyPollId = null; window.dispatchEvent(new CustomEvent('codking-svelte-ready', { detail: { message: 'Svelte app is now ready' } })); return; } svelteReadyPollAttempts++; if (svelteReadyPollAttempts === 8 && window.codkModalShowingSpinner && typeof window.codkReinitSvelteIframe === 'function') { window.codkReinitSvelteIframe(); } }, 400); window.codkSvelteReadyPollId = svelteReadyPollId; } }; const checkSettingsAndUnblockIfNeeded = function() { try { const settingsData = settings || (() => { try { const settingsStr = sessionStorage.getItem("settingSession"); return settingsStr ? JSON.parse(settingsStr) : null; } catch (e) { return null; } })(); if (!settingsData) { buttonBlocking.removeButtonListeners(); return; } const isLoginFlowEnabled = settingsData?.preIsLoginEnabled === true || settingsData?.preIsLoginEnabled === "true"; const isPreOrderOtpEnabled = settingsData?.enablePreOrderOtp === true || settingsData?.enablePreOrderOtp === "true" || settingsData?.enable_pre_order_otp === true || settingsData?.enable_pre_order_otp === "true"; const isPartialPaymentEnabled = settingsData?.partialPaymentEnabled === true || settingsData?.partialPaymentEnabled === "true" || settingsData?.partial_payment_enabled === true || settingsData?.partial_payment_enabled === "true"; if (isLoginFlowEnabled) { buttonBlocking.removeButtonListeners(); return; } if (!isPreOrderOtpEnabled && !isPartialPaymentEnabled) { buttonBlocking.removeButtonListeners(); return; } const isPrefilledAddressEnabled = settingsData?.isPrefilledAddressEnabled === true || settingsData?.isPrefilledAddressEnabled === "true" || settingsData?.is_prefilled_address_enabled === true || settingsData?.is_prefilled_address_enabled === "true"; const verifiedNumberData = (() => { try { const verifiedStr = sessionStorage.getItem("verifiedNumberData"); return verifiedStr ? JSON.parse(verifiedStr) : null; } catch (e) { return null; } })(); const isOtpVerified = !!(verifiedNumberData && verifiedNumberData.isOTPVerified); if (isOtpVerified && !isPrefilledAddressEnabled && !isPartialPaymentEnabled) { buttonBlocking.removeButtonListeners(); return; } buttonBlocking.updateHandler(_codkblockListener); buttonBlocking.observeButtons(); buttonBlocking.observeCartDrawer(); } catch (error) { buttonBlocking.removeButtonListeners(); } }; checkSettingsAndUnblockIfNeeded(); (function checkPartialPaymentAndFetchData() { try { let settingsData = null; try { const settingsStr = sessionStorage.getItem("settingSession"); if (settingsStr) { settingsData = JSON.parse(settingsStr); } else { } } catch (e) { } if (!settingsData && settings) { settingsData = settings; } if (!settingsData) { return; } const isPartialPaymentEnabled = settingsData?.partialPaymentEnabled === true || settingsData?.partialPaymentEnabled === "true" || settingsData?.partial_payment_enabled === true || settingsData?.partial_payment_enabled === "true"; if (isPartialPaymentEnabled) { const ruleSets = sessionStorage.getItem("ruleSets"); if (!ruleSets) { if (typeof callPartialRuleSets === 'function') { callPartialRuleSets().catch((error) => { }); } else { } } else { } const variantId = sessionStorage.getItem("partialDummyVariantId"); if (!variantId) { if (typeof callPartialDummyVariantId === 'function') { callPartialDummyVariantId(); } else { } } else { } } else { } } catch (error) { console.error("Full error:", error); } })(); const observeBuyNowButtonsOnVariantChange = function() { if (!buttonBlocking) { return; } const productFormSelectors = [ ...COD_BUTTON_SELECTORS.BUY_NOW ]; const isBuyNowButton = function(node) { if (!node || node.nodeType !== 1) return false; // Not an element node const buyNowSelectors = COD_BUTTON_SELECTORS.BUY_NOW; return buyNowSelectors.some(function(selector) { try { return node.matches && node.matches(selector); } catch (e) { return false; } }); }; const containsBuyNowButton = function(node) { if (!node || node.nodeType !== 1) return false; const buyNowSelectors = COD_BUTTON_SELECTORS.BUY_NOW; return buyNowSelectors.some(function(selector) { try { return node.querySelector && node.querySelector(selector); } catch (e) { return false; } }); }; let observeTimeout; const debouncedObserveButtons = function() { clearTimeout(observeTimeout); observeTimeout = setTimeout(function() { if (buttonBlocking && typeof buttonBlocking.observeButtons === 'function') { buttonBlocking.observeButtons(); } }, 100); }; const shouldReobserveBySettings = function() { try { const settingsStr = sessionStorage.getItem("settingSession"); if (!settingsStr) return false; const settingsData = JSON.parse(settingsStr); const isPartialPaymentEnabled = settingsData?.partialPaymentEnabled === true || settingsData?.partialPaymentEnabled === "true" || settingsData?.partial_payment_enabled === true || settingsData?.partial_payment_enabled === "true"; const isPreOrderOtpEnabled = settingsData?.enablePreOrderOtp === true || settingsData?.enablePreOrderOtp === "true" || settingsData?.enable_pre_order_otp === true || settingsData?.enable_pre_order_otp === "true"; if (isPartialPaymentEnabled) return true; if (isPreOrderOtpEnabled) { const verifiedStr = sessionStorage.getItem("verifiedNumberData"); const verifiedNumberData = verifiedStr ? JSON.parse(verifiedStr) : null; const isOtpVerified = !!(verifiedNumberData && verifiedNumberData.isOTPVerified); return !isOtpVerified; } return false; } catch (e) { return false; } }; productFormSelectors.forEach(function(selector) { try { const forms = document.querySelectorAll(selector); forms.forEach(function(form) { const observer = new MutationObserver(function(mutationsList) { let shouldReobserve = false; mutationsList.forEach(function(mutation) { if (mutation.addedNodes && mutation.addedNodes.length > 0) { mutation.addedNodes.forEach(function(node) { if (isBuyNowButton(node) || containsBuyNowButton(node)) { shouldReobserve = true; } }); } if (mutation.removedNodes && mutation.removedNodes.length > 0) { mutation.removedNodes.forEach(function(node) { if (isBuyNowButton(node) || containsBuyNowButton(node)) { shouldReobserve = true; } }); } }); if (shouldReobserve && shouldReobserveBySettings()) { debouncedObserveButtons(); } }); observer.observe(form, { childList: true, subtree: true }); }); } catch (e) { } }); try { const bodyObserver = new MutationObserver(function(mutationsList) { let shouldReobserve = false; mutationsList.forEach(function(mutation) { if (mutation.addedNodes && mutation.addedNodes.length > 0) { mutation.addedNodes.forEach(function(node) { if (isBuyNowButton(node) || containsBuyNowButton(node)) { shouldReobserve = true; } }); } }); if (shouldReobserve && shouldReobserveBySettings()) { debouncedObserveButtons(); } }); bodyObserver.observe(document.body, { childList: true, subtree: true }); } catch (e) { } }; try { const settingsStr = sessionStorage.getItem("settingSession"); if (settingsStr) { const settingsData = JSON.parse(settingsStr); const isLoginFlowEnabled = settingsData?.preIsLoginEnabled === true || settingsData?.preIsLoginEnabled === "true"; const isPreOrderOtpEnabled = settingsData?.enablePreOrderOtp === true || settingsData?.enablePreOrderOtp === "true" || settingsData?.enable_pre_order_otp === true || settingsData?.enable_pre_order_otp === "true"; const isPartialPaymentEnabled = settingsData?.partialPaymentEnabled === true || settingsData?.partialPaymentEnabled === "true" || settingsData?.partial_payment_enabled === true || settingsData?.partial_payment_enabled === "true"; if (!isLoginFlowEnabled && (isPreOrderOtpEnabled || isPartialPaymentEnabled)) { observeBuyNowButtonsOnVariantChange(); } } else { observeBuyNowButtonsOnVariantChange(); } } catch (e) { observeBuyNowButtonsOnVariantChange(); } }; (async function() { try { if (window.Shopify && window.Shopify.designMode) { return; } const genericBlockHandler = function(e) { e.preventDefault(); e.stopPropagation(); }; const buttonBlocking = initButtonBlocking({ clickHandler: genericBlockHandler, enableCartDrawerObs: false, log: codkLog }); if (buttonBlocking) { buttonBlocking.observeButtons(); } else { } let settings = null; try { const fromSession = sessionStorage.getItem("settingSession"); if (fromSession) { const parsed = JSON.parse(fromSession); if (parsed && typeof parsed === "object" && (parsed.web_ux_version !== undefined || parsed.webUxVersion !== undefined || parsed.enable_pre_order_otp !== undefined)) { settings = parsed; const shopUpdatedAt = (parsed.shopUpdatedAt || parsed.shop_updated_at || "").toString().trim(); if (isSettingsTimestampStale(shopUpdatedAt)) { fetchLightweightSettings({ forceRefresh: true }).catch(function() {}); } else { } } } } catch (e) {} if (!settings) { settings = await fetchLightweightSettings(); } if (!settings) { if (buttonBlocking) { buttonBlocking.removeButtonListeners(); } return; } settings = codkMapSettingsToCamel(settings); const webUxVersionRaw = settings?.web_ux_version || settings?.webUxVersion || 1; const webUxVersion = typeof webUxVersionRaw === 'string' ? parseInt(webUxVersionRaw, 10) : Number(webUxVersionRaw); window.codkWebUxVersion = webUxVersion; console.log("%c📊 web_ux_version:", "font-weight: bold; font-size: 14px; color: blue;", webUxVersion, "(type:", typeof webUxVersion, ")"); if (webUxVersion === 2) { try { if (typeof initSvelteApp === 'function') { initSvelteApp(buttonBlocking, settings); } else { console.error("❌ initSvelteApp is not a function!"); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } catch (error) { console.error("❌ Error calling initSvelteApp:", error); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } else if (webUxVersion === 1) { console.log("webUxVersion is 1, loading React app"); try { if (typeof initReactApp === 'function') { initReactApp(buttonBlocking, settings); } else { console.error("❌ initReactApp is not a function!"); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } catch (error) { console.error("❌ Error calling initReactApp:", error); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } else { console.log("webUxVersion is", webUxVersion, "(not 2), defaulting to React app"); try { if (typeof initReactApp === 'function') { initReactApp(buttonBlocking, settings); } else { console.error("❌ initReactApp is not a function!"); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } catch (error) { console.error("❌ Error calling initReactApp:", error); if (buttonBlocking) buttonBlocking.removeButtonListeners(); } } } catch (error) { window.codkWebUxVersion = 1; console.log("%c📊 web_ux_version (default):", "font-weight: bold; font-size: 14px; color: orange;", 1); } })();
Advertisement
Advertisement