我希望这对专家来说是一个非常简单的问题,但对我来说不是。
我只想,当我的网站网址打开时,它会自动重定向到客户登录页面,但条件是客户登录时,如果他点击主页链接,则显示客户仪表板或客户信息。
有人可以帮我请给我任何解决方案,我正在使用magento 1.7.X
提前致谢
我希望这对专家来说是一个非常简单的问题,但对我来说不是。
我只想,当我的网站网址打开时,它会自动重定向到客户登录页面,但条件是客户登录时,如果他点击主页链接,则显示客户仪表板或客户信息。
有人可以帮我请给我任何解决方案,我正在使用magento 1.7.X
提前致谢
我的问题得到了解决我创建了 cms 页面并输入了此代码
{{block type='core/template' template='page/html/custom_login.phtml'}}
然后我制作了页面和代码-
`<?php //Check If Customer Is Logged In Or Not.
if (!Mage::getSingleton("customer/session")->isLoggedIn())
{
$session = Mage::getSingleton("customer/session");
// Store The Current Page Url Where User will be redirected once loggedin
$session->setBeforeAuthUrl(Mage::helper("core/url")->getCurrentUrl());
$customerLoginURL = $this->getBaseUrl() . "customer/account/login";
Mage::app()->getFrontController()->getResponse()>setRedirect($customerLoginURL)- >sendResponse();
}else{
//redirect to login
$customerLoginURL = $this->getBaseUrl() . "customer/account/login";
Mage::app()->getFrontController()->getResponse()->setRedirect($customerLoginURL)->sendResponse();
}
?>`
如果有人想为此提供帮助,可以问我对此发表评论