Skip to content

POS Configuration and State

Andy Theuninck edited this page Aug 4, 2015 · 1 revision

Configuration

Configuration for the lane is primarily stored in the database in the opdata.parameters table. A handful of settings needed to connect to the database are stored in ini.php. These include: the lane's number and all database connectivity settings. A setting may be stored in both places although this is not recommended. If the same setting has different values in ini.php and parameters lane behavior may be somewhat random. Settings in parameters with lane_id zero are loaded first and then settings with the lane's own lane_id are loaded. This allows generic settings for the store and per-lane overrides if a specific value differs at just one lane.

State

State are various settings that persist across page loads. The configuration values are stored in state but other values may be added, updated, and removed as the lane runs. State is access via the CoreLocal class. It has static methods get() and set() to get and set values. If a value does not exist, get() will return an empty string. This was not a particularly smart design decision and should be refactored when time allows.

In regular operation, state is stored in a PHP session. This means that closing the browser (or clearing cookies) will delete all values. This is rarely a practical problem, but when working with the lane you should always start from the default login.php to ensure the state is correctly initialized.

Clone this wiki locally