You will need to edit the following files:–
* catalog/controller/common/header.php
* catalog/language/english/common/header.php
* catalog/view/theme/default/template/common/header.tpl
* catalog/view/theme/default/stylesheet/stylesheet.css
catalog/controller/common/header.php
Insert the following:–
Code: Select all
if (!$this->customer->isLogged()) {
$this->data['text_greeting'] = $this->language->get('text_greeting');
} else {
$this->load->model('account/customer');
$customer_info = $this->model_account_customer->getCustomer($this->customer->getId());
$this->data['text_greeting'] = sprintf($this->language->get('text_logged'), $customer_info['firstname']);
}
$this->data['text_create'] = $this->language->get('text_create');
$this->data['text_account'] = $this->language->get('text_account');
$this->data['create'] = $this->url->https('account/create');
$this->data['account'] = $this->url->https('account/account');
Code: Select all
$this->id = 'header';
catalog/language/english/common/header.php
Insert the following:–
Code: Select all
$_['text_greeting'] = 'Welcome, <strong>Guest</strong>';
$_['text_logged'] = 'Welcome back, <strong>%s</strong>';
$_['text_create'] = 'Register';
$_['text_account'] = 'Account';
catalog/view/theme/default/template/common/header.tpl
Insert the following:–
Code: Select all
<div class="welcome">
<?php echo $text_greeting; ?>
<?php if (!$logged) { ?>
[ <a href="<?php echo $login; ?>"><?php echo $text_login; ?></a> ] [ <a href="<?php echo $create; ?>"><?php echo $text_create; ?></a> ]
<?php } else { ?>
[ <a href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a> ] [ <a href="<?php echo $account; ?>"><?php echo $text_account; ?></a> ]
<?php } ?>
</div>
Code: Select all
<div class="div4">
Add the following:–
Code: Select all
#header .welcome {
clear: both;
margin: 10px 0px 10px 0px;
text-align: right;
}
Enjoy!