Customer session lifetime
The lifetime of a customer shopping session is determined by several factors, including the length of the server session, the use of a persistent cart, and the lifetime of information that is stored in the browser. Although these are related to the same customer experience, they are separate processes with different expiration events and lifetimes.
If Persistent Cart is enabled, the cart contents are saved for the next time customers sign into their accounts. When using a persistent cart, it is recommended that you set the lifetime of the server session and the session cookie to a long time period.
On the server, the length of the session is controlled by the php.ini
file and several variables. Currently, ۶Ƶ Commerce does not have an Admin configuration setting that controls the length of the server session.
Configure the cookie lifetime
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
If you have multiple stores, set the Store View chooser in the upper-right corner to the store where the configuration applies.
-
In the left panel under General, choose Web.
-
Expand the Default Cookie Settings section.
{width="600" modal="regular"}
-
To change the default, clear the Use system value checkbox and enter the new value in seconds.
-
When complete, click Save Config.
Configure Remember Me functionality
To make login easier, the Remember Me function allows user account holders to avoid entering their credentials every time they enter the storefront. For security reasons, the persistence feature is disabled by default.
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Customers and choose Persistent Shopping Cart.
-
Expand the General Options section.
-
For Enable Persistence, set to
Yes
. (Clear the Use system value checkbox to allow changing the default setting.) -
For Enable “Remember Me”, set to
Yes
orNo
according to your requirements. -
When complete, click Save Config.