aboutsummaryrefslogtreecommitdiffstats
path: root/public/catalog/model/design/translation.php
blob: 9168a54857bb9a9c06443943cfcb7428b4a8216a (plain)
1
2
3
4
5
6
7
8
9
10
<?php
class ModelDesignTranslation extends Model {
	public function getTranslations($route) {
		$language_code = !empty($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');
		
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "translation WHERE store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "' AND (route = '" . $this->db->escape($route) . "' OR route = '" . $this->db->escape($language_code) . "')");

		return $query->rows;
	}
}