This app is built in:
- 2014 with legacy PHP, SQL, AJAX, JQuery, JavaScript, HTML, and CSS
- PHP app hosted in Google App Engine
- MySQLServer hosted in external cloud MySQL hosting
Application:
- Restaurant online ordering and processing, and can be integrated with Uber/Lyft delivery
Functions{
Check order status and order details info display: PHP, AJAX, SQL, JQuery{
>JQuery slides down the Order Display Grid
>PHP and SQL query MySQL database and display the status of the latest 5 orders in ascending order
>When order number is entered, AJAX and POST/GET method send off order info to .php file
>PHP processes the info, has SQL query the database, and returns the info in a table format back to AJAX
>AJAX displays the order details info in the Order Display Grid (only) without refreshing the page
}
Add items function: PHP{
>POST/GET method sends off items to .php file
>PHP stores items in $_SESSION[cartArray][itemsArray[attributesArray]] (which means multi-dimensional array)
}
Remove items function: PHP{
>POST/GET method sends off items to .php file
>PHP removes items from $_SESSION[cartArray][itemsArray[attributesArray]] (multi-dimensional array)
}
Display items in cart: PHP{
>PHP queries $_SESSION["cart"] after items stored and displays them
}
Empty cart function: PHP{
>PHP unsets $_SESSION["cart"], which makes cart empty
}
Checkout button behaviors: JQuery{
>placeOrderForm slides down
>checkout button hides
}
Lookup order button behaviors: JQuery{
>table of the latest 5 orders status hides
>table of the order details being looked up comes from AJAX shows
}
Place order: PHP, SQL{
>POST/GET method sends off customer form info to .php file
>PHP and SQL store customer info in $_SESSION["customers"]
>PHP and SQL insert customer info into tblCustomers in MySQL database
>PHP and SQL insert order info into tblOrders in the database such as: tblOrders(item_id, qty, customer_phone, "In Progress")
>PHP generates order number, which is captured partially from session_id with concatenated incremental
>Order number is given to customers with info echo'd back from $_SESSION["customers"]
}
Fill order: PHP, SQL{
>PHP and SQL querry MySQL database and display "In Progress" orders that need to be filled
>When "Complete" button is clicked, POST/GET method sends off order info to .php file
>PHP and SQL update the "Ready" status on the order accordingly into the database
>When hyperlink order number is clicked, POST/GET method sends off order number info to .php file
>PHP processes the info, has SQL query the database, and populates/displays the order details info in the Order Details Display Grid
}
Auto-populate new incoming in progress orders: JavaScript{
>JavaScript setTimeout calls the function to refresh the page every 15 mins (or based on the time set)
>The page is reloaded, which means repopulating any new incoming in progress orders to be filled
}
Input validity: JavaScript, HTML "required"{
>If phone number, which is a required field, is not entered, alert message insists
>If quantity, which is set to be between 1-5, is not within the range, alert message insists
}
Display menu: PHP, SQL, HTML, CSS{
>PHP and SQL query MySQL database and display the items in the menu
>PHP and HTML provide "Add to cart" option for every item displayed in the menu
}
}
Database Tables(
tblItems(item_id, type, item_name, description, price)
tblCustomers(phone, last, first)
tblOrders(order_num, order_date, status, phone)
tblTransactions(trans_id, item_id, quantity, order_num)
)
Theme: HTML, CSS, Graphics, PHP (from scratch)