$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_default'] = $this->language->get('text_default');
$this->data['text_enabled'] = $this->language->get('text_enabled');
$this->data['text_disabled'] = $this->language->get('text_disabled');
$this->data['entry_title'] = $this->language->get('entry_title');
$this->data['entry_description'] = $this->language->get('entry_description');
$this->data['entry_store'] = $this->language->get('entry_store');
$this->data['entry_keyword'] = $this->language->get('entry_keyword');
$this->data['entry_bottom'] = $this->language->get('entry_bottom');
$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
$this->data['entry_status'] = $this->language->get('entry_status');
$this->data['entry_layout'] = $this->language->get('entry_layout');
$this->data['button_save'] = $this->language->get('button_save');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['tab_general'] = $this->language->get('tab_general');
$this->data['tab_data'] = $this->language->get('tab_data');
$this->data['tab_design'] = $this->language->get('tab_design');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
if (isset($this->error['title'])) {
$this->data['error_title'] = $this->error['title'];
} else {
$this->data['error_title'] = array();
}
if (isset($this->error['description'])) {
$this->data['error_description'] = $this->error['description'];
} else {
$this->data['error_description'] = array();
}
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, 'SSL'),
'separator' => ' :: '
);
if (!isset($this->request->get['information_id'])) {
$this->data['action'] = $this->url->link('catalog/information/insert', 'token=' . $this->session->data['token'] . $url, 'SSL');
} else {
$this->data['action'] = $this->url->link('catalog/information/update', 'token=' . $this->session->data['token'] . '&information_id=' . $this->request->get['information_id'] . $url, 'SSL');
}
$this->data['cancel'] = $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, 'SSL');
if (isset($this->request->get['information_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
$information_info = $this->model_catalog_information->getInformation($this->request->get['information_id']);
}
$this->data['token'] = $this->session->data['token'];
$this->load->model('localisation/language');
$this->data['languages'] = $this->model_localisation_language->getLanguages();
if (isset($this->request->post['information_description'])) {
$this->data['information_description'] = $this->request->post['information_description'];
} elseif (isset($this->request->get['information_id'])) {
$this->data['information_description'] = $this->model_catalog_information->getInformationDescriptions($this->request->get['information_id']);
} else {
$this->data['information_description'] = array();
}
$this->load->model('setting/store');
$this->data['stores'] = $this->model_setting_store->getStores();
if (isset($this->request->post['information_store'])) {
$this->data['information_store'] = $this->request->post['information_store'];
} elseif (isset($this->request->get['information_id'])) {
$this->data['information_store'] = $this->model_catalog_information->getInformationStores($this->request->get['information_id']);
} else {
$this->data['information_store'] = array(0);
}
if (isset($this->request->post['keyword'])) {
$this->data['keyword'] = $this->request->post['keyword'];
} elseif (!empty($information_info)) {
$this->data['keyword'] = $information_info['keyword'];
} else {
$this->data['keyword'] = '';
}
if (isset($this->request->post['bottom'])) {
$this->data['bottom'] = $this->request->post['bottom'];
} elseif (!empty($information_info)) {
$this->data['bottom'] = $information_info['bottom'];
} else {
$this->data['bottom'] = 0;
}
if (isset($this->request->post['status'])) {
$this->data['status'] = $this->request->post['status'];
} elseif (!empty($information_info)) {
$this->data['status'] = $information_info['status'];
} else {
$this->data['status'] = 1;
}
if (isset($this->request->post['sort_order'])) {
$this->data['sort_order'] = $this->request->post['sort_order'];
} elseif (!empty($information_info)) {
$this->data['sort_order'] = $information_info['sort_order'];
} else {
$this->data['sort_order'] = '';
}
if (isset($this->request->post['information_layout'])) {
$this->data['information_layout'] = $this->request->post['information_layout'];
} elseif (isset($this->request->get['information_id'])) {
$this->data['information_layout'] = $this->model_catalog_information->getInformationLayouts($this->request->get['information_id']);
} else {
$this->data['information_layout'] = array();
}
$this->load->model('design/layout');
$this->data['layouts'] = $this->model_design_layout->getLayouts();
$this->template = 'catalog/information_form.tpl';
$this->children = array(
'common/header',
'common/footer'
);
$this->response->setOutput($this->render());