Схема
public mixed
getTotalReviewsByProductId (
$product_id )
Аргументы
Аргумент |
Возможный тип |
Описание |
$product_id |
— |
— |
Описание
Метод пока еще не документирован.
Исходный код
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "review r LEFT JOIN " . DB_PREFIX . "product p ON (r.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND p.date_available <= NOW() AND p.status = '1' AND r.status = '1' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
return $query->row['total'];