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
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Create New Account - uncaught type error
Author « Topic »  

kmkelso
Starting Member

USA
48 Posts

Posted - 10/21/2022 :  09:51:05  
(note: originally posted this in Developer mods, then realized it was wrong forum. p.s. MidValleyDrifter notes the same issue).

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
945 Posts

Posted - 10/21/2022 :  17:39:07  
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

Vince
Administrator

42944 Posts

Posted - 10/22/2022 :  04:52:34  
Hi all
This is fixed now and I've added the fix to the v7.4 and v7.5 updaters to the inccart.php (and inccart.asp for ASP users) files. Can you give it a go and let me know if everything is ok now?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

midvalleydrifter001
Ecommerce Template Expert

USA
945 Posts

Posted - 10/22/2022 :  08:19:18  
That fixed it.

Thanks Vince

Patrick

kmkelso
Starting Member

USA
48 Posts

Posted - 10/22/2022 :  09:11:00  
I confirm its working now for my sites as well. Thanks very much Vince for your prompt reply and assistance with this. Very Much appreciated!

Best,
Karl

1818charlie
ECT Moderator

United Kingdom
1201 Posts

Posted - 10/23/2022 :  04:36:19  
Hi Vince

Would that latest update be 7.5.4.001 or will it still be 7.5.4.000? I'm seeing 7.5.4.000 in the incfunctions file; just curious!

-----------------------------------------------
Steve
Manchester UK

How to update your store
https://www.ecommercetemplates.com/updater_info.asp

QuickBuy, Product & Product Details Layouts
https://www.ecommercetemplates.com/help/layouts.asp

User Manual - an easy read!
https://www.ecommercetemplates.com/free_downloads.asp#usermanual

Request Updater
https://www.ecommercetemplates.com/updaters.asp

Vince
Administrator

42944 Posts

Posted - 10/23/2022 :  14:12:45  
Hi Steve
Good point and the sub-version number should have been changed (but wasn't) so I've done that now.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

1818charlie
ECT Moderator

United Kingdom
1201 Posts

Posted - 10/23/2022 :  16:22:01  
Cheers Vince

-----------------------------------------------
Steve
Manchester UK

How to update your store
https://www.ecommercetemplates.com/updater_info.asp

QuickBuy, Product & Product Details Layouts
https://www.ecommercetemplates.com/help/layouts.asp

User Manual - an easy read!
https://www.ecommercetemplates.com/free_downloads.asp#usermanual

Request Updater
https://www.ecommercetemplates.com/updaters.asp
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000