This is a good suggestion, but shouldn't it log them out, if they click on "Not you?"?jmrchaves wrote:Hey great add-on Fido-x
Let me ask you is it possible to add to this a not you? button?
Example
Welcome, customer Not you?(->this would go to login page)
Thanks, great contrib
(1) gather as much useful information about the customer as possible
(2) have logical use for that information in your product selection & promotions
Whilst having the ability to greet someone correctly is great (infact in Germany it can be insulting not to use someone's title as it's a a sign of respect for their qualifications etc.), I feel that having the ability to know that a product is better suited to a woman rather than a man is great for promotional purposes.
That said, it means that you need to extend your product metadata to include these new fields too (in order to make use of this new real-time sales smarts), and possibly change way too many php files to be able to upgrade or take advantage of other people's mods.
IMHO, if you just want salutation, then I agree the effort isn't worth the risk of a mistake happening (even if it's caused by the customer), plus not everyone wants to divulge their sex as part of registration.
But, if you're thinking of collecting it as part of additional marketing fields to be used for analytics and sales promotions, then you've got a pretty difficult journey of mods ahead of you. My thoughts are with you.
- [MB]
http://online.enterpriseconsulting.com.au
Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates
Good question... this is full of useless contributions since version is getting changed every week.The Alchemist wrote:Will this work in 1.4.0?
I am running 1.4.7 and it gives me the following error when I try to run.
Fatal error: Call to a member function https() on a non-object in /content/HostingPlus/v/m/vmaxx.ie/web/catalog/controller/common/header.php on line 60
Can anyone explain what's wrong?
Vivian
To make this compatible with 1.4.7, in "catalog/controller/common/header.php" change the following 2 lines:-Vivian wrote:Hi,
I am running 1.4.7 and it gives me the following error when I try to run.
Fatal error: Call to a member function https() on a non-object in /content/HostingPlus/v/m/vmaxx.ie/web/catalog/controller/common/header.php on line 60
Can anyone explain what's wrong?
Vivian
Code: Select all
$this->data['create'] = $this->url->https('account/create');
$this->data['account'] = $this->url->https('account/account');
Code: Select all
$this->data['create'] = HTTPS_SERVER . 'index.php?route=account/create';
$this->data['account'] = HTTPS_SERVER . 'index.php?route=account/account';
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!
Code: Select all
$_['text_greeting'] = 'Welcome, <strong>Guest</strong>';
$_['text_logged'] = 'Welcome back, <strong>%s</strong>';
$_['text_create'] = 'Register';
$_['text_account'] = 'Account';
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!
catalog/controller/common/header.php
Insert the following (around line 104):
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
Insert the following:
Code: Select all
// Greeting Text
$_['text_greeting'] = 'Welcome, <strong>Guest</strong>';
$_['text_logged'] = 'Welcome back, <strong>%s</strong>';
$_['text_create'] = 'Register';
// End Greeting Text
Insert the following where you want the welcome message to appear:
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>
Give it some style (eg. margins, padding, etc.):
Code: Select all
#header .welcome {
float: left;
display: block;
margin-top: 20px;
margin-bottom: 10px;
padding-left: 0px;
}
#header .welcome a {
margin: 0px;
padding: 0px;
background: none;
}
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!
welcome; name lastname
Thanks
Use this in the header controller (catalog/controller/common/header.php):silanli_53 wrote:How can we show the surname.?
welcome; name lastname
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->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
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!
but why there is big space?
Welcome, Guest [........ Log In ] [........Register ]
see it live
also can you provide how to add total cart items and total cart amount? plz answer here. i dont want to H/J this post
thanks
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
Users browsing this forum: No registered users and 10 guests