2017-04-09 125 views

回答

0
  1. 這個電子郵件中review表中添加列。 enter image description here

  2. 打開從目錄/視圖/主題/默認/模板/產品/ product.tpl視圖文件和電子郵件

<div class="form-group"> 
 
    <div class="col-sm-12"> 
 
    <label class="control-label" for="input-email">Email</label> 
 
    <input type="text" name="user_email" value="" id="input-email" class="form-control" /> 
 
    </div> 
 
</div>

  • 從目錄/ model/catalog/review.php中打開模型並找到addReview()方法。在這種方法中,更改查詢

    $ this-> db-> query(「INSERT INTO」.DB_PREFIX。「review SET author ='」。$ this-> db-> escape($ data ['name' ])。「',customer_id ='」。(int)$ this-> customer-> getId()。「',user_email ='」。$ this-> db-> escape($ data ['user_email']) 。'',product_id ='「。(int)$ product_id。」',text ='「。$ this-> db-> escape($ data ['text'])。'',rating ='」。( int)$ data ['rating']。「',date_added = NOW()」);

  • +0

    好的。我這樣做,我已經在電子郵件中使用數據庫。我如何在作者和文本審查字段附近的字段電子郵件的管理面板中顯示它們? –

    相關問題