Laddawn.com : UI – Get Session Data like Web Discount

Overview:  There are settings that are settings for the entire session.  Currently the only one that falls into this category is web discount, but there could be more in the future. There is a database routine that is built to return these settings.

 

Process:

A database routine already exists to return the setting to use for the session:

  • Name: RPC$UTILITY_GETSESSIONINFO
  • Input:
    • PORT.NBR
    • PORT.MARKER
    • Output:
      • WEB.DISCPCT

New Method in the Utility Service / repository:

  • Name: GetSessionInfo
  • Input: Nothing, Base Properties should handle it.
  • Output: Collection of WebOption Entities.
  • Process:
    • Make call to RPC$UTILITY_GETSESSIONINFO
    • Take returned data
    • Add WebOption to returned collection.
      • Name: Discount
      • Value: Data.Item(WEB.DISCPCT)

Upon successful validation:

  • Make call to Utility.GetSessionInfo
  • Update Cookie with returned Discount value.