TA Tripadvisor 4.6/5 (25) SB SafariBookings ★ 4.6/5 (5)
+ calcTotal.toLocaleString(); noteEl.textContent = `4x4 Cruiser, guide & ${lodgeTier}`; } else { totalEl.textContent = 'Custom Quote'; noteEl.textContent = `Tailored for ${guests} guest(s) • ${lodgeTier}`; } const est = totalEl.textContent; const summary = `• Safari Tour: ${tourName}\n` + `• Arrival Date: ${date}\n` + `• Travelers: ${guests} (${residency})\n` + `• Lodge Tier: ${lodgeTier}\n` + `• Pickup Hub: ${pickup}\n` + `• UWA Permits: ${permits}\n` + `• Estimated Quote: ${est}\n` + `• Guest Name: ${name}\n` + `• Contact: ${contact}`; const waText = encodeURIComponent(`Hello Angara Tours and Travel! I'd like a direct quote for *${tourName}*:\n\n${summary}`); waLink.href = `https://wa.me{waText}`; return { tourName, date, guests, residency, lodgeTier, pickup, permits, est, name, contact }; } [dateEl, guestsEl, lodgeEl, residencyEl, pickupEl, nameEl, contactEl, permitsEl].forEach(el => { if (el) { el.addEventListener('input', updateCard); el.addEventListener('change', updateCard); } }); emailBtn.addEventListener('click', function () { if (!nameEl.value.trim() || !contactEl.value.trim()) { statusEl.style.display = 'block'; statusEl.style.background = '#fef3c7'; statusEl.style.color = '#92400e'; statusEl.textContent = 'Please enter your Full Name and Email/WhatsApp so we can send your quote.'; return; } const data = updateCard(); emailBtn.disabled = true; emailBtn.textContent = 'Sending Inquiry...'; statusEl.style.display = 'none'; fetch('https://formsubmit.co', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify({ _subject: `Safari Quote Request: ${data.tourName} (${data.guests} Guests)`, Tour: data.tourName, Arrival_Date: data.date, Travelers: `${data.guests} (${data.residency})`, Lodge_Tier: data.lodgeTier, Pickup_Hub: data.pickup, UWA_Permits: data.permits, Estimated_Total: data.est, Guest_Name: data.name, Guest_Contact: data.contact }) }) .then(res => res.json()) .then(() => { statusEl.style.display = 'block'; statusEl.style.background = '#e7f5ec'; statusEl.style.color = '#14532d'; statusEl.textContent = '✓ Sent directly to Angara Tours and Travel! Our Pakwach desk will reply shortly.'; emailBtn.disabled = false; emailBtn.textContent = '✉ Send Inquiry to Angara Tours and Travel'; }) .catch(() => { statusEl.style.display = 'block'; statusEl.style.background = '#fde8e8'; statusEl.style.color = '#9b1c1c'; statusEl.textContent = 'Could not send right now. Please tap the WhatsApp button above for an instant response.'; emailBtn.disabled = false; emailBtn.textContent = '✉ Send Inquiry to Angara Tours and Travel'; }); }); updateCard(); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initAngaraCard); } else { initAngaraCard(); } })(); + totalEstimate.toLocaleString(); } // 6. Sync WhatsApp & Email Links with the calculated estimate const userContact = contactInput ? contactInput.value.trim() : ''; const companyWhatsApp = '256781541372'; const companyEmail = 'infi@angaratours.com'; const messageText = `Hello Angara Tours!\n` + `Trip: ${tripName}\n` + `Travelers: ${numPeople}\n` + `Live Estimate: ${totalEstimate.toLocaleString()}\n` + (userContact ? `My Contact: ${userContact}` : ''); const encodedMessage = encodeURIComponent(messageText); const encodedSubject = encodeURIComponent(`Safari Inquiry: ${tripName}`); const whatsappBtn = document.getElementById('angFwWhatsappLink'); const emailBtn = document.getElementById('angFwEmailLink'); if (whatsappBtn) { whatsappBtn.href = `https://wa.me{companyWhatsApp}?text=${encodedMessage}`; } if (emailBtn) { emailBtn.href = `mailto:${companyEmail}?subject=${encodedSubject}&body=${encodedMessage}`; } } // Run once when the page loads so the initial estimate shows immediately document.addEventListener('DOMContentLoaded', syncAngaraFWLinks);