Post by dev9457 » Sat Apr 04, 2015 8:24 pm

I am getting error when i am trying to edit order status / history --
PHP Notice: Undefined variable: json in /home/arrockr1/public_html/admin/controller/sale/order.php on line 2490
And also when i trying to edit order status in Total save button is not working.
Please give me a solution.

Newbie

Posts

Joined
Sat Apr 04, 2015 8:20 pm

Post by aljawaid » Sun Apr 05, 2015 10:22 pm

I have the same problem on OC v2.2.0 :(

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by pm-netti » Mon Apr 06, 2015 12:26 am

dev9457 wrote:I am getting error when i am trying to edit order status / history --
PHP Notice: Undefined variable: json in /home/arrockr1/public_html/admin/controller/sale/order.php on line 2490
And also when i trying to edit order status in Total save button is not working.
Please give me a solution.
You find this text admin/controller/sale/order.php on line 2423:

Code: Select all

        public function api() {
change to:

Code: Select all

	  public function api() {
		$json = array();

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by psopa » Sat Apr 18, 2015 6:48 pm

Hi
i did this, and the error now changed to unexpected end of input...
any help please!
i'm not in maintenance mode, and it's a fresh install of 2.0.2.0

Newbie

Posts

Joined
Sat Apr 18, 2015 6:46 pm

Post by psopa » Mon Apr 20, 2015 5:12 am

does anyone solved this? i tryed everything!...:(

Newbie

Posts

Joined
Sat Apr 18, 2015 6:46 pm

Post by ashwani_multi » Mon May 04, 2015 3:32 pm

I got the same error and i fixed it

go to Admin->System->users->Api

Add a new api generate password, and enable it

Then go to Admin->system->settings->Edit->Option(tab)

Select api user under Checkout section as your api user

Then save the changes

Then go to Sales->orders->edit

It will work fine :-)

Opencart Quick checkout
View All modules
Any opencart issue contact me at support@opencartextensions.in

Thank you


User avatar
New member

Posts

Joined
Tue Dec 09, 2014 2:40 pm
Location - Ludhiana,Punjab,India

Post by Vicx007 » Sun May 10, 2015 7:07 am

ashwani_multi wrote:I got the same error and i fixed it

go to Admin->System->users->Api

Add a new api generate password, and enable it

Then go to Admin->system->settings->Edit->Option(tab)

Select api user under Checkout section as your api user

Then save the changes

Then go to Sales->orders->edit

It will work fine :-)
I did this but still it didnt work can anyone help its annoying it has been two whole night i havent slept plssssssssssss :bash: :bash: :bash: :bash: :bash: :bash:

Newbie

Posts

Joined
Sun May 10, 2015 7:02 am

Post by mcpop » Wed May 13, 2015 9:34 am

I had the same problem as OP but none of the steps listed helped. I tried resetting the API password, reassigning the API user etc etc and didn't have any joy.

I also tried the code mods that were suggested in other threads ... no luck.

Then, when I thought things couldn't get any worse, I discovered I couldn't delete orders either. FFS!

Then I read somewhere that the OC admin module uses curl to send requests to the other parts of OC using http. Then I remembered that I had set a Basic AuthType in my .htaccess while I was still building the site (didn't want outsiders or bots indexing my junk data!)

I removed the Auth stuff from my .htaccess and now my order operations in admin all work properly.

So, if you also have these problems, check that your infrastructure allows your admin module to access your main OC site. In my case it was .htaccess but you may have some firewall restriction or a network restriction placed by your ISP or server provider.

Good luck.

McPop.

Newbie

Posts

Joined
Wed May 13, 2015 9:22 am

Post by cbutler7 » Wed May 13, 2015 10:41 pm

Worked for me () :)

Newbie

Posts

Joined
Mon Apr 27, 2015 4:41 pm

Post by Ergotron_Mexico » Fri May 22, 2015 12:21 am

mcpop wrote:I had the same problem as OP but none of the steps listed helped. I tried resetting the API password, reassigning the API user etc etc and didn't have any joy.

I also tried the code mods that were suggested in other threads ... no luck.

Then, when I thought things couldn't get any worse, I discovered I couldn't delete orders either. FFS!

Then I read somewhere that the OC admin module uses curl to send requests to the other parts of OC using http. Then I remembered that I had set a Basic AuthType in my .htaccess while I was still building the site (didn't want outsiders or bots indexing my junk data!)

I removed the Auth stuff from my .htaccess and now my order operations in admin all work properly.

So, if you also have these problems, check that your infrastructure allows your admin module to access your main OC site. In my case it was .htaccess but you may have some firewall restriction or a network restriction placed by your ISP or server provider.

Good luck.

McPop.

Mmm, i check this but i not have .htaccess file in admin folder how i can check this ?

ergotron mexico


New member

Posts

Joined
Wed Nov 06, 2013 12:40 am
Location - Mexico

Post by npn2531 » Sat May 23, 2015 3:37 am

I removed the Auth stuff from my .htaccess and now my order operations in admin all work properly.
Can you be specific? What is 'Auth stuff'. I am getting the same error msg:

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

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by npn2531 » Sat May 23, 2015 5:52 am

Searching this forum I am coming with answers that are all over the map, from generating a new api

Code: Select all

http://stackoverflow.com/questions/27732677/opencart-2-0-0-syntaxerror-json-parse-unexpected-end-of-data-at-line-1-colu
to
removing 'auth stuff' from htaccess file (see above) to making sure mantenance mode is off, to changing HTTPS to HTTP in admin/config.php and config.php, etc.

Searching for 'opencart SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK' comes up with tons of people posting about having this problem, but very little in the way of an answer.

Is this an unresolved issue with Opencart? Or is there an official solution to this?

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by TheLizard » Sun May 24, 2015 8:47 pm

This is a bug.

I have tried :

-Maintaince mode on and off
-Created new APIs via the Admin and through phpMyAdmin
-Edited admin/controller/sale/order.php by adding after public function api() { $json = array();
-Fresh install
-PHP and cURL enabled on server
-SSL enabled on server

This is soo annoying that it is not address and not fixed. OpenCart is loosing my respect day and day and I am always actively promoting it. I might have to go the Magento bloated route..

Even the damn site documentation and downloading the latest release has a zip file that talks about upgrading 1.4 to 1.5 and nothing about 1.5 to 2.0 or anything about 2.0 upgrades - even on the website. It is so poor and embarassing.. To much brown sniffing and licking ass of the Leeds agency; welford media opencart

New member

Posts

Joined
Mon Feb 20, 2012 11:51 pm

Post by casys123 » Mon May 25, 2015 10:25 am

Hellow everyone,

I got this error after installing a product configuration extension:

Fatal error: Cannot redeclare ModelCatalogProduct::editProductFee() in /home1/casys123/public_html/system/modification/admin/model/catalog/product.php on line 352


Please let me knwo how to fix it...Thanks

Newbie

Posts

Joined
Sun May 24, 2015 12:03 am

Post by vsjforall » Mon May 25, 2015 5:53 pm

Hi , BEEN Annoyed with the issue for a while. But solved it with the replies in this thread itself.

First You have to create the api user with the smae name and password as the original user you logged it. Can be done through

system-> settings ->edit -> options -> select user you created with same as the store owner

Then Edit the code in order.php with assignment as in above thread.

By doing both the above my problem is fixed and i can delete as well as edit the orders :)

Hope this piece of info helps you all

Newbie

Posts

Joined
Mon May 25, 2015 5:49 pm

Post by exit15 » Wed May 27, 2015 8:03 am

I tried all of the above, nothing helped. Cannot update order history. Is there another thread for this issue?
Version 2.0.2.0 fresh install.

New member

Posts

Joined
Sun Mar 03, 2013 2:05 am


Post by exit15 » Fri May 29, 2015 9:35 am

Posted on another thread.. I found out that this was a CloudFlare related issue. As soon as I disabled CloudFlare DNS routing, the problem went away. This was also confirmed by other users, something in the way they resolve DNS does not sit well with cURL. I hope that this is reported as a bug (i'm not part of the github scene) and addressed. It's en easy test, enable DNS routing via ClouldFlare and the error pops, disable and its gone. Thanks.

New member

Posts

Joined
Sun Mar 03, 2013 2:05 am


Post by TheLizard » Fri May 29, 2015 5:32 pm

I don't use CloudFare and I am still getting this issue.

In fact, CloudFare is an embarrassment of a CDN. We have Rackspace Cloud and Akamai and S3 systems. This forum and site uses CloudFare and you get an annoying DDos que message; very amateur.

New member

Posts

Joined
Mon Feb 20, 2012 11:51 pm

Post by romeo2906 » Mon Jun 01, 2015 5:01 am

"Undefined variable: json in admin/controller/sale/order.php on line 2490"
The error occurs when you edit an order or when you want to change the status of an order.
I tried solving methods mentioned above but do not have a positive outcome.
Is it a bug in version 2.0.2.0?

Newbie

Posts

Joined
Fri Jun 13, 2014 7:12 am

Post by R1ant » Mon Jun 01, 2015 10:17 pm

Image


i got this error when i try to change order status any1 know how to solve it?

Newbie

Posts

Joined
Mon Jun 01, 2015 7:41 pm
Who is online

Users browsing this forum: No registered users and 45 guests