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