-10% isWishlisted = val, (val) => isWishlisted = val); } else { fetch('https://e-market.kisanagriconnect.com/wishlist/toggle', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]')?.content }, body: JSON.stringify({ product_id: 10 }) }).then(r => r.json()).then(data => { isWishlisted = data.added; if (window.wishlistFx && typeof window.wishlistFx.updateBadgeCounts === 'function') { window.wishlistFx.updateBadgeCounts(data.wishlist_count, 0); } else { const wc = document.getElementById('wc'); if (wc) wc.textContent = data.wishlist_count; const mwc = document.getElementById('mobileWc'); if (mwc) mwc.textContent = data.wishlist_count; } window.dispatchEvent(new CustomEvent('wishlist-updated', { detail: data })); }).catch(() => {}); } "> Kisan Krishi Kendra IFFCO DAP 50kg (Di-Ammonium Phosphate) ★★★★★ 4.8 (220) ₹1,350 ₹1,500 Add to cart 0
-13% isWishlisted = val, (val) => isWishlisted = val); } else { fetch('https://e-market.kisanagriconnect.com/wishlist/toggle', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]')?.content }, body: JSON.stringify({ product_id: 2 }) }).then(r => r.json()).then(data => { isWishlisted = data.added; if (window.wishlistFx && typeof window.wishlistFx.updateBadgeCounts === 'function') { window.wishlistFx.updateBadgeCounts(data.wishlist_count, 0); } else { const wc = document.getElementById('wc'); if (wc) wc.textContent = data.wishlist_count; const mwc = document.getElementById('mobileWc'); if (mwc) mwc.textContent = data.wishlist_count; } window.dispatchEvent(new CustomEvent('wishlist-updated', { detail: data })); }).catch(() => {}); } "> Kisan Krishi Kendra Urea Fertilizer 50kg Neem Coated ★★★★★ 4.7 (312) ₹1,050 ₹1,200 Add to cart 0