From ce1e3791a1fd155bb42f81d1154f0c0ae990ebaf Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 14 May 2026 10:04:52 +0700 Subject: [PATCH] update(seo): update seo --- assets/js/hero.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/assets/js/hero.js b/assets/js/hero.js index 8831bb8..d81660c 100644 --- a/assets/js/hero.js +++ b/assets/js/hero.js @@ -39,6 +39,20 @@ document.addEventListener("DOMContentLoaded", () => { const heroInput = document.getElementById("hero-input"); const typewriterEl = document.getElementById("typewriter-title"); + // Hero search: open store picker, then redirect to {STORE_URL}/catalogsearch/result/?q=... + const buySearchForm = document.querySelector("#buy-section .hero-search-form"); + if (buySearchForm) { + buySearchForm.addEventListener("submit", (e) => { + e.preventDefault(); + const q = (heroInput?.value || "").trim(); + if (!q) return; + const slug = `catalogsearch/result/?q=${encodeURIComponent(q)}`; + if (typeof window.openStoreModal === "function") { + window.openStoreModal(slug); + } + }); + } + // Multi-stage Typewriter Sequence const typeStrings = [ "Network hardware sourcing made simple", -- 2.39.2