在Prestashop 1.7.1上,我想在用户创建帐户后显示自定义成功消息
用户注册后,现在的默认操作是直接重定向回首页
public function checkAccess()
{
if ($this->context->customer->isLogged() && !$this->ajax) {
$this->redirect_after = ($this->authRedirection) ? urlencode ($this->authRedirection) : 'my-account';
$this->redirect();
}
return parent::checkAccess();
}
我想在客户注册后显示类似引导警报(成功或危险)的通知
在用户注册并重定向回首页后,这样的内容将显示为消息(成功消息,不是警告,如下所示)
this->warning = $this->l('Thank you for creating a account.');
答案 0 :(得分:0)
尝试:
$this->displayConfirmation('Thank you for creating a account.');
致谢