Hi so basically I need my page to redirect to login/register.html I'm currently planning on using:
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
$this->_redirect(Mage::getUrl("customer/account/login"));
}
problem is I'm don't know where to place the syntax I tried placing it in the pre dispatch function in the index controller of my module but it didn't work I was wondering where do I place this? do I use an event? is there a better way to implement it? I'm using magento btw
the flow is Navigation is clicked-> check if user is logged in -> if not redirect to login/register page
Aucun commentaire:
Enregistrer un commentaire