Page 5 of 6

Re: Editing orders dont work 2.0.1.1

Posted: Wed May 13, 2015 7:25 pm
by studio1982
Hi, I just thought i would share this as a possible solution to the problem of editing orders.

I was getting an error message saying that I did not have permission to access the api. I'd read through a load of solutions on here with none of them working.

My hosting supplier has just updated the PHP version on the site to PHP 5.6 and the error message is no more!

I hope this helps someone else.

Thanks

Stephen

Re: Editing orders dont work 2.0.1.1

Posted: Thu May 14, 2015 5:01 pm
by gwenthehen
Thanks for sharing this info. Which version of PHP are you using? I've just updated to 5.6.8 and I still get the same issue. I also get "Warning: CURL error (0)!" when I try to delete an order. Did you get that?

Re: Editing orders dont work 2.0.1.1

Posted: Thu May 14, 2015 6:24 pm
by WCS
I think that the CURL error is related to loopback - some hosting providers allow it and some don't. If they don't, then OC2 just won't work, though I do hope that there is a solution coming soon.

Re: Editing orders dont work 2.0.1.1

Posted: Thu May 28, 2015 1:21 am
by exit15
Strangest thing - my issue with not being able to update orders was the fact that i had CloudFlare CDN on. Turned it off and it all started working just fine. Of course I spent hours trying all the other remedies, but NONE worked. Now I have to check if it is possible to exclude the admin folder from CF and test the website thoroughly. What a bummer! Wondering if someone has an idea what in CF can be causing this error.

Re: Editing orders dont work 2.0.1.1

Posted: Thu May 28, 2015 1:46 am
by JNeuhoff
exit15 wrote: Wondering if someone has an idea what in CF can be causing this error.
Firewall, or security settings?

Re: Editing orders dont work 2.0.1.1

Posted: Thu May 28, 2015 2:13 am
by exit15
Dont want to bother people too much, but when I disable CloudFlare completely (i.e. stop the DNS rerouting of traffic), "updating orders" worked just fine, but then I enabled it and created what they call a "page rule" basically bypassing the admin folder... it started giving me the error again. I will try to work with with CF and report back. This is odd, it does not seem to be related to caching or security, I turned all of them OFF. It has to do with the routing thru their system.

For all of you facing the issue, check with your host if they are using some sort of CDN and ask how this might impact your situation.

Re: Editing orders dont work 2.0.1.1

Posted: Fri May 29, 2015 7:12 am
by ThePath
Im a Heart Internet reseller and this is really going to affect me.

Heart are not supporting OC v2 on there auto install and it will not work on their shared hosting accounts.

Does anyone know why the way loopbacks are handled has changed? And how to change it back would be good too!

Total nightmare. This will undoubtedly affect OpenCarts popularity.

Re: Editing orders dont work 2.0.1.1

Posted: Fri May 29, 2015 9:28 pm
by Qphoria
ThePath wrote:Im a Heart Internet reseller and this is really going to affect me.

Heart are not supporting OC v2 on there auto install and it will not work on their shared hosting accounts.

Does anyone know why the way loopbacks are handled has changed? And how to change it back would be good too!

Total nightmare. This will undoubtedly affect OpenCarts popularity.
It's because v2.0 adds a new API design, which itself isn't bad. The API uses curl calls to common functions on the front end, thus making the system more unified in the process, which is a good thing in theory. But an unexpected side effect is that it doesn't work on some hosts because they disallow curl loopback for some reason. There is no real reason for them to prevent it, they are just being difficult or don't know any better.

Re: Editing orders dont work 2.0.1.1

Posted: Tue Jun 02, 2015 10:11 pm
by WCS
Hi,

So it comes down to a choice between changing host or changing shopping cart if neither is willing or able to change their minds on this.

Andrew

Re: Editing orders dont work 2.0.1.1

Posted: Tue Jun 02, 2015 11:14 pm
by JNeuhoff
The issue has already been posted on github. I'll face the same issue soon and hope to be able to implement a suitable workaround. In principle there is no need to use a HTTP local loopback, the API should be called directly.

Re: Editing orders dont work 2.0.1.1

Posted: Mon Jun 08, 2015 7:20 pm
by ThePath
Thanks for explaining Q.

