ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
Thanks fido-xfido-x wrote:Use this in the header controller (catalog/controller/common/header.php):silanli_53 wrote:How can we show the surname.?
welcome; name lastnameCode: Select all
// Greeting in header if (!$this->customer->isLogged()) { $this->data['text_greeting'] = $this->language->get('text_greeting'); } else { $this->data['text_greeting'] = sprintf($this->language->get('text_logged'), $this->customer->getFirstName() . ' ' . $this->customer->getLastName()); } $this->data['text_create'] = $this->language->get('text_create'); $this->data['create'] = HTTPS_SERVER . 'index.php?route=account/create'; // End Greeting in header
How do I add is in which group.?
Thanks
best regarts
Yes.DannyMacD wrote:Hi Fido and all.
is this 1.4.9 compatible?
many thanks
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Hello,fido-x wrote:I've had a few requests for this from people who have visited my dev site. Since this is not mine (it's something that was in version 0.7.7), I'm quite happy to post the necessary information to get it working.
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:–before: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');
(around line 31 in an unmodified setup)Code: Select all
$this->id = 'header';
catalog/language/english/common/header.php
Insert the following:–before the end of the file.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:–beforeCode: 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>
catalog/view/theme/default/stylesheet/stylesheet.cssCode: Select all
<div class="div4">
Add the following:–At the end of the file.Code: Select all
#header .welcome { clear: both; margin: 10px 0px 10px 0px; text-align: right; }
Enjoy!
The Header.php code, do I add it before or after $this->id = 'header"? because I tried, but its not working.
any help please
v1.5.0.5
With so many codes flying around I think many of us was confused. Here's just a compilation of what Fido coded for 1.4.9.2 users:
catalog/controller/common/header.php
Insert the following:–
Code: Select all
// Greeting in header
if (!$this->customer->isLogged()) {
$this->data['text_greeting'] = $this->language->get('text_greeting');
} else {
$this->data['text_greeting'] = sprintf($this->language->get('text_logged'), $this->customer->getFirstName());
}
$this->data['text_create'] = $this->language->get('text_create');
$this->data['create'] = HTTPS_SERVER . 'index.php?route=account/create';
// End Greeting in header
Code: Select all
$this->id = 'header';
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 {
float: right;
display: block;
margin-top: 7px;
margin-bottom: 10px;
padding-left: 0px;
}
#header .welcome a {
margin: 0px;
padding: 0px;
background: none;
}
And that's it, hope I didn't screw the code with the cut and paste. I put the Greeting messages on the right side along the lines of [Specials] [Bookmark] [Contact] and align the top to 7px, as the rest of the wordings.
Thanks Fido for the codes!
I don't know much about PHP...~~
Don't know much about JQuery...~~
But I do know that I love OC!~~
and I know that if you'd guide me, what a wonderful world this would be...!~~
_________________________________________________________________
Using OC 1.4.9.2
http://www.ten2hundred.com
Fatal error: Call to a member function https() on a non-object in /home/abcd12/public_html/ocart/catalog/controller/common/header.php on line 182
what does it mean?
It adds a personalised welcome message after login to both the account and affiliate account pages.
You can download it (commercial) here:
http://www.opencart.com/index.php?route ... on_id=3946
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
I find the solution in stackoverflow, not worked, but I think it's almost.
anyone help ?
Users browsing this forum: No registered users and 5 guests