Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Developers, Mods and Updaters
 PHP Mods
 Create New Account uncaught type error
Author « Topic »  

kmkelso
Starting Member

USA
48 Posts

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

midvalleydrifter001
Ecommerce Template Expert

USA
912 Posts

Posted - 10/20/2022 :  20:10:17  
I just tried it on my site and it does the same thing.

My error was this:

Uncaught TypeError: Cannot read properties of null (reading 'value')
at co2displaynewaccount (cart.php:1073:81)
at HTMLInputElement.onclick (cart.php:656:201)


Uncaught TypeError: Cannot read properties of null (reading 'style')
at XMLHttpRequest.co2newacctcallback (cart.php:1058:42)



v7.5.3
PHP 8.0.21

Edited by - midvalleydrifter001 on 10/20/2022 20:15:36

kmkelso
Starting Member

USA
48 Posts

Posted - 10/22/2022 :  09:13:06  
This issue is now resolved in update 7.5.4. Thanks Vince!

Best,
Karl
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000