2.3.0.2
Hi there,
I am trying to get the customer ID (The customer who left the review) onto review.tpl.
Currently review.tpl pulls data including the author, date and rating from the review table (which also contains the customer ID value).
It comes from the controller product.php: $this->model_catalog_review->getReviewsByProductId(...).
getReviewsByProductId(...), currently selects all values from the review table other than customer_id ... simply adding ", r.customer_id," doesn't work for me. I just get undefined index. Can someone tell me what I'm doing wrong
Thanks!
That is correct. Since we do not display the customer's profile information from the store-front end other than the actual customer profile's page where the current customer is being logged in, it is not an issue but rather for confidentiality reasons.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks for the reply straightlight !straightlight wrote: ↑Wed Jul 18, 2018 9:13 pmThat is correct. Since we do not display the customer's profile information from the store-front end other than the actual customer profile's page where the current customer is being logged in, it is not an issue but rather for confidentiality reasons.
I see it no more of a confidentiality issue than publishing the authors name unless of course there is a security issue. Is there a security reason why the customer_id is kept / should be kept hidden for confidentiality reasons?
Is this value not possible to retrieve through the getReviewsByProductId function? Is something stopping it? Or is it retrievable and I'm just not doing it properly - what way would I go about doing this?
Any help would be appreciated!
It is retrievable and you are not doing it properly.
Of course. The customer profile's information would also allow to display all confidential information which may be against the customer's consent while the author's name is simply showing the name of the poster as it does not refer to any profiles.Is there a security reason why the customer_id is kept / should be kept hidden for confidentiality reasons?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am confused? Does retrieving the customer ID from the review table (review_id, customer_id, rating, text, date, status and author) allow access to all the customer's profile information? I am a beginner to this.straightlight wrote: ↑Wed Jul 18, 2018 9:28 pmIt is retrievable and you are not doing it properly.
Of course. The customer profile's information would also allow to display all confidential information which may be against the customer's consent while the author's name is simply showing the name of the poster as it does not refer to any profiles.Is there a security reason why the customer_id is kept / should be kept hidden for confidentiality reasons?
This is what I am doing on the tpl: <?php echo $review['customer_id']; ?>
In the controller product.php:
foreach ($results as $result) {
$data['reviews'][] = array(
'customer_id' => $result['customer_id'],
And the model review.php in function getReviewsByProductId
$query = $this->db->query("SELECT r.review_id, r.customer_id,
Could you tell me where I am going wrong?
Thanks again!
Who is online
Users browsing this forum: Google [Bot] and 136 guests