Page 1 of 1
Cannot delete Sales order nor modify them
Posted: Wed Apr 29, 2015 7:43 am
by west1982
Screen Shot 2015-04-29 at 01.40.41.png (145.22 KiB) Viewed 2479 times
hello all,
The site is still in testing mode.
but we want to delete the test orders in the admin. we have OC 2.0.2.0
1/ when i try to delete sales orders from admin it just blinks and the orders are still there
2/ when i try to "edit" them, i have an error message - is there anybody facing this issue?
here is the message:
SyntaxError: Unexpected token <
OK
<b>Notice</b>: Undefined variable: json in <b>/home/thinkwin/public_html/system/modification/admin/controller/sale/order.php</b> on line <b>2516</b>
thank you all

Re: Cannot delete Sales order nor modify them
Posted: Fri May 01, 2015 2:43 am
by rph
The error means you have an ocMod script which is causing an error somewhere.
Re: Cannot delete Sales order nor modify them
Posted: Sat May 02, 2015 1:40 am
by r.lechner
I have the same problem, new installazion with opencart 2.0.2.0 and vqmod 2.5.1.
Can't delte the orders and can't modify them. :-(
My error is:
JSON.parse: unexpected character at line 1 column 1 of the JSON data.
Any hints?
Re: Cannot delete Sales order nor modify them
Posted: Sat May 02, 2015 6:39 am
by west1982
HI thanks for your reply - but we solved it actually - have a nice day
Re: Cannot delete Sales order nor modify them
Posted: Sat May 02, 2015 8:24 am
by rph
r.lechner wrote:I have the same problem, new installazion with opencart 2.0.2.0 and vqmod 2.5.1.
Can't delte the orders and can't modify them. :-(
My error is:
JSON.parse: unexpected character at line 1 column 1 of the JSON data.
Any hints?
See if anything is in your error log. It looks like part of the admin order API and to be blunt, that file is one giant code hell beast. Working in it is a nightmare.
Re: Cannot delete Sales order nor modify them
Posted: Sat May 02, 2015 8:09 pm
by west1982
O sorry - I did solve this from this thread:
http://www.viethemes.com/how-to-fix-err ... pencart-2/
Try creating a new user: follow the given link tutotrial. Which is adding leave the one that is already (theuser) from you install.
Hope this helps!
Re: Cannot delete Sales order nor modify them
Posted: Sat May 02, 2015 9:53 pm
by pm-netti
This can help:
https://raw.githubusercontent.com/pekka ... .ocmod.xml
This first operation fix this bugs ( and refresh modifiaction page )
Code: Select all
<file path="admin/controller/sale/order.php">
<operation>
<search><![CDATA[public function api() {]]></search>
<add position="after"><![CDATA[ $json = array();]]></add>
</operation>
</file>
Re: Cannot delete Sales order nor modify them
Posted: Sat Oct 10, 2015 8:01 pm
by ledstyle
I've now tested this earlier and one other olution with API user style but none of those work.