Post by pezastic » Mon Mar 30, 2015 4:50 pm

abin@opencart wrote:I got the same error and i fixed it
go to Admin->System->users->Api ...
Wild goose chase for me (i.e., it didn't work). I'm still unable to delete or edit orders. :(

Edit: It works now. My problem was that I was misreading the comments advising to turn off Maintenance Mode in admin > System > Stores > Your store > tab Server as turning test mode in the payment gateway type to off.

Newbie

Posts

Joined
Sat Mar 14, 2015 5:06 pm

Post by mva.name » Tue Apr 14, 2015 7:34 pm

Hi there!

I've the same error on the store, upgraded from 1.5.x, and neither method explained here is fixed it.
Maintenance mode is disabled out of the box.
I've added API user and set up main store to use it.
I've set HTTPS host in admin config.php (and site root config.php) to "http://.*"
I've even debugged all in JS console.

And I've found that

Code: Select all

$.ajax({url: 'index.php?route=sale/order/api&token=BLABLA&api=api/customer&store_id=' + $("select[name='store_id'] option:selected").val(),type: 'post',data: $("#tab-customer input[type='text'], #tab-customer input[type='hidden'], #tab-customer input[type='radio']:checked, #tab-customer input[type='checkbox']:checked, #tab-customer select, #tab-customer textarea"), dataType: 'json', success: function() { alert("1"); }, error: function(xhr, ajaxOptions, thrownError){ alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } });


(the code from /admin/view/sale/order_form.tpl, that executes when you're pressing "Proceed" button in edit mode with redefined "success" part to avoid context change)

executes "error" part (and that's why you see an error). But if I change "dataType" to 'text',instead of 'json', then it executes success part.
Any ideas?

Newbie

Posts

Joined
Tue Apr 14, 2015 7:21 pm

Post by nerven » Mon May 25, 2015 9:11 pm

Hi there, just fight the same problem! I did fix it with this!


1. Make sure you have created (or have) user API in menu System / Users / API
2. Then in System / Settings, choose your store, select Options tab
3. In Checkout section, choose API User you just created
4. Save your settings
5. Try to add or edit an order again, it should be working.

Newbie

Posts

Joined
Mon May 25, 2015 9:08 pm

Post by gmonterog » Tue Jun 09, 2015 6:03 pm

Changing https routes to http in the config files, as said by leaveyou, seems to work fine for me. This also has solved a CURL warning I had when I tried to delete orders.

Newbie

Posts

Joined
Mon Jun 01, 2015 9:34 pm

Post by Bellomedia » Fri Jun 12, 2015 11:23 pm

abin@opencart 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 :-)
nope, does not work

Newbie

Posts

Joined
Thu Jun 11, 2015 4:08 pm

Post by Jomacrar » Wed Jul 01, 2015 5:37 pm

I migrated a 1.5 multistore to 2.0.3.1 and I found the same issue editing orders. Nothing worked until I found that default store orders could be edited without issues. Then I checked the options for the rest of the stores and voilá, the SSL URL was blank. Setting the SSL URL to the same value than Store URL solved the issue.

Not sure why Opencart should be checking SSL URLs if SSL is not set for the store but happy to solve this issue, I was thinking to stop the migration because of this.

Newbie

Posts

Joined
Thu Jul 18, 2013 8:32 pm

Post by sanaullah » Tue Oct 13, 2015 7:43 pm

change HTTPS to HTTP in opencart/admin/config.php

define('HTTPS_SERVER', 'http://'.$_SERVER['HTTP_HOST'].'/admin/'); define('HTTPS_CATALOG', 'http://'.$_SERVER['HTTP_HOST'].'/');

Newbie

Posts

Joined
Tue Oct 13, 2015 7:42 pm

Post by burrito » Wed Nov 04, 2015 5:40 pm

I'm having the same issues on 2.0.2.0,
what is set:

1) API username and password are set and enabled (created a new one)
2) API username is selected and saved in Configuration > System
3) https server is set correctly in config file
4) htaccess is turned off

I am still unable to delete orders from the admin side.
Does anybody have another idea?

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by iman4web » Wed Jan 20, 2016 7:46 pm

I have same problem when i want to edit or delete orders . open cart 2.0.3.1
how can i resolve it ?

Newbie

Posts

Joined
Wed Jan 20, 2016 7:43 pm

Post by ajojavi » Thu Jan 21, 2016 6:57 pm

HI, I have to add... in order to make the things weirder...

I have the same problem, I have my config as the people said, I have no maintenance mode, I have added the api as recommended some users,,, and the problem still there.

But the most weird is that, THE CHANGES ARE SAVED!!! , so I received the message, but any time I save, is created a new order which is added to the same one... I mean, I saved 10 times, and them I realize that I have one order but with 10times the price, and a lot of xxxxxx before the name of product. Also I changed procesed to complete, and it works well.

So, for me it works but weird and I have to be careful with this weid funtions, also, the partner (I have a marketplace) recibe is order (just one) but a kind of repeated (ten emails) with same order id, and 10times the money! So be careful.

Best,

New member

Posts

Joined
Thu Oct 24, 2013 8:51 pm
Location - Spain

Post by Randem » Fri Jan 29, 2016 7:28 pm


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by privee » Sun Feb 21, 2016 3:26 am

I had the same problem. I have already changed HTTPS_SERVER and HTTPS_CATALOG links (from https: to http:) in 'config.php' inside admin folder, but was still getting this error.
But then I changed password for API user (System -> Users -> API -> Edit) and it started working.
I foud out that you shouldn't use double quote character in password for API user !!!.

Newbie

Posts

Joined
Sun Feb 21, 2016 2:22 am

Post by pwiking » Thu Jan 11, 2018 5:09 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
Who is online

Users browsing this forum: No registered users and 8 guests