-2
我试图显示一个错误,当用户从表单提交数据,但没有错误。创建prestashop模块试图在PrestaShop模块上显示错误
尝试把在驱动程序(强迫你告诉我一个错误) 如下
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本地模块显示...
你确定你用smarty变量赋值你的errors []数组吗? –