Модуль Easy News опенкарт 1.5.6.
Нашёл данное решение:
https://opencartforum.com/topic/27094-google-sitem...
Но по данному пути нету данного файла:
"Но важно в файле catalog/model/catalog/news.php добавить перед "public function getNews($data) {" следующий код."
Как вариант..есть файл по пути такому /catalog/model/module
можно ли вставить в него тот кусок, который там написан..
Содержание файла в module(news.php):
<?php
//-----------------------------------------------------
// News Module for Opencart v1.5.5
// Modified by villagedefrance
// contact@villagedefrance.net
//-----------------------------------------------------
class ModelModuleNews extends Model {
public function updateViewed($news_id) {
$this->db->query("UPDATE " . DB_PREFIX . "news SET viewed = (viewed + 1) WHERE news_id = '" . (int)$news_id . "'");
}
public function getNewsStory($news_id) {
$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE n.news_id = '" . (int)$news_id . "' AND nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1'");
return $query->row;
}
public function getNews($start,$limit) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1' ORDER BY n.date_added DESC LIMIT $start, $limit ");
return $query->rows;
}
public function getNewsShorts($limit) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1' ORDER BY n.date_added DESC LIMIT " . (int)$limit);
return $query->rows;
}
public function getTotalNews() {
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1'");
if ($query->row) {
return $query->row['total'];
} else {
return FALSE;
}
}
}
?>