Answer the question
In order to leave comments, you need to log in
How to get page path by information_id?
There is information_id , as well as code:
$this->load->language('information/information');
$this->load->model('catalog/information');
$page = $this->model_catalog_information->getInformation($information_id);
Array
(
[information_id] => 9
[bottom] => 0
[sort_order] => 5
[status] => 1
[language_id] => 1
[title] => Заголовок страницы
[description] => ''
[meta_title] => ''
[meta_description] =>
[meta_keyword] =>
[store_id] => 0
)
Answer the question
In order to leave comments, you need to log in
In general, I solved the issue in my own way:
Added a function to "catalog\model\catalog\information.php"
public function getInformationAdd($information_id) {
$query = $this->db->query("SELECT DISTINCT *, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'information_id=" . (int)$information_id . "') AS keyword FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE i.information_id = '" . (int)$information_id . "' AND id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1'");
return $query->row;
}
Array
(
[information_id] => 9
[bottom] => 0
[sort_order] => 5
[status] => 1
[language_id] => 1
[title] => 'Заголовок страницы'
[description] => ''
[meta_title] => 'Заголовок страницы в метатеге'
[meta_description] =>
[meta_keyword] =>
[store_id] => 0
[keyword] => 'zagolovok-stranitzi'
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question