M.E.
M.E.

Reputation: 5495

OpenCart 2.3 - Controller default and custom template

I am following the book OpenCart Theme and Module development

In chapter 3 it states:

For example, you can refer to catalog/controller/account/account.php. You will find the following code in it:

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/account.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/account/account.tpl';
} else {
    $this->template = 'default/template/account/account.tpl';
}

However, it is not possible to find this code excerpt while checking catalog/controller/account/account.php.

Where is this check in OpenCart 2.3?

Upvotes: 0

Views: 264

Answers (1)

DigitCart
DigitCart

Reputation: 3000

Loading view in OpeCart 2.3:

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

You may want to ckeck these files:

system\library\response.php
system\engine\loader.php
system\library\template.php

Upvotes: 1

Related Questions