When I try to create an account on the checkout page with products in my cart I get an error like:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data OK
If I then press F5 the account will be created and I can go on with the order without problems.
This problem will not occur if the customer first creates the account and then places products in the cart and go to the checkout page.
Someone who has seen this and has some ideas?
Attachments
checkout.PNG (31.44 KiB) Viewed 2141 times
My guess is that is is due to the "where did you hear about us" add-on you have there, I bet you do not show that when a customer is already registered.
So maybe disable that add-on and test if you still have that error.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
turn that on, select the network tab and go thru the same sequence and check what the ajax calls like
index.php?route=checkout/checkout/country&country_id=xxx
return as json response strings.
something like:
{"country_id":"206","name":"Taiwan","iso_code_2":"TW","iso_code_3":"TWN","address_format":"","postcode_required":"0","zone":[{"zone_id":"3135","country_id":"206","name":"Chang-hua","code":"CH","status":"1"},{"zone_id":"3154","country_id":"206","name":"Chi-lung","code":"CL","status":"1"},{"zone_id":"3136","country_id":"206","name":"Chia-i","code":"CI","status":"1"},{"zone_id":"3153","country_id":"206","name":"Chia-i city","code":"CC","status":"1"},{"zone_id":"3155","country_id":"206","name":"Hsin-chu city","code":"HC","status":"1"},{"zone_id":"3137","country_id":"206","name":"Hsin-chu county","code":"HS","status":"1"},{"zone_id":"3138","country_id":"206","name":"Hua-lien","code":"HL","status":"1"},{"zone_id":"3139","country_id":"206","name":"I-lan","code":"IL","status":"1"},{"zone_id":"3158","country_id":"206","name":"Kao-hsiung city","code":"KC","status":"1"},{"zone_id":"3140","country_id":"206","name":"Kao-hsiung county","code":"KH","status":"1"},{"zone_id":"3141","country_id":"206","name":"Kin-men","code":"KM","status":"1"},{"zone_id":"3142","country_id":"206","name":"Lien-chiang","code":"LC","status":"1"},{"zone_id":"3143","country_id":"206","name":"Miao-li","code":"ML","status":"1"},{"zone_id":"3144","country_id":"206","name":"Nan-t'ou","code":"NT","status":"1"},{"zone_id":"3145","country_id":"206","name":"P'eng-hu","code":"PH","status":"1"},{"zone_id":"3146","country_id":"206","name":"P'ing-tung","code":"PT","status":"1"},{"zone_id":"3156","country_id":"206","name":"T'ai-chung","code":"TH","status":"1"},{"zone_id":"3147","country_id":"206","name":"T'ai-chung","code":"TG","status":"1"},{"zone_id":"3148","country_id":"206","name":"T'ai-nan","code":"TA","status":"1"},{"zone_id":"3157","country_id":"206","name":"T'ai-nan","code":"TN","status":"1"},{"zone_id":"3159","country_id":"206","name":"T'ai-pei city","code":"TC","status":"1"},{"zone_id":"3149","country_id":"206","name":"T'ai-pei county","code":"TP","status":"1"},{"zone_id":"3150","country_id":"206","name":"T'ai-tung","code":"TT","status":"1"},{"zone_id":"3151","country_id":"206","name":"T'ao-yuan","code":"TY","status":"1"},{"zone_id":"3152","country_id":"206","name":"Yun-lin","code":"YL","status":"1"}],"status":"1"}
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
/catalog/controller/checkout/register.php:246
$this->response->setOutput(json_encode($json));
The code abow sends a junk character when $json is empty. the character is: \ufeff and that cause the error.
How do I get rid of it?
I'm not a programmer
So you have an encoding issue there.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Check those files are saved as UTF-8 and not UTF-8-BOM or UTF-16-BOM
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Users browsing this forum: No registered users and 98 guests