Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Questions about user session timeouts

    Hi,

    Three questions:

    1 --- One of our customers has complained that he took a 1 hour lunch break from filling out a large order, and when he came back his session had expired and the cart contents were gone. So I increased "Configuration > My Store > Admin Session Time Out in Seconds" to 7200 (2 hours).

    But then I checked the "session.gc_maxlifetime" variable (in "Tools > Server Info") and there are two columns there: "Local Value" = 7200 and "Master Value" = 1440.
    What is this "master value" and how does it affect the changes I made? I'm guessing its something set by our web hosts? Does it override my setting?

    2 --- The customer was not logged in when he was adding items to the cart, and it seems like the cart contents are lost permanently. Is there any way to retrieve the cart contents for him? (our session cache method is set to "file").

    3 --- Is there any way to force customers to log in before any item can be added to cart?
    Our server is pretty slow - so until we can move to a faster one, we would like to avoid "total loss" this way, at least the cart contents will come back when the customer logs in again.......

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Questions about user session timeouts

    1. The admin timeout setting is for the admin side only.
    The "master" is the server-wide setting which applies if you don't override it.
    The "local" value is the setting currently active by your override, and takes effect over the "master" value.

    2. Sorry, no, if he wasn't logged in, his cart contents are gone.

    3. If you change your customer mode to "must be logged in to see prices", they can still poke around but can't add to cart until they log in.
    Admin->Configuration->Customer Details->Customer Shop Status - View Shop and Prices
    Customer Shop Status - View Shop and Prices
    Customer must be approved to shop?
    0= Not required
    1= Must login to browse
    2= May browse but no prices unless logged in
    3= Showroom Only
    Or, you could just put up a note on the page telling them to login if they want their in-progress cart to be stored between now and when they do their checkout.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Re: Questions about user session timeouts

    Hi DrByte,

    Thanks for your reply.
    So.....

    1 - "The admin timeout setting is for the admin side only" - so is there anything else I need to change in order to control the user session lifetime?
    Or, if the "Local Value" for "session.gc_maxlifetime" is already 7200, then I don't need to worry about it?

    2 - "must be logged in to see prices" - yes, we've considered using that option, but we would still like everyone to be able to see prices, even if they're not logged in... the only thing we would like to prevent is adding items to the cart.
    Is there any quick way to add a check to the php code, when someone is adding a product to the cart, which would redirect the user to the login page if they're not signed in yet?

    Once again, many thanks.

 

 

Similar Threads

  1. Ajax requests and session timeouts
    By lumpylumpy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 Dec 2010, 02:23 PM
  2. sessionWatcher (better handling of session timeouts)
    By s_mack in forum All Other Contributions/Addons
    Replies: 49
    Last Post: 4 Sep 2010, 03:49 AM
  3. Not a Zen user yet - couple questions: How user friendly? UPS & Paypal etc
    By eseesnad in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Aug 2009, 08:31 PM
  4. session.save_handler = user?
    By hollygds in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 25 Feb 2008, 05:15 PM
  5. Session Timeouts !!
    By Scrat in forum General Questions
    Replies: 0
    Last Post: 7 Apr 2007, 08:41 PM

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