我是opencart的新手,刚开始学习它。我想知道每个产品都有两个链接,名为0评论,并在opencart中写评论,但没有任何链接点击它。如何从管理员那里点击它进行评论和管理员应该知道用户给出了多少评论?
答案 0 :(得分:1)
Catalog > Reviews
- 此处列出了所有评论。度过愉快的一天:)!
答案 1 :(得分:0)
自动启用评论。 添加状态='1'
编辑:catalog / model / catalog / review.php
查找
public function addReview($product_id, $data) {
$this->db->query("INSERT INTO " . DB_PREFIX . "review SET author = '" . $this->db->escape($data['name']) . "', customer_id = '" . (int)$this->customer->getId() . "', product_id = '" . (int)$product_id . "', text = '" . $this->db->escape(strip_tags($data['text'])) . "', rating = '" . (int)$data['rating'] . "', date_added = NOW()");
}
更改为
public function addReview($product_id, $data) {
$this->db->query("INSERT INTO " . DB_PREFIX . "review SET author = '" . $this->db->escape($data['name']) . "', customer_id = '" . (int)$this->customer->getId() . "', product_id = '" . (int)$product_id . "', text = '" . $this->db->escape(strip_tags($data['text'])) . "', rating = '" . (int)$data['rating'] . "', status = '1', date_added = NOW()");
}
自动启用评论。