Page 1 of 1
JSON Error When Customer Trys to Register [SOLVED]
Posted: Wed Apr 22, 2015 9:44 pm
by Kenberne1965
Code: Select all
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK
Hi, After searching the whole internet for a solution and not been able to find the solution I'm posting here in hope that somebody can help me fix this issue please.
When a customer trys to Register they get the above error on submission of the address / password etc..
Guest Checkout works fine.
Opencart
Version 2.0.2.0
Ive checked the usual stuff as found on the internet such as Api user key etc.. and all seams well in the database, i even created a new one and assigned that but still the problem exists.. although im not sure this has anything to do with this error as this the same error when people were trying to edit an order..
Can anybody Help please?
http://www.cda-homeappliances.co.uk is the website in question.
Re: JSON Error When Customer Trys to Register
Posted: Mon Jun 01, 2015 7:53 pm
by Kenberne1965
Does anyone know if this issue has been resolved yet? I get this error on quite a few websites using opencart 2.0.2 both on my local machine and online (sites hosted with Servage.net)
Paul
Re: JSON Error When Customer Trys to Register
Posted: Tue Jun 02, 2015 7:36 pm
by PaulSketo
When i had this issue it was solved by changing the admin/config and config.php, i was having errors from ssl looping, please search my
http://forum.opencart.com/viewtopic.php?f=190&t=145497
Re: JSON Error When Customer Trys to Register
Posted: Wed Jun 03, 2015 2:52 pm
by PaulSketo
The most common reason i think with json error on register is that it tries to send an email to your client and it can't, (ping timeout) or wrong/no settings in mail server tab of your opencart.
Re: JSON Error When Customer Trys to Register
Posted: Sat Jun 06, 2015 7:20 pm
by Kenberne1965
Thanks for the reply, Ive tried setting up both Mail() and SMTP but i still get this problem
On checking the Error logs ive found this though which may be the route of the problem
Code: Select all
2015-06-06 11:16:23 - PHP Notice: Error: E-Mail to required! in /mounted-storage/*******/*****/sc34697-CKVO/cda-homeappliances.co.uk/system/library/mail.php on line 61
Any ideas??
Paul
Re: JSON Error When Customer Trys to Register [SOLVED]
Posted: Sat Jun 06, 2015 8:21 pm
by Kenberne1965
turned out to be an error with the email customer method
catalog/model/account/customer.php :line 78 onwards should look like this:-
Code: Select all
$mail->setSubject($this->language->get('text_new_customer'));
$mail->setText($message);
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($this->config->get('config_name'));
$mail->send();
// Send to additional alert emails if new account email is enabled
Please see
http://forum.opencart.com/viewtopic.php?f=190&t=142719 bottom of page 1 for full details.
Thanks to osexperts for the fix
