我是新的magento。我的網站上有藝術家概念。藝術家數據只有保存到數據庫,但未登錄馬真羅
我想,當一個藝術家寄存器,數據將保存到數據庫中,但它不會被登錄。
默認情況下,數據被保存到數據庫,它將進入儀表板頁面,但我想,當一個藝術家會做註冊然後數據將保存到數據庫,但不會登錄並重定向到同一頁面。
我嘗試了很多,但無法停止登錄概念只重定向到相同的頁面,但登錄functionalitily依然採用這種狀況
工作AccountController.php
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;
}
如果有誰知道這一點,請幫助我出去了。 感謝
你可以在這裏發表你的保存動作,藝術家數據保存在控制器中嗎? –
我更新的代碼,請參見上面 – kingp