N
N
Nikolay2020-01-31 16:36:27
opencart
Nikolay, 2020-01-31 16:36:27

Why does changing the home.php controller not affect the page?

Hello! We have a simple controller/catalog/controller/common/home.php

class ControllerCommonHome extends Controller {
  public function index() {
    $this->document->setTitle($this->config->get('config_meta_title'));
    $this->document->setDescription($this->config->get('config_meta_description'));
    $this->document->setKeywords($this->config->get('config_meta_keyword'));

    if (isset($this->request->get['route'])) {
      $this->document->addLink(HTTP_SERVER, 'canonical');
    }

    $this->load->model('catalog/information');
    $data['main_text'] = $this->model_catalog_information->getInformation(11);
    $data['column_left'] = $this->load->controller('common/column_left');
    $data['column_right'] = $this->load->controller('common/column_right');
    $data['content_top'] = $this->load->controller('common/content_top');
    $data['content_bottom'] = $this->load->controller('common/content_bottom');
    $data['footer'] = $this->load->controller('common/footer');
    $data['header'] = $this->load->controller('common/header');


    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/home.tpl')) {
      $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/common/home.tpl', $data));
    } else {
      $this->response->setOutput($this->load->view('default/template/common/home.tpl', $data));
    }
  }
}


I can completely clean it up and the main page looks the same.
But if I delete it, then the appearance will change a little, several blocks will disappear.

Edits in the template
/catalog/view/theme/default/template/common/home.tpl
- affect the page.

/system/storage/cache- cleaned, does not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lazuren, 2020-02-06
@lazuren

Try to clean this system/storage/modificationfolder (except for the index.html file), then update the modifiers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question