Post by PaulSketo » Thu May 28, 2015 8:06 pm

Hello all! I need your help i've been reading all over the internet to find a solution but i cant..

In opencart 2.0 i am trying to edit a customer order and i get this error:

Code: Select all

"SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK"
I have tried, switching off maintance, changing API's, changing HTTP to HTTPS and vice versa, going into sql and changing value of the api to 1 but nothing HELPS!! ??? ??? ??? ??? Please help me!


Update: After a lot of trial and error, the problem was in the config.php, with the ssl loopback.
Last edited by PaulSketo on Fri May 29, 2015 5:19 pm, edited 1 time in total.

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by mrchristo » Fri May 29, 2015 10:13 am

could you help by telling us how you did this?

i have the same error and this forum is useless if you have troubles.

i recommend that people avoid opencart as it has useless / non existent support

Newbie

Posts

Joined
Wed May 27, 2015 5:53 pm

Post by PaulSketo » Fri May 29, 2015 5:13 pm

In my case it was the admin/config.php

The code should be like this:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.domain.com/admin/');
define('HTTP_CATALOG', 'http://www.domain.com/');

// HTTPS
define('HTTPS_SERVER', 'http://www.domain.com/admin/');
define('HTTPS_CATALOG', 'http://www.domain.com/');
Also your domain is with www or without? If so, edit these lines accordingly

If this doesn't work tell me the domain of your shop so i can see what i can do..

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by ThePath » Fri May 29, 2015 7:03 pm

This wont work for a large number of people on shared hosting...me for one.

It is because cURL loopback request are not allowed on some shared hosting, I have heard that some allow it like Fasthosts but theyre awful.

If your host doesnt allow http loopback requests then its game over for OC v2 on your account. Either go back to or use 1.5.5.1 or 1.5.6.4

Mental

Image

OpenCart Theme Options - See All My Extensions - OpenCart Themes and Mods


User avatar
Active Member

Posts

Joined
Fri Jun 26, 2009 11:53 pm
Location - Scotland

Post by mrchristo » Fri May 29, 2015 7:24 pm

thanks for the info guys, very much appreciated.

actually think i will move away from opencart.

Newbie

Posts

Joined
Wed May 27, 2015 5:53 pm

Post by PaulSketo » Fri May 29, 2015 8:53 pm

Opencart isn't that bad, there isn't much support though but as a e-commerce platform it does what it's supposed to do.

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by Peekabloom » Wed Jun 24, 2015 2:11 am

Hello, I am new to Opencart and when tested with a fake order then attempt to edit it, I get these JSON error message as well.

Screenshot 2015-06-23 23.47.56.png

Screenshot 2015-06-23 23.47.56.png (173.13 KiB) Viewed 3004 times

I have been reading through many forum postings, it looks like not all JSON errors are the same? I have already tried the API way and updating the htaccess file to .htaccess but the error persist. I was originally lured to Opencart after testing and finding it so much easier (for me) to use than with my experience with Joomla/Hikashop. But this one error is already bringing back flashes of dealing with Hikashop issue for days and weeks.

I am a hardcore newbie to opencart and programming stuff. I am already doing my best to get help from Arixe (my server company), but I have strong sense that they will probably tell me to ask Opencast instead. Just wondering if anyone would know how I could fix this or if I should find a freelancer to help to fix this. Any advise would be appreciated!

Newbie

Posts

Joined
Tue Jun 23, 2015 11:09 pm

Post by PaulSketo » Wed Jun 24, 2015 4:25 pm

Have you tried editing the admin/config files?

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by Peekabloom » Wed Jun 24, 2015 5:34 pm

Hi Paul:

In my case, my config file only has http_server but not http_catalogue, like this:

// HTTP
define('HTTP_SERVER', 'http://www.website.com/');

// HTTPS
define('HTTPS_SERVER', 'http://www.website.com/');

Would it help if I add the catalogue line to HTTP and HTTPS, do you think?

Newbie

Posts

Joined
Tue Jun 23, 2015 11:09 pm

Post by PaulSketo » Thu Jun 25, 2015 8:13 pm

it should be like this in admin/config.php try and and tell me

Code: Select all

    // HTTP
    define('HTTP_SERVER', 'http://www.domain.com/admin/');
    define('HTTP_CATALOG', 'http://www.domain.com/');

    // HTTPS
    define('HTTPS_SERVER', 'http://www.domain.com/admin/');
    define('HTTPS_CATALOG', 'http://www.domain.com/');
If this doesn't help take a look here : http://forum.opencart.com/viewtopic.php?f=190&t=146714

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by Peekabloom » Thu Jun 25, 2015 11:04 pm

Hi Paul:

Thanks for the advice. I have updated my config file with that information and the correct website domain, but the same error message pops up.

Just read the post from your link. Is that what you would suggest me to try? to create a manual loopback to a second website? I'm not completely certain if I am technical enough to achieve that properly. I'm also worry that by trying to get that to happen, I may break something else (this was the main issue I had with Hikashop/Joomla which was why I left it to come to Opencart).

Besides waiting to see if this get fixed in the next Opencart update, any other solution comes to mind? ^-^

Newbie

Posts

Joined
Tue Jun 23, 2015 11:09 pm

Post by PaulSketo » Tue Jun 30, 2015 7:33 pm

First of all you should ask your host if they support cURL, if yes then there is something wrong with your settings in OC, if not then you could try the cURL Loopback, or changing a hosting provider.

Also you should edit two files the first is in the root directory called config and the other is in the admin they should be the same.

After you have finished paste the two config files here.

New member

Posts

Joined
Sat Apr 25, 2015 5:10 pm

Post by pwiking » Thu Jan 11, 2018 5:41 am

I have created a fix for this order update page JSON error.
If you have JSON error you can replace it with my module. Read the readme file to set up.
Download at: www.advertigo.net/orderstatus.zip

Sincerely, Mike
Advertigo.net team

Newbie

Posts

Joined
Fri Apr 29, 2016 1:41 pm

Post by Baski » Fri Mar 09, 2018 9:15 pm

pwiking wrote:
Thu Jan 11, 2018 5:41 am
I have created a fix for this order update page JSON error.
If you have JSON error you can replace it with my module. Read the readme file to set up.
Download at: www.advertigo.net/orderstatus.zip

Sincerely, Mike
Advertigo.net team
Hi will it work on OC 2.0.3.1 pls i get the following error when i try to edit my orders

syntax unexpected token < in JSON at position 0
parseerror

<b>Notice</b>:undefined variable;json in <b>/var/www/store/system/modification/admin/controller/sale/order.php</b> on line<b>2234</b>

New member

Posts

Joined
Fri Sep 11, 2015 6:29 pm

Post by rgbrewer » Fri Mar 09, 2018 10:27 pm

In my experience this is often caused by permissions issues.

The first thing to test is test with a user account that has 100% full permissions, and see if the problem goes away.

Often it is localization settings, but I've also had problems with openbay being required for some reason.

New member

Posts

Joined
Sat Apr 22, 2017 9:30 am

Post by mourin516@gmail.com » Fri Dec 07, 2018 9:54 pm

Using OpenCart Version 3.0.2.0. While Placing any order, no order proceeding. Only showing this message
SyntaxError: JSON.parse: unexpeded character at line 1 column 1 of the JSON data
OK
<b>Notice4b, Undefined properly: Proxy:SendOrderEmainSeller in <biltorage/modification/systemienginelaction.php413.. on line ..79.11,


Posts

Joined
Fri Dec 07, 2018 1:16 am
Who is online

Users browsing this forum: No registered users and 11 guests