Nejprodávanější

Řazení produktů

178 položek celkem

Výpis produktů

6krqh2gxi3ob
LED reflektor + PIR 24W / 4000K - LFX221
Skladem u dodavatele (5 ks)
879 Kč / ks
Kód: NELFX221
tcw10fxgau67
LED reflektor + PIR 24W / 4000K - LFX121
Skladem u dodavatele (5 ks)
879 Kč / ks
Kód: NELFX121
ezipfxgk2njw Kód: NELFX225
x981m36jtfn4
829 Kč / ks
Kód: NEWL25R
haqvpum1f62b
1 190 Kč / ks
Kód: NEWL26R
u78kao1trfh5
569 Kč / ks
Kód: NEWL21R
8zo9satyvxrj
929 Kč / ks
Kód: NEWL22R
4stc16hkqbzo
429 Kč / ks
Kód: NEWL20R
2pfcziam59sk
739 Kč / ks
Kód: NELF0025
at5os8k4m0ne
LED bílý reflektor 20W / 4000K - LF0122
Skladem u dodavatele (5 ks)
199 Kč / ks
Kód: NELF0122
hsa7mnk96oei
449 Kč / ks
Kód: NELF0122S
6a0byfiq89xz
629 Kč / ks
Kód: NELF0024S
nxze95b3kuyv
139 Kč / ks
Kód: NELF7021
ofpks4xv5n09
209 Kč / ks
Kód: NELF7022
bv56oegsatqc
289 Kč / ks
Kód: NELF7023
9eg7mtl0sf6c
399 Kč / ks
Kód: NELF7024
qjfki8zoau56
619 Kč / ks
Kód: NELF7025
mqcfnkvwah58
139 Kč / ks
Kód: NELF7121

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