Отдельный шаблон для текстовой страницы opencart?

Здравствуйте)
Вопрос скорее всего тупой, но все же не судите начинающего.

Как сделать отдельную страницу, например "Доставка и оплата" и привязать ее к отдельному шаблону.
Может есть какие-то бесплатные модули?
помогите пожалуйста)
  • Вопрос задан
  • 1125 просмотров
Решения вопроса 1
zoozag
@zoozag
Opencart
Смотри кнтроллер information/information
Там ищи строки типа:
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
				$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/information.tpl', $data));
			} else {
				$this->response->setOutput($this->load->view('default/template/information/information.tpl', $data));
			}

Тебе нужно в это условие добавить проверку по $information_id т.е. примерно так:
if ($information_id == {id нужной статьи}) {
	if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
		$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/{новое название шаблона}.tpl', $data));
	} else {
		$this->response->setOutput($this->load->view('default/template/information/{новое название шаблона}.tpl', $data));
	}
} else {
	if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
		$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/information.tpl', $data));
	} else {
		$this->response->setOutput($this->load->view('default/template/information/information.tpl', $data));
	}
}
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы