Community Forums

SyntaxError: JSON.parse: unexpected character

Support for Payment extensions

SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Tue Feb 21, 2012 3:58 pm

Hi Everyone
and thanks to all the pros that help opencart improve
I have a problem with Checkout Confirmation in Choosing Payment Method
I already search the forum for this issue and installed a patch that shows the whole error
I used the firebug too, so I find the error
but i can't solve this, Here is the story

Code: Select all
SyntaxError: JSON.parse: unexpected character
parsererror
<b>Notice</b>: Undefined index:  comment in
<b>/home/gardesho/public_html/catalog/controller/checkout/confirm.php</b> on line
<b>253</b><b>Notice</b>: Undefined index:  payment_method in
<b>/home/gardesho/public_html/catalog/controller/checkout/confirm.php</b> on line
<b>352</b><b>Notice</b>: Error: Could not load controller payment/! in
<b>/home/gardesho/public_html/vqmod/vqcache/vq2-system_engine_controller.php</b> on line <b>49</b>
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby Qphoria » Tue Feb 21, 2012 4:02 pm

The payment module you are trying to load doesn't appear to be working correctly.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19015
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Tue Feb 21, 2012 4:03 pm

on all of the payment methods, i got this error :-\
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby Qphoria » Tue Feb 21, 2012 4:08 pm

Could not load controller payment/! in

Somehow it didn't get the method from step 5 during checkout
But this doesn't happen for anyone else
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19015
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Tue Feb 21, 2012 4:12 pm

thanks Qphoria
so how can i find a solution
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Tue Feb 21, 2012 5:20 pm

I reainstall opencart, and got same error again...
I think its from VQmod
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Tue Feb 21, 2012 5:30 pm

I delete database & install a fresh copy of opencart without VQMOD and without any modules...
the error appears again in Step 5!!!!!!!!!!!!!!!
is it possible that JSON.Parse is not work in my WebHost ? ???
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby alfredooo » Wed Feb 22, 2012 1:07 am

any help?
alfredooo
 
Posts: 6
Joined: Tue Feb 21, 2012 3:54 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby CJMartin » Tue Feb 28, 2012 11:04 am

I have the same problem with my checkout, i get the same error code each time i try to checkout.
I have tried reinstalling vQmod.

Code: Select all
SyntaxError: JSON Parse error: Unrecognized token '<'
parsererror
<b>Notice</b>: Error: Could not load model checkout/extension! in <b>/home/content/91/8979391/html/shop/vqmod/vqcache/vq2-system_engine_loader.php</b> on line <b>39</b>
User avatar
CJMartin
 
Posts: 5
Joined: Tue Feb 28, 2012 11:00 am

Re: SyntaxError: JSON.parse: unexpected character

Postby Qphoria » Tue Feb 28, 2012 11:44 am

CJMartin wrote:I have the same problem with my checkout, i get the same error code each time i try to checkout.
I have tried reinstalling vQmod.

Code: Select all
SyntaxError: JSON Parse error: Unrecognized token '<'
parsererror
<b>Notice</b>: Error: Could not load model checkout/extension! in <b>/home/content/91/8979391/html/shop/vqmod/vqcache/vq2-system_engine_loader.php</b> on line <b>39</b>


This isn't the same thing. You just need this:
viewtopic.php?f=133&t=45863
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19015
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: SyntaxError: JSON.parse: unexpected character

Postby Qphoria » Tue Feb 28, 2012 11:47 am

alfredooo wrote:I delete database & install a fresh copy of opencart without VQMOD and without any modules...
the error appears again in Step 5!!!!!!!!!!!!!!!
is it possible that JSON.Parse is not work in my WebHost ? ???


Sounds more like something is wrong with your sessions not saving. Tho if payment_methods isn't set in the session, it shouldn't even be possible to get to the point where you are seeing the error as it should simply force you to choose payment again.

If it is happening on your site with a fresh install and nobody else is seeing it... It is likely a server issue.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19015
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: SyntaxError: JSON.parse: unexpected character

Postby tophat » Wed Mar 07, 2012 7:18 am

