eCanteen Setup
To set up the tables, use the sql file "ecanteen-tables-views.sql". Open phpAdmin or an MySQL session and run the sql file. This will create the tables for eCanteen.
The Tables are:
active_guests : for tracking active guests.
active_users : for tracking active users.
banned_users : for tracking banned users - not implemented in eCanteen.
break: the meal breaks per pay.
class: the class/delivery point for the orders.
customersandorders: tracks minor cusotmer orders and menu items.
itemtype: categories of menu items.
majorcustomer: the accounts that order for minor accounts.
majorcustomerextract: a view used in minorcustomer to identify majorcustomers. The parameter DEFINER=`root`@`localhost` should have
the proper credentials for you MySQL database.
menuitem: an individual menu item.
minorcustomer: the accounts managed by the majorcustomer.
siteid: site detials table.
specialdate: dates and range of dates of consequence to the operation of the eCanteen.
transactions: the collated order of the items in customerandorders.
supervisor: the supervisor account is stored here to setup sites on the system.
After running the first script, the second script "ecanteen-config.sql" has to be run. This sets the database user the scripts use to access the tables.
The "ecanteen-config.sql" can be configured to reflect local circumstances. The default servername is "localhost" and the db user is 'canteene'@'localhost' with the password 'can5pass'.
Whatever changes made must be included in the include/constants.php file in the DB variables section.
define("DB_SERVER", "localhost");
define("DB_USER", "canteene");
define("DB_PASS", "can5pass");
define("DB_NAME", "ecanteen");
The link to access a live eCanteen site is "http://<servername>/index.php?site=1".
Other sites can be added to the same database and accessed by changing the site parameter. Sites are added with the supervisor page. Refer to the SiteSupervisorGuide pdf for details.