HCL Commerce Version 9.1.10.0 or later

Enabling persistent session for React based store

Enable persistent session and remember me features in the React-based store for a faster login to your store. This feature is available on HCL Commerce version 9.1.10.0 and greater.

Before you begin

Make sure that you complete the Enabling global persistent sessions task.

Procedure

  1. Add the following line of code to the .env file located in the react-store workspace folder of the store-web root directory. This line indicates that the persistent session is enabled.

    REACT_APP_PERSISTENT_SESSION=true

  2. Update the PERSISTENTSESSION column in the STORE table to enable the persistent session:
    1. Open a session to your database.
    2. Find the STORE_ID of the store you are enabling persistent session for by entering the following SQL statement into the session:
      SELECT * FROM STORE
      
    3. Enter the following SQL statement into your database:
      UPDATE STORE SET PERSISTENTSESSION = 
      configValue WHERE STORE_ID = 
      store
      
      ID
      
       
      

      where:

      storeID
      The ID of the store for which you are enabling persistent session.
      configValue
      A value from the following list that represents the appropriate configuration:
      0
      The rememberMe function is disabled for registered customers and guest customers. This is the default value.
      1
      The rememberMe function is enabled for registered customers only.
      2
      The rememberMe function is enabled for guest customers only.
      3
      The rememberMe function is enabled for registered customers and guest customers.

Results

The persistent session feature is enabled for the React-based store.