Page 1 of 1

order status change in order history and ssl o/c 2.0.3.1

Posted: Mon Mar 27, 2017 2:49 am
by ianhaney
Hi

I am trying to update the order status for a order in view->history tab but each time I click add history, I get the following error, I can't seem to find a fix for it. I have a SSL installed on the site, could that be the issue that the admin url starts with https

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined variable: json in <b>/home/broadway/public_html/store/bmdstoreadmin/controller/sale/order.php</b> on line <b>2221</b>

I am using opencart 2.0.3.1

Thank you in advance

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Tue Mar 28, 2017 12:12 am
by ADD Creative
https://github.com/opencart/opencart/bl ... /order.php only has 1997 lines. Which suggests to get an error on line 2221 is down to a modification.

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Tue Mar 28, 2017 11:25 pm
by ianhaney
Oh right ok, is there a way to find out or do I just need to remove each xml file from the vqmod folder and disable each extension in the modifications page on the admin side?

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Wed Mar 29, 2017 9:42 pm
by ianhaney
Hi

Just having a look at this issue and in the bmdstoreadmin/controller/sale/order.php I have 2223 lines and on line 2221 is the following code

Code: Select all

$this->response->setOutput($json);
Is there any solution for this line like changing it to something else

I have compared it to the original order.php from the download folder and the line is the same in there too but I removed all the vqmod xml files and disabled all the modifications and refresh the modifications list but am still getting the error message

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Thu Mar 30, 2017 7:07 pm
by ADD Creative
My mistake I was looking at 2.3.0.1 not 2.0.3.1.

The problem is $json does not exist before being used by that line. So the problem is likely somewhere before that.

This may help you. viewtopic.php?t=142841

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Thu Mar 30, 2017 9:46 pm
by ianhaney
I tried every solution in the link and nothing worked, is really frustrating

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Thu Mar 30, 2017 10:29 pm
by ADD Creative
Did not adding

Code: Select all

$json = array();
to just after

Code: Select all

public function api() {
not do anything?

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Fri Mar 31, 2017 1:57 am
by ianhaney
No unfortunately, am still getting the error below

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Fri Mar 31, 2017 7:59 pm
by ADD Creative
That's a different error, so the first problem is fixed.

There looks like a number of causes of the 2nd error. http://forum.opencart.com/viewtopic.php?f=181&t=133490

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Sat Apr 01, 2017 12:56 am
by ianhaney
I have gone through that post and still got the error, I can't change HTTPS to HTTP as some are suggesting in the config file as I have a SSL installed on the domain/site so if I changed HTTPS to HTTP, it would show http in the url address bar but I want the https to show in the url address bar

Re: order status change in order history and ssl o/c 2.0.3.1

Posted: Mon Apr 03, 2017 10:20 pm
by ADD Creative
I agree that changing HTTPS to HTTP, doesn't sound a good idea.

If you have searched the internet and tried all possible solutions. You could try later versions. Start by installing the same version clean with no modifications to a test area on your server. Test you get the same problem. Then try later versions to see if the problem has been fixed.