I have had this problem with the same error message.

It was because I removed the 'fax' field from the order and the file /catalog/controller/checkout/confirm.php was calling this and getting confused. Found the problem highlighted in the error.txt file... clearly outlines here why it was getting stuck on line 115.
User avatar
tophat
 
Posts: 102
Joined: Thu Nov 24, 2011 7:31 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby linhos » Thu Jun 07, 2012 11:43 pm

OpenCart Hello forum members, I have a problem at the checkout of my OpenCart 1.5.3.1 SyntaxError: JSON.parse: unexpected character, did the firefox debug and found the following response

<b> Fatal error </ b>: Call to undefined method Cart :: getTotalRewardPoints () <b> in / home / bethapec / public_html / catalog / controller / checkout / confirm.php </ b> on line 255 <b> </ b> <br />

Someone has gone through this problem that can help me fix it, I need urgent, because the store of my client is already ready, only this error in step 5 of payment that I need to finish the project completely successful. I appreciate the cooperation of everyone. success to all!
linhos
 
Posts: 2
Joined: Wed Jun 06, 2012 8:12 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby Qphoria » Mon Jun 11, 2012 11:14 am

linhos wrote:OpenCart Hello forum members, I have a problem at the checkout of my OpenCart 1.5.3.1 SyntaxError: JSON.parse: unexpected character, did the firefox debug and found the following response

<b> Fatal error </ b>: Call to undefined method Cart :: getTotalRewardPoints () <b> in / home / bethapec / public_html / catalog / controller / checkout / confirm.php </ b> on line 255 <b> </ b> <br />

Someone has gone through this problem that can help me fix it, I need urgent, because the store of my client is already ready, only this error in step 5 of payment that I need to finish the project completely successful. I appreciate the cooperation of everyone. success to all!


What mod are you running on that page? getTotalRewardPoints() was in 1.5.1.3 but moved in 1.5.2 and later.
So if you are running 1.5.3.1 then I assume one of your mods replaces the confirm.php file with an older one that still expects that function to be there. Get the catalog/controller/checkout/confirm.php file from the 1.5.3.1 zip
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19015
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: SyntaxError: JSON.parse: unexpected character

Postby aviatedman » Tue Sep 25, 2012 5:51 pm

I'm seeing a lot of people with similar problems and a lot of the "solutions" have been pretty much questions themselves. So.....has anyone came across this specific error yet??? And if so, how did you fix it? I have vqmod installed but have not uploaded any files through it. Frankly....I don't have the SLIGHTEST clue how to use vqmod either.

I've never had to jump threw so many damn loops just to modify a theme or core files :crazy:

MY ERROR:

SyntaxError: JSON.parse: unexpected character
OK
<b>Notice</b>: Undefined index: payment_address in <b>/home/planet45/public_html/shop/catalog/controller/checkout/payment_address.php</b> on line <b>125</b><b>Notice</b>: Undefined index: payment_address in <b>/home/planet45/public_html/shop/catalog/controller/checkout/payment_address.php</b> on line <b>171</b>[]
aviatedman
 
Posts: 18
Joined: Tue Sep 25, 2012 5:48 pm

Re: SyntaxError: JSON.parse: unexpected character

Postby gob33 » Wed Oct 24, 2012 12:11 pm

I confirm the same error with 1.5.4 and 1.5.4.1 installed right out of the box.
No error with 1.5.3 series. Topic should go to the bug list.
gob33
 
Posts: 147
Joined: Tue Feb 09, 2010 7:43 pm
Location: France

Re: SyntaxError: JSON.parse: unexpected character

Postby dtommy79 » Fri Nov 02, 2012 2:48 am

I have the same issue, please any help?

EDIT!

Ok, for me this error occured when there was no default address added to the customer account. When I added the default billing address I managed to go through with the order.
dtommy79
 
Posts: 9
Joined: Sun Dec 04, 2011 6:40 pm


Return to Payments

Who is online

Users browsing this forum: No registered users and 15 guests

Hosted by Arvixe Web Hosting