Divyareport File (Food Mania1)
Divyareport File (Food Mania1)
In today’s fast-paced world, where convenience and time-saving are paramount, online food
ordering systems have become an essential part of daily life. These platforms enable users to
browse through menus, place orders, and have food delivered directly to their doorstep with
just a few clicks, all from the comfort of their home or office.
The online food ordering system integrates modern technology with the food service industry,
providing customers with a wide variety of cuisines from various restaurants, accessible
anytime and anywhere. It simplifies the process of ordering food, eliminating the need to call
restaurants or wait in long lines.
The system typically involves a user-friendly interface, a secure payment gateway, real-time
order tracking, and options for customization, allowing customers to select their preferred
dishes, ingredients, and delivery time. For restaurant owners, this system offers a streamlined
process for managing orders, menus, inventory, and customer data, ultimately enhancing
customer satisfaction and increasing revenue.
With the rise of smartphones and internet connectivity, the online food ordering market has
grown significantly, becoming a preferred option for millions of customers globally. Whether
it's a casual meal, a special event, or a late-night craving, these platforms have revolutionized
the way we experience food delivery.
1. The Online Food Ordering System project falls under several categories in the
context of software development and technology. The primary project categories for
an Online Food Ordering System are:
2.
1. E-Commerce Systems
Description: The system facilitates transactions of food and beverages over
the internet, similar to other e-commerce platforms where customers can
browse, select, and purchase products online.
Examples: Platforms like UberEats, Grubhub, and DoorDash.
2. Mobile Applications
Description: As most food ordering is done through smartphones, the system
often falls under mobile app development. It involves creating mobile
applications for iOS or Android that allow users to browse menus, place
orders, and track deliveries.
Examples: Native apps or hybrid apps developed for food ordering services.
3. Web Development
1
Description: An online food ordering system can also be categorized as a
web-based application. The web development aspect involves creating
websites where customers can access the system from their computers or
laptops to order food.
Examples: Restaurant websites with integrated ordering systems like
Domino’s Pizza.
4. Cloud Computing
Description: Online food ordering systems typically use cloud platforms to
handle data storage, transaction processing, and scalability. This category
focuses on cloud-based solutions for managing large volumes of user data,
menu items, orders, and delivery tracking.
Examples: Amazon Web Services (AWS), Google Cloud, or Microsoft Azure
used to host the application.
2
Each of these categories plays a critical role in the development, functioning, and
optimization of an Online Food Ordering System. The project may overlap between
several categories depending on its features and the technological infrastructure used.
1.2 OBJECTS:
In an Online Food Ordering System, the concept of "objects" refers to the key entities or
components that interact within the system. These objects represent real-world or digital
elements that the system manipulates to facilitate food ordering, delivery, and management
processes. Below are the key objects in such a system:
1. Customer
Description: Represents a person who places an order through the system.
Attributes:
Customer ID
Name
Email
Phone Number
Address
Payment details
Functions:
Browse the menu
Place orders
Track orders
Make payments
Rate and review restaurants/food
2. Restaurant
Description: Represents a food establishment that offers menu items for customers to
order.
Attributes:
Restaurant ID
Name
Address
Cuisine type
Contact information
3
Available menu items
Functions:
Display menu items
Update menu or pricing
Accept orders
Prepare and dispatch orders
3. Menu
Description: Represents the list of food items available for customers to order.
Attributes:
Item ID
Name
Description
Price
Category (e.g., starters, main course, desserts)
Ingredients
Availability (in stock or out of stock)
Functions:
Show food options
Allow customers to customize orders (e.g., adding or removing ingredients)
Provide dietary information (e.g., vegetarian, vegan, gluten-free)
4. Order
Description: Represents a customer's food order, which includes items and related
details.
Attributes:
Order ID
Customer ID (refers to the customer who made the order)
Restaurant ID (refers to the restaurant fulfilling the order)
List of ordered menu items
Total price
Order status (e.g., pending, preparing, out for delivery, completed)
Delivery address
4
Functions:
Place order
Update order status
Calculate total price and taxes
Track order status in real time
5. Payment
Description: Represents the transaction made for an order, including the method of
payment.
Attributes:
Payment ID
Order ID (links to the order being paid for)
Payment amount
Payment method (credit card, PayPal, cash on delivery, etc.)
Payment status (success, failed, pending)
Payment timestamp
Functions:
Process payments securely
Validate payment methods
Record and confirm payment
6. Delivery
Description: Represents the process and logistics of delivering food from the
restaurant to the customer.
Attributes:
Delivery ID
Order ID (links to the order being delivered)
Delivery address
Delivery status (e.g., dispatched, in transit, delivered)
Estimated delivery time
Delivery person (driver ID)
Functions:
Assign a delivery driver
5
Track delivery route and progress
Update delivery status
Handle issues like delays or order cancellations
7. Delivery Person (Driver)
Description: Represents the individual responsible for delivering the order to the
customer.
Attributes:
Driver ID
Name
Contact information
Vehicle details (optional)
Current delivery status
Functions:
Receive assigned orders for delivery
Update status of the delivery (e.g., picked up, on the way)
Communicate with the customer in case of issues
8. Admin (System Administrator)
Description: Represents the backend user who manages the system, including the
restaurant menu, customer orders, and payment details.
Attributes:
Admin ID
Name
Email
Role/Permissions
Functions:
Manage customer accounts
Update restaurant menus
Process refunds and cancellations
Generate reports (sales, customer activity)
Maintain system security and functionality
9. Review
6
Description: Represents feedback given by customers regarding their food order,
restaurant experience, or delivery service.
Attributes:
Review ID
Customer ID (refers to the customer who gave the review)
Restaurant ID (refers to the restaurant being reviewed)S
Rating (1–5 stars)
Comments or feedback
Functions:
Submit feedback
Display customer reviews on restaurant pages
Report inappropriate content
Functions:
Apply discounts to orders
Validate coupon usage
Track coupon usage and expiration
These objects are interrelated, and each one plays a crucial role in the efficient functioning of
the system. Proper interaction and management of these objects help ensure a smooth and
satisfying user experience, from placing the order to receiving the delivery.
1.3 Identification:
The Online Food Ordering System is a digital platform that allows customers to browse
menus, place food orders, and have them delivered or prepared for pick-up from restaurants
or food vendors. It involves several components and technologies working together to enable
a seamless experience for both customers and food providers. Below is a breakdown of the
key aspects of identifying the Online Food Ordering System:
1. Key Features:
Menu Browsing: Customers can view a variety of menu items offered by different
restaurants, categorized by type (e.g., appetizers, main courses, desserts).
7
Order Customization: Users can modify their food orders by adding or removing
ingredients, selecting portion sizes, or choosing preferences like extra toppings or
dietary requirements (e.g., vegetarian, gluten-free).
Secure Payment Gateway: Multiple payment methods (credit/debit cards, digital
wallets, or cash on delivery) are supported to ensure safe and seamless transactions.
Real-Time Order Tracking: Customers can track the status of their orders, including
the preparation and delivery stages, in real-time via the app or website.
Order History & Repeat Orders: Registered users can access their previous orders
and quickly reorder their favorite meals with minimal effort.
Customer Reviews and Ratings: Customers can rate their food, the service, and
provide feedback to help future users make informed decisions.
Discounts and Coupons: Special offers, loyalty rewards, and discount coupons can
be applied to orders to encourage repeat business and attract new customers.
User Interface (UI): The front-end design of the application (either web-based or
mobile app) that customers interact with. It is intuitive, easy to navigate, and
responsive.
Backend Server: The server handles user requests, processes orders, updates the
menu, and manages data such as user profiles, payment transactions, and order status.
Restaurant Dashboard: A platform for restaurant owners to manage their menu
items, track orders, update stock, and manage customer feedback.
Delivery System: Integration with delivery drivers or services that help in real-time
tracking of food deliveries and ensure timely and accurate order fulfillment.
Database Management: Stores customer data, restaurant details, payment records,
order history, and feedback. Ensures data security and smooth operation of the
platform.
4. Stakeholders Involved:
Customers: The end-users who place the orders, customize their meals, make
payments, and receive deliveries. Their feedback and experience play a critical role in
system optimization.
Restaurants: Food vendors that provide menu items, accept orders, and prepare the
food. They rely on the system to increase their customer base and streamline their
operations.
Delivery Personnel: Individuals or third-party services who pick up the orders from
restaurants and deliver them to customers. Their efficiency directly impacts customer
satisfaction.
System Admin/Operators: Manage the platform's functionality, monitor system
performance, ensure smooth transactions, and address issues like order cancellations
or refunds.
8
5. Technologies Involved:
Mobile and Web Applications: Developed using technologies like React, Angular, or
Vue.js (for frontend) and Node.js, Django, or Ruby on Rails (for backend). These
platforms are built to be user-friendly and scalable.
Database Management: Relational databases (e.g., MySQL, PostgreSQL) or NoSQL
databases (e.g., MongoDB) are used to store and manage large volumes of user and
transaction data.
Payment Gateway Integration: Payment processors like Stripe, PayPal, or local
banks enable secure online payments. Integration of SSL certificates ensures the
security of financial transactions.
GPS and Mapping Services: GPS services (e.g., Google Maps, Mapbox) help in
real-time tracking of orders, and optimized routing for delivery drivers to ensure the
most efficient path.
Cloud Infrastructure: Cloud platforms like Amazon Web Services (AWS), Microsoft
Azure, or Google Cloud are used for hosting the system, ensuring scalability, and
maintaining uptime during high traffic.
Convenience: Customers can place orders anytime, anywhere, eliminating the need to
make calls or visit restaurants in person.
Wide Variety: Access to a broad range of cuisines and restaurants, making it easier
for customers to discover new foods.
Time-Saving: Streamlined ordering and payment processes, faster preparation and
delivery times, and a simplified system for managing repeat orders.
Business Growth: For restaurants, an online ordering system opens new sales
channels, increases visibility, and provides valuable customer data for targeted
marketing.
Cost Efficiency: Reduces the need for phone-based order taking, minimizes errors,
and improves delivery logistics through automation.
7. Challenges:
Delivery Logistics: Ensuring timely and accurate delivery, managing traffic, and
dealing with unpredictable delivery conditions can be challenging.
Customer Support: Handling customer complaints, order issues, or refunds in a
timely and efficient manner is crucial to maintain satisfaction.
Data Security: Ensuring user data, especially payment and personal details, is
protected from breaches or cyber-attacks.
Restaurant Coordination: Synchronizing orders between multiple restaurants,
managing inventory, and ensuring quality control can be complex, especially with
large volumes of orders.
9
1.4 EXISTING SYSTEM:
Several well-established platforms have revolutionized the online food ordering experience,
providing convenient, reliable, and user-friendly systems for customers to order food and
have it delivered to their doorstep. These existing systems have become dominant players in
the market, offering a range of features for both customers and restaurant owners. Below are
some of the most popular and successful existing online food ordering systems:
1. Uber Eats
Overview: Uber Eats is one of the largest and most popular online food ordering and
delivery platforms globally. It operates in numerous countries and offers a wide
variety of restaurant choices.
Key Features:
User-Friendly Interface: Customers can browse menus, read reviews, and
place orders easily.
Real-Time Tracking: Customers can track the delivery progress in real-time.
Payment Integration: Multiple payment methods, including credit/debit
cards, PayPal, and Uber wallet, are supported.
Order Customization: Users can customize their orders by selecting different
food options or adding special instructions.
Delivery Tracking: Real-time GPS tracking of the delivery driver.
Technology: Uber Eats uses cloud-based infrastructure to ensure scalability and high
availability. The system is mobile-first with apps for iOS and Android, and the
website is responsive.
5. Zomato
Overview: Zomato is a popular restaurant discovery and food delivery platform in
India and several other countries. It started as a restaurant review platform and later
expanded into food delivery.
Key Features:
Restaurant Discovery: Helps users discover new restaurants based on
location, type of cuisine, and ratings.
Online Ordering and Delivery: Allows users to place food orders from
restaurants directly through the app.
Cashless Transactions: Supports online payments through various methods.
10
Restaurant Reviews: Provides detailed customer reviews and restaurant
ratings.
Subscription Service (Zomato Pro): Offers exclusive discounts and offers to
subscribers at participating restaurants.
Technology: Zomato uses a combination of native mobile applications (iOS and
Android) and a web platform, backed by a cloud-based infrastructure for scalability.
Technology: Swiggy uses a robust back-end system built with Python and
Ruby on Rails. The mobile apps are developed with modern frameworks such
as React Native and Kotlin.
The proposed Online Food Ordering System aims to improve the overall user experience,
streamline restaurant operations, and enhance delivery efficiency by integrating new features,
advanced technologies, and user-centric design. The system will provide a robust and
scalable platform for customers, restaurant owners, and delivery personnel to ensure a
seamless, secure, and efficient process from placing an order to delivery.
11
Ratings and Reviews: After receiving their orders, customers can rate their food and
delivery experience, helping future customers make informed decisions.
Order History & Quick Reorder: Customers can view past orders and easily reorder
their favorite meals with a few clicks.
Notifications: Push notifications or SMS alerts about order status updates (order
confirmation, preparation, dispatch, and delivery).
Loyalty Programs & Discounts: Customers can earn points, receive promotional
discounts, and use coupons for special deals.
Technologies:
Frontend: React Native/Flutter for mobile apps
(iOS/Android), React.js/Angular for web.
Backend: Node.js, Django, or Ruby on Rails.
Database: PostgreSQL/MySQL for customer data, orders, and payment records.
Payment Integration: Stripe, Razorpay, PayPal.
2. Restaurant Interface
The Restaurant Interface will be a platform for restaurant owners to manage their menus,
process orders, track inventory, and communicate with customers.
Key Features:
Restaurant Registration & Dashboard: Restaurant owners can register on the
platform, manage their profile, and customize their menu (add, update, or remove
dishes).
Order Management: Restaurants can receive, accept, and process orders in real-time,
along with customer details.
Menu Management: Update prices, descriptions, availability, and special offers,
including the ability to mark items as unavailable if out of stock.
Order Status Updates: Restaurants can update the order status (e.g., preparing, ready
for delivery) in real-time to notify customers.
Analytics & Reporting: Restaurant owners can view sales reports, customer reviews,
popular dishes, and customer demographics.
Inventory Management: Track stock levels and receive alerts for low inventory,
helping restaurants to manage supplies effectively.
Customer Communication: Direct communication tools (chat or call) to resolve
order issues, queries, or special requests.
Technologies:
12
Frontend: React.js or Vue.js for restaurant web interface.
Backend: Node.js or Django for order processing, notifications, and data
management.
Database: MongoDB/PostgreSQL to store menu items, order data, inventory, and
restaurant details.
13
User Management: Admins can monitor and manage both customer and restaurant
accounts, handle disputes, and ensure compliance with platform rules.
Order Monitoring: Admins can view real-time updates on all orders, including
customer complaints, delivery delays, or canceled orders.
Payment & Transaction Management: Monitor payment flows, manage refunds,
disputes, and track financial reports.
System Analytics & Reports: Generate reports on platform usage, sales, top
restaurants, and customer behavior.
Promotions & Discounts: Admins can create and manage promotional campaigns,
coupon codes, and discounts across the platform.
Security and Privacy: Admins can ensure the security of customer data, monitor
unauthorized activities, and maintain GDPR compliance.
Technologies:
Admin Dashboard: React.js or Angular for responsive admin panels.
Backend: Node.js or Django for handling admin functionalities.
Database: PostgreSQL/MySQL for secure data storage and management.
Technological Stack
Frontend:
Mobile App: React Native or Flutter for building cross-platform
applications.
Web App: React.js, Vue.js, or Angular for a dynamic, responsive web
application.
Backend:
Node.js or Django for building scalable APIs and handling requests.
GraphQL (optional) for optimized data querying.
WebSocket for real-time updates, especially for order tracking.
Database:
PostgreSQL/MySQL for relational data (customer info, orders, payments).
MongoDB (optional) for flexible, non-relational data storage (restaurant
menus, reviews).
Cloud & Hosting:
AWS, Google Cloud, or Microsoft Azure for cloud hosting, file storage, and
scalability.
14
Payment Gateway:
Stripe, Razorpay, PayPal for secure transactions.
Geolocation & Mapping:
Google Maps API or Mapbox for location tracking, route optimization, and
map displays.
Notifications:
Firebase Cloud Messaging (FCM) for push notifications.
15
Payment Integration:
Integration with secure payment gateways (e.g., Stripe, PayPal, local payment
methods).
Support for multiple payment options: credit/debit cards, digital wallets, and
cash on delivery.
Order Tracking:
Real-time tracking of the order from preparation to delivery.
Provide estimated delivery time and real-time updates on order status.
Reviews and Ratings:
After receiving the order, customers should be able to leave feedback about
the food, restaurant, and delivery service.
Order History and Reordering:
Customers should be able to view past orders and reorder their favorites with a
single click.
Notifications:
Push notifications for order confirmation, updates, and delivery status.
Promotions & Discounts:
Ability to use coupons, discounts, or loyalty points during checkout.
B. Restaurant Module
Restaurant Registration and Profile Management:
Allow restaurants to register, update their profile, and manage business details
like hours of operation, contact info, and location.
Menu Management:
Restaurants can add, update, or remove menu items, adjust prices, and indicate
availability.
Order Management:
Restaurants should be able to view and manage incoming orders, mark orders
as accepted, being prepared, or ready for delivery.
Order Notification:
Restaurants should receive instant notifications when a new order is placed.
Inventory Management:
16
Integration to track inventory levels, manage stock, and receive alerts when
ingredients run low.
Analytics and Reporting:
View sales reports, popular dishes, and customer trends to help make data-
driven decisions.
Customer Communication:
Allow communication with customers via chat or phone in case of order
modifications, issues, or clarifications.
C. Delivery Module
Delivery Personnel Registration:
Delivery drivers can register on the platform and provide necessary
identification for verification.
Order Assignment:
Delivery drivers are assigned orders based on proximity, availability, and
traffic conditions.
Route Optimization:
The system suggests optimal delivery routes to drivers using GPS integration
(e.g., Google Maps, Mapbox).
Real-Time Updates:
Drivers should update the system with the delivery status (e.g., picked up, in
transit, delivered).
Earnings Management:
Delivery personnel should be able to view their earnings, tips, and payment
history.
Delivery Ratings:
After completing the delivery, drivers can be rated by customers to maintain
high service standards.
D. Admin Module
System Administration and User Management:
Admin can manage customer, restaurant, and delivery personnel accounts.
Ability to suspend, activate, or block users for violations.
Payment Management:
17
Admin can oversee all transactions, monitor payments, handle disputes, and
process refunds.
Promotions and Discounts Management:
Admin can create and manage promotional campaigns, coupons, and special
offers for restaurants and customers.
Analytics and Reporting:
Admin has access to real-time data for overall system performance, sales,
order volume, popular restaurants, customer behavior, etc.
System Monitoring and Security:
Continuous monitoring of the platform’s security, data integrity, and user
activity.
Admin should be able to configure security measures like 2-factor
authentication for users.
2. Non-Functional Requirements
These requirements define how the system performs and the qualities it must have.
A. Performance Requirements
Scalability: The system should be able to handle a large number of users, orders, and
restaurant listings without degradation in performance. This includes both the website
and mobile app (iOS/Android).
Fast Response Time: The system should provide quick responses (under 2 seconds
for page loads and order submissions) to ensure a smooth user experience.
High Availability: The system should be available 24/7 with minimal downtime. Use
of cloud platforms and load balancing to ensure fault tolerance and uptime.
Concurrency: The system should be able to handle simultaneous orders and
interactions from multiple users without data loss or slowdowns.
B. Security Requirements
Data Encryption: All sensitive data, especially payment details and user information,
should be encrypted using SSL/TLS protocols to prevent unauthorized access.
Secure Authentication: Use secure login mechanisms such as OAuth or multi-factor
authentication for both customers and restaurant owners.
Transaction Integrity: The system should guarantee that financial transactions are
secure and accurately processed without errors or fraud.
18
Privacy Compliance: The system must adhere to data privacy regulations like GDPR
(General Data Protection Regulation) for users' personal and payment data.
C. Usability Requirements
User-Friendly Interface: The system’s interface should be simple, intuitive, and
responsive across all devices (desktop, tablet, and mobile).
Multilingual Support: The system should support multiple languages to cater to
users from diverse geographic regions.
Accessibility: The platform must comply with accessibility standards (WCAG 2.1) to
ensure that it is usable by people with disabilities.
D. Reliability Requirements
Error Handling: The system should handle errors gracefully and provide clear
messages to users in case of issues (e.g., order failure, payment decline).
Backup and Recovery: Implement regular data backups and a disaster recovery plan
to ensure minimal data loss in case of system failures.
E. Maintainability Requirements
Modular Design: The system architecture should be modular to allow easy updates,
addition of new features, and scalability as the system grows.
Logging and Monitoring: Implement logging for system events and continuous
monitoring for performance bottlenecks and potential security issues.
1. Technical Feasibility
Technical feasibility assesses whether the proposed system can be developed using existing
technology and infrastructure. It looks at the software, hardware, and technical expertise
required for the system.
A. Technologies and Platform
Web and Mobile Platforms:
The system will operate as a web application (accessible via browsers) and
mobile applications for iOS and Android. Mobile apps can be built using
19
frameworks like React Native or Flutter, while the web platform can be built
using technologies like HTML5, CSS, and JavaScript, with backend
technologies like Node.js,.
Database Management:
The system will require databases to store user information, orders, restaurant
menus, reviews, payments, and delivery tracking data. Relational
databases like MySQL or PostgreSQL and NoSQL
databases like MongoDB or Firebase will be suitable.
Third-Party Integrations:
Payment Gateways like Stripe, PayPal, or Razorpay will be integrated for
secure payments.
Real-time Notifications: Services like Firebase Cloud Messaging for push
notifications.
Geolocation & Mapping: APIs like Google Maps or Mapbox for real-time
tracking of deliveries.
B. Development Team and Expertise
The development team will require expertise in:
Frontend development (HTML, CSS, JavaScript, React, Vue, or Angular).
Backend development (Node.js, Python, Java, Ruby).
Mobile development (React Native, Flutter).
Database management (SQL/NoSQL).
Payment and API integration.
The team will also need UX/UI designers, QA testers, and DevOps experts for
deployment and maintenance.
C. Infrastructure Requirements
The system will need cloud hosting (AWS, Google Cloud, or Microsoft Azure) to
scale and manage high user traffic.
Scalability: The infrastructure should allow the system to scale as demand grows,
ensuring minimal downtime.
Security: Implementing encryption (SSL/TLS) for payment processing and protecting
user data is crucial.
Hardware and Infrastructure: Costs for cloud services (AWS, Google
Cloud), servers, storage, and networking.
Licensing Fees: Payment gateway and map API integrations may come with
licensing or transaction fees.
3. Operational Feasibility
20
Operational feasibility assesses whether the organization has the ability to operate and
manage the system after development, including the resources, personnel, and procedures.
A. System Usability
The system must be user-friendly, with simple navigation for customers, restaurant
owners, and delivery personnel.
Customers should easily browse menus, place orders, make payments, and track
deliveries.
Restaurant owners need an intuitive dashboard to manage their menus, orders, and
performance.
Delivery personnel should be able to receive orders, navigate to delivery locations,
and update status with ease.
B. Support and Maintenance
Customer Support: 24/7 customer support via live chat, email, or phone to handle
complaints, refunds, and service inquiries.
System Maintenance: Regular software updates, bug fixes, and new feature releases
will be necessary.
Performance Monitoring: Ongoing monitoring of system performance (uptime,
response time, order accuracy) is required to maintain quality.
C. User Adoption
Customer adoption depends on the system’s ease of use, availability of food options,
and delivery speed.
Restaurants will be more inclined to join the platform if they can easily manage orders
and access detailed analytics.
Delivery personnel will need an efficient system to optimize routes and track orders in
real-time.
D. Delivery Regulations
Delivery Logistics: Depending on the jurisdiction, there might be laws governing the
working hours of delivery personnel or the types of vehicles used for delivery.
E. Employment Regulations
If the platform hires delivery personnel directly, compliance with labor
laws and taxation is necessary
.
2.2 SDLC (Software Development Life Cycle)
21
The Software Development Life Cycle (SDLC) is a structured approach to software
development, providing a systematic process for planning, creating, testing, and deploying a
software application. For an Online Food Ordering System, the SDLC can be broken down
into several phases that guide the development process from start to finish. Below is a
detailed overview of the SDLC applied to an Online Food Ordering System.
1. Planning Phase
The planning phase is the foundation for the project. In this phase, the project goals, scope,
and feasibility are outlined. The planning process ensures that the project has a clear
direction.
Key Activities:
Requirement Gathering:
Define the system’s functional requirements such as order placement, payment
processing, menu management, and delivery tracking.
Identify non-functional requirements like performance, security, and usability.
Feasibility Study:
Assess technical, operational, economic, and legal feasibility of the project.
Project Scope:
Define the features and functionality to be included in the system, such as user
registration, payment integration, real-time tracking, and restaurant dashboard.
Timeline and Budgeting:
Estimate the development time, resources, and budget required.
22
Plan how the system will handle secure payments (PCI DSS compliance),
protect personal data (GDPR compliance), and ensure secure user
authentication.
Technology Stack Selection:
Select the frontend, backend, database, and hosting technologies based on the
system requirements (e.g., React, Node.js, MySQL, AWS).
3. Development Phase
The development phase is where the actual coding and implementation of the system take
place. This phase focuses on translating the system design into a functional application..
4. Testing Phase
The testing phase ensures the system works as expected and meets the requirements. It
identifies and resolves any bugs or issues before deployment.
Key Activities:
Unit Testing:
Test individual components or modules (e.g., order placement, payment
gateway integration) to ensure they work as expected.
Integration Testing:
Verify that different components of the system (frontend, backend, database,
APIs) work seamlessly together.
System Testing:
Test the entire system to ensure it meets all functional and non-functional
requirements.
Security Testing:
Ensure the system is secure from vulnerabilities such as SQL injection, cross-
site scripting (XSS), and payment fraud.
User Acceptance Testing (UAT):
Validate the system with real users (restaurant owners, delivery personnel,
customers) to ensure the system is user-friendly and meets the user needs.
Load Testing:
Check the system’s ability to handle a large number of simultaneous users,
particularly during peak ordering times.
5. Deployment Phase
23
The deployment phase involves making the system live for public use. It ensures that the
system is properly deployed and accessible to users.
Conduct a soft launch to a smaller audience before making it widely available,
to gather user feedback and resolve any final issues.
6. Maintenance Phase
After deployment, the system enters the maintenance phase, where the application is
monitored, updated, and improved as needed.
Key Activities:
Bug Fixes and Updates:
.
System Monitoring:
Feature Enhancements:
. Compliance Updates:
Online Food Ordering System is actually a type of software that allows the manager of
restaurants to manage and accept the placed orders over the Internet or in the restaurant. Let
us understand the working of the food ordering system by using DFD (Data Flow Diagram).
DFD for Food Ordering System is shown below.
Level 0 DFD –
24
At this level, the Input and Output of the system are shown. The system is designed and
established across the world with input and output at this level.
Level 1 DFD
It shows the data flow between customers, restaurants, the order system, and third-party
services.
Key Processes:
Customer Registration & Login: Manages user account creation and authentication.
Menu Browsing: Customers view available menu items from restaurants.
Order Placement: Customers place their food order by selecting items and adding to
the cart.
Order Processing: The system processes the order, handles payment, and notifies the
restaurant.
Payment Processing: Interaction with payment gateways for secure transaction
handling.
Order Assignment & Delivery: The system assigns the order to a delivery person
and tracks delivery status.
25
Order Tracking: Customers can track the real-time status of their order.
26
Explanation of Processes in the Level 1 DFD
1. Customer Registration & Login:
Input: Customer’s personal details (e.g., name, email, address, password).
Output: A registered user or authenticated session to proceed with ordering.
2. Menu Browsing:
Input: Restaurant details, items, and menu information.
Output: Menu items displayed to the customer for order selection.
3. Order Placement:
Input: Selected menu items, quantity, and any special instructions.
Output: A food order placed by the customer, which is forwarded to the
restaurant for processing.
4. Payment Processing:
Input: Payment details (e.g., credit card information).
Output: Payment status (successful or failed), which is sent back to the
system.
Interaction: Communicates with third-party payment gateways (e.g., Stripe,
PayPal).
5. Order Processing:
Input: Food order details from the customer and payment status.
Output: Confirmation of the order, notifying both the restaurant and customer.
Interaction: Interacts with the restaurant's order management system to
update order status.
6. Restaurant Order Management:
Input: Customer order details and updates to order status.
Output: Order updates (e.g., “In Progress”, “Out for Delivery”).
7. Delivery Assignment:
27
Input: Finalized order, assigned delivery personnel details.
Output: Order assigned to delivery personnel, with delivery instructions.
8. Delivery Tracking:
Input: Real-time location of the delivery personnel.
Output: Real-time updates for the customer on delivery status.
Interaction: Provides tracking information through integration with services
like Google Maps.
Level 2 DFD
The Level 2 DFD further decomposes specific processes from Level 1 into sub-
processes. For example, the Order Placement process could be broken down into
sub-processes like:
28
Proceed to Checkout
Apply Promo Code
Confirm Order
The Order Processing process could be broken down into:
Check Inventory
Validate Payment
Notify Restaurant
Send Confirmation to Customer
The Delivery Assignment process could include:
Assign Delivery Personnel
Track Delivery Location
Update Delivery Status
29
3.3 USER INTERFACE DESIGN
Below is an outline of the key components and features of the UI Design for an Online Food
Ordering System, broken down into multiple sections for clarity.
30
1. Menu Page
Objective: Display the restaurant menu items in an organized and visually appealing
way, allowing users to browse and select their items.
Features:
Restaurant Name and Details: At the top of the page, display the restaurant name,
ratings, and a brief description.
Menu Categories: Organize food into clear categories (e.g., Appetizers, Main
Course, Desserts, Beverages).
Item Filters: Allow customers to filter by dietary preferences, such as vegetarian,
gluten-free, etc.
Item Images: Display images of food items to encourage selection.
Add to Cart Button: Each item should have an "Add to Cart" button to allow users
to select multiple items.
Pricing: Clear display of item prices and any additional charges.
Special Offers: Display combo meals, discounts, or special offers at the top or in a
dedicated section.
31
2. Cart Page
4. Checkout Page
Objective: Allow customers to finalize their order with payment, delivery, and billing
information.
Features:
Customer Information: Fields for the user to enter their delivery address, phone
number, and any special delivery instructions.
Payment Options: Provide multiple payment methods (credit/debit card, PayPal,
cash on delivery, etc.).
Order Summary: Display a summary of the order (items, quantities, total cost).
Delivery Method: Allow users to choose between standard delivery, express delivery,
or pickup.
Promotions: Include a space to apply any discount codes before confirming payment.
Place Order Button: A final button to submit the order and proceed with payment.
5. Order Tracking Page
Objective: Allow customers to track the status of their order in real-time.
Features:
Order Status: Show the current status of the order (e.g., Preparing, Out for Delivery,
Delivered).
Order Timeline: A timeline indicating the stages of the order (e.g., Order Placed,
Preparing, Out for Delivery, Delivered).
32
Delivery Location: Integrate a map to show the real-time location of the delivery
personnel (if possible).
Contact Information: Display restaurant and delivery contact information in case the
customer needs support.
Estimated Delivery Time: Update the estimated time of arrival in real-time.
6. User Profile Page
Objective: Provide users with an area to manage their account settings, view order history,
and save preferences.
Features:
Profile Information: Allow users to edit their personal details (name, address, phone
number).
Order History: A list of past orders with options to reorder items.
Payment Methods: Manage stored payment options.
Favorites: Users can save favorite restaurants or dishes for quick reordering.
Logout Button: Easy access to log out from the system.
3.4 ER DIAGRAM
The Entity-Relationship (ER) Diagram for an Online Food Ordering System models the
relationships between different entities in the system. It defines how the data is structured and
how various components interact within the system. The key entities involved in such a
system include Users (Customers), Restaurants, Menu Items, Orders, Payments,
Delivery, and Admins.
Below is a detailed explanation of the entities and their relationships that form the ER
Diagram for the system:
33
1. User – Order Relationship: A user can place multiple orders, and each order is
associated with a user.
2. Restaurant – Menu Item Relationship: A restaurant has many menu items, which
are linked via the Menu Item entity.
3. Order – Menu Item Relationship: An order can contain multiple menu items, and
each menu item can appear in many orders, hence the many-to-many relationship.
The Order_Menu_Item join table handles this.
4. Order – Payment: Each order is tied to one payment, ensuring that the order has
been paid for before delivery.
5. Order – Delivery: Each order has one associated delivery, which includes
information about the delivery person and the delivery status.
6. Admin – Restaurant: An admin manages many restaurants, controlling their menu,
orders, and payments.
7. Delivery Personnel – Delivery: A delivery person is responsible for multiple
deliveries. They are assigned specific orders for delivery.
34
3.5 DATABASE DESIGN
Database design for an Online Food Ordering System focuses on structuring data efficiently
while supporting functionalities such as user management, restaurant details, orders,
payments, and delivery tracking. Below is an outline of the database design,
including tables, attributes, primary keys, and foreign keys that ensure referential integrity.
Unique
PRIMARY KEY, identifier for
user_id INT AUTO_INCREMENT each user.
Full name of
name VARCHAR(100) NOT NULL the user.
Email address
email VARCHAR(100) UNIQUE, NOT NULL for user login.
Contact number
phone_number VARCHAR(15) NOT NULL of the user.
Delivery
address for the
address TEXT NOT NULL user.
Hashed
password for
password VARCHAR(255) NOT NULL user login.
Type of user
ENUM('Regular', (Regular or
user_type 'Premium') DEFAULT 'Regular' Premium).
2. Restaurant Table
This table contains information about the restaurants available in the system.
Table Name: restaurants
35
Attribute Data Type Constraints Description
Name of the
name VARCHAR(100) NOT NULL restaurant.
Physical location
or address of the
location VARCHAR(255) NOT NULL restaurant.
Average rating of
rating DECIMAL(2,1) DEFAULT 0.0 the restaurant.
Type of cuisine
served (e.g.,
cuisine_type VARCHAR(50) NOT NULL Italian, Chinese).
Contact
information of the
contact_info VARCHAR(100) NOT NULL restaurant.
Unique
identifier for
PRIMARY KEY, each menu
menu_item_id INT AUTO_INCREMENT item.
Reference to
the restaurant
FOREIGN KEY offering the
restaurant_id INT (restaurants.restaurant_id) menu item.
Name of the
name VARCHAR(100) NOT NULL food item.
Description
of the food
description TEXT NULL item.
Price of the
price DECIMAL(8,2) NOT NULL food item.
36
Attribute Data Type Constraints Description
'Main Course',
'Dessert', 'Beverage') the food item.
Ingredients
used in the
ingredients TEXT NULL dish.
4. Order Table
This table stores information about each order placed by customers.
Table Name: orders
Unique
PRIMARY KEY, identifier for
order_id INT AUTO_INCREMENT each order.
Reference to
the user
FOREIGN KEY placing the
user_id INT (users.user_id) order.
Reference to
the restaurant
FOREIGN KEY being
restaurant_id INT (restaurants.restaurant_id) ordered from.
Date and
time when
the order was
order_date DATETIME NOT NULL placed.
Total cost of
total_amount DECIMAL(8,2) NOT NULL the order.
ENUM('Pending',
'In Progress', Current
'Delivered', status of the
order_status 'Cancelled') NOT NULL order.
Delivery
address for
delivery_address TEXT NOT NULL the order.
Payment
ENUM('Paid', status of the
payment_status 'Unpaid', 'Failed') NOT NULL order.
37
5. Order Menu Item Table (Join Table)
This table stores the relationship between orders and menu items, capturing which menu
items belong to which order.
Table Name: order_menu_items
Data
Attribute Type Constraints Description
Reference to the
order_id INT FOREIGN KEY (orders.order_id) order.
Quantity of the
quantity INT NOT NULL menu item ordered.
6. Payment Table
This table contains information about the payment for each order.
Table Name: payments
Unique
PRIMARY KEY, identifier for
payment_id INT AUTO_INCREMENT each payment.
Reference to
FOREIGN KEY the order being
order_id INT (orders.order_id) paid for.
Total amount
amount DECIMAL(8,2) NOT NULL paid.
ENUM('Credit
Card', 'PayPal', Payment
payment_method 'Cash on Delivery') NOT NULL method used.
7. Delivery Table
This table tracks the delivery status and information for each order.
Table Name: deliveries
38
Descriptio
Attribute Data Type Constraints n
Unique
identifier
PRIMARY KEY, for each
delivery_id INT AUTO_INCREMENT delivery.
Reference
to the order
being
order_id INT FOREIGN KEY (orders.order_id) delivered.
Reference
to the
FOREIGN KEY delivery
delivery_person_ (delivery_personnel.delivery_person person
id INT _id) assigned.
ENUM('In Current
Transit', status of
'Delivered', the
delivery_status 'Pending') NOT NULL delivery.
Estimated
DATETIM delivery
estimated_time E NOT NULL time.
Actual
DATETIM time of
delivery_time E NULL delivery.
Unique
identifier for
PRIMARY KEY, each delivery
delivery_person_id INT AUTO_INCREMENT person.
Name of the
delivery
name VARCHAR(100) NOT NULL person.
39
Attribute Data Type Constraints Description
for the
delivery
person.
9. Admin Table
This table stores information about the admins who manage the system, including
restaurant management and order processing.
Table Name: admins
Name of the
name VARCHAR(100) NOT NULL admin.
Hashed password
password VARCHAR(255) NOT NULL for admin login.
40
CHAPTER 4 IMPLEMENTATION AND TESTING
The implementation of an Online Food Ordering System involves developing the system
from a database design to a fully functional web or mobile application. This implementation
includes both the backend (server-side logic, database interaction) and frontend (user
interface for customers, admin, and restaurant management) components.
Below is a comprehensive guide for implementing such a system, including key steps,
technologies, and best practices.
41
Payment Gateway: Integration with payment providers (e.g., Stripe, PayPal)
for processing payments.
Order Tracking: Users can view the status of their orders (e.g., Pending, In
Progress, Delivered).
2. Restaurant Module
Restaurant Dashboard: Allows restaurant owners/managers to manage their
menus, view orders, and update order statuses.
Menu Management: Restaurants can add/edit/remove menu items, manage
pricing, and specify availability.
Order Management: Restaurants can accept, reject, and update orders.
3. Admin Module
Admin Dashboard: Admins can manage users, restaurants, and monitor
orders across the system.
User Management: Admins can block/unblock users and handle customer
support issues.
Restaurant Management: Admins can add/edit/delete restaurants and
monitor their performance.
Reporting: Admins can view system analytics, such as total sales, top-rated
restaurants, and user activity.
4. Delivery Module
Delivery Assignment: Delivery personnel can accept or reject delivery
assignments.
Delivery Tracking: Allows users and restaurants to track the status of
deliveries in real-time.
3. Database Implementation
1. Database Schema: The database schema was discussed previously. Implement the
tables using SQL, setting up primary keys, foreign keys, and relationships as
described.
2. Database Tables:
Use CREATE TABLE statements to define the structure of each table (Users,
Restaurants, Orders, Payments, etc.).
Ensure proper indexing for performance (e.g., on order dates, user IDs, etc.).
42
The development of an Online Food Ordering System involves integrating several
technologies to ensure that the platform is user-friendly, scalable, secure, and capable of
handling various operations like ordering, payment processing, menu management, and
delivery tracking. Below are the key technologies used in different aspects of such a system:
1. Frontend Technologies
The frontend is the user interface (UI) where customers, restaurant owners, and delivery
personnel interact with the system.
HTML, CSS, and JavaScript:
These are the fundamental technologies for structuring (HTML), styling
(CSS), and making the page interactive (JavaScript). They are essential for
building responsive, interactive web pages.
CSS Frameworks:
Bootstrap: A framework for building responsive websites quickly. It offers
pre-built components like grids, navigation, and forms.
2. Backend Technologies
The backend is responsible for processing requests, managing databases, authenticating users,
and integrating with payment and third-party services.
Programming Languages:
Java (Spring Boot): A widely used backend technology with excellent
performance and scalability, ideal for enterprise-grade applications.
PHP (Laravel): A server-side scripting language that, when paired with the
Laravel framework, helps create scalable web applications quickly..
Spring Boot (Java): A framework for building stand-alone, production-grade
Spring-based applications with minimal configurations.
3. Database Technologies
A robust database system is required to store user data, orders, menus, transactions, reviews,
and delivery tracking information.
Relational Databases (SQL):
MySQL: An open-source relational database system commonly used for web
applications and e-commerce platforms.
4. Payment Integration Technologies
Payment processing is a critical part of any online ordering system, and the integration of
third-party payment gateways is essential.
Payment Gateways:
PayPal: Another widely used gateway for processing payments securely.
43
Razorpay: A payment gateway offering multiple payment options such as
debit/credit cards, net banking, and wallets, particularly useful for Indian
businesses.
4.2 PERT CHART
A PERT (Program Evaluation Review Technique) chart is a project
management tool used to schedule, organize, and coordinate tasks within a
project. To create a diagram with a date-based PERT chart for the FoodMania
project, we need to first define the key tasks, their dependencies, and
estimated durations. Then, we can assign start and end dates for each task.
breakdown of tasks for an online food ordering system like FoodMania:
Tasks Breakdown:
Dependencies:
44
Development
5 Back-End- 12 03-12-2024 15-12-2024 2
Development
6 Integration And 7 21-12-2024 28-12-2024 4,5
Testing
7 Deployment and 3 28-12-2024 31-12-2024 6
Go-live
Project scheduling is a crucial part of project management. It outlines the timeline and
milestones of the project, allocating sufficient time for each phase of development to ensure
the successful and timely completion of the project. Below is a comprehensive project
schedule for the development of an Online Food Ordering System.
45
2. Requirements Gathering and Analysis (Week 2-3)
Task 2.1: Stakeholder Meetings.
Document user stories, use cases, and technical requirements.
46
Backend Development (Week 9-10)
Task 5.4: Set Up Backend Framework
Set up Node.js with Express or other backend frameworks (Django, Spring
Boot).
Establish the database connection.
Task 5.5: Implement Backend APIs
Task 5.6: Implement Admin and Restaurant APIs
Develop APIs for restaurant and admin management, including
adding/updating menus, tracking orders, and processing payments.
47
Task 8.1: Deployment Setup
Set up hosting (e.g., AWS EC2, Heroku) for the backend.
Set up hosting for the frontend (e.g., Netlify, Vercel).
Task 8.2: Database Deployment
Set up cloud database (e.g., AWS RDS, Heroku Postgres).
Migrate database to production.
Task 8.3: Final Deployment and Go-Live
Deploy the system to production.
Monitor the system post-deployment for any immediate issues.
48
Task Start Date End Date Duration (Weeks)
4.3 CODING
Login code:
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Login</title>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
49
<link rel="stylesheet" href="css/login.css">
<style type="text/css">
#buttn{
color:#fff;
background-color: #5c4ac7;
}
</style>
</head>
<body>
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
50
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{
echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}
?>
</ul>
</div>
</div>
</nav>
</header>
<div style=" background-image: url('images/img/pimg.jpg');">
51
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];
if(!empty($_POST["submit"]))
{
$loginquery ="SELECT * FROM users WHERE username='$username' &&
password='".md5($password)."'"; //selecting matching records
$result=mysqli_query($db, $loginquery); //executing
$row=mysqli_fetch_array($result);
if(is_array($row))
{
$_SESSION["user_id"] = $row['u_id'];
header("refresh:1;url=index.php");
}
else
{
$message = "Invalid Username or Password!";
}
}
}
?>
52
<div class="pen-title">
<
</div>
</div>
<div class="form">
<h2>Login to your account</h2>
<span style="color:red;"><?php echo $message; ?></span>
<span style="color:green;"><?php echo $success; ?></span>
<form action="" method="post">
<input type="text" placeholder="Username" name="username"/>
<input type="password" placeholder="Password" name="password"/>
<input type="submit" id="buttn" name="submit" value="Login" />
</form>
</div>
53
</div>
<footer class="footer">
<div class="container">
<div class="bottom-footer">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
54
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
REGISTRATION CODE:
!DOCTYPE html>
<html lang="en">
<?php
session_start();
error_reporting(0);
include("connection/connect.php");
if(isset($_POST['submit'] ))
55
{
if(empty($_POST['firstname']) ||
empty($_POST['lastname'])||
empty($_POST['email']) ||
empty($_POST['phone'])||
empty($_POST['password'])||
empty($_POST['cpassword']) ||
empty($_POST['cpassword']))
{
$message = "All fields must be Required!";
}
else
{
if($_POST['password'] != $_POST['cpassword']){
56
echo "<script>alert('Invalid phone number!');</script>";
}
header("refresh:0.1;url=login.php");
}
}
57
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Registration</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> </head>
<body>
<div style=" background-image: url('images/img/pimg.jpg');">
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-
link active" href="index.php">Home <span class="sr-only">(current)</span></a>
</li>
58
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{
echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}
?>
</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
<div class="container">
<ul>
59
</ul>
</div>
60
<input type="text" class="form-control" name="email"
id="exampleInputEmail1" aria-describedby="emailHelp">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Phone number</label>
<input class="form-control" type="text" name="phone"
id="example-tel-input-3">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control"
name="password" id="exampleInputPassword1">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Confirm
password</label>
<input type="password" class="form-control"
name="cpassword" id="exampleInputPassword2">
</div>
<div class="form-group
col-sm-12">
<label for="exampleTextarea">Delivery Address</label>
<textarea class="form-control" id="exampleTextarea"
name="address" rows="3"></textarea>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<p> <input type="submit" value="Register" name="submit"
class="btn theme-btn"> </p>
</div>
61
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
62
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
63
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>
</html>
RESTAURANTS CODE:
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Restaurants</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
64
<link href="css/style.css" rel="stylesheet"> </head>
<body>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{
echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
65
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}
?>
</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
<div class="top-links">
<div class="container">
<ul class="row links">
66
</div>
</div>
</div>
<section class="restaurants-page">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-3">
</div>
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-9">
<div class="bg-gray restaurant-entry">
<div class="row">
<?php $ress=
mysqli_query($db,"select * from restaurant");
while($rows=mysqli_fetch_array($ress))
{
<div class="entry-logo">
</div>
<div class="entry-dscr">
67
</div>
</div>
<div class="right-review">
<a href="dishes.php?res_id='.
$rows['rs_id'].'" class="btn btn-purple">View Menu</a> </div>
</div>
</div>';
}
?>
</div>
</div>
68
</div>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="bottom-footer">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>
69
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</footer>
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
70
</body>
</html>
Logout code:
<?php
session_start();
session_destroy();
$url = 'login.php';
header('Location: ' . $url);
?>
switch($_GET["action"])
{
case "add":
if(!empty($quantity)) {
$stmt = $db-
>prepare("SELECT * FROM dishes where d_id= ?");
$stmt->bind_param('i',
$productId);
$stmt->execute();
$productDetails = $stmt-
>get_result()->fetch_object();
71
$itemArray = array($productDetails-
>d_id=>array('title'=>$productDetails->title, 'd_id'=>$productDetails->d_id,
'quantity'=>$quantity, 'price'=>$productDetails->price));
if(!empty($_SESSION["cart_item"]))
{
if(in_array($productDetails-
>d_id,array_keys($_SESSION["cart_item"])))
{
foreach($_SESSION["cart_item"] as
$k => $v)
{
if($productDetails->d_id == $k)
{
if(empty($_SESSION["cart_item"][$k]["quantity"]))
{
$_SESSION["cart_item"][$k]["quantity"] = 0;
}
$_SESSION["cart_item"][$k]["quantity"] += $quantity;
}
}
}
else
{
$_SESSION["cart_item"] =
$_SESSION["cart_item"] + $itemArray;
}
}
else
{
$_SESSION["cart_item"] = $itemArray;
72
}
}
break;
case "remove":
if(!empty($_SESSION["cart_item"]))
{
foreach($_SESSION["cart_item"] as $k => $v)
{
if($productId == $v['d_id'])
unset($_SESSION["cart_item"][$k]);
}
}
break;
case "empty":
unset($_SESSION["cart_item"]);
break;
case "check":
header("location:checkout.php");
break;
}
}
73
error_reporting(0);
session_start();
if(empty($_SESSION['user_id']))
{
header('location:login.php');
}
else
{
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>My Orders</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<style type="text/css" rel="stylesheet">
.indent-small {
margin-left: 5px;
}
.form-group.internal {
74
margin-bottom: 0;
}
.dialog-panel {
margin: 10px;
}
.datepicker-dropdown {
z-index: 200 !important;
}
.panel-body {
background: #e5e5e5;
/* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-
stop(0%, #e5e5e5), color-stop(100%, #ffffff));
/* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* IE10+ */
background: radial-gradient(ellipse at center, #e5e5e5 0%, #ffffff 100%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5',
endColorstr='#ffffff', GradientType=1);
font: 600 15px "Open Sans", Arial, sans-serif;
}
label.control-label {
font-weight: 600;
color: #777;
75
}
/*
table {
width: 750px;
border-collapse: collapse;
margin: auto;
/* Zebra striping */
/* tr:nth-of-type(odd) {
background: #eee;
}
th {
background: #404040;
color: white;
font-weight: bold;
td, th {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
font-size: 14px;
} */ */
76
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
/* table {
width: 100%;
}
/* thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
/* td {
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}
td:before {
77
position: absolute;
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
content: attr(data-column);
color: #000;
font-weight: bold;
} */
</style>
</head>
<body>
78
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{
?>
79
</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
</div>
<div class="result-show">
<div class="container">
<div class="row">
</div>
</div>
</div>
<section class="restaurants-page">
<div class="container">
<div class="row">
<div class="col-xs-12">
</div>
<div class="col-xs-12">
80
<div class="bg-gray">
<div class="row">
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
<th>Status</th>
<th>Date</th>
<th>Action</th>
<th>Update Items</th>
</tr>
</thead>
<tbody>
<?php
81
}
else
while($row=mysqli_fetch_array($query_res))
{
?>
<tr>
<td data-column="status">
<?php
$status=$row['status'];
if($status=="" or $status=="NULL")
?>
<?php
82
}
if($status=="in process")
{ ?>
<button type="button"
class="btn btn-warning"><span class="fa fa-cog fa-spin" aria-hidden="true"
></span> On The Way!</button>
<?php
if($status=="closed")
?>
<?php
?>
<?php
if($status=="rejected")
?>
83
<button type="button" class="btn
btn-danger"> <i class="fa fa-close"></i> Cancelled</button>
<?php
?>
</td>
</td>
<td data-column="Action">
84
<a href="edit_order.php?order_id=<?php echo $row['o_id'];?>"
class="btn btn-warning btn-flat btn-addon btn-xs m-b-10">
<i class="fa fa-edit" style="font-size:16px"></i>
</a>
</td>
</tr>
<?php }} ?>
</tbody>
</table>
</div>
</div>
</div>
85
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="row bottom-footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal">
</a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png"
alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe">
</a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin">
</a>
86
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>
87
</html>
<?php
}
?>
CHECKOUT CODE:
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
include_once 'product-action.php';
error_reporting(0);
session_start();
function function_alert() {
if(empty($_SESSION["user_id"]))
{
header('location:login.php');
}
else{
88
{
$item_total += ($item["price"]*$item["quantity"]);
if($_POST['submit'])
mysqli_query($db,$SQL);
unset($_SESSION["cart_item"]);
unset($item["title"]);
unset($item["quantity"]);
unset($item["price"]);
function_alert();
89
}
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Checkout</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> </head>
<body>
<div class="site-wrapper">
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
90
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>
<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{
echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}
?>
</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
<div class="top-links">
91
<div class="container">
<ul class="row links">
<div class="container">
<span style="color:green;">
<?php echo $success; ?>
</span>
</div>
<div class="widget-body">
<form method="post" action="#">
<div class="row">
92
<div class="col-sm-12">
<div class="cart-totals margin-b-20">
<div class="cart-totals-title">
<h4>Cart Summary</h4> </div>
<div class="cart-totals-fields">
<table class="table">
<tbody>
<tr>
<td>Cart Subtotal</td>
<td> <?php echo "$".$item_total; ?></td>
</tr>
<tr>
<td>Delivery Charges</td>
<td>Free</td>
</tr>
<tr>
<td class="text-color"><strong>Total</strong></td>
<td class="text-color"><strong> <?php echo "$".
$item_total; ?></strong></td>
</tr>
</tbody>
</table>
</div>
93
</div>
<div class="payment-option">
<ul class=" list-unstyled">
<li>
<label class="custom-control custom-radio m-b-20">
<input name="mod" id="radioStacked1" checked
value="COD" type="radio" class="custom-control-input"> <span class="custom-
control-indicator"></span> <span class="custom-control-description">Cash on
Delivery</span>
</label>
</li>
<li>
<label class="custom-control custom-radio m-b-10">
<input name="mod" type="radio" value="paypal"
disabled class="custom-control-input"> <span
class="custom-control-indicator"></span> <span class="custom-control-
description">Paypal <img src="images/paypal.jpg" alt="" width="90"></span>
</label>
</li>
</ul>
<p class="text-xs-center"> <input type="submit"
onclick="return confirm('Do you want to confirm the order?');" name="submit"
class="btn btn-success btn-block" value="Order Now"> </p>
</div>
</form>
</div>
</div>
</div>
</div>
</form>
</div>
<footer class="footer">
94
<div class="row bottom-footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal">
</a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png"
alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe">
</a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin">
</a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
95
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>
</html>
<?php
}
?>
96
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2022 at 03:22 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
/*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `onlinefoodphp`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
--
-- Dumping data for table `admin`
--
-- --------------------------------------------------------
--
-- Table structure for table `dishes`
--
-- --------------------------------------------------------
--
-- Table structure for table `restaurant`
--
99
`email` varchar(222) NOT NULL,
`phone` varchar(222) NOT NULL,
`url` varchar(222) NOT NULL,
`o_hr` varchar(222) NOT NULL,
`c_hr` varchar(222) NOT NULL,
`o_days` varchar(222) NOT NULL,
`address` text NOT NULL,
`image` text NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `restaurant`
--
INSERT INTO `restaurant` (`rs_id`, `c_id`, `title`, `email`, `phone`, `url`, `o_hr`, `c_hr`,
`o_days`, `address`, `image`, `date`) VALUES
(1, 1, 'North Street Tavern', '[email protected]', '3547854700',
'www.northstreettavern.com', '8am', '8pm', 'mon-sat', '1128 North St, White Plains',
'6290877b473ce.jpg', '2022-05-27 08:10:35'),
(2, 2, 'Eataly', '[email protected]', '0557426406', 'www.eataly.com', '11am', '9pm',
'Mon-Sat', '800 Boylston St, Boston', '606d720b5fc71.jpg', '2022-05-27 08:06:41'),
(3, 3, 'Nan Xiang Xiao Long Bao', '[email protected]', '1458745855',
'www.nanxiangbao45.com', '9am', '8pm', 'mon-sat', 'Queens, New York',
'6290860e72d1e.jpg', '2022-05-27 08:04:30'),
(4, 4, 'Highlands Bar & Grill', '[email protected]', '6545687458', 'www.hbg.com', '7am',
'8pm', 'mon-sat', '812 Walter Street', '6290af6f81887.jpg', '2022-05-27 11:01:03');
-- --------------------------------------------------------
--
-- Table structure for table `res_category`
100
--
--
-- Dumping data for table `res_category`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
101
`phone` varchar(222) NOT NULL,
`password` varchar(222) NOT NULL,
`address` text NOT NULL,
`status` int(222) NOT NULL DEFAULT '1',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
-- --------------------------------------------------------
--
-- Table structure for table `users_orders`
--
102
CREATE TABLE `users_orders` (
`o_id` int(222) NOT NULL,
`u_id` int(222) NOT NULL,
`title` varchar(222) NOT NULL,
`quantity` int(222) NOT NULL,
`price` decimal(10,2) NOT NULL,
`status` varchar(222) DEFAULT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users_orders`
--
INSERT INTO `users_orders` (`o_id`, `u_id`, `title`, `quantity`, `price`, `status`, `date`)
VALUES
(1, 4, 'Spring Rolls', 2, '6.00', 'rejected', '2022-05-27 11:43:26'),
(2, 4, 'Prawn Crackers', 1, '7.00', 'closed', '2022-05-27 11:11:41'),
(3, 5, 'Chicken Madeira', 1, '23.00', 'closed', '2022-05-27 11:42:35'),
(4, 5, 'Cheesy Mashed Potato', 1, '5.00', 'in process', '2022-05-27 11:42:55'),
(5, 5, 'Meatballs Penne Pasta', 1, '10.00', 'closed', '2022-05-27 13:18:03'),
(6, 5, 'Yorkshire Lamb Patties', 1, '14.00', NULL, '2022-05-27 11:40:51'),
(7, 6, 'Yorkshire Lamb Patties', 1, '14.00', 'closed', '2022-05-27 13:04:33'),
(8, 6, 'Lobster Thermidor', 1, '36.00', 'closed', '2022-05-27 13:05:24'),
(9, 6, 'Stuffed Jacket Potatoes', 1, '8.00', 'rejected', '2022-05-27 13:03:53');
--
--
-- Indexes for table `restaurant`
--
103
ALTER TABLE `restaurant`
ADD PRIMARY KEY (`rs_id`);
--
Login code:
body {
background: #e9e9e9;
color: #666666;
background-image: url("images/img/background_login.jpg");
font-family: "RobotoDraft", "Roboto", sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}
104
.pen-title span .fa {
color: #5c4ac7;
}
.pen-title span a {
color: #5c4ac7;
font-weight: 600;
text-decoration: none;
}
/* Form Module */
.form-module {
position: relative;
background: #ffffff;
max-width: 320px;
width: 100%;
border-top: 5px solid #5c4ac7;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
105
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: "";
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {
106
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #5c4ac7;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module input {
outline: none;
display: block;
width: 100%;
border: 1px solid #ccc;
margin: 0 0 20px;
padding: 10px 15px;
box-sizing: border-box;
font-wieght: 400;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #5c4ac7;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #5c4ac7;
width: 100%;
border: 0;
padding: 10px 15px;
107
color: #ffffff;
transition: 0.3s ease;
}
.form-module button:hover {
background: #b92a07;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}
Stylecss
// Main Colors
$accent: null;
$white: #ffffff;
$black: #000000;
$dark-gray: lighten($black, 20%);
108
$gray: lighten($black, 40%);
$light-gray: lighten($black, 60%);
$lighter-gray: lighten($black, 80%);
// Pen Settings
$accent: #33b5e5;
$module-width: 320px;
body {
background: #e9e9e9;
color: $gray;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
span {
font-size: 12px;
.fa {
109
color: $accent;
}
a{
color: $accent;
font-weight: 600;
text-decoration: none;
}
}
}
/* Form Module */
.form-module {
position: relative;
background: $white;
max-width: $module-width;
width: 100%;
border-top: 5px solid $accent;
box-shadow: 0 0 3px rgba($black, .1);
margin: 0 auto;
.toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: $accent;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: $white;
font-size: 12px;
110
line-height: 30px;
text-align: center;
.tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba($black, .6%);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
&:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba($black, .6);
}
}
}
.form {
display: none;
padding: 40px;
&:nth-child(2) {
display: block;
111
}
}
h2 {
margin: 0 0 20px;
color: $accent;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
input {
outline: none;
display: block;
width: 100%;
border: 1px solid darken($white, 15%);
margin: 0 0 20px;
padding: 10px 15px;
box-sizing: border-box;
font-wieght: 400;
@include transition(.3s ease);
&:focus {
border: 1px solid $accent;
color: $dark-gray;
}
}
button {
cursor: pointer;
background: $accent;
width: 100%;
border: 0;
padding: 10px 15px;
112
color: $white;
@include transition(.3s ease);
&:hover {
background: darken($accent, 15%);
}
}
.cta {
background: darken($white, 5%);
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: $gray;
font-size: 12px;
text-align: center;
a{
color: $dark-gray;
text-decoration: none;
}
}
}
JAVA SCRIPT
/*!
* Foodpicky HTML template V 1.0
* A simple and easy to use HTML template designed for online food ordering.
* http://codenpixel.com
* Author : codenpixel (http://codenpixel.com/)
*/
113
/*
* Table of content
*************************************
* Loading animation seetings
* Adding images via data atr
* Range slider.Pricing slider
* Headroom (hide - show menu on scrool)
* Isotope
*
**/
$(document).ready(function() {
"use strict";
$(".animsition").animsition({
inClass: 'fade-in',
outClass: 'fade-out',
inDuration: 300,
outDuration: 300,
linkElement: '.animsition-link', // e.g. linkElement :
'a:not([target="_blank"]):not([href^=#])'
loading: true,
loadingParentElement: 'body', //animsition wrapper element
loadingClass: 'animsition-loading',
unSupportCss: ['animation-duration', '-webkit-animation-duration', '-o-animation-
duration'], //"unSupportCss" option allows you to disable the "animsition" in case the
css property in the array is not supported by your browser.
//The default setting is to disable the "animsition" in a browser that does not
support "animation-duration".
overlay: false,
overlayClass: 'animsition-overlay-slide',
overlayParentElement: 'body'
114
});
$(".bg-image").css("background",function(){var a="url("+$(this).data("image-src")
+") no-repeat center center";return a}),$(".bg-image").css("background-
size","cover"),
// grab an element
var myElement = document.querySelector('#header');
// construct an instance of Headroom, passing the element
var headroom = new Headroom(myElement, {
// vertical offset in px before element is first unpinned
offset: 80, // scroll tolerance in px before state changes
tolerance: 40, // if you need other CSS classes, to apply these options.
classes: {
initial: "animated",
pinned: "fadeInDown",
unpinned: "fadeOutUp"
}
});
// initialise
headroom.init();
// initialise
headroom.init();
115
////////Packages filter
var $container = $(".restaurant-listing");
$container.isotope({
filter: "*",
animationOptions: {
duration: 750,
easing: "linear",
queue: false,
}
});
/////// Isotope
$("nav.primary ul a").click(function() {
var selector = $(this).attr("data-filter");
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: "linear",
queue: false,
}
});
return false;
});
var $optionSets = $("nav.primary ul"),
$optionLinks = $optionSets.find("a");
$optionLinks.click(function() {
//alert( $optionLinks);
var $this = $(this);
// don"t proceed if already selected
116
if ($this.hasClass("selected")) {
return false;
}
var $optionSet = $this.parents("nav.primary ul");
$optionSet.find(".selected").removeClass("selected");
$this.addClass("selected");
});
117
var thisInput = thisObj.parent().find("input");
var prevVal = parseInt(thisInput.val());
var newVal = prevVal + 1;
thisInput.val(newVal);
});
$(".down").on("click", function() {
var thisObj = $(this);
var thisInput = thisObj.parent().find("input");
var prevVal = parseInt(thisInput.val());
var newVal = prevVal - 1;
if (newVal >= 0) {
thisInput.val(newVal);
}
});
4.4 TESTING
Testing is a crucial phase in the development of an Online Food Ordering System. It ensures
that the system is working as expected and that there are no bugs, security issues, or usability
problems. Testing involves verifying the functionality, usability, performance, and security of
the system.
118
Here’s a detailed breakdown of the types of testing and testing techniques for the Online
Food Ordering System:
1. Types of Testing
1. Unit Testing
2. Integration Testing
3. Functional Testing
4. Usability Testing
5. Security Testing
6. Performance Testing
7. System Testing
8. User Acceptance Testing (UAT)
9. Regression Testing
10. Smoke Testing
2. Unit Testing
Unit Testing involves testing individual components or functions of the application in
isolation to ensure they work correctly. This is typically done by developers during the coding
phase.
Examples of Unit Tests for Online Food Ordering System:
User Registration: Test if user registration functionality works as expected
(validating input fields, password encryption).
Order Placement: Ensure that when a user places an order, the correct data is added
to the database.
Menu Management: Verify that restaurants can add, update, and delete menu items.
Tools:
Jest, Mocha, or Chai for JavaScript
JUnit for Java
PyTest for Python
3. Integration Testing
Integration Testing checks if different components/modules of the system work together as
expected. This involves testing the interaction between the frontend, backend, and database.
Examples of Integration Tests:
119
Test the interaction between the Order API and the Payment Gateway. When a user
places an order, the system should correctly communicate with the payment processor.
Test the interaction between the Restaurant Module and Order Management
System. Ensure that a restaurant can view and update the status of the orders placed
by customers.
Tools:
Postman for API testing
JUnit or TestNG for Java integration tests
4. Functional Testing
Functional Testing ensures that the system’s features work as per the requirements. In the
case of the Online Food Ordering System, functional tests would focus on validating the
following functionalities:
Examples of Functional Tests:
Login/Registration: Ensure that users can successfully log in and register.
Add to Cart: Validate that customers can add items to their cart, remove them, and
view the cart contents.
Order Placement: Verify that an order can be placed successfully with the correct
details, such as food items, total cost, and delivery address.
Payment Processing: Ensure that payments are processed correctly through the
integrated payment gateway (Stripe, PayPal).
Order Tracking: Verify that users can track the status of their order (e.g., “Pending”,
“In Progress”, “Delivered”).
Tools:
Selenium for automated UI testing
Cucumber for behavior-driven development (BDD) testing
5. Usability Testing
Usability Testing ensures that the system is easy to use and offers a good user experience.
For an Online Food Ordering System, usability testing can be performed by real users to see
how intuitive and efficient the interface is.
Examples of Usability Tests:
Test the navigation of the app to ensure that users can easily find the menu, place an
order, and proceed to checkout.
Test if the checkout process is simple and doesn’t confuse users.
Ensure the order status tracking feature is easily understandable for customers.
120
Tools:
Crazy Egg, Hotjar for user behavior tracking
Lookback.io for live user testing
6. Security Testing
Security Testing identifies vulnerabilities in the system to prevent unauthorized access and
potential threats. Security is critical in an online food ordering system because sensitive data
like user information and payment details are involved.
Examples of Security Tests:
Data Encryption: Ensure that sensitive information such as passwords, credit card
details, and personal information are encrypted.
SQL Injection Testing: Test if the system is vulnerable to SQL injection attacks,
where a malicious user can manipulate database queries.
Cross-Site Scripting (XSS): Test for vulnerabilities that may allow an attacker to
inject malicious scripts into the frontend.
Authentication and Authorization: Verify that users have the appropriate
permissions and can only access their data.
Tools:
OWASP ZAP for vulnerability scanning
Burp Suite for security testing and penetration testing
7. Performance Testing
Performance Testing ensures that the system performs well under expected and peak loads.
It also checks how the system behaves under high traffic volumes and heavy usage.
Examples of Performance Tests:
Load Testing: Test how the system performs when multiple users place orders
simultaneously (e.g., hundreds of orders being placed in a short period).
Stress Testing: Determine how the system performs under extreme conditions (e.g.,
when there are more users than the system can handle).
Scalability Testing: Test if the system can scale to accommodate increasing numbers
of users and orders over time.
Tools:
Apache JMeter for load and performance testing
LoadRunner for stress testing
8. System Testing
121
System Testing involves testing the entire system to ensure all components work together
and the system meets the specified requirements. This includes end-to-end testing of the
application.
Examples of System Tests:
Order Process Flow: Test the entire process, starting from browsing the menu to
placing an order, making payment, and tracking the delivery.
User Account Management: Ensure that users can register, log in, update their
profiles, and log out successfully.
Tools:
Selenium for automated browser-based testing
Cypress for modern end-to-end testing
122
11. Smoke Testing
Smoke Testing is a preliminary test to check if the most critical functionalities of the system
work correctly. This is usually done before performing more detailed testing.
Examples of Smoke Tests:
Ensure the system starts correctly.
Verify that users can log in and register.
Check if the payment gateway is functional.
Tools:
Manual Testing or Automated Tests for basic functionality.
5 RESULT
123
Clean and minimalistic design with high-quality images of food.
A vibrant color scheme that reflects the brand.
Easy-to-read fonts and clear call-to-action buttons.
3. Menu Page
The menu page displays the food items available for ordering from a selected restaurant.
Key UI Elements:
Restaurant Name and Details: Display the restaurant's name, rating, and cuisine
type.
Food Categories: Categories like "Starters," "Main Course," "Desserts," etc.
Search Filters: Filter food items by category, price, or popularity.
Food Items: Each item should have a name, image, description, price, and "Add to
Cart" button.
Sort Options: Sort food by price, rating, or popularity.
Pagination: If there are many food items, pagination should be included.
Visual Appearance:
Grid or list layout for displaying food items.
Each food item should have a high-quality image, making it visually appealing.
124
Interactive buttons like "Add to Cart" should be easy to locate and click.
Hover effects or animations to highlight actions like adding to the cart.
4. Cart Page
Once the user adds food items to their cart, the cart page allows them to review the items,
modify quantities, or proceed to checkout.
Key UI Elements:
Food List: Display a list of food items with their name, quantity, price, and total cost.
Update Quantity Buttons: Options to increase or decrease the quantity of an item.
Remove Item: A button to remove an item from the cart.
Total Cost: Display the subtotal, taxes, and delivery fees.
Proceed to Checkout Button: Prominent button to continue to the checkout process.
Apply Promo Code: An input box to enter discount or promo codes.
Visual Appearance:
Well-organized, easy-to-read table or list layout.
Simple and user-friendly controls to adjust the order.
Color-coded sections to distinguish between food items, pricing, and actions.
5. Checkout Page
The checkout page allows users to provide delivery details and payment information before
completing their order.
Key UI Elements:
Delivery Information Form: Fields to enter the delivery address, phone number, and
delivery instructions.
Payment Method Selection: Buttons or dropdowns to select the payment method
(credit card, PayPal, cash on delivery).
Order Summary: Show a breakdown of the order (food items, delivery address, total
cost).
Place Order Button: A clear call-to-action to finalize the order.
Cancel or Edit Order: Options to go back or edit the order before confirming.
Visual Appearance:
Simple, step-by-step layout for easy user flow.
125
Clear and concise labels and input fields.
A secure feel, especially in the payment section, using visual cues like locks for
secure payment processing.
126
Menu Management: Add, edit, and remove food items from the menu.
Order Management: View incoming orders, change their status (e.g., in preparation,
out for delivery).
Reports: View analytics about sales, popular items, and customer feedback.
Customer Support: Respond to customer inquiries or complaints.
Visual Appearance:
A simple yet effective dashboard with tables or charts displaying key metrics.
Actionable buttons for menu and order management.
Clear sections for easy navigation (e.g., orders, reports, support).
127
5.3 OUTPUT OF THE SCREEN
128
HOME PAGE:
129
130
RESTAURANTS PAGE
131
LOGIN PAGE
132
REGISTER PAGE
ORDER CART
133
CHECKOUT ORDER
MY ORDERS
134
ADMIN PANEL
ADMIN DASHBOARD
135
USERS
136
MENUS(ADD MENU)
ORDERS
137
5.4 SNAPSHOT OF DATABASE DESIGN
DATABASE DESIGN
138
6 CONCLUSION AND FUTURE SCOPE
139
3. Broader Reach: Restaurants can expand their customer base by offering online
services, reaching more potential customers who may not be within close proximity to
the restaurant. Additionally, the system can offer features like reviews and ratings,
helping restaurants to attract new customers based on positive feedback.
4. Payment Flexibility: Integration with multiple payment gateways allows customers
to choose their preferred method (credit card, mobile wallet, or cash on delivery),
enhancing the overall shopping experience.
5. Real-time Order Tracking: Customers benefit from real-time tracking of their
orders, giving them peace of mind and allowing them to plan their schedules
accordingly.
6. Data Insights: Both customers and restaurants can benefit from valuable data
insights. Customers get personalized recommendations based on past orders, while
restaurant owners can analyze order trends, customer preferences, and sales data to
optimize their offerings and operations.
Challenges & Considerations
While the system offers several advantages, it is not without its challenges. Security of
sensitive data, ensuring uptime and system reliability, and managing logistics (delivery times,
quality of food, etc.) are some of the key aspects that need careful attention. Furthermore,
maintaining an intuitive user interface and continuously improving the system's functionality
based on user feedback is crucial for long-term success.
FUTURE SCOPE
The future scope of an Online Food Ordering System is vast, as the global trend toward
digitalization and convenience continues to grow. As technology advances, the online food
ordering industry is expected to evolve in ways that enhance both the customer experience
and operational efficiency. Below are some key areas where the future of online food
ordering is headed:
140
Demand Forecasting: AI can help predict demand trends, assisting restaurants in
managing inventory and reducing food wastage.
2. Voice-enabled Ordering
As voice assistants like Amazon Alexa, Google Assistant, and Apple Siri become more
widespread, the integration of voice-activated ordering is an exciting area for growth.
Customers could place orders through their voice commands, making the process faster and
more accessible, especially for those who may have difficulty using traditional interfaces.
Voice-activated Search: Users can search for menu items or restaurants by simply
speaking.
Order Completion via Voice: With voice recognition and processing, users can add
items to their cart, check out, and make payments without needing to touch their
devices.
141
The use of cryptocurrency for online transactions in the food delivery space is becoming
more viable. Cryptocurrencies like Bitcoin and Ethereum are slowly gaining mainstream
adoption.
Payment with Cryptocurrency: Online food ordering platforms may accept
cryptocurrency payments, offering more convenience for customers who prefer digital
currencies.
Blockchain for Transparency: Blockchain technology can be used to create
transparent and tamper-proof systems for tracking food sourcing, ensuring food
quality, and improving supply chain management.
142
9. Subscription-based Models
Subscription models, where users can subscribe to receive regular meal deliveries, are
becoming more popular.
Meal Plans and Boxes: Users could subscribe to receive weekly meal kits or pre-
cooked meals based on their dietary preferences.
Loyalty Programs: Subscription models could be integrated with loyalty programs
where customers earn points or discounts for regular orders.
BIBLIOGRAPHY
https://www.w3schools.com
https://www.canvasjs.com
https://.getbootstrap.com
https://fontawesome.com
https://www.youtube.com/watch?v-4hQHwP5oFc0
https://www.w3schools.com/php/php_session.asp
https://www.w3schools.com/css/default.asp
REFERENCES
Liu, X., & Liu, Y. (2020). Design and Implementation of an Online Food Ordering
System. International Journal of Computer Applications, 178(7), 10-15.
https://doi.org/10.5120/ijca2020-802850
143
Smith, R. (2019). The Future of Online Food Delivery: A Global Perspective.
Springer.
ISBN: 978-3-319-86830-1.
Chou, Y., & Lin, C. (2021). User Experience Design in Online Food Ordering
Systems: A Case Study of Mobile Applications. Journal of Digital Commerce, 22(4),
251-267.
https://doi.org/10.1016/j.jdoc.2020.11.004
Khan, M., & Kapoor, S. (2018). E-commerce and Online Ordering in the Food
Industry: A Review. International Journal of Business and Social Science, 9(12), 112-
121.
https://www.ijbssnet.com/
Kumar, V., & Agarwal, S. (2020). A Comparative Study of Online Food Delivery
Platforms: User Preferences and Market Trends. International Journal of Information
Management, 40(1), 100-110.
https://doi.org/10.1016/j.ijinfomgt.2018.12.004
144
145