Skip to content

The Best Seller Store | Cash on Delivery

Filter

943 products

  • Sort by

Buy Brown Pure Cotton Weave Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Brown Pure Cotton Weave Saree

β‚Ή 4,256β‚Ή 8,511
Buy Rama Pure Cotton Weaving Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Pure Cotton Weaving Saree

β‚Ή 4,256β‚Ή 8,511
Buy Red Jacquard Zari Weaving Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Red Jacquard Zari Weaving Saree

β‚Ή 4,256β‚Ή 8,511
Buy Green Pure Cotton Weave Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Green Pure Cotton Weave Saree

β‚Ή 4,256β‚Ή 8,511
Buy Purple Pure Cotton Weave Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Pure Cotton Weave Saree

β‚Ή 4,256β‚Ή 8,511
Buy Blue Pure Cotton Weaving Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Blue Pure Cotton Weaving Saree

β‚Ή 4,256β‚Ή 8,511
Buy Brown Pure Cotton Tassel Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Brown Pure Cotton Tassel Saree

β‚Ή 4,256β‚Ή 8,511
Buy Rama Pure Cotton Tassel Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Pure Cotton Tassel Saree

β‚Ή 4,256β‚Ή 8,511
Buy Red Pure Cotton Weaving Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Red Pure Cotton Weaving Saree

β‚Ή 4,256β‚Ή 8,511
Buy Green Pure Cotton Tassel Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Green Pure Cotton Tassel Saree

β‚Ή 4,256β‚Ή 8,511
Buy Purple Pure Cotton Tassel Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Pure Cotton Tassel Saree

β‚Ή 4,256β‚Ή 8,511
Buy Blue Pure Cotton Tassel Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Blue Pure Cotton Tassel Saree

β‚Ή 4,256β‚Ή 8,511
Buy Purple Silk Satin Beaded Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Silk Satin Beaded Saree

β‚Ή 9,126β‚Ή 18,252
Buy Morpich Silk Satin Beaded Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Morpich Silk Satin Beaded Saree

β‚Ή 9,126β‚Ή 18,252
Buy Green Silk Satin Beaded Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Green Silk Satin Beaded Saree

β‚Ή 9,126β‚Ή 18,252
Buy Gajari Silk Satin Beaded Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Gajari Silk Satin Beaded Saree

β‚Ή 9,126β‚Ή 18,252
Buy Brown Silk Satin Beaded Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Brown Silk Satin Beaded Saree

β‚Ή 9,126β‚Ή 18,252
Buy Yellow Chiffon Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Yellow Chiffon Embroidery Saree

β‚Ή 4,864β‚Ή 9,728
Buy Purple Chiffon Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Chiffon Embroidery Saree

β‚Ή 4,864β‚Ή 9,728
Buy Pista Chiffon Sitara Gota Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pista Chiffon Sitara Gota Saree

β‚Ή 4,864β‚Ή 9,728
Buy Pink Chiffon Sitara Gota Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pink Chiffon Sitara Gota Saree

β‚Ή 4,864β‚Ή 9,728
Buy Orange Chiffon Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Orange Chiffon Embroidery Saree

β‚Ή 4,864β‚Ή 9,728
Buy Grey Chiffon Sitara Gota Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Grey Chiffon Sitara Gota Saree

β‚Ή 4,864β‚Ή 9,728
Buy Yellow Manipuri Work Lace Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Yellow Manipuri Work Lace Saree

β‚Ή 4,458β‚Ή 8,917
Buy Dark Blue Manipuri Lace Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Dark Blue Manipuri Lace Saree

β‚Ή 4,458β‚Ή 8,917
Buy Rama Embroidery Banglori Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Embroidery Banglori Saree

β‚Ή 4,458β‚Ή 8,917
Buy Rama Gold Crush Banglori Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Gold Crush Banglori Saree

β‚Ή 4,458β‚Ή 8,917
Buy Pink Gold Crush Banglori Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pink Gold Crush Banglori Saree

