Nejprodávanější

Řazení produktů

178 položek celkem

Výpis produktů

wm 50w pp 1
909 Kč / ks
Kód: SOWM-50W-PP-1
wm 50w l
579 Kč / ks
Kód: SOWM-50W-L
wm 50w fvq
Kód: SOWM-50W-FVQ
wm 30ws q
419 Kč / ks
Kód: SOWM-30WS-Q
wm 30ws l
549 Kč / ks
Kód: SOWM-30WS-L
wm 30w re
939 Kč / ks
Kód: SOWM-30W-RE
wm 30w q
249 Kč / ks
Kód: SOWM-30W-Q
wm 30w l
369 Kč / ks
Kód: SOWM-30W-L
wm 30w feq
Kód: SOWM-30W-FEQ
wm 20ws q
349 Kč / ks
Kód: SOWM-20WS-Q
wm 20ws l
409 Kč / ks
Kód: SOWM-20WS-L
wm 20w re
689 Kč / ks
Kód: SOWM-20W-RE
wm 20w q
199 Kč / ks
Kód: SOWM-20W-Q
wm 20w l
239 Kč / ks
Kód: SOWM-20W-L
wm 150 s
Kód: SOWM-150-S
wm 10ws q
299 Kč / ks
Kód: SOWM-10WS-Q
wm 10ws l
349 Kč / ks
Kód: SOWM-10WS-L

Ovládací prvky výpisu

178 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); })();