Log in

You dont have an account yet? Register Now

11
    11
    Shporta e juaj!
    GOTA EXCLUSIVE RUM 21.5CL
    GOTA EXCLUSIVE RUM 21.5CL
    Qty: 1
    Price: 1.99
    1.99
    Tavolinë Salloni - K47-662
    Tavolinë Salloni - K47-662
    Qty: 1
    Price: 199.99
    199.99
    MSGW Gamer R5 A104 PC Gaming
    MSGW Gamer R5 A104 PC Gaming
    Qty: 1
    Price: 699.00
    699.00
    ARZUM AR5220 makine per rroje WET&DRY
    ARZUM AR5220 makine per rroje WET&DRY
    Qty: 1
    Price: 29.90
    29.90
    MS O300 Wrist Pad
    MS O300 Wrist Pad
    Qty: 1
    Price: 9.90
    9.90
    SAMSUNG EP-T4510EXBEGEU 45W ADAPTER
    SAMSUNG EP-T4510EXBEGEU 45W ADAPTER
    Qty: 1
    Price: 39.90
    39.90
    ELECTOLUX KCC83443 Pllake me aspirator
    ELECTOLUX KCC83443 Pllake me aspirator
    Qty: 1
    Price: 1,699.00
    1,699.00
    Mbajtese TV 1442"
    Mbajtese TV 1442"
    Qty: 1
    Price: 9.90
    9.90
    KINGSTON 128GB, EXODIA ONYS Black
    KINGSTON 128GB, EXODIA ONYS Black
    Qty: 1
    Price: 14.90
    14.90
    VIVAX HD-2000 Fem per floke
    VIVAX HD-2000 Fem per floke
    Qty: 1
    Price: 24.90
    24.90
    SAMSUNG SMR-930NZEAEU Galaxy Watch 6
    SAMSUNG SMR-930NZEAEU Galaxy Watch 6
    Qty: 1
    Price: 299.00
    299.00
    document.addEventListener("DOMContentLoaded", function () { let page = 1; let loading = false; let finished = false; const btn = document.getElementById("bt-load-more"); const container = document.getElementById("bt-products"); if (!btn || !container) return; // kjo e shpëton nga error function loadProducts() { if (loading || finished) return; loading = true; btn.innerText = "Duke u ngarkuar..."; fetch(`/wp-admin/admin-ajax.php?action=bt_load_products&page=${page}`) .then(res => res.text()) .then(data => { if (!data.trim()) { finished = true; btn.innerText = "Nuk ka më produkte"; return; } container.insertAdjacentHTML("beforeend", data); page++; loading = false; btn.innerText = "Shiko më shumë produkte"; }); } loadProducts(); // kjo e mbush fillimin btn.addEventListener("click", loadProducts); });