import wixData from 'wix-data'; let skip = 0; const limit = 9; let isLoading = false; $w.onReady(() => { loadMoreProducts(); // OPTIONAL: If using button for load more // $w("#loadMore").onClick(() => { // loadMoreProducts(); // }); // Auto scroll trigger $w("#repeater1").onViewportEnter(() => { loadMoreProducts(); }); }); function loadMoreProducts() { if (isLoading) return; isLoading = true; wixData.query("Products") .skip(skip) .limit(limit) .find() .then((results) => { if (results.items.length > 0) { const newItems = results.items; const currentItems = $w("#repeater1").data || []; $w("#repeater1").data = [...currentItems, ...newItems]; skip += limit; } else { // No more products $w("#loadMore").hide(); // if using button } isLoading = false; }); } Trending MetroNeeds Deals

🔥 Trending MetroNeeds' Deals

Loading deals...
top of page

Home Automation

Smart devices for home automation, making everyday tasks easier and more efficient.
Smart devices for home automation, making everyday tasks easier and more efficient.
bottom of page
import wixData from 'wix-data'; let skip = 0; const limit = 9; let isLoading = false; $w.onReady(() => { loadMoreProducts(); // OPTIONAL: If using button for load more // $w("#loadMore").onClick(() => { // loadMoreProducts(); // }); // Auto scroll trigger $w("#repeater1").onViewportEnter(() => { loadMoreProducts(); }); }); function loadMoreProducts() { if (isLoading) return; isLoading = true; wixData.query("Products") .skip(skip) .limit(limit) .find() .then((results) => { if (results.items.length > 0) { const newItems = results.items; const currentItems = $w("#repeater1").data || []; $w("#repeater1").data = [...currentItems, ...newItems]; skip += limit; } else { // No more products $w("#loadMore").hide(); // if using button } isLoading = false; }); } // ========================== // MetroNeeds + Modulyfe Enhanced Automation // Paste this in Wix → Settings → Custom Code // ========================== import { oneClickDeploy, scheduledDeploy } from 'backend/autoDeploy.jsw'; import { deployTwoSites } from 'backend/liveDeployTwoSites.jsw'; $w.onReady(async function () { // ===== 1. GLOBAL VARIABLES ===== const SCROLL_BATCH = 3; // Products per batch let metroSkip = 0; let modulyfeSkip = 0; // ===== 2. POPULATE REPEATERS WITH INFINITE SCROLL ===== async function populateRepeaters(skipMetro = 0, skipModulyfe = 0) { try { const liveData = await deployTwoSites(); // --- MetroNeeds --- const metroBatch = liveData.metroneeds.products.slice(skipMetro, skipMetro + SCROLL_BATCH); $w("#repeater1Metro").data = metroBatch; $w("#bannerRepeaterMetro").data = rotateArray(liveData.metroneeds.banners); $w("#videoRepeaterMetro").data = rotateArray(liveData.metroneeds.videos); $w("#videoRepeaterMetro").onItemReady(($item, itemData) => { $item("#youtubeFrameMetro").src = itemData.url; $item("#videoTitleMetro").text = itemData.title; $item("#ctaButtonMetro").link = `https://jaysonlinereviews.com/go/offerlab/?nipid=${Date.now()}-${itemData.title}`; }); // --- Modulyfe --- const modBatch = liveData.modulyfe.products.slice(skipModulyfe, skipModulyfe + SCROLL_BATCH); $w("#repeater1Modulyfe").data = modBatch; $w("#bannerRepeaterModulyfe").data = rotateArray(liveData.modulyfe.banners); $w("#videoRepeaterModulyfe").data = rotateArray(liveData.modulyfe.videos); $w("#videoRepeaterModulyfe").onItemReady(($item, itemData) => { $item("#youtubeFrameModulyfe").src = itemData.url; $item("#videoTitleModulyfe").text = itemData.title; $item("#ctaButtonModulyfe").link = `https://jaysonlinereviews.com/go/offerlab/?nipid=${Date.now()}-${itemData.title}`; }); } catch(err) { console.error("Error populating repeaters:", err); } } // ===== 3. ROTATION HELPER ===== function rotateArray(arr) { if (!arr || arr.length <= 1) return arr; const first = arr.shift(); arr.push(first); return arr; } // ===== 4. INITIAL POPULATION ===== await populateRepeaters(); // ===== 5. INFINITE SCROLL HANDLER ===== $w("#repeater1Metro").onViewportEnter(async () => { metroSkip += SCROLL_BATCH; await populateRepeaters(metroSkip, modulyfeSkip); }); $w("#repeater1Modulyfe").onViewportEnter(async () => { modulyfeSkip += SCROLL_BATCH; await populateRepeaters(metroSkip, modulyfeSkip); }); // ===== 6. ADMIN ONE-CLICK DEPLOY ===== if ($w("#deployButton")) { $w("#deployButton").onClick(async () => { $w("#deployStatus").text = "Deploying latest updates..."; try { const res = await oneClickDeploy(); $w("#deployStatus").text = res.message; metroSkip = 0; modulyfeSkip = 0; // Reset scroll await populateRepeaters(); } catch(err) { console.error(err); $w("#deployStatus").text = "Deployment failed. Check console."; } }); } // ===== 7. ADMIN LIVE PREVIEW ===== if ($w("#previewButton")) { $w("#previewButton").onClick(async () => { try { const previewData = await deployTwoSites(); $w("#repeaterPreviewMetro").data = previewData.metroneeds.products; $w("#repeaterPreviewModulyfe").data = previewData.modulyfe.products; $w("#previewStatus").text = "Preview loaded. No live changes committed."; } catch(err) { console.error(err); $w("#previewStatus").text = "Preview failed. Check console."; } }); } // ===== 8. SCHEDULED AUTOMATIC DEPLOY ===== setInterval(async () => { try { const res = await scheduledDeploy(); console.log("Scheduled deployment executed:", res); metroSkip = 0; modulyfeSkip = 0; // Reset scroll await populateRepeaters(); } catch(err) { console.error("Scheduled deployment failed:", err); } }, 21600000); // Every 6 hours }); // ======================================= // MetroNeeds.in – Final Unified Deploy Snippet // ======================================= import { getSecrets } from 'backend/secureKeys.jsw'; import { oneClickDeploy, scheduledDeploy } from 'backend/autoDeploy.jsw'; import { deployMetroNeeds } from 'backend/liveDeployMetro.jsw'; $w.onReady(async function () { console.log("🚀 MetroNeeds Unified Deploy Loaded"); // ====== 1. GLOBAL CALIBRATIONS ====== const SCROLL_BATCH = 4; // Products per scroll const AUTO_DEPLOY_INTERVAL = 21600000; // 6 hours let skipCount = 0; // ====== 2. SECRETS (affiliate ID, API keys etc.) ====== let secrets = {}; try { secrets = await getSecrets("metrneeds"); console.log("Secrets loaded ✅"); } catch (err) { console.error("Secrets fetch failed:", err); } // ====== 3. POPULATE FRONTEND ====== async function populateMetroNeeds(skip = 0) { try { const data = await deployMetroNeeds(); // Products batch const batch = data.products.slice(skip, skip + SCROLL_BATCH); $w("#repeaterProducts").data = batch; // Banners (rotate on reload) $w("#bannerRepeater").data = rotateArray(data.banners); // Video Blogs $w("#videoRepeater").data = rotateArray(data.videos); $w("#videoRepeater").onItemReady(($item, itemData) => { $item("#youtubeFrame").src = itemData.url; $item("#videoTitle").text = itemData.title; $item("#ctaButton").link = `${secrets.affiliateBase}?nipid=${Date.now()}-${itemData.title}`; }); // Map integration (if available) if (data.map) { $w("#mapWidget").location = data.map.location; $w("#mapWidget").marker = data.map.marker; } } catch (err) { console.error("Error populating MetroNeeds:", err); } } function rotateArray(arr) { if (!arr || arr.length <= 1) return arr; const first = arr.shift(); arr.push(first); return arr; } // ====== 4. INITIAL LOAD ====== await populateMetroNeeds(); // ====== 5. INFINITE SCROLL ====== $w("#repeaterProducts").onViewportEnter(async () => { skipCount += SCROLL_BATCH; await populateMetroNeeds(skipCount); }); // ====== 6. ADMIN CONTROLS ====== if ($w("#deployButton")) { $w("#deployButton").onClick(async () => { $w("#deployStatus").text = "Deploying updates..."; try { const res = await oneClickDeploy(); $w("#deployStatus").text = res.message; skipCount = 0; await populateMetroNeeds(); } catch (err) { console.error(err); $w("#deployStatus").text = "❌ Deployment failed"; } }); } if ($w("#previewButton")) { $w("#previewButton").onClick(async () => { try { const preview = await deployMetroNeeds(); $w("#previewRepeater").data = preview.products; $w("#previewStatus").text = "Preview loaded ✅"; } catch (err) { console.error(err); $w("#previewStatus").text = "❌ Preview failed"; } }); } // ====== 7. AUTO DEPLOY SCHEDULE ====== setInterval(async () => { try { const res = await scheduledDeploy(); console.log("Auto-deploy:", res); skipCount = 0; await populateMetroNeeds(); } catch (err) { console.error("Scheduled deploy failed:", err); } }, AUTO_DEPLOY_INTERVAL); }); // ================================ // Master Endless Scroll Integration // Works for MetroNeeds.in, ModuLyfe.in, PalmSpringsLakeResort.in // ================================ let productIndex = 0; const productsPerLoad = 20; const maxProducts = 1000; function loadProducts() { const container = document.getElementById("product-container"); if (!container) return; for (let i = 0; i < productsPerLoad && productIndex < maxProducts; i++) { productIndex++; const card = document.createElement("div"); card.className = "product-card"; card.innerHTML = `

Product #${productIndex}

Auto-loaded via Endless Scroll

`; container.appendChild(card); if (productIndex % 10 === 0) { const adBlock = document.createElement("div"); adBlock.className = "adsense-slot my-4"; adBlock.innerHTML = ``; container.appendChild(adBlock); if (window.adsbygoogle) window.adsbygoogle.push({}); } } } window.addEventListener("scroll", () => { if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 500) { loadProducts(); } }); document.addEventListener("DOMContentLoaded", () => { loadProducts(); }); /*************************************************** * MASTER UNIFIED VELO SNIPPET * Sites: MetroNeeds.in | ModuLyfe.in | PalmSpringsLakeResort.in * Features: Analytics, Affiliate, UPI, AI, PWA, Lexilexi, StoreHippo ***************************************************/ // ---------------- CONFIG ---------------- const CONFIG = { googleAnalyticsId: "G-XXXXXXXXXX", // GA4 ID metaPixelId: "META-PIXEL-ID", // Meta Pixel ID amazonAffiliateId: "metroneeds-21", // Affiliate ID upiId: "yourupi@upi", // UPI ID lexilexiSiteId: "YOUR_LEXILEXI_SITE_ID", // Lexilexi widget/site key perplexityApiKey: "PERPLEXITY_API_KEY", // Perplexity API key metroSheet: "https://docs.google.com/spreadsheets/d/e/YOUR_METRONEEDS_SHEET/pub?output=csv", moduSheet: "https://docs.google.com/spreadsheets/d/e/YOUR_MODULYFE_SHEET/pub?output=csv", storeHippoEnterpriseUrl: "https://www.storehippo.com/en/page/enterprise-platinum" }; // ---------------- UTILITY ---------------- function buildAffiliateLink(url) { return url.includes("tag=") ? url : `${url}${url.includes("?") ? "&" : "?"}tag=${CONFIG.amazonAffiliateId}`; } // ---------------- ANALYTICS ---------------- (function(){ // GA4 const ga = document.createElement("script"); ga.async = true; ga.src = `https://www.googletagmanager.com/gtag/js?id=${CONFIG.googleAnalyticsId}`; document.head.appendChild(ga); window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } window.gtag = gtag; gtag("js", new Date()); gtag("config", CONFIG.googleAnalyticsId); // Meta Pixel !(function(f,b,e,v,n,t,s){ if (f.fbq) return; n = f.fbq = function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = "2.0"; n.queue = []; t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s); })(window, document, "script", "https://connect.facebook.net/en_US/fbevents.js"); fbq("init", CONFIG.metaPixelId); fbq("track", "PageView"); })(); // ---------------- ON READY ---------------- $w.onReady(() => { cleanupLegacy(); initSiteFunctions(); injectEnterprisePlatinum(); registerPWA(); injectLexilexi(); }); // ---------------- CLEANUP ---------------- function cleanupLegacy() { document.querySelectorAll("script[data-legacy-snippet]").forEach(el => el.remove()); } // ---------------- SITE LOGIC ---------------- function initSiteFunctions() { const base = wixLocation.baseUrl; if (base.includes("metroneeds.in")) { loadProducts(CONFIG.metroSheet, "#productRepeater"); } else if (base.includes("modulyfe.in")) { loadProducts(CONFIG.moduSheet, "#moduRepeater"); } else if (base.includes("palmspringslakeresort.in")) { initResortBooking(); initHotelSearchAI(); } } // ---------------- PRODUCT LOADING ---------------- async function loadProducts(sheetUrl, repeaterId) { try { const resp = await fetch(sheetUrl); const txt = await resp.text(); const rows = txt.split("\n").slice(1); const items = rows.map(r => { const [title, price, img, url] = r.split(","); return { title, price, img, url }; }); if ($w(repeaterId)) { $w(repeaterId).data = items; $w(repeaterId).onItemReady(($item, itemData) => { $item("#title").text = itemData.title; $item("#price").text = `₹${itemData.price}`; $item("#image").src = itemData.img; $item("#buyNow").link = buildAffiliateLink(itemData.url); }); } } catch (e) { console.error("Product load error:", e); } } // ---------------- PALMSPRINGS BOOKING ---------------- function initResortBooking() { if ($w("#bookNowBtn")) { $w("#bookNowBtn").onClick(() => { wixLocation.to(`https://wa.me/919834193149?text=Booking%20Inquiry`); }); } } // ---------------- PALMSPRINGS AI ---------------- function initHotelSearchAI() { if ($w("#hotelSearchBox") && $w("#hotelResults")) { $w("#hotelSearchBtn").onClick(async () => { const query = $w("#hotelSearchBox").value; try { const res = await fetch("https://api.perplexity.ai/search", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${CONFIG.perplexityApiKey}` }, body: JSON.stringify({ query }) }); const data = await res.json(); $w("#hotelResults").text = data?.answer || "No results found."; } catch (err) { console.error("AI search error:", err); $w("#hotelResults").text = "Error retrieving hotel info."; } }); } } // ---------------- STOREHIPPO CALLOUT ---------------- function injectEnterprisePlatinum() { const container = $w("#enterprisePlatinumSection"); if (!container) return; container.html = `

🔐 Enterprise Platinum Solutions

Scale your eCommerce with StoreHippo’s Enterprise Platinum infrastructure.

Learn more at StoreHippo →
`; } // ---------------- LEXILEXI WIDGET ---------------- function injectLexilexi() { if (!CONFIG.lexilexiSiteId) return; const s = document.createElement("script"); s.src = `https://cdn.lexilexi.ai/widget.js?site=${CONFIG.lexilexiSiteId}`; s.async = true; document.body.appendChild(s); } // ---------------- PWA ---------------- function registerPWA() { if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/service-worker.js") .catch(err => console.error("SW registration failed:", err)); } }

3SC Review Integrations

🏖️
Palm Springs
Lake Resort Airoli
Post Review →
🛒
MetroNeeds
E-comm Essentials
Post Review →
🏠
ModuLyfe
Modular Living
Post Review →
✅ All 3 Sites Linked | Updated Jan 2026
👆 Tap icons for site-specific actions

3SC AI Reels

https://www.amazon.in/Ganpati-Sheesham-Storage-Furniture-Bedroom/dp/B09T3LV7NW?crid=FY3L9RYYJ0SY&dib=eyJ2IjoiMSJ9.HfJeVthsC4LwL10ngebWkW4xDh1uji3jfGHgbaT2O90T8lqp7-_6m3siSglx0PcT_s6q342bQTM5MA2tt9niZmH-cNdqwhNbUFqjqjKxo9fzMnpGEfcmooHer_8ey5JaKyWh8z5lp0EPnUJFbDYvxN-l0DJkWTSaPDxi6n4WqLePwBIpK8LWGTnuISI7Q7ynQZXUIyz2Xgbdk5w3jrOQq5OuFoDqn-lJkCixJsXHfwdBdI1Hjzh29JHKrXv2LF6XDg0eQNmg2WjUoWKMjrBUz0AIjwuokTGqlYcCjuppYPY.YXbhthAI4ZnP0Aj7uZf1tlxrSyfhTonmS9TN1-irJfM&dib_tag=se&keywords=6%27%2B%C3%97%2B7%27bed&qid=1770775653&s=kitchen&sprefix=6%27%2B7%27bed%2B%2Ckitchen%2C426&sr=1-10&th=1&linkCode=ll2&tag=metroneeds0f-21&linkId=831a268c895b8b69ce372a9063da78ef&ref_=as_li_ss_tl