Page 1 of 1
Orders staus change
Posted: Thu May 07, 2015 5:27 am
by ryanhammill10
Hello all,
Not sure if anyone can help however I have found ANOTHER bug/issue in opencart 2. When changing the status of orders I am getting the below message:
SyntaxError: Unexpected Token <
OK
Notice:Undefined variable: json in /vhost/...../www/admin/controller/sale/order.php on line 2490
I have tried re-creating a new API user as found in other posts about this without any luck, still gets the same error. I have also tried amended the order.php file to add the extra line for json but this makes no difference so reverted to original order.php file for now.
Any help would be great as currently cannot edit orders and the upgrade to opencart 2 for production is very near and testing has already found a lot of bugs.
Re: Orders staus change
Posted: Thu May 21, 2015 9:46 pm
by Daydream85
I have exactly the same error. And so far nobody knows the answer to this problem.
Did you already find out how to solve this?
Re: Orders staus change
Posted: Thu May 21, 2015 10:12 pm
by OpenTeam
Hello,
Normally you are getting a response from the controller 'api/order' in the catalog folder. In fact, the public function history() is executed when you change an order status.
So to get close to the problem, do check the function addOrderHistory in the model file 'model/checkout/order.php' in the folder 'catalog'.
Hope it will help you.
Re: Orders staus change
Posted: Fri May 29, 2015 11:45 pm
by Ergotron_Mexico
Any have the modification ? or a copy of order.php ?
thanks.
Re: Orders staus change
Posted: Fri Jun 05, 2015 4:13 pm
by nchotorova
Opnecart Version 2.0.3.1.
I got the an 'Unexpected Token'... error in odrer.php when trying to edit the order in admin section
I tried a lot of solutions, it took me a lot of time.
This is the solution that worked for me:
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
I found the solution here
http://www.codedisqus.com/CyVqkkjVUk/op ... ta-ok.html. Thank you very much!
Re: Orders staus change
Posted: Wed Jul 29, 2015 3:14 pm
by prashant_21

Change api user was not worked for me.
Replace all admin files with fresh copies. It works for me.
oc version : 2.0.2.0
Re: Orders staus change
Posted: Wed Sep 30, 2015 2:57 pm
by twigg
You have to change php version: cPanel -> Software and Services -> Select PHP version.
Use 5.4 and buy me a beer

Re: Orders staus change
Posted: Sun Oct 04, 2015 4:50 pm
by serafimme
Hi,
I'm new here. Just want to share with you guys, i got same problem when i tried to run that step it still getting me same issue. i'm using OC 2.0.3.1
i create new API user and generate new password, save it and follow to Sales menu. i still unable to edit or modify any order even delete it still fail.
I go to CPanel to change the PHP version to 5.4 / 5.5 and still stuck in same problem.
anybody can help me?
when click edit order_after create new API - Error_Edit_Order_AP.JPG (19.87 KiB) Viewed 1284 times