Page 11 of 21 FirstFirst ... 910111213 ... LastLast
Results 101 to 110 of 209
  1. #101
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Hey Lat9,

    thanks for the awesome plugin.

    I've given it a go on a 1.5.4 installation.

    I decided to login, add a product to cart, and then go to home page.

    I then left the test site completely alone for 24 minutes just to test it out.

    After the 24 minute period, I click on a random product that is shown on the home page under the Whats New products...

    It stays logged in, but the cart contents are emptied. I tested this several times, each time doing the same thing, not always clicking on a random product, simply reloading the page does the same thing.

    I then tested out logging out and logging back in. The cart contents are actually restored when doing this. So it doesn't forget the cart contents, it just empties it for that session after inactivity until you log out and log back in. Any ideas?

  2. #102
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,494
    Plugin Contributions
    88

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    @yaseent: I've opened an issue in the plugin's GitHub repo (https://github.com/lat9/remember_me/issues/4) to track the issue that you reported.

  3. #103
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    I found a solution that fixes the issue:

    Open includes/classes/observers/class.remember_me_observer.php

    Beneath this line:

    PHP Code:
    $_SESSION['customer_remembered'] = true
    Insert this:

    PHP Code:
    if(!$_SESSION['cart']) $_SESSION['cart'] = new shoppingCart(); 
    $_SESSION['cart']->restore_contents(); 

  4. #104
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    On second thought, I'm a bit concerned about this line....

    PHP Code:
     if(!$_SESSION['cart']) $_SESSION['cart'] = new shoppingCart(); 
    I found this placed twice in Zen Carts original core files...but in both instances it's commented out...So it does the job, but whether it should be used...I don't know...can anyone shed light.... :/

  5. #105
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,494
    Plugin Contributions
    88

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    The "remember me" processing is loaded at autoload check-point #71; the cart is instantiated (if not already present) at #80 using a process very similar (it does a whole lot more) to the code you posted (that I'm going to graciously include in the plugin's next update).

    I'm going to change the code you posted just a bit prior to use, to reduce the chance of receiving a PHP warning if that session-variable is not set:
    Code:
    if (!isset ($_SESSION['cart'])) {
         $_SESSION['cart'] = new shoppingCart(); 
    }
    $_SESSION['cart']->restore_contents();
    Last edited by lat9; 13 Feb 2016 at 02:45 PM.

  6. #106
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    This plugin is exactly what I was looking for, but I'm having real difficulties with it on ZC 1.3.9h. It seemed to be working, but it has a few major issues:

    1. If you put something in your basket when logged out then try to log in, you get a "security error" message and can't log in till you empty your basket.

    2. If you put something in your basket in a session, then log out, you are logged out. But as soon as you go to the page of the thing you previously put into the basket, you are magically logged in again.

    3. With this plugin installed, when you log in, you don't get the "merged your visitor's cart" message at all.

    I think there is something wrong with the code that merges the baskets. Is this because I'm using a 1.5.x plugin on a 1.3.9h site? If so, I'll have to wait till 1.5.5 is complete: they plan to move to that when it is released.

  7. #107
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,494
    Plugin Contributions
    88

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by hairydog View Post
    This plugin is exactly what I was looking for, but I'm having real difficulties with it on ZC 1.3.9h. ... Is this because I'm using a 1.5.x plugin on a 1.3.9h site? If so, I'll have to wait till 1.5.5 is complete: they plan to move to that when it is released.
    The plugin, itself, is pretty non-intrusive ... making only a couple of template-related changes to the login/create-account form. It could be that the Zen Cart login/logoff handling and notification system has changed subtly over the past 6 or so years.

  8. #108
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by lat9 View Post
    The plugin, itself, is pretty non-intrusive ... making only a couple of template-related changes to the login/create-account form. It could be that the Zen Cart login/logoff handling and notification system has changed subtly over the past 6 or so years.
    I think you are right. It works just fine on the 1.5.4 sites I've installed it on. I think I'll have to leave it till we move the 1.3.9 sites to 1.5.5 which will hopefully be released for production soon.

  9. #109
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Hi lat9,

    I've become interested in getting this plugin to remember if I was logged in using Encrypted Master Password, and act accordingly...

    Basically what I've done is changed this:

    PHP Code:
              if (!$password_info->EOF) {
                
    $remember_me_info = array ( 'id' => $_SESSION['customer_id'],
                                            
    'password' => md5 ($this->secret $password_info->fields['customers_password'])  );
                
    $cookie_value base64_encode (gzcompress (serialize ($remember_me_info), 9));
                
    setcookie ($this->cookie_name$cookie_valuetime() + $this->cookie_lifetime);
                
              } 
    to this:

    PHP Code:
              if (!$password_info->EOF) {
                
    $remember_me_info = array ( 'id' => $_SESSION['customer_id'],
                                            
    'password' => md5 ($this->secret $password_info->fields['customers_password']),
                                            
    'emp' => $_SESSION['emp_admin_login'] );
                
    $cookie_value base64_encode (gzcompress (serialize ($remember_me_info), 9));
                
    setcookie ($this->cookie_name$cookie_valuetime() + $this->cookie_lifetime);
                
              } 
    So I've added in this: 'emp' => $_SESSION['emp_admin_login']

    into $remember_me_info array...

    It seems to be giving me the desired result.

    So if I've logged into a customer account with EMP, and the session times out....When the cookie logs me back in it triggers the $_SESSION['emp_admin_login'] flag...

    Just wondering if I could be missing anything...

  10. #110
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,494
    Plugin Contributions
    88

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Nice integration idea, yaseent! I've reviewed your changes and the remember-me plugin's current code and I'm not clear as to how your change is working.

    I'll review further over the next couple of days and give you more "proper" feedback.

 

 
Page 11 of 21 FirstFirst ... 910111213 ... LastLast

Similar Threads

  1. Admin auto login for a cron job
    By Gigo in forum Customization from the Admin
    Replies: 20
    Last Post: 9 Aug 2012, 07:39 AM
  2. Is there a way to auto-login to admin?
    By mikejd in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2009, 09:55 AM
  3. Auto-switching DB login to end 1226 Error
    By Camarilladee in forum Basic Configuration
    Replies: 7
    Last Post: 2 Jun 2006, 05:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR