I overridden login controller and placed it in my local directory. I have seperate login.phtml as well. It is working fine. But I would like to have core/Mage/ login as well.
Below is my Mage\Customer\Controllers\AccountController.php
<?php
class Mage_Customer_AccountController extends Mage_Core_Controller_Front_Action
{
/**
* Customer login form page
*/
public function loginAction()
{
echo 'Mage'; die;
if ($this->_getSession()->isLoggedIn()) {
$this->_redirect('*/*/');
return;
}
$this->getResponse()->setHeader('Login-Required', 'true');
$this->loadLayout();
$this->_initLayoutMessages('customer/session');
$this->_initLayoutMessages('catalog/session');
$this->renderLayout();
}
Below is my local directory account controller
<?php
require_once 'Mage/Customer/controllers/AccountController.php';
class Ucs_Customer_AccountController extends Mage_Customer_AccountController
{
.
.
.
/**
* Customer login form page
*/
public function popuploginAction()
{
if ($this->_getSession()->isLoggedIn()) {
$this->_redirect('*/*/');
return;
}
$this->getResponse()->setHeader('Login-Required', 'true');
$this->loadLayout();
$this->_initLayoutMessages('customer/session');
$this->_initLayoutMessages('catalog/session');
$this->renderLayout();
}
When I access my overridden loginAction it automatically redirects to core login method.
I am trying to access overridden popuplogin as below
http://localhost/magento/index.php/customer/account/popuplogin/
and core login as below