Page 1 of 1

Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Tue Jul 05, 2011 3:33 am
by xerath
Hey Guys,

Getting this error on checkout on select payment method;

SyntaxError: JSON.parse

Nothing in error log, nothing anywhere else!

Any ideas? :( Help!

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Tue Jul 05, 2011 8:28 am
by Qphoria
This is typically due to the payment module having an error. The problem with the new checkout is that it is loaded with json and it never shows the php error. Check your system log and try another payment. Contact the author of the payment module you are trying

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Tue Jul 05, 2011 11:19 pm
by xerath
Checked the error log and nothing in there...

I disabled all but "cash on delivery" and still getting the same error, even with "cheque / postal order"... doesn't seem to be a way around it

I wish I could catch an error and identify the problen but it gives nothing away :(

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Tue Jul 05, 2011 11:24 pm
by xerath
Also replaced confirm and shipping language / controller / view with defaults and no change...

Is there anything additional passed at THIS stage (payment method) that's not passed anywhere else in the checkout process?

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Sat Aug 20, 2011 8:49 pm
by bobbyh
Having the same issues: SyntaxError: JSON.parse: unexpected character when going onto the payment.tpl page of the checkout. Am using Paypal website payment pro and version 1.5.0 of OC.

Do you have any ideas on how to fix this or if you got round it somehow?

Many thanks

Bob

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Sat Aug 20, 2011 9:59 pm
by uksitebuilder
This is a guess, does your store name have a single quote character in it ?

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Sat Aug 20, 2011 10:04 pm
by xerath
use firebug to read the JSON error from your browser..

I had put some additional logic in order.php that had an error, but this is how it presented itself!

Re: Suddenly 'SyntaxError: JSON.parse' on checkout :(

Posted: Sun Aug 21, 2011 1:12 am
by Qphoria
The error depends on what step.
If its before the shipping options load, then one of your shipping modules has a bug
if its before the payment choice then its one of your payment module's "model" or "language" file bug
if its after the payment choice, but before the final step loads, then its a payment "controller" file bug

This error has been discussed ad nauseum