Доброго времени суток! Имеется OpenCart 2.3, сейчас настраиваю вывод договора с заполненными данными пользователя, но они все никак не хотят отображаться в tpl
Контроллер:
$this->load->model('account/signup');
$vendor_data = $this->model_account_signup->getVendorDataUI();
foreach ($vendor_data AS $result) {
$data['vendor_data'][] = array (
'username' => $result['username'],
'firstname' => $result['firstname'],
'middle_name' => $result['middle_name'],
'lastname' => $result['lastname'],
'date_added' => $result['date_added']
);
$username = $result['username'];
$firstname = $result['firstname'];
$middle_name = $result['middle_name'];
$lastname = $result['lastname'];
$date_added = $result['date_added'];
}
$data['username'] = $username;
$data['date_added'] = $date_added;
$data['firstname'] = $firstname;
$data['middle_name'] = $middle_name;
$data['lastname'] = $lastname;
$this->load->language('account/dogovor');
$data['text_head'] = $this->language->get('text_head');
$data['text_first'] = sprintf($this->language->get('text_first'), $lastname, $firstname, $middle_name);
$data['text_city'] = $this->language->get('text_city');
$data['text_date'] = $this->language->get('text_date');
$data['text_head'] = $this->language->get('text_head');
$data['text_predmet'] = $this->language->get('text_predmet');
$data['text_second'] = $this->language->get('text_second');
$data['text_oplata'] = $this->language->get('text_oplata');
$data['text_third'] = $this->language->get('text_third');
$data['text_poryadok'] = $this->language->get('text_poryadok');
$data['text_fourth'] = $this->language->get('text_fourth');
$data['text_otvet'] = $this->language->get('text_otvet');
$data['text_fifth'] = $this->language->get('text_fifth');
$data['text_fors'] = $this->language->get('text_fors');
$data['text_sixth'] = $this->language->get('text_sixth');
$data['text_osob'] = $this->language->get('text_osob');
$data['text_seventh'] = $this->language->get('text_seventh');
$data['text_rekv'] = $this->language->get('text_rekv');
$data['text_eighth'] = $this->language->get('text_eighth');
$data['text_seller'] = $this->language->get('text_seller');
$data['text_nickname'] = $this->language->get('text_nickname');
$this->response->setOutput($this->load->view('common/success', $data));
Модель:
public function getVendorDataUI() {
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "user` WHERE username = '" . (int)$this->request->get['username'] . "'");
return $query->row;
}
Вызов контролера происходит по ссылке вида:
https://tu***.ru/index.php?route=account/signupsuccess&username=avrora