Hello,
in Admin, version 3.0.3.8, I'd like to see which customer left each review (I don't allow guests to post reviews).
I saw that the "oc_review" table in the database contains the customer ID so how can I display the customer's name in the review list?
Thank you!
in Admin, version 3.0.3.8, I'd like to see which customer left each review (I don't allow guests to post reviews).
I saw that the "oc_review" table in the database contains the customer ID so how can I display the customer's name in the review list?
Thank you!
Try:
Code: Select all
SELECT * FROM `oc_review` r
JOIN `oc_customer` c
ON r.customer_id = c.customer_id;
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thank you Paul!
I'm not SQL savvy enough. I know I need to edit admin/model/review.php but I don't know exactly where.
Should I change this:
or create a new function?
I'm not SQL savvy enough. I know I need to edit admin/model/review.php but I don't know exactly where.
Should I change this:
Code: Select all
public function getReviews($data = array()) {
$sql = "SELECT r.review_id, pd.name, r.author, r.rating, r.status, r.date_added FROM " . DB_PREFIX . "review r LEFT JOIN " . DB_PREFIX . "product_description pd ON (r.product_id = pd.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "'";
This really is such a simple thing that if it doesn't make sense, you probably shouldn't be poking around with any code at all on a live ecommerce shop.
You should probably find a freelancer from the Commercial Support Forum.
However, it does seem to already output the Author name "r.author" - isn't that working on yours?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Don't worry, it's not online yet. I know HTML and CSS well, a little PHP but not SQL. "Author" is what customers enter when they write the review and can be different from their real name. I'd just like to be able to link reviews to customers in the admin area. It's one of those things that I don't understand why it hasn't been done, given that the database is already set up to do so.
Thank you anyway for your time!
Thank you anyway for your time!

Who is online
Users browsing this forum: No registered users and 6 guests