yeah, i was in a hurry and hoped that someone else had already done this to save me some time...
Here's what I did for this...maybe there's a better way, but this was quick for me....
I added a label variable called lbl_welcome_notme and set it equal to:
(if this if not you, please click
here)
Of course, you could hard-code this as well.
Then, I edited welcome.tpl ( skin1/customer/main/welcome.tpl ) and changed the line:
<h3>{$lng.lbl_welcome_back}, {$smarty.cookies.GreetingCookie|replace:"\'":"'"} </h3>
with
<h3>{$lng.lbl_welcome_back}, {$smarty.cookies.GreetingCookie|replace:"\'":"'"} {$lng.lbl_welcome_notme} </h3>
Next, I edited include/login.php and added:
if($REQUEST_METHOD=="GET") {
if($mode=="ungreet") {
if(!empty($active_modules["Greet_Visitor"]))
include "../modules/Greet_Visitor/unset_cookie.php";
}
}
Last, I went to modules/Greet_Visitor/ dir and copied set_cookie.php to unset_cookie.php and changed the setcookie line to read:
setcookie("GreetingCookie", "", -1, "/", $_tmp["host"]);
to clear the cookie.
I'm sure there's probably a cleaner way to do it..but this is how I did it...If anyone sees a reason not to do it this way, let me know.
<ramble>
Possible issue in general with this mod is if you re-direct to https on log-in to the store....when the customer logs out, the cookie is set the https hostname...which is often different (e.g. secure.domain.com instead of
www.domain.com)....
If you log-out while accessing via https and then come back to the store via http, the cookie won't be there for that hostname (
www.domain.com) anyway....
To fix this, you'd just need to manipulate "$_tmp[host]" -- you could strip off the first part of the domain so that you're left with .domain.com and that would make the cookie good for the whole domain.
</ramble>
Thanks,
Dave