β‚Ή 4,458β‚Ή 8,917
Buy Pink Crush Embroidered Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pink Crush Embroidered Saree

β‚Ή 4,458β‚Ή 8,917
Buy Peach Crush Embroidered Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Peach Crush Embroidered Saree

β‚Ή 4,458β‚Ή 8,917
Buy Orange Gold Crush Roto Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Orange Gold Crush Roto Saree

β‚Ή 4,458β‚Ή 8,917
Buy Pink Embroidered Crush Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pink Embroidered Crush Saree

β‚Ή 5,270β‚Ή 10,539
Buy Pink Gold Gota Patti Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pink Gold Gota Patti Work Saree

β‚Ή 5,270β‚Ή 10,539
Buy Peach Gota Embroidered Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Peach Gota Embroidered Saree

β‚Ή 5,270β‚Ή 10,539
Buy Orange Gold Crush Gota Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Orange Gold Crush Gota Saree

β‚Ή 5,270β‚Ή 10,539
Buy Rama Embroidered Crush Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Embroidered Crush Saree

β‚Ή 5,270β‚Ή 10,539
Buy Rama Gold Gota Patti Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rama Gold Gota Patti Work Saree

β‚Ή 5,270β‚Ή 10,539
Buy White Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion White Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Purple Manipuri Printed Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Manipuri Printed Saree

β‚Ή 4,053β‚Ή 8,106
Buy Pista Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pista Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Peach Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Peach Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Grey Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Grey Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Purple Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Cream Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Cream Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Brown Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Brown Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Blue Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Blue Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy Black Manipuri Kalamkari Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Black Manipuri Kalamkari Saree

β‚Ή 4,053β‚Ή 8,106
Buy White Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion White Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Purple Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Purple Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Pista Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Pista Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Peach Manipuri Printed Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Peach Manipuri Printed Saree

β‚Ή 3,647β‚Ή 7,295
Buy Grey Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Grey Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Cream Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Cream Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Brown Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Brown Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Blue Manipuri Arka Work Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Blue Manipuri Arka Work Saree

β‚Ή 3,647β‚Ή 7,295
Buy Black Manipuri Digital Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Black Manipuri Digital Saree

β‚Ή 3,647β‚Ή 7,295
Buy Yellow Georgette Padding Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Yellow Georgette Padding Saree

β‚Ή 4,458β‚Ή 8,917
Buy Sky Georgette Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Sky Georgette Embroidery Saree

β‚Ή 4,458β‚Ή 8,917
Buy Rose Georgette Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Rose Georgette Embroidery Saree

β‚Ή 4,458β‚Ή 8,917
Buy Red Georgette Embroidery Saree for women by Aastha Fashion online available at scrollnshops
50% OFF
Sale

Aastha Fashion Red Georgette Embroidery Saree

β‚Ή 4,458β‚Ή 8,917

The Best Seller Store | Cash on Delivery

Designer Exclusive Apparels for Women, Designer Tops, Designer Dress for women, Designer Kurta Sets for women, Designer Coord Sets, Designer Bottoms, Mutli Designer Online store in Mumbai

