Page 1 of 1
Can't view orders, Access denied / undefined error after SSL installation
Posted: Mon May 22, 2017 10:33 pm
by Xerobia
Opencart V2.2.0
I've installed SSL for my site (which was a pain in the a.. to get to work). Now it's finally working but i get to see an error when opening an order in admin.
In internet explorer it shows "access denied, undefined error". In firefox it's simply "network error".
From other posts i gathered it's a problem with the API / SSL? And there seems to be no definite fix for it?
I've spent a lot of hours on fixing so many things in v2.2 so upgrading to 2.3 is not an option at this moment, i fear it will break things and i do not have the time to be bothered with that now.
I need to have it fixed in 2.2, is it possible?
Thanks
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Tue May 23, 2017 8:40 am
by Xerobia
Does anyone know of a solution? It's very urgent because it's a live store, I'd be forever grateful.
I'm willing to pay for a solution if there's any.
Thanks
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Thu May 25, 2017 11:18 am
by Xerobia
I like to recall on your help again guys, i tried almost everything that has been suggested in other threads but nothing has worked so far.
Again, if someone knows how to fix this then i'd be more than happy to pay for your services.
Thanks!
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Fri May 26, 2017 3:52 pm
by sculptex
I'd be happy to look at this for you, please raise a support ticket on my website with details,
www.sculptex.co.uk
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Sun May 28, 2017 7:21 pm
by Xerobia
You didn't like my security restrictions remember.
Anyway, i've fixed the problem thanks to an older post on the forum from VictorJ.
For anyone interested or having the same problem:
I quote;
open file admin/controller/sale/order.php
find line 850
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
change to
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? preg_replace("/^http:\/\//", "https://", $order_info['store_url']) : $order_info['store_url'];
This fixes the faulty call in ajax.
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Tue May 30, 2017 3:27 pm
by sculptex
Xerobia wrote: ↑Sun May 28, 2017 7:21 pm
You didn't like my security restrictions remember.
I posted this before you started that other thread and when I replied to that I didn't realize you were the same poster (or I might have taken offence!)

Anyway, thanks for sharing your solution, hopefully a mod will mark this as solved now.
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Thu Jul 06, 2017 6:00 pm
by Storeship
Xerobia wrote: ↑Sun May 28, 2017 7:21 pm
You didn't like my security restrictions remember.
Anyway, i've fixed the problem thanks to an older post on the forum from VictorJ.
For anyone interested or having the same problem:
I quote;
open file admin/controller/sale/order.php
find line 850
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
change to
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? preg_replace("/^http:\/\//", "https://", $order_info['store_url']) : $order_info['store_url'];
This fixes the faulty call in ajax.
Thanks, i was having the same problem, your fix worked great.
Re: Can't view orders, Access denied / undefined error after SSL installation
Posted: Thu Mar 08, 2018 3:06 am
by halitorak72
Xerobia wrote: ↑Sun May 28, 2017 7:21 pm
You didn't like my security restrictions remember.
Anyway, i've fixed the problem thanks to an older post on the forum from VictorJ.
For anyone interested or having the same problem:
I quote;
open file admin/controller/sale/order.php
find line 850
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
change to
Code: Select all
$data['store_url'] = $this->request->server['HTTPS'] ? preg_replace("/^http:\/\//", "https://", $order_info['store_url']) : $order_info['store_url'];
This fixes the faulty call in ajax.
Hi,
I have same problem but my opencart version is 2.1.0.1.
I was finde line 850 in the admin/controller/sale/order.php but not same line of you.
On 2.1.0.1 version, line 850 is like this:
$data['order_id'] = $this->request->get['order_id'];
How can I fix this problem on 2.1.0.1. Please help me...