Post by delalibera » Sat Mar 11, 2017 1:32 pm

I upgraded my 1.5.6 OpenCart to 2.3.0.2 version and I have several problems when I edit my received orders.
In Brazil 90% of the internet connections are through dynamic ips, dynamic ips are ips that change daily. To manage my orders I have to add my new IP in API every day, sometimes it happens several times in a day, It's very difficult to work this way.
I think that the opencart system, when the user is logged in the administrative area, this user must to be able to change the orders without the API.
I think that the API is very usefull for external accesses and not when the user is logged in admin area.
When one user is logged in the admin area and this user still needs the api to change an order, THIS IS VERY STUPID.

Does anyone have an extension that allow logged in users change the orders?
Or can help me to change this in code?

Newbie

Posts

Joined
Tue Feb 07, 2017 12:35 am

Post by delalibera » Mon Mar 13, 2017 9:11 pm

Some help?

Newbie

Posts

Joined
Tue Feb 07, 2017 12:35 am

Post by thekrotek » Mon Mar 13, 2017 10:54 pm

In catalog/controller/api/login.php find this line:

Code: Select all

if (!in_array($this->request->server['REMOTE_ADDR'], $ip_data)) {
And comment the line AFTER it, this will disable error IP message completely, no matter the IP-address.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by motion2082 » Wed Jul 04, 2018 9:17 pm

So change from this

Code: Select all

if (!in_array($this->request->server['REMOTE_ADDR'], $ip_data)) {
				$json['error']['ip'] = sprintf($this->language->get('error_ip'), $this->request->server['REMOTE_ADDR']);
			}
to this?

Code: Select all

if (!in_array($this->request->server['REMOTE_ADDR'], $ip_data)) {
				 $this->request->server['REMOTE_ADDR']);
			}
I get an error

Active Member

Posts

Joined
Tue May 12, 2015 8:48 pm
Who is online

Users browsing this forum: Google [Bot] and 27 guests