So tonight I was able to replicate this issue.

Quote Originally Posted by Scully View Post
I've gone through this entire post and haven't seen the answer to my question, so if someone could help me, I'd be very grateful. :-)

I installed the COWOA (1.5.0, I think) a few months ago, and after some hiccups, got it working properly. But recently a few different book customers have contacted me, saying that the system is telling them their session has expired. This is happening less than 5 minutes after they've finalized their order. How can I reset the timeout feature so that their session won't expire until AFTER they've downloaded their products?

Oddly enough, it isn't happening every time, just occasionally. Any ideas why?

Thanks!!
To resolve it I changed the COWOA setting "Enable Forced Logoff" to "false". This stopped the session expiration error and allowed my customer to get their download.

BUT..

once I changed "Enable Forced Logoff" to "false", I noticed that something lat9 reported reared it's ugly head..

Quote Originally Posted by lat9 View Post
P.S. Off-subject, but when I did a fresh install of COWOA on a fresh install of Zen Cart 1.5.1, the define TEXT_CHECKOUT_LOGOFF_CUSTOMER appears to be missing from the orders_status page.
Quote Originally Posted by lat9 View Post
That P.S. is from a post a little over a year ago. I did a fresh install of v2.4 and the define is still missing. What are the TEXT_CHECKOUT_LOGOFF_CUSTOMER and TEXT_CHECKOUT_LOGOFF_GUEST defines "supposed" to say?

Quote Originally Posted by DivaVocals View Post
Just did a search of the code and I don't see any reference to "TEXT_CHECKOUT_LOGOFF_GUEST".

"TEXT_CHECKOUT_LOGOFF_CUSTOMER" looks like it has been missing for sometime, and it's never been reported as an "issue".. I don't think that it creates an "issue" since it's wrapped in a non-existent condition
Code:
  if (isset($_SESSION['customer_guest_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_GUEST;
"customer_guest_id" doesn't exist.. I'm thinking that this is code from an original/older version of COWOA.. The codebase that is part of COWOA comes from multiple contributors, and this looks like code that was leftover from one of these original contributors..
The issue is that in BOTH cases this block of code in the orders_status page is the issue.. The missing constant definition aside, this code flat out it just doesn't "do" what it should do, and it's over my head to fix.. So I'm throwing it out there for the community to take a gander at..


Code:
<!--bof logoff-->
<!--Kills session after COWOA customer looks at order status-->
<?php
if ($_SESSION['COWOA'] and COWOA_LOGOFF == 'true') {
  zen_session_destroy();
} else {
  if (isset($_SESSION['customer_guest_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_GUEST;
  } elseif (isset($_SESSION['customer_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
  }
?>
<?php } ?>
<!--eof logoff-->
The workaround for now for anyone selling downloads is to set "Enable Forced Logoff" to "false" and replace the code above as follows:

Code:
<!--bof logoff-->
<!--Kills session after COWOA customer looks at order status-->
<?php
if ($_SESSION['COWOA'] and COWOA_LOGOFF == 'true') {
  zen_session_destroy();
} else {
  if (isset($_SESSION['customer_guest_id'])) {
    echo ' ';
  } elseif (isset($_SESSION['customer_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
  }
?>
<?php } ?>
<!--eof logoff-->