bazaarbondhu44@gmail.com
01717-282744
āĻŦāĻžāĻāĻžāϰ āĻŦāύā§āϧā§
Home
Shop
Blog
Contact
Login
0
ā§ŗ0
đ° Filter by Price
ā§ŗ0 - ā§ŗ200
ā§ŗ201 - ā§ŗ500
ā§ŗ501 - ā§ŗ1000
ā§ŗ1001+
đ Reset
đ Products by Category (ā§ŗ201 - ā§ŗ500)
āĻĢāĻžāϏā§āĻ-āĻĢā§āĻĄ
Chicken Special Cheese Pizza (8")
ā§ŗ300.00
View Details
Chicken Special Cheese Pizza (7")
ā§ŗ250.00
View Details
See More in āĻĢāĻžāϏā§āĻ-āĻĢā§āĻĄ
×
All Categories
āĻĢāϞ
āĻĢāĻžāϏā§āĻ-āĻĢā§āĻĄ
āĻŦāĻŋāϰā§āĻžāύā§-āĻāĻāĻā§āĻŽ
āĻŽāĻžāĻ
āĻŽā§āĻĻāĻŋ-āĻĒāĻŖā§āϝ
āϏāĻŦāĻāĻŋ
āĻāώā§āϧ
āĻ āύā§āϝāĻžāύā§āϝ
Home
Categories
Cart
Login
/* ====================================== đ Product Slider (Horizontal Carousel) ====================================== */ const track = document.getElementById('slider-track'); const btnLeft = document.querySelector('.btn-left'); const btnRight = document.querySelector('.btn-right'); const productWidth = 170; // product width + margin let visibleProducts = Math.floor(document.querySelector('.slider-container').offsetWidth / productWidth); const totalProducts = track.children.length; let currentIndex = 0; function updateSlider() { if (currentIndex < 0) currentIndex = 0; if (currentIndex > totalProducts - visibleProducts) currentIndex = totalProducts - visibleProducts; const distance = -currentIndex * productWidth; track.style.transform = `translateX(${distance}px)`; } btnRight.addEventListener('click', () => { currentIndex++; updateSlider(); }); btnLeft.addEventListener('click', () => { currentIndex--; updateSlider(); }); setInterval(() => { currentIndex++; if (currentIndex > totalProducts - visibleProducts) { currentIndex = 0; } updateSlider(); }, 3000); // â FIXED: Only reload on desktop window.addEventListener('resize', () => { if (window.innerWidth > 768) { location.reload(); // Only reload for desktop/tablet } }); /* ================================ đ Category Dropdown Toggle ================================ */ const categoryToggle = document.getElementById('categoryToggle'); const categoryWrapper = document.getElementById('categoryWrapper'); const toggleIcon = document.getElementById('toggleIcon'); let isOpen = false; categoryToggle.addEventListener('click', () => { isOpen = !isOpen; if (isOpen) { categoryWrapper.style.maxHeight = categoryWrapper.scrollHeight + 'px'; toggleIcon.classList.replace('fa-chevron-down', 'fa-chevron-up'); } else { categoryWrapper.style.maxHeight = '0'; toggleIcon.classList.replace('fa-chevron-up', 'fa-chevron-down'); } }); /* ================================ đŧī¸ Banner Slider with Dots ================================ */ let slideIndex = 0; const slides = document.querySelectorAll('.mySlides'); const dots = document.querySelectorAll('.dot'); function showSlides(n) { if (n >= slides.length) slideIndex = 0; if (n < 0) slideIndex = slides.length - 1; slides.forEach((slide, i) => { slide.classList.toggle('active', i === slideIndex); }); dots.forEach((dot, i) => { dot.classList.toggle('active', i === slideIndex); }); } function nextSlide() { slideIndex++; showSlides(slideIndex); } function currentSlide(n) { slideIndex = n - 1; showSlides(slideIndex); } setInterval(nextSlide, 3000); showSlides(slideIndex); /* ================================ đ Add to Cart via AJAX ================================ */ document.querySelectorAll('.add-to-cart-form').forEach(form => { form.addEventListener('submit', function (e) { e.preventDefault(); const formData = new FormData(this); fetch('add_to_cart.php', { method: 'POST', body: formData }) .then(res => res.json()) .then(data => { if (data.success) { document.getElementById('cart-count').innerText = data.cart_count; document.getElementById('cart-total').innerText = 'ā§ŗ' + data.total_price; const alertBox = document.getElementById('cart-alert'); alertBox.classList.remove('d-none'); setTimeout(() => { alertBox.classList.add('d-none'); }, 3000); } }); }); }); /* =================================== đ Live Product Search Suggestions =================================== */ const liveSearch = document.getElementById('live-search'); const searchSuggestions = document.getElementById('search-suggestions'); liveSearch.addEventListener('input', function () { const query = this.value.trim(); if (query.length >= 2) { fetch(`live_search.php?term=${encodeURIComponent(query)}`) .then(res => res.json()) .then(data => { searchSuggestions.innerHTML = ''; if (data.length > 0) { data.forEach(product => { const item = document.createElement('a'); item.href = `product_details.php?id=${product.id}`; item.classList.add('list-group-item', 'list-group-item-action', 'd-flex', 'align-items-center'); item.innerHTML = `
${product.name}
`; searchSuggestions.appendChild(item); }); searchSuggestions.style.display = 'block'; } else { searchSuggestions.style.display = 'none'; } }); } else { searchSuggestions.style.display = 'none'; } }); document.addEventListener('click', function (e) { if (!liveSearch.contains(e.target)) { searchSuggestions.style.display = 'none'; } }); /* ================================ đą Highlight Active Mobile Menu ================================ */ const links = document.querySelectorAll('.mobile-menu-link'); const current = window.location.pathname; links.forEach(link => { if (link.getAttribute('href') && current.includes(link.getAttribute('href'))) { link.classList.add('active'); } }); /* ================================ đą Mobile Menu Toggle Button ================================ */ const menuBtn = document.getElementById('mobileMenuBtn'); const mobileMenu = document.getElementById('mobileMenu'); menuBtn.addEventListener('click', () => { mobileMenu.style.display = (mobileMenu.style.display === 'block') ? 'none' : 'block'; }); document.addEventListener('click', function (event) { if (!menuBtn.contains(event.target) && !mobileMenu.contains(event.target)) { mobileMenu.style.display = 'none'; } }); /* ================================ đ Hamburger Menu Toggle ================================ */ document.querySelectorAll('#mobileMenu a').forEach(link => { link.addEventListener('click', () => { document.getElementById('mobileMenu').style.display = 'none'; }); }); /* ================================ đ Mobile Category Dropdown ================================ */