Luxury Perfumes

Showing 1–12 of 39 results

Shopping Cart
Scroll to Top
document.addEventListener('DOMContentLoaded', function () { let currentPage = 1; const loadMoreBtn = document.querySelector('#load-more-btn'); const productContainer = document.querySelector('.elementor-widget-wc-products .products'); if (!loadMoreBtn || !productContainer) return; loadMoreBtn.addEventListener('click', function () { currentPage++; fetch(`/?paged=${currentPage}`) .then(res => res.text()) .then(data => { const parser = new DOMParser(); const newDoc = parser.parseFromString(data, 'text/html'); const newProducts = newDoc.querySelectorAll('.elementor-widget-wc-products .products > li'); newProducts.forEach(item => productContainer.appendChild(item)); // Hide button if no more products found if (newProducts.length === 0) { loadMoreBtn.style.display = 'none'; } }); }); });