Nejprodávanější

Řazení produktů

9 položek celkem

Výpis produktů

wz532
269 Kč / ks
Kód: SOWZ532
Chytrá LED žárovka GoSmart A65 / E27 / 14 W (94 W) / 1 400 lm / RGB / stmívatelná / Zigbee Kód: EMZQZ516R
Chytrá LED žárovka GoSmart A60 / E27 / 11 W (75 W) / 1 050 lm / RGB / stmívatelná / Zigbee Kód: EMZQZ515R
Chytrá LED žárovka GoSmart A60 / E27 / 9 W (60 W) / 806 lm / RGB / stmívatelná / Zigbee Kód: EMZQZ514R
Chytrá LED žárovka GoSmart A65 / E27 / 14 W (94 W) / 1 400 lm / RGB / stmívatelná / WiFi
Akce
Kód: EMZQW516R
Chytrá LED žárovka GoSmart A60 / E27 / 11 W (75 W) / 1 050 lm / RGB / stmívatelná / WiFi
Akce
Kód: EMZQW515R
Chytrá LED žárovka GoSmart A60 / E27 / 9 W (60 W) / 806 lm / RGB / stmívatelná / WiFi
Akce
Kód: EMZQW514R
naf1e96ct8xp
279 Kč / ks
Kód: NEZLS532W
pf4ku605oq78
339 Kč / ks
Kód: NEZLS535W

Ovládací prvky výpisu

9 položek celkem

Grafický návrh vytvořil a na Shoptet implementoval Tomáš Hlad & Shoptetak.cz.

(function() { // Funkce pro načtení skladů z feedu Napojse async function loadSupplierStock() { const productCodeEl = document.querySelector('[data-product-code]'); if (!productCodeEl) return; const productCode = productCodeEl.dataset.productCode; // Proxy pro načtení feedu (kvůli CORS) const feedURL = "https://api.allorigins.win/raw?url=" + encodeURIComponent("https://klient.napojse.cz/suppliers/feeds/6196?password=53036c68fa3acd0758c65cb2ba27ac33"); try { const response = await fetch(feedURL); const xmlText = await response.text(); const parser = new DOMParser(); const xml = parser.parseFromString(xmlText, "text/xml"); const items = xml.querySelectorAll("SHOPITEM"); let supplierStock = null; items.forEach(function(item) { const code = item.querySelector("CODE")?.textContent || item.querySelector("PRODUCTCODE")?.textContent || item.querySelector("EAN")?.textContent; if (code === productCode) { const warehouse = item.querySelector("STOCK WAREHOUSES WAREHOUSE VALUE"); if (warehouse) supplierStock = warehouse.textContent; } }); if (!supplierStock) return; insertSupplierStock(supplierStock); } catch (e) { console.log("Napojse feed error", e); } } // Funkce pro vložení skladu dodavatele do doplňku function insertSupplierStock(supplierStock) { const table = document.querySelector(".store-availability table tbody"); if (!table) return; if (document.querySelector(".supplier-stock-row")) return; const row = document.createElement("tr"); row.className = "supplier-stock-row"; row.innerHTML = ` Sklad dodavatele ${supplierStock} ks `; table.appendChild(row); } // Čekání, aby doplněk měl čas se načíst function waitForAddon() { let tries = 0; const interval = setInterval(() => { const table = document.querySelector(".store-availability table tbody"); if (table) { loadSupplierStock(); clearInterval(interval); } tries++; if (tries >= 30) clearInterval(interval); // max 30 pokusů }, 300); } document.addEventListener("DOMContentLoaded", waitForAddon); })();