Page 21 of 21 FirstFirst ... 11192021
Results 201 to 209 of 209
  1. #201
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,524
    Plugin Contributions
    88

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

    Might I suggest "Keep Cart" (https://www.zen-cart.com/downloads.php?do=file&id=992) instead? That's a lot less cookie-weight and I've actually been keeping it updated!

  2. #202
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

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

    Well, I'm actually using both... keep cart to save un logged in carts, and remember me to automatically log back in if you have an account.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  3. #203
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,524
    Plugin Contributions
    88

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

    Quote Originally Posted by gothstone View Post
    Well, I'm actually using both... keep cart to save un logged in carts, and remember me to automatically log back in if you have an account.
    I'll take a look at the "Remember Me" implementation, but note that I'm not a big fan of its use with One-Page Checkout (if you're also using that).

  4. #204
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

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

    Lol, of corse I am. I use a LOT of your plugins.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  5. #205
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

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

    Please consider the following scenario for a customer who has activated auto-login. They go to the store and select a product and checkout, so the checkout_success page is displayed. They close the browser or move to another site. After the zc session expires, they come back to the checkout_success page through browser history or other means. They are auto-logged in and the checkout success page is displayed. Is auto-login configured to deal with this scenario correctly? What if the customer goes back to an earlier stage of checkout?

    In my case, I have an observer triggered by NOTIFY_HEADER_END_CHECKOUT_SUCCESS that gets executed when the customer comes back and the page is displayed again. The observer fails because some data is missing. So I don't need or want the observer to execute when this scenario is encountered, since the observer did its thing when the customer first checked out successfully. Five different customers have triggered this error in the last two months so it's a problem I need to fix.

    Unfortunately, I can't figure out a way to detect this scenario in the observer. Any ideas would be appreciated!

    What worries me in addition, is what happens if the customer comes back to other pages in the store and whether the core and custom code will work.

    If auto-login is not chosen by the customer, and the scenario is followed, the "Whoops, the session has expired" page is displayed, so I feel fairly certain nothing incorrect will occur for those customers.

    Thank you for any advice/help you can provide.

    Dave
    zc157c, php 8

  6. #206
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    9

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

    Quote Originally Posted by Dave224 View Post
    ....
    In my case, I have an observer triggered by NOTIFY_HEADER_END_CHECKOUT_SUCCESS that gets executed when the customer comes back and the page is displayed again. The observer fails because some data is missing. So I don't need or want the observer to execute when this scenario is encountered, since the observer did its thing when the customer first checked out successfully. Five different customers have triggered this error in the last two months so it's a problem I need to fix.

    Unfortunately, I can't figure out a way to detect this scenario in the observer. Any ideas would be appreciated!

    ...

    Thank you for any advice/help you can provide.
    i would suggest posting your error message as well as the code for your observer.

    with that information, i would think someone can give better advice as to how to resolve the error condition.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #207
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

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

    Quote Originally Posted by carlwhat View Post
    i would suggest posting your error message as well as the code for your observer.

    with that information, i would think someone can give better advice as to how to resolve the error condition.

    best.
    I'm looking for a general solution that would detect the scenario regardless of the page returned to, and not re-execute any damaging code. I've already tested for the missing data (a custom session variable) in the observer and bypassed primary observer logic, so there are no myDEBUG messages. There is an email sent to me when the missing session data is detected with debug data. So I'm not sure what good the observer code will do.

    What I was thinking of was a test on the "came from page", or a test on the current date-time relative to the order date_purchased date-time. In the case of returning to the checkout_success page, the "came from page" must be the order_confirmation page, otherwise the scenario was encountered. The time test would see if the time difference was less than say 20 minutes or else the scenario was encountered. But those are just preliminary thoughts, and I'm not sure how to get the "came from page" or even if it's possible.

    Info on the observer...the observer automatically sets the order status and sends the order status update email for certain types of orders based on a custom session variable $_SESSION['order_case'] that's set elsewhere. It also tailors some text in the order status update email based on what was ordered. The idea was to relieve the admins from setting status and sending emails when they could be sent automatically at order time. The observer is too large to include as attachment to this site.

    Dave
    Last edited by Dave224; 7 Nov 2023 at 06:50 PM.

  8. #208
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

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

    Another possible idea would be to redirect to the home page or login page on auto-login, regardless of what page was requested by the browser. This could potentially avoid all negative impacts of coming back to the site on a "bad" page. This would need to be a change (I believe) to the auto-login add-on.
    Dave
    Last edited by Dave224; 7 Nov 2023 at 07:01 PM.

  9. #209
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

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

    Since manual login success loads the home page, I've decided to load the home page on auto-login too, even if the customer entered the store with a bookmark, browser history item, or restored a previous (browser) session. I inserted the following line after the update to the customers_info table in function checkRememberCustomer in file includes/classes/observers/class.remember_me_observer.php.
    Code:
    if (isset($_GET['main_page']) && $_GET['main_page'] !== 'index') $_GET['main_page'] = 'index'; // edit to force home page to load on auto-login
    I have tested the code with and without products in the cart and all appears to work properly.
    Dave

 

 
Page 21 of 21 FirstFirst ... 11192021

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