Answer the question
In order to leave comments, you need to log in
How to make a notification about a new review in the admin panel?
I'm using Opencart 3. I'm trying to display a notification about a new review in the admin panel. There is a module with reviews admin/controller/catalog/p_review.php:
<?php
class ControllerCatalogPReview extends Controller {
...
// Reviews
$this->load->model('catalog/review');
$review_total = $this->model_catalog_review->getTotalReviews(array('filter_status' => 0));
$data['review_total'] = $review_total;
$data['review'] = $this->url->link('catalog/review', 'user_token=' . $this->session->data['user_token'] . '&filter_status=0', true);
...
}
{% if p_review_total >= 1 %}
<li class="dropdown"><a href="{{ p_review }}"> <i class="fa fa fa-comments-o fa-lg blinking" style="color:green"></i> <span style="font-size: 10px">{{ text_review }}</span> <sub>{{ text_new_review }}: ({{ review_total }})</sub></a></li>
{% endif %}
$this->load->model('catalog/p_review');
$p_reviewtotal = $this->model_catalog_p_review->getTotalReviews(array('status' => 0));
$data['p_reviewtotal'] = $p_reviewtotal;
$data['p_review'] = $this->url->link('catalog/p_review', 'user_token=' . $this->session->data['user_token'] . '&status=0', true);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question