Enable Debug Console for Specific IP Address Only

Category: X-Cart Snippets
Added:
Enter Price $
SKU SKU802
Quantity

Gives you a private debug console for a specific IP address, so as not to disturb customer view...

First apply this SQL patch...

REPLACE INTO `xcart_config` ( `name` , `comment` , `value` , `category` , `orderby` , `type` , `defvalue` , `variants` ) VALUES ('enable_debug_console_ip', 'Only show debug console to this <a href="https://www.google.com/search?q=ip+address" target="_blank">IP address</a>', 'xx.xx.xx.xx', 'General', '611', 'text', '', '');

Then in init.php, replace...

 $smarty->debugging = true;

With...

 if ($config["General"]["enable_debug_console_ip"] != '') {
 if ($config["General"]["enable_debug_console_ip"] == $_SERVER['REMOTE_ADDR']) {
 $smarty->debugging=true;
 }
 } else {
 $smarty->debugging=true;
 }

Then go into General Settings and add your IP address.

The website uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy.
More Information