Hellp there
I'm not sure if this is right place to ask it then move it if not dear moderator!
currently in default opencart 2.0.3.1 when users put their reviews on a product, it won't show up immediately and need admin to activate it.
is there any way to change it? thanks
Hi,
Open this file:
find:
change it to:
Open this file:
Code: Select all
catalog/model/catalog/review.php
Code: Select all
$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($data['text']) . "', rating = '" . (int)$data['rating'] . "', date_added = NOW()");
Code: Select all
$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($data['text']) . "', rating = '" . (int)$data['rating'] . "', status = '" . (int)1 . "', date_added = NOW()");
Thank you so much, worked well, only 1 thing to make it perfect now:DigitCart wrote: ↑Mon Jul 17, 2017 10:00 pmHi,
Open this file:find:Code: Select all
catalog/model/catalog/review.php
change it to:Code: Select all
$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($data['text']) . "', rating = '" . (int)$data['rating'] . "', date_added = NOW()");
Code: Select all
$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($data['text']) . "', rating = '" . (int)$data['rating'] . "', status = '" . (int)1 . "', date_added = NOW()");
now after review a message tells customer " Thank you for your review. It has been submitted to the webmaster for approval" can you tell me where I can change its text?.
You are welcome.
this file:
find and change the text:
this file:
Code: Select all
catalog/language/english/product/product.php
Code: Select all
$_['text_success'] = 'Thank you for your review. It has been submitted to the webmaster for approval.';
Who is online
Users browsing this forum: No registered users and 65 guests