0

I have a extension that worked perfect on opencart 1.5.x

Now with opencart 2.0 with the changes made Adding an admin page on OpenCart version 2 that I've read from here "shadyyx" only few inputs save and the others don't.

Example:

Controller ( not complete ) :

    $this->load->model('setting/setting');

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
    $this->model_setting_setting->editSetting('advanced_stock_notification', $this->request->post);

    $this->session->data['success'] = $this->language->get('text_success');

    $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
}

    if (isset($this->request->post['notify_mode'])) {
    $data['notify_mode'] = $this->request->post['notify_mode'];
} else {
    $data['notify_mode'] = $this->config->get('notify_mode');
}

Template ( not complete )

 <input  name="notify_mode" id="notify_mode" value="<?php echo $notify_mode; ?>"  />

Form:

<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
Community
  • 1
  • 1
user2252671
  • 59
  • 1
  • 12
  • You may have to refine the question, it is not clear what is the problem and what is expected. – elembivos Feb 24 '15 at 12:26
  • found solution , after I changed $data[''] to be different with config->get and post , and changed the input to the one that I put on post and get it worked. – user2252671 Feb 27 '15 at 15:47

0 Answers0