Complete Your Details

function handleSigninFormSubmit(e) { e.preventDefault(); const customerDetails = { name: document.getElementById("customer-name").value, email: document.getElementById("customer-email").value, phone: document.getElementById("customer-phone").value, }; const product = JSON.parse(localStorage.getItem('productData')); const orderDetails = { ...customerDetails, product, }; // Save sign-in state and data localStorage.setItem('isSignedIn', 'true'); localStorage.setItem('productData', JSON.stringify(orderDetails)); // Redirect back to checkout.html window.location.href = "/checkout.html"; } document.addEventListener('DOMContentLoaded', () => { const form = document.getElementById('signin-form'); form.addEventListener('submit', handleSigninFormSubmit); });