Post by gosulove » Mon Nov 28, 2011 12:08 pm

I am trying to modify the login.tpl such that I want the header.tpl to be header2.tpl . So i replace <?php echo $header; ?> with <?php include('catalog/view/theme/default/template/account/header2.tpl'); ?> . However, it doesn't work..... Anyone can help? what is the correct coding for including such file? Thx in advance

Newbie

Posts

Joined
Sun Jul 17, 2011 4:03 pm

Post by Qphoria » Mon Nov 28, 2011 12:51 pm

1. EDIT: catalog/controller/common/header.php

2. FIND (Multiple times):

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/common/header.tpl';
} else {
    $this->template = 'default/template/common/header.tpl';
} 
3. REPLACE WITH:

Code: Select all

if (isset($this->request->get['route']) && $this->request->get['route'] == 'account/login') {
    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header2.tpl')) {
        $this->template = $this->config->get('config_template') . '/template/common/header2.tpl';
    } else {
        $this->template = 'default/template/common/header2.tpl';
    }
} else {
    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
        $this->template = $this->config->get('config_template') . '/template/common/header.tpl';
    } else {
        $this->template = 'default/template/common/header.tpl';
    }
} 

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by gosulove » Mon Nov 28, 2011 3:45 pm

Thx!!! You are so awesome!! ;)

Newbie

Posts

Joined
Sun Jul 17, 2011 4:03 pm
Who is online

Users browsing this forum: No registered users and 66 guests