I work with a company that will probably develop this if there is more interest. Get some more chat on this topic and I can convince the boss to develop it!
Steve, I like the sound of that! Tell your boss you have at least someone (me) willing to pay for this extension if you guys publish it.
Seems like when I am logged into the front it logs me out after 10 min. It’s really annoying to have to keep logging back on all the time
Well there is a solution that is much easier (and much less expensive!) than an extension for that purpose. Simply change the cookie lifetime settings.
System>Configuration>Web (its on the left side-bar)>Session Cookie Management>Cookie Lifetime
I believe the default value is 3600 (seconds). Increasing this increases the time required for inactivity timeout.
To others:
I’ll have the “remember me” extension done really soon. For free.
Steve,
Wow, you’re going to do that for fee! I was expecting to have to pay for it or something. I just wish I know a little more about MySQL and PHP to do this type of thing myself. But, I am learning. Until then you’re my hero!
Also, thanks for the tip on changing the cookie lifetime. I had not actually noticed that setting before. I was adjusting the setting in:
System>Configuration>Magento Core Api “Client Session timeout (sec.)”
System>Configuration>Admin> Security “Session Lifetime, Seconds”
I was thinking one of those two settings had to do with the frontend user session inactive timeout cookie. I was thinking maybe I was simply misperceiving time or something when things seemed to not change. “Follow the white rabbit” lol
I’ve updated NemanjaS post to hopefully make it a little more clear on how to do this, because I had a little trouble figuring out a couple of the steps. For example, this first step was kind of confusing at first because I didn’t know where to find the login.phtml file. I’ve edited the file path listed below so others don’t have the same problem finding it.
Now we have options in our Admin Panel configuration section to set cookie lifetime for our frontend users that click the “Remember me” box. You can find this setting if you login to your Admin Panel and navigate to:
System > Configuration > Web > Session Cookie User Management
public function getLifetime() { $lifetime = Mage::getStoreConfig(self::XML_PATH_COOKIE_LIFETIME, $this->getStore()); if (!is_numeric($lifetime)) { $lifetime = 3600; } return $lifetime; }
change with
public function getLifetime() { if (isset($_REQUEST['rememberme'])){ $lifetime = Mage::getStoreConfig(self::XML_PATH_COOKIE_LIFETIME_LONG, $this->getStore()); return $lifetime; }else{ if (null !== $this->_lifetime) { $lifetime = $this->_lifetime; } else { $lifetime = Mage::getStoreConfig(self::XML_PATH_COOKIE_LIFETIME, $this->getStore()); } if (!is_numeric($lifetime)) { $lifetime = 3600; } return $lifetime; } }
A BIG thank you to NemanjaS!!!
Everything seems to work like it should for me. Not sure if you guys (Steve and NemanjaS) work for the same boss/company but in any case thanks Steve for your efforts and for building interest in getting this thing rolling so fast.
Thanks for the work NemanjaS. Great code. I was developing an extension to do this job, to allow for future magento upgrades. I stopped once NemanjaS posted his solution. Is this worth me continuing the extension? Or is everyone happy with the solution? I just wanted to know so I don’t waste my time developing this.
Steve (and NemanjaS) I’ve been testing this and it is not working properly. In the Admin Panel I have my “Session Cookie User Management” set to 7200 (2 hours), but it still logs me out after one hour of inactivity on the front end.
So, I don’t know if it has to do with NemanjaS code or something else with the Magento’s core code. I hope you guys don’t stop working with this just yet.
After manually deleting my IE7 and Firefox cookie files I ran 3 other tests since that last post of mine, and I am still having the same problem with me getting logged out after one hour of inactivity.
Is anyone else having the same problem?
Here is the locations of the cookie files in my Vista 32bit install:
C:Users\Dave\AppData\Local\Microsoft\Windows\Temporary Internet Files\Cookie:dave@spoonertuner.com C:Users\Dave\AppData\Local\Microsoft\Windows\Cookies\dave@spoonertuner[1].txt
This is my first cookie created before I loggin on the front end:
frontend
ba9b989220213abedfb0fa973cf8424e
spoonertuner.com/
9728
3890896256
30004614
3205686256
30004614
*
__utma
214461141.1145108483968304100.1242410311.1242410311.1242410311.1
spoonertuner.com/
1600
2998511360
30151465
3249906256
30004614
*
__utmb
214461141.1.10.1242410311
spoonertuner.com/
1600
4061027072
30004618
3249946256
30004614
*
__utmz
214461141.1242410311.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
spoonertuner.com/
1600
2106558208
30041327
3249346256
30004614
*
This is the cookie after I logged in on the frontend
frontend
ba9b989220213abedfb0fa973cf8424e
spoonertuner.com/
9728
3706452224
30004631
386838960
30004615
*
__utma
214461141.1145108483968304100.1242410311.1242410311.1242410311.1
spoonertuner.com/
1600
173544064
30151466
418058960
30004615
*
__utmb
214461141.3.10.1242410311
spoonertuner.com/
1600
1236059776
30004619
418508960
30004615
*
__utmz
214461141.1242410311.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
spoonertuner.com/
1600
2106558208
30041327
3249346256
30004614
*
Hey, wow, that is great Mike! I hope your code is the solution the problem. I will test it out tomorrow and let you know how it goes. At any rate, I am very grateful for your efforts, and happy to hear your solution does not modify the core code. Thanks!