艺术家数据仅保存到数据库,但未登录到magento
我是马根托的新手。我们有艺术家的概念在我的网站 我想,当一个艺术家注册,数据将保存到数据库,但它不会被登录 默认情况下,数据保存到数据库,它将转到仪表板页面,但我希望艺术家注册后,数据将保存到数据库,但它不会登录并重定向到同一页面 我尝试了很多,但无法停止登录的概念,只是重定向到同一页,但登录功能仍在使用此条件工作 AccountController.php艺术家数据仅保存到数据库,但未登录到magento,magento,magento-1.9,magento-1.9.1,Magento,Magento 1.9,Magento 1.9.1,我是马根托的新手。我们有艺术家的概念在我的网站 我想,当一个艺术家注册,数据将保存到数据库,但它不会被登录 默认情况下,数据保存到数据库,它将转到仪表板页面,但我希望艺术家注册后,数据将保存到数据库,但它不会登录并重定向到同一页面 我尝试了很多,但无法停止登录的概念,只是重定向到同一页,但登录功能仍在使用此条件工作 AccountController.php if($data['artists']=='art'){ $successUrl = $this->
if($data['artists']=='art'){
$successUrl = $this->_getUrl('artistregister/index/index', array('_secure' => true));
}
else{
$successUrl = $this->_getUrl('*/*/index', array('_secure' => true));
}
protected function _successProcessRegistration(Mage_Customer_Model_Customer $customer)
{
$session = $this->_getSession();
if ($customer->isConfirmationRequired()) {
/** @var $app Mage_Core_Model_App */
$app = $this->_getApp();
/** @var $store Mage_Core_Model_Store*/
$store = $app->getStore();
$customer->sendNewAccountEmail(
'confirmation',
$session->getBeforeAuthUrl(),
$store->getId()
);
$customerHelper = $this->_getHelper('customer');
$session->addSuccess($this->__('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href="%s">click here</a>.',
$customerHelper->getEmailConfirmationUrl($customer->getEmail())));
$url = $this->_getUrl('*/*/index', array('_secure' => true));
} else {
$session->setCustomerAsLoggedIn($customer);
$url = $this->_welcomeCustomer($customer);
}
$this->_redirectSuccess($url);
return $this;
}
if($data['artists']=='art'){
$successUrl=$this->u getUrl('artistregister/index/index',数组('u secure'=>true));
}
否则{
$successUrl=$this->_getUrl('*/*/index',数组(''u secure'=>true));
}
受保护功能\u成功处理注册(Mage\u客户\u型号\u客户$Customer)
{
$session=$this->_getSession();
如果($customer->isConfirmationRequired()){
/**@var$app Mage\u Core\u Model\u app*/
$app=$this->_getApp();
/**@var$store Mage\u Core\u Model\u store*/
$store=$app->getStore();
$customer->sendNewAccountEmail(
“确认”,
$session->getBeforeAuthUrl(),
$store->getId()
);
$customerHelper=$this->_getHelper('customer');
$session->addSuccess($this->\uuuuuuu('需要进行帐户确认。请检查您的电子邮件中的确认链接。要重新发送确认电子邮件,请。“”,
$customerHelper->getEmailConfirmationUrl($customer->getEmail());
$url=$this->_getUrl('*/*/index',数组(''u secure'=>true));
}否则{
$session->setCustomerAsLoggedIn($customer);
$url=$this->\u欢迎客户($customer);
}
$this->\u重定向成功($url);
退还$this;
}
如果有人知道这一点,请帮助我。
谢谢您需要在函数中设置条件
\u successProcessRegistration
在此功能中,客户按功能登录会话
$session->setCustomerAsLoggedIn($customer);
$url = $this->_welcomeCustomer($customer);
您可以在这里为您的艺术家设置条件,并根据您的要求更改URL 你能在这里发布你的保存操作吗?艺术家数据保存在控制器中?我更新了代码,请参见上文。你能告诉我我将要写的条件是什么吗?因为当我写这个时,如果($data['artists'!='art'){}其他{$session->setCustomerLoggedin($customer);$url=$this->\u welcomeCustomer($customer)}………..它不工作我更新了代码函数成功处理注册请参见上文我现在已经完成它工作正常,但问题是当我单击注册按钮时,它正在重定向到主页……请建议