优化ecshop商城用户评论体验效果

2016-09-07 22:02 来源:www.chinab4c.com 作者:ecshop专家

ecshop评论优化后结果展示:

具体操作如下: 
 
一、修改/admin/comment_manage.php 
 
$smarty->assign('admin_info',   $admin_info); //管理员信息  
替换为:
 
$smarty->assign('user_name',   $comment_info['user_name']); //评论者用户名
$smarty->assign('user_email',   $comment_info['email']); //评论者邮箱 
 
删除一下语句:
 
$sql = "SELECT user_name, email FROM ". $ecs->table('admin_user').
           " WHERE user_id = '$_SESSION[admin_id]'";
    $admin_info = $db->getRow($sql);
二、修改/admin/templates/comment_info.htm
 
<tr>
    <td>{$lang.user_name}:</td>
    <td><input name="user_name" type="text" {if $reply_info.user_name eq ""}value="{$admin_info.user_name}"{else} value="{$reply_info.user_name}"{/if} size="30" readonly="true" /></td>
</tr>www.zuimoban.com
<tr>
    <td>{$lang.email}:</td>
    <td><input name="email" type="text" {if $reply_info.email eq ""}value="{$admin_info.email}"{else} value="{$reply_info.email}"{/if} size="30" readonly="true" /></td>
</tr>
替换为:
 
<tr>
    <td>{$lang.user_name}:</td>
    <td><input name="user_name" type="text" {if $user_name}value="{$user_name}"{else} value="{$lang.anonymous}"{/if} size="30" readonly="true" /></td>
</tr>
<tr>
    <td>{$lang.email}:</td>
    <td><input name="email" type="text" value="{$user_email}" size="30" readonly="true" /></td>
</tr>

实现后ecshop网站评论体验就更佳了
(责任编辑:chinab4c)