2.7版本,如果设置留言板不显示商品详细评论?

2016-07-07 15:00 来源:www.chinab4c.com 作者:ecshop专家

2.7版本,如果设置留言板不显示商品详细评论?

只显示用户得留言,不显示评论。

谢谢!

回答:
那你再处理过滤条件了

我也需要这样修改,,,


商品评论本就应该显示在商品展示的页面上面,,,,怎么能跑到留言板上面去呢?


如果生意好了,商品评论自然就会很多很多,,那时的留言本全都是商品评论,多不好,真正的留言反而难找出来了,这样不好??

望官方修改!

2楼正解 得修改程序代码

2.26的那一版不就是分开了嘛! 你可以参考下啊!



修改方法:以2.7 utf8版本为例

用纯文件编辑器(如记事本,editplus),打开根文件夹下面 messgage.php

修改119--122
  1. $sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('comment')." WHERE STATUS =1 AND comment_type =0 ";
  2. $record_count = $db->getOne($sql);
  3. $sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('feedback')." WHERE `msg_area`='1' AND `msg_status` = '1' ";
  4. $record_count += $db->getOne($sql);
复制代码
修改为如下代码:
  1. //$sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('comment')." WHERE STATUS =1 AND comment_type =0 ";

  2. //$record_count = $db->getOne($sql);

  3. $sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('feedback')." WHERE `msg_area`='1' AND `msg_status` = '1' ";

  4. $record_count = $db->getOne($sql);
复制代码
再修改149--156行代码
  1. $sql = "(SELECT 'comment' AS tablename,comment_id AS ID, content AS msg_content, null AS msg_title, add_time AS msg_time, id_value AS id_value, comment_rank AS comment_rank, null AS message_img, user_name AS user_name, '6' AS msg_type ";
  2. $sql .= " FROM " .$GLOBALS['ecs']->table('comment');
  3. $sql .= "WHERE STATUS =1 AND comment_type =0) ";
  4. $sql .= " UNION ";
  5. $sql .= "(SELECT 'feedback' AS tablename, msg_id AS ID, msg_content AS msg_content, msg_title AS msg_title, msg_time AS msg_time, null AS id_value, null AS comment_rank, message_img AS message_img, user_name AS user_name, msg_type AS msg_type ";
  6. $sql .= " FROM " .$GLOBALS['ecs']->table('feedback');
  7. $sql .= " WHERE `msg_area`='1' AND `msg_status` = '1') ";
  8. $sql .= " ORDER BY msg_time DESC ";
复制代码
修改为如下:
  1. $sql = "SELECT 'feedback' AS tablename, msg_id AS ID, msg_content AS msg_content, msg_title AS msg_title, msg_time AS msg_time, null AS id_value, null AS comment_rank, message_img AS message_img, user_name AS user_name, msg_type AS msg_type ";

  2. $sql .= " FROM " .$GLOBALS['ecs']->table('feedback');

  3. $sql .= " WHERE `msg_area`='1' AND `msg_status` = '1' ";

  4. $sql .= " ORDER BY msg_time DESC ";
复制代码


已在本地测试通过.
如有不明,请跟帖询问.
---------------------------分割线-----------------------------
作者简介:
灵犀科技,专业ecshop二次开发,及lamp架构网站制作.
最近案例:
http://www.lionhit.net/shouji
http://www.hoovon.com



上面的文件修改部分较多, 如果修改者不懂程序,可直接下载本帖的附件.
本帖的附件为utf8格式, 所以,为了防止出现问题, 请不要利用附件直接覆盖同名文件的方式.

稳妥的办法是:
1:打开原message.php文件,全选,清空.
2:打开附件message.php,全选,复制.
3:粘贴进入原message.php.
4:保存原message.php

留个纪念!

非常好!顶

非常好,解决问题