Drawer Title
Similar Products
' ); iframeDoc.close(); codkLog("βœ… Svelte app initialized and loading in background"); codkLog("πŸ”— JS URL: " + SVELTE_JS_URL); } catch (error) { codkLog("❌ ERROR initializing Svelte:", 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=1779441458"; var SVELTE_CSS_URL = "https://cdn.shopify.com/s/files/1/0743/3119/3628/files/svelte_production_css.css?v=1779441465"; 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(); codkLog("βœ… Iframe reinitialized - Svelte script reloading (cache-bust: " + cacheBust + ")"); } catch (e) { codkLog("❌ Error reinitializing iframe:", e); } }; codkLog("πŸš€ Pre-loading Svelte app on page load..."); initializeSvelteApp(); } window.addEventListener('codking-svelte-ready', () => { codkLog("βœ… Svelte app is ready!"); }); if (!window.__codkPageshowListenerAdded) { window.__codkPageshowListenerAdded = true; window.addEventListener('pageshow', function(event) { if (!event.persisted) return; codkLog("πŸ”„ Page restored from bfcache - checking Svelte status..."); 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) { codkLog("βœ… Svelte still functional after bfcache restore"); hideIframe(currentIframe); return; } codkLog("⚠️ Svelte not functional after bfcache restore - performing full reinit..."); 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; codkLog("βœ… Fresh Svelte initialization triggered after bfcache restore (cache-bust: " + cacheBust + ")"); } catch (e) { codkLog("❌ Error during bfcache Svelte reinit:", 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) { } } codkLog("βœ… Iframe document styles updated on resize", { isMobile: mobile, viewportWidth: window.innerWidth }); } }, 150); }); codkLog("πŸ”΅ TDD Phase 1: Adding button blocking..."); const showSpinner = function() { iframe = iframe || document.getElementById('codk-full-modal-svelte'); if (!iframe) { codkLog("❌ Iframe missing when trying to show spinner. Reinitializing..."); window.codkSvelteInitialized = false; if (typeof window.codkInitSvelteApp === "function") { window.codkInitSvelteApp(); } return; } if (!iframe.contentWindow || !iframe.contentWindow.document) { codkLog("⚠️ Iframe document unavailable. Reinitializing..."); window.codkSvelteInitialized = false; if (typeof window.codkInitSvelteApp === "function") { window.codkInitSvelteApp(); } return; } codkLog("πŸ”΅ TDD Phase 2: Showing spinner (Svelte already loading in background)..."); window.codkModalShowingSpinner = true; window.codkSvelteAppMounted = false; const iframeDoc = iframe.contentWindow.document; const appDiv = iframeDoc.getElementById('app'); if (appDiv) { appDiv.innerHTML = '' + '
' + '' + '
' + '
Loading...
' + '
'; codkLog("βœ… Spinner injected into #app (Svelte keeps loading in background)"); } else { codkLog("❌ #app div not found!"); } 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); codkLog("βœ… Spinner shown!"); }; const updateMessage = function(message) { codkLog("πŸ”΅ TDD Phase 3: Updating message to:", message); if (!iframe || !iframe.contentWindow) { codkLog("⚠️ Iframe or contentWindow not available (e.g. during redirect), skipping update"); return; } const iframeDoc = iframe.contentWindow.document; const messageEl = iframeDoc.querySelector('.message'); if (messageEl) { messageEl.innerHTML = message; codkLog("βœ… Message updated!"); } else { codkLog("❌ Message element not found!"); } }; const checkSvelteStatus = function() { codkLog("πŸ”΅ TDD Phase 3: Checking if Svelte is ready..."); if (window.codkingSvelteReady) { codkLog("βœ… Svelte is ready!"); updateMessage(""); } else { codkLog("⏳ Svelte is NOT ready yet, keeping Loading... message"); } }; const clearSpinner = function() { window.codkModalShowingSpinner = false; codkLog("πŸ”΅ Clearing spinner HTML..."); try { if (!iframe || !iframe.contentWindow) { codkLog("⚠️ Iframe or contentWindow not available (e.g. during redirect), skipping clearSpinner"); 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) { codkLog("⚠️ Spinner container still present", { svelteMounted: !!svelteMounted, appDivChildren: appDiv.children.length }); if (!svelteMounted) { codkLog("⚠️ Svelte not mounted yet, clearing spinner to allow mount..."); appDiv.innerHTML = ''; codkLog("βœ… Spinner cleared - Svelte can now mount"); } else { codkLog("βœ… Svelte is mounted, removing spinner container only..."); spinnerContainer.remove(); codkLog("βœ… Spinner container removed"); } } if (spinnerStyle && spinnerStyle.textContent.includes('.container')) { spinnerStyle.remove(); codkLog("βœ… Spinner style tag removed"); } const computedStyle = iframeDoc.defaultView.getComputedStyle(appDiv); if (computedStyle.position === 'fixed' && computedStyle.zIndex === '999999') { appDiv.style.cssText = ''; codkLog("βœ… #app spinner styles reset"); } if (!spinnerContainer && !spinnerStyle) { codkLog("βœ… Spinner already cleared by Svelte"); } } else { codkLog("⚠️ #app div not found"); } } catch (error) { codkLog("⚠️ Error clearing spinner:", error); } }; window.addEventListener('codking-svelte-ready', function() { codkLog("πŸŽ‰ TDD Phase 3: Received 'codking-svelte-ready' event!"); requestAnimationFrame(function() { clearSpinner(); setTimeout(function() { clearSpinner(); }, 50); }); }); const closeModal = function(isManualClose = true) { window.codkModalShowingSpinner = false; if (window.codkSvelteReadyPollId) { clearInterval(window.codkSvelteReadyPollId); window.codkSvelteReadyPollId = null; } codkLog("πŸ”΅ ========== CLOSING MODAL ==========", { isManualClose }); const iframeElement = document.getElementById('codk-full-modal-svelte'); if (!iframeElement) { codkLog("❌ CRITICAL: iframe element not found!"); return; } if (iframeElement !== iframe) { codkLog("⚠️ WARNING: iframe variable doesn't match DOM element!"); } const scrollY = window.codkScrollY || 0; codkLog("πŸ”΅ Saved scroll position:", scrollY); codkLog("πŸ”΅ Hiding iframe (CSS from Svelte)..."); 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'); } codkLog("πŸ”΅ Body styles cleared"); if (scrollY > 0) { window.scrollTo(0, scrollY); codkLog("πŸ”΅ Scrolled to:", scrollY); } else { window.scrollTo(0, 0); codkLog("πŸ”΅ Scrolled to top"); } try { if (iframe && iframe.contentWindow && iframe.contentWindow.appStore) { setTimeout(function() { iframe.contentWindow.appStore.update(function(state) { return { ...state, isOpen: false }; }); codkLog("βœ… Svelte modal state updated to closed"); }, 0); } } catch (error) { codkLog("⚠️ Could not update Svelte store:", error); } if (typeof window.codkIsProcessing !== 'undefined') { window.codkIsProcessing = false; } window.codkScrollY = 0; codkLog("βœ… ========== MODAL CLOSE COMPLETE =========="); }; window.addEventListener('message', function(event) { codkLog("πŸ”΅ Received message from iframe:", event.data, event.origin); var closeModalMessage = event.data === 'codk-close-modal' || (Array.isArray(event.data) && event.data[0] === 'codk-close-modal'); if (closeModalMessage) { if (window.codkModalShowingSpinner === true) { codkLog("⏳ Ignoring 'codk-close-modal' while spinner is showing (Svelte not ready yet) - keeps modal open on Safari/redirect"); return; } codkLog("βœ… Received 'codk-close-modal' message - calling closeModal()"); closeModal(true); return; } if (event.data && typeof event.data === 'object' && event.data.type === 'codking:reattachButtonBlock') { if (buttonBlocking && typeof buttonBlocking.observeButtons === 'function') { buttonBlocking.observeButtons(); codkLog("βœ… Re-attached button block listeners (cart drawer mutation from Svelte)"); } 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'; codkLog("βœ… Updated iframe height from content:", { contentHeight: height, appliedHeight: maxHeight, viewportHeight: window.innerHeight }); } return; } if (Array.isArray(event.data) && event.data.length >= 1 && (event.data[0] === 'null' || event.data[0] == null)) { return; } codkLog("ℹ️ Ignoring message (not recognized):", event.data); }); 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; } // Any click inside Shopify's custom element (including inner overlays) 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; } } // Optional: some themes (e.g. TPO) add .tpo-buy-it-now-btn β€” most shops do not. // When absent, the user clicks the real button and checkShopifyBuyNowButtons() // returns true on the first isShopifyBuyNowButton(clickedButton) check. // TPO overlay sits as sibling of shopify-accelerated-checkout, so querySelector // from the overlay never finds the