Easy. Add the following 2 files to your store:
/includes/auto_loaders/config.login_redirect.php```
<?php
/**
* autoloader to initialize an observer class
*
* @package initSystem
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*
@version $Id: config.login_redirect.php drbyte$
*/
/**
* Designed for v1.5.0
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* point 200 is usually suitable for addon observer classes in v1.x
*/
$autoLoadConfig[200][] = array('autoType'=>'class',
'loadFile'=>'observers/class.login_redirect.php');
$autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
'className'=>'login_redirect',
'objectName'=>'login_redirect');
```and
/includes/classes/observers/class.login_redirect.php```
<?php
/**
* @package addons
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*
@version $Id: class.login_redirect.php 2011-11 drbyte $
*
* Designed for v1.5.0
*/
class login_redirect extends base {
function __construct() {
$this->attach($this, array('NOTIFY_LOGIN_SUCCESS'));
}
function update(&$class, $eventID, $paramsArray = array()) {
/**
* $paramsArray contains any parameters passed to the hooked notifier point.
* If those parameters are passed by reference, you can pass back the change by setting that entry to a new value.
* For example, if the first parameter is passed as &$string1
* then you can effect a change to $string1 by setting the first entry in paramsArray, as shown:
* $paramsArray[0] = 'new_value for string1';
*/
if ($eventID == 'NOTIFY_LOGIN_SUCCESS')
{
$_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_DEFAULT,
'get' => array('cPath' => '0')));
// set the appropriate category path above (replacing the '0' with '3_10' or '147_83_24', etc
}
}
}
```
This should work for both v1.3.9h and v1.5.0
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.