Well in "coder" terms it might not be bad, but as you have mentioned yourself 35% of your upgrade customers cant upgrade to v2! Thats just your customers I would think the real number is much much higher. So in usability terms its worse than bad.

Thats sounds promising JNeuhoff!!!!

Re: Editing orders dont work 2.0.1.1

Posted: Fri Jun 12, 2015 5:09 pm
by bero
I was facing the same problem,
changed the admin/config file, changing the API key and API user.
didn't work..
Until i changed maintance mode off.. Everything is working fine now.

Re: Editing orders dont work 2.0.1.1

Posted: Thu Jun 18, 2015 12:11 am
by moneycarlo
Can someone tell me how I'd see if i'm going to have the curl/loopback issues?
i have 2.0.3.1 on my testing site and so far have been able to place orders. When editing orders, i had to click the Apply button for payment and shipping for it to save. Successfully able to delete orders.
I dont currently use the API but would eventually like to..
so far no errors in the error log.
What things should I look for or other potential showstoppers?
Thanks!

Re: Editing orders dont work 2.0.1.1

Posted: Fri Jul 03, 2015 2:45 pm
by nick5000
Any update on this?
It's strange that such a basic function doesn't work on fresh install.
What settings to change for curl in order to get it to work?

Re: Editing orders dont work 2.0.1.1

Posted: Mon Jul 06, 2015 12:56 am
by nick5000
nick5000 wrote:Any update on this?
It's strange that such a basic function doesn't work on fresh install.
What settings to change for curl in order to get it to work?
For the record for anybody that finds this thread; In my case it was caused by Maxmind module. Disabling it fixed the issue.

Re: Editing orders dont work 2.0.1.1

Posted: Fri Jul 24, 2015 7:23 pm
by jpsurese
Hi All,
I also had issues in editing Orders in Admin. It was all due the API call. The Api calls the frontend controller/api/order.php.
In the public function edit() some session variables are taken ( shipping, payment etc) which are not available. and so the error. I commented out the whole area and it worked!

regs

Suresh J

Re: Editing orders dont work 2.0.1.1

Posted: Sat Aug 22, 2015 10:00 pm
by dmitov
Commonly caused error either by Maintenance Mode or .httaccess password protection of website.

Re: Editing orders dont work 2.0.1.1

Posted: Wed Aug 26, 2015 11:44 pm
by Bobbio999
Same here. I've edited the https in the config file and also tried the curlback through another domain....neither has fixed this big issue I have.

Has anyone any further ideas please?

Re: Editing orders dont work 2.0.1.1

Posted: Sun Aug 30, 2015 8:41 pm
by sculptex
jpsurese wrote:Hi All,
I also had issues in editing Orders in Admin. It was all due the API call. The Api calls the frontend controller/api/order.php.
In the public function edit() some session variables are taken ( shipping, payment etc) which are not available. and so the error. I commented out the whole area and it worked!

regs

Suresh J
Hi have you done a mod for this? all my attempts down this route leave the shipping/payment methods as unapplied - zero value in shipping for example. obviously this then differs from the original order which would cause no end of problems if an order has already been taken and paid for but you just wanted to change customer or product details (i.e. same value) etc.

Daniel announced he was re-writing the order editing system back in June but not heard anything since:-
https://github.com/opencart/opencart/issues/3062

I haven't looked at 2032rc yet but it seems to me if a solution is to rely on using the front end controller it is going to rely on the same shipping and payment methods (also vouchers, coupons etc.) being available as when the order was placed to be able to re-apply them to get the same result?
Unless there was an option to re-calculate these values ONLY if the product total of the cart was to change? (of course some shipping methods rely on products or weight so even if order total didn't change it would be the admin discretion to re-calculate or not).
Its a bit of a minefield really. Perhaps there needs to be a high level editing system as currently implemented and a low level order editing system that bypasses controller and allows values to be manipulated in the database

Re: Editing orders dont work 2.0.1.1

Posted: Wed Sep 09, 2015 11:40 pm
by gwenthehen
I have managed to resolve this problem. I did three things:

1) Update OpenCart to 2.0.3.1
2) Update the server's hosts file so point the website's domain back to the server IP (the domain wasn't live at the time)
3) Update the admin/config.php file so that both the https links are using http rather than https (I don't have an SSL installed currently).

That seemed to fix it. If anyone needs any more info please post back and I'll do what I can to help.