Posted - 10/20/2022 : 18:09:48
Can't figure this one out. Client wants to allow guest checkout without logging in first. However wants to show the option of creating an account during checkout. I removed forcing login which was previously used, by setting $forceclientlogin=false;. This is now a snippet of the includes.php:
$enableclientlogin=true; $allowclientregistration=true; $customeraccounturl="clientlogin.php"; $forceclientlogin=false; $noclientloginprompt=TRUE;
This allows guest checkout as desired. Customer has to enter shipping address info, etc. Problem is if the Create New Account button is clicked on the cart page, as the Ajax box is presented I note in the browser Developers Console the error:
cart.php:459 Uncaught TypeError: Cannot read properties of null (reading 'value') at co2displaynewaccount (cart.php:459:19189) at HTMLInputElement.onclick (cart.php:425:180)
occurs at: ecttrim(document.getElementById('name').value
in: function co2displaynewaccount(){displaynewaccount();document.getElementById('naname').value=ecttrim(document.getElementById('name').value+(document.getElementById('lastname')?' '+document.getElementById('lastname').value:''));document.getElementById('naemail').value=document.getElementById('email').value;}gtag("event","add_shipping_info",{currency:"USD",value:29.95,items:[{item_id:'TEK-SLL',item_name:'Tekna Splash Lite Led',index:1,item_category:'Flashlights',price:29.95}
If I continue entering the new account info (first name/Last name/Address, etc., with different email addresses every time) and click Create Account in the ajax popup window, I note the following error in the Developers console:
cart.php:459 Uncaught TypeError: Cannot read properties of null (reading 'style') at XMLHttpRequest.co2newacctcallback (cart.php:459:18488)
The even stranger thing is, the system actually creates a new account. However, it re-displays the Ajax Create Account popup window as if stuck in a loop. Only way out of that is to close the window.
Best, Karl
|