Jump to content

[SOLVED] Is it possible to enable developer mode only for some IP address?


Nitin Jain

Recommended Posts

Sometime when I face some issue on my webstore, I have to enable developer mode to check the issues. But this effects my sale as customer also see errors on the front end and abandoned carts without purchasing products.
 
Is it possible to enable developer mode only for some specific IP address?

Edited by Nitin Jain (see edit history)
Link to comment
Share on other sites

You could probably modify config/defines.inc.php and test e.g.

if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1')
    $developer = true;
else
    $developer = false;

/* Debug only */
if (!defined('_PS_MODE_DEV_'))
    define('_PS_MODE_DEV_', $developer);

Obviously 127.0.0.1 should be replaced with your external IP address which you'll get from the likes of www.whatsmyip.org if you don't know what it is.

Edited by Paul C (see edit history)
  • Like 2
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...