prestashop 1.7.x如何在创建用户后显示自定义成功消息

时间:2018-09-01 16:05:18

标签: php prestashop prestashop-1.7

在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.');

1 个答案:

答案 0 :(得分:0)

尝试:

$this->displayConfirmation('Thank you for creating a account.');

致谢