当用户从表单提交数据时,我试图显示错误,但没有错误。
尝试按如下方式放入驱动程序(迫使您向我显示错误)
public function postProcess()
{
$ this-> errors [] = Tools :: DisplayError ('Invalid e-mail address');
}
并在模板中
{include file = "$ tpl_dir. / errors.tpl"}
<form method="post" action="{$request_uri|escape:'htmlall':'UTF-8'}" class="std" id="form_confirmPassword">
<fieldset>
<p class="text">
<label for="email"> {l s = 'E-mail'} </ label>
<input type = "text" id = "email" name = "email" value = "{if isset ($ smarty.post.email)} {$ smarty.post.email | escape: 'htmlall': 'UTF-8 '| stripslashes} {/ if} "/>
</ p>
</ fieldset>
</ form>
无论如何,我无法显示任何消息错误,例如 prestashop 本机模块显示...