Upgrading modules from OpenCart 1.5.x to OpenCart 2.0.x

Opencart has released version opencart 2 and it is very Cheap Manchester United football shirts different from opencart 1.5+. Extensions build in 1.5 will not work on opencart 2.x.x  . You have to upgrade these extension for opencart version 2.x.x

Changes in opencart 2

Coding standards: As many CMS doesn’t use this PHP end tag ” ?> “ in the php file. Opencart 2 also not use the PHP end tag ” ?> “.

Bootstrap : Opencart 2 uses bootstrap 3.0 .

OCMOD instead of VQMOD : It is almost the same. It has similar syntax, but OCMOD is cheap football tops built in the OpenCart. OCMOD planned to be Cheap Barcelona football shirts more simple for reduce amount of the conflicts.

Controllers : Controller changes has been cheap football shirts given below.

1. Assigning template variables

OpenCart 1.5:

$this->data['foo'] = $foo;

OpenCart 2.0:

$data['foo'] = $foo;

2. Assigning a template

OpenCart 1.5:

$this->template = 'module/module.tpl';

OpenCart 2.0:

$this->response->setOutput($this->load->view('module/module', $data));

3. Adding child controllers

OpenCart 1.5:

$this->children = array(

OpenCart 2.0 (you can load controllers now):

$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');

4. Redirect

OpenCart 1.5:

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

OpenCart 2.0:

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

5. Status field is mandatory for the module now:

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

Note : If during upgrade your modules you will find cheap football kits a new change not described here. I will add it in blog.