【问题标题】:prestashop 1.7.x how to display custom success message after user creationprestashop 1.7.x 如何在用户创建后显示自定义成功消息
【发布时间】:2019-02-07 08:07:57
【问题描述】:

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

【问题讨论】:

    标签: php prestashop prestashop-1.7


    【解决方案1】:

    尝试:

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

    问候

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-21
      • 2017-04-04
      • 2023-03-06
      相关资源
      最近更新 更多