0% found this document useful (0 votes)
15 views33 pages

Foodcart Final Report 3 Project - Removed

The document outlines the development of an Online Food Ordering System aimed at replacing traditional order-taking methods with a computerized system. It includes acknowledgments, project characteristics, system analysis, feasibility studies, requirements, UML diagrams, and code snippets for implementation. The system is designed to be user-friendly, secure, and efficient, allowing for easy order management and reporting.

Uploaded by

yogeshcy254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views33 pages

Foodcart Final Report 3 Project - Removed

The document outlines the development of an Online Food Ordering System aimed at replacing traditional order-taking methods with a computerized system. It includes acknowledgments, project characteristics, system analysis, feasibility studies, requirements, UML diagrams, and code snippets for implementation. The system is designed to be user-friendly, secure, and efficient, allowing for easy order management and reporting.

Uploaded by

yogeshcy254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

INDEX

Sr.
No Topics Page No.

1 Acknowledgement 4

2 Introduction 5

3 Characteristics Of The Project 6

4 System Analysis 7

5 Feasibility Study 9

6 System Requirement 10

7 UML Diagram 11

8 Data Directory 17

9 Input & Output Screen 20

10 Code 28

11 Conclusion 35

3|Page
Acknowledgement

It gives us great pleasure to acknowledge our sense of gratitude to all Those who have
helped us to complete this project and bring it in its
Present form.We acknowledge our sincere thanks to Miss.A. N. Aher Mam for giving Us the
opportunity to perform the project work and also for her Constant guidance and motivation.We
express our gratitude to Computer
Science Department of ACS College, Manur for providing us the opportunity to prepare this
project.We must also acknowledge our sincere thanks to all the people Associated with Food Ordering
System giving us their much needed Support and valuable information as well as time.Also we would
like to thank our friends for their encouragement and Kind support. It has been a great learning
experience for us.

4|Page
Introduction
The aim of developing Online Food Ordering system project is to replace the traditional way of
taking orders with computerized system. Another important reason for developing this project
is to prepare order summary reports quickly and in correct format at any point of time when
required.

Online Food Ordering System has a very lot of scope. This PHP project can be used by any
restaurants or fast foods for customers for keeping their order records. This project is easy, fast
and accurate. It requires less disk space. Online Food Ordering System uses MYSQL Server as
backend so there is not any chance of data loss or data security.

5|Page
CHARACTERISTICS OF THE PROJECT

1. User Friendly: Online Food Ordering System is a very user friendly project because
the Food Ordering Record and searching from
categories is very simple, fast and data is secured. The user interface of the project is very simple

2. Order reports of the system can be easily generated. User can generate the report of any
particular date and period. In this way they can get delivery status of customers and get
information about what is being ordered.

3. Very less paper work: Online Food Ordering System requires less paper work. In this
project all record is fetched directly into the computer and reports can be generated
through just a click. In this way it saves time. As data is directly entered into computer
so there is no need to do any paper work.

4. Computer operator control: Online Food Ordering System is operated by the staff
members and one admin so there is no chance of clerical mistakes. Data feeding and
retrieving in this system is very easy. So the work can be done on time.

6|Page
System Analysis
• Existing System of Online Food Ordering System:
• In the existing system the exams are done only manually but in proposed
system we have to computerize the exams using this application.

• Lack of security of data.

• More man power.

• Time consuming.

• Consumes large volume of pare work.

• Needs manual calculations.

• No direct role for the higher officials

• Proposed System of Online Food Ordering System:


• The aim of proposed system is to develop a system of improved facilities.
• he proposed system can overcome all the limitations of the existing system.
• The system provides proper security and reduces the manual work.
• Security of data.
• Ensure data accuracy’s.
• Proper control of the higher officials.
• Minimize manual data entry.
• Minimum time needed for the various processing.
• Greater efficiency.
• Better service.
• User friendliness and interactive.
• Minimum time required.

 Scope & Benefits of the system

• The system is user friendly.


• Data modification can be done easily.

8|Page
• Easy maintenance.
• No data redundancy.
• Less time consuming.
• Data is secure.

9|Page
• Itshelpful system travel or work at night women as well as any person.
• In this system, a large volume of data will be handled by the system.
• Various reports provide by the system.

Requirements Analysis

Feasibility study

• After doing the project Online Food Ordering System, study and analyzing
all the existing or required functionalities of the system, the next task is to
do the feasibility study for the project. All projects are feasible - given
unlimited resources and infinite time. Feasibility study includes consideration
of all the possible ways to provide a solution to the given problem. The
proposed solution should satisfy all the user requirements and should be
flexible enough so that future changes can be easily done based on the
future upcoming requirements.

A. Economical Feasibility
• This is a very important aspect to be considered while developing a project. We
decided the technology based on minimum possible cost factor. All hardware and
software cost has to be borne by the organization. Overall we have estimated that
the benefits the organization is going to receive from the proposed system will
surely overcome the initial costs and the later on running cost for system.

B. Technical Feasibility
This included the study of function, performance and constraints that may affect
the ability to achieve an acceptable system. For this feasibility study, we studied
complete functionality to be provided in the system, as described in the
System Requirement Specification (SRS), and checked if everything was
possible using different type of frontend and backend plaformst.

11 | P a g e
C. Operational Feasibility
No doubt the proposed system is fully GUI based that is very user friendly and
all inputs to be taken all self-explanatory even to a layman. Besides, a proper
training has been conducted to let know the essence of the system to the
users so that they feel comfortable with new system. As far our study is
concerned the clients are comfortable and happy as the system has cut down
their loads and doing.

Hardware and Software Requirement

 Software Requirement

 Windows XP or upward version of operating system.


 Xampp Server

 Any Web Browser like chrome

 Hardware Requirement

 A PC with 2GB RAM, 520GB HDD

 Internet Connection

UML Diagram

12 | P a g e
1) E-R Diagram: -

%3C mxG ra phM od el%

13 | P a g e
2) Use case Diagram

14 | P a g e
3) Class Diagram:

15 | P a g e
4) Sequence Diagram:
5)Activity Diagram:

Data Dictionary

 Admin Login details

 Field  Data  Description  Key  size


Name type

id Number Admin Id 50
Primary
key

username Varchar Admin name - 50

password Varchar Admin password - 50

14 |
Page
 Register

Details

Field Name Data Type Description Key Size

id number User Id Primary 50


key

fname varchar First Name - 50

lname varchar Last Name - 50

username varchar User Name - 50

Password varchar User Password - 50

email varchar Email Address - 50

contact Number Contact Number - 20

15 |
Page
 Login Details

Field Name Data Type Description Key Size

Id Number Complaint Id Primary Key 50

Email Varchar User Email - 50

16 |
Page
Input & Output Screen
 Main screen

 Order Screen:

18 |
Page
 Customer Registration

 Admin Login

19 |
Page
 Logo of FoodCart:

CODE
Here’s a simple Online Food Ordering System project in PHP with MySQL. This project
includes user authentication, a menu display, cart functionality, and order system.

1. Database Setup (MySQL)


Create a database named food_ordering and
use the following SQL script to create necessary tables:

CREATE DATABASE
food_ordering; USE
food_ordering;

20 |
Page
 Users Table

CREATE TABLE users (

Id INT AUTO_INCREMENT PRIMARY KEY,

Name VARCHAR(100),

Email VARCHAR(100) UNIQUE,

Password VARCHAR(255)

);

 Food Menu Table

CREATE TABLE menu (

Id INT AUTO_INCREMENT PRIMARY KEY,

Name VARCHAR(100),

Price DECIMAL(10,2),

Image VARCHAR(255)

);

21 |
Page
 Orders Table

CREATE TABLE orders (

Id INT AUTO_INCREMENT PRIMARY KEY,

User_id INT,

Total_price DECIMAL(10,2),

Status ENUM(‘pending’, ‘completed’) DEFAULT ‘pending’,

Created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

FOREIGN KEY (user_id) REFERENCES users(id)

);

 Order Items Table

CREATE TABLE order_items (

Id INT AUTO_INCREMENT PRIMARY KEY,

Order_id INT,

Menu_id INT,

Quantity INT,

Price DECIMAL(10,2),

FOREIGN KEY (order_id) REFERENCES orders(id),

FOREIGN KEY (menu_id) REFERENCES menu(id)

);
22 |
Page
2. Configuration File (config.php)

This file connects to the database.

<?php

$host = “localhost”;

$user = “root”;

$password = “”;

$database = “food_ordering”;

$conn = new mysqli($host, $user, $password, $database);

If ($conn->connect_error) {

Die(“Connection failed: “ . $conn->connect_error);

?>

23 |
Page
3. User Authentication (register.php & login.php)

Register User (register.php)

<?php

Include “config.php”;

If ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$name = $_POST[‘name’];

$email = $_POST[‘email’];

$password = password_hash($_POST[‘password’], PASSWORD_DEFAULT);

$sql = “INSERT INTO users (name, email, password) VALUES (‘$name’, ‘$email’, ‘$password’)”;

If ($conn->query($sql)) {

24 |
Page
Echo “Registration successful!”;

} else {

Echo “Error: “ . $conn->error;

?>

<form method=”post”>

Name: <input type=”text” name=”name”><br>

Email: <input type=”email” name=”email”><br>

Password: <input type=”password” name=”password”><br>

<button type=”submit”>Register</button>

</form>

Login (login.php)

<?php

Include “config.php”;

25 |
Page
Session_start();

If ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$email = $_POST[‘email’];

$password = $_POST[‘password’];

$result = $conn->query(“SELECT * FROM users WHERE email=’$email’”);

$user = $result->fetch_assoc();

If ($user && password_verify($password, $user[‘password’])) {

$_SESSION[‘user_id’] = $user[‘id’];

Echo “Login successful!”;

Header(“Location: index.php”);

} else {

Echo “Invalid credentials!”;

?>

26 |
Page
<form method=”post”>

Email: <input type=”email” name=”email”><br>

Password: <input type=”password” name=”password”><br>

<button type=”submit”>Login</button>

</form>

4. Display Food Menu (menu.php)

<?php

Include “config.php”;

$result = $conn->query(“SELECT * FROM menu”);

While ($row = $result->fetch_assoc()) {

Echo “<div>

27 |
Page
<img src=’” . $row[‘image’] . “’ width=’100’><br>

“ . $row[‘name’] . “ - $” . $row[‘price’] . “

<form action=’cart.php’ method=’post’>

<input type=’hidden’ name=’menu_id’ value=’” . $row[‘id’] . “’>

<input type=’number’ name=’quantity’ value=’1’ min=’1’>

<button type=’submit’>Add to Cart</button>

</form>

</div>”;

?>

28 |
Page
5. Shopping Cart (cart.php)

<?php

Session_start()

If ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$menu_id = $_POST[‘menu_id’];

$quantity = $_POST[‘quantity’];

If (!isset($_SESSION[‘cart’])) {

$_SESSION[‘cart’] = [];

$_SESSION[‘cart’][$menu_id] = $quantity;

Echo “Added to cart!”;

Echo “<a href=’checkout.php’>Go to Checkout</a>”;

?>

29 |
Page
6. Checkout (checkout.php)

<?php

Include “config.php”;

Session_start();

If (!isset($_SESSION[‘user_id’])) {

Echo “Please <a href=’login.php’>login</a> first.”;

Exit;

If ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$user_id = $_SESSION[‘user_id’];

$total_price = 0;

Foreach ($_SESSION[‘cart’] as $menu_id => $quantity) {

$result = $conn->query(“SELECT price FROM menu WHERE id=’$menu_id’”);

$menu = $result->fetch_assoc();

$total_price += $menu[‘price’] * $quantity;

30 |
Page
}

$conn->query(“INSERT INTO orders (user_id, total_price) VALUES (‘$user_id’, ‘$total_price’)”);

$order_id = $conn->insert_id;

Foreach ($_SESSION[‘cart’] as $menu_id => $quantity) {

$menu_result = $conn->query(“SELECT price FROM menu WHERE id=’$menu_id’”);

$menu = $menu_result->fetch_assoc();

$conn->query(“INSERT INTO order_items (order_id, menu_id, quantity, price) VALUES


(‘$order_id’, ‘$menu_id’, ‘$quantity’, ‘” . $menu[‘price’] . “’)”);

$_SESSION[‘cart’] = [];

Echo “Order placed successfully!”;

?>

<form method=”post”>

<button type=”submit”>Confirm Order</button>

</form>

31 |
Page
7. Admin Panel – Order Management (admin_orders.php)

<?php

Include “config.php”;

$result = $conn->query(“SELECT * FROM orders”);

While ($row = $result->fetch_assoc()) {

Echo “Order #” . $row[‘id’] . “ - $” . $row[‘total_price’] . “ – “ . $row[‘status’];

Echo “<form action=’update_order.php’ method=’post’>

<input type=’hidden’ name=’order_id’ value=’” . $row[‘id’] . “’>

<select name=’status’>

<option value=’pending’>Pending</option>

<option value=’completed’>Completed</option>

</select>

<button type=’submit’>Update</button>

</form><hr>”;

?>

33 |
Page
8. Update Order Status (update_order.php)

<?php

Include “config.php”;

If ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$order_id = $_POST[‘order_id’];

$status = $_POST[‘status’];

34 |
Page
$conn->query(“UPDATE orders SET status=’$status’ WHERE id=’$order_id’”);

Echo “Order updated!”;

?>

How to Run the Project

1. Install XAMPP or WAMP.

2. Create a database named food_ordering.

3. Import the given SQL script.

4. Save the PHP files in htdocs/your_project.

5. Start Apache and MySQL in XAMPP/WAMP.

6. Open http://localhost/your_project/register.php to register a user.

7. Log in, browse the menu, add items to the cart, and
place an order. 8.

35 |
Page
CONCLUSION

Limitations:

Therefore, conclusion of the proposed system is based on user's need and is user centred.
The system is developed in considering all issues related to all user which are included in
this system. Wide range of people can use this if they know how to operate android smart
phone.
Various issues related to Mess/Tiffin Service will be solved by
providing them a full-fledged system. Thus, implementation of Online Food Ordering
system is done to help and solve one of the important

problems of people. Based on the result of this research, it can be concluded: It helps
customer in making order easily; It gives information needed in making order to
customer. The Food website application made for restaurant and mess can help restaurant
and mess in receiving orders and modifying its data and it is also made for admin so that
it helps admin in controlling all the Food system. With online food ordering system, a
restaurant and mess menu online can be set up and the customers can easily place order.
Also, with a food menu online, tracking the orders is done easily, it maintain customer's
database and improve the food delivery service. The restaurants and mess can even
customize online restaurant menu and upload images easily. Having a restaurant menu on
internet, potential customers can easily access it and place order at their convenience.
Thus, an automated food ordering system is presented with features of
feedback and wireless communication. The proposed system would attract customers and
adds to the efficiency of maintaining the restaurant and mess ordering and billing
sections. Scope of the proposed system is justifiable because in large amount peoples are
shifting to different cities so wide range of people can make a use of proposed system

36 |
Page

You might also like