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

    好的。我这样做,我已经在电子邮件中使用数据库。我如何在作者和文本审查字段附近的字段电子邮件的管理面板中显示它们? –

    相关问题