-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 []數組嗎? –