Online Food Ordering System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 68

CHAPTER ONE

INTRODUCTION

1.1 Background of the Study

Computers have become a part the 21 st of the life for accessing almost any kind of

information. Life in century is full of technological advancement and this

technological age it is very difficult for any organization to survive without

utilizing technology (Peter et al., 2015). The world-wide-web contributes greatly to

the creation of an ever increasing global information database. It could also be

used as a mechanism to share information within an enterprise. In today’s age of

fast food and takeout, many canteens have chosen to focus on quick preparation

and speedy deli very of orders rather than offering a rich dining experience (Dana,

2016).

The pace at which Restaurants Managements Information Systems are being

deploy in fast-food and beverage industry is fascinating and widely accepted in the

world (Abel and Obuten, 2015). This has really made a positive impact in the

industry over the last decay, as most restaurant entrepreneurs are investing in this

technology. This is not only due to the fact that entrepreneurs are rapidly adapting

to the technological advancement in the industry, but also relate to the enormous
competitive advantage and other benefits that they stand to gain from

implementing this emerging technology.

According to Ngai et al. (2018), online food ordering is the crucial technology

components that enable a single outlet or enterprise to better serve its customers

and aid employees with food and control. In other words, it provide the platform

for restaurants to effectively and efficiently attend to customers order even from

the comfort of their homes, assist employees to carryout transactions accurately

and inventory control. Most transactions effected with the aid of online ordering

system limit the tendency of error prone during calculations and other financial

transactions.

The online food ordering system is one of the latest servicers most fast food

restaurants in the western world are adopting. With this method, food is ordered

online and delivered to the customer. Because the use of internet-based ordering

system is in rise in today’s world. Since 2014, about 30% of customers aged

between 18 and 54 have ordered food from a restaurant's website via their phone or

tablet in USA. On the other hand, QSR Web found that digital restaurant ordering

is growing 300% faster than dine-in traffic (Beltis, 2016). So, the market for online

food delivery now remains as large as ever. Nevertheless, a huge section of this

market is still being overwhelmingly offline.


1.2 Statement of the Problem

For a system to require some modification or replacement or enhancement, there

must be some existing problems associated with the old or existing system that

prompted to it. This organization faces numerous problems due to the manual

methods of recording which may include:

1. The manual method of going to their local food sales outlets to purchase

food is becoming obsolete and more tasking.

2. Industries are fast expanding, people are seeking for more ways to purchase

products with much ease and still maintain cost effectiveness. The vendors

need to purchase the products in order to sell to end users.

3. There is need for a wide range of publicity and enabling direct order,

processing and delivering of food through online system.

1.3 Aim and Objectives of the Study

This project is aimed at designing and implementing an online food ordering

system for handling food ordering in a restaurant.

The specific objectives includes:

1. To give the customers more reliable information about what the fast food

industry really does.


2. To provide the customers with all the different categories of available

products that they can choose and select from.

3. To provide a user friendly environment between the customer and food

vendor thus increasing the efficiency of the food ordering system.

4. Enable online purchase form with which valued customers will be using to

get in touch with any of their request whenever the need arises.

5. To ease the record keeping process.

1.4 Significance of the Study

In view of the rapid development of computer technology in almost all the fields of

operation and its use in relation to information management, it has become

important to look into the development of online ordering system for firms to meet

up with demands of the customers. Therefore, the food ordering and delivery

system will help customers and management to:

 Advertise available foods in their company

 Reduce the workload in the present system

 Reduce time wasted in data processing

 Create a platform for online purchase and delivery of fast food

 Keep accurate record on purchased order and delivery.


1.5 Scope of the Study

This project is designed, a fast food ordering system for Best choice, to enable

customers order for food and get it delivered accordingly and also to reduce the

long queues of customers at the counter ordering for food and to reduce the work

load on the employees.

1.6 Limitation of the Study

 Due to time and financial constraints, the software that was developed

covers only the aspect of food ordering and payments.

 Limited menu: which is menu choices because the system may have limited

number of meals and the menu changes every week or months but if you

stick to the system for more than a few months the menu items will come

back again and again. So you should eat the food provided for the week.

1.7 Definition of Terms

FOOD: Any nutritious substance that people or animals eat or drink, or that plant

absorbs, in order to maintain life and growth.


MENU: A list of dishes available in a restaurant or the food available or to be

served in a restaurant or at a meal for example "a dinner-party menu”.

ONLINE FOOD ORDERING: Online food ordering services are websites that

interactive menus allowing customers to place orders with local restaurants and

food cooperatives.

CREDIT CARD: A credit card is a payment card issued to users as a system of

payment. It allows the cardholder to pay for goods and services based on the

holder's promise to pay for them.

ORDERING SYSTEM: This is referred to as a set of detailed methods that is

being used in handling the ordering process

RESTAURANT: (eating place) is a place where meals and drinks are sold and

served to customers.

CUSTOMER: Sometimes known as a client, buyer, or purchaser) is the recipient

of goods, services, products or idea obtained from a seller, vendor, or supplier for a

monetary or other valuable consideration.

TECHNOLOGY: It is the study of techniques or process of mobilizing resources

(such as information) for accomplishing objectives that benefit man and his

environment.
HAMBURGERS: A hamburger is a sandwich consisting of a cooked patty of

ground meat usually placed inside a sliced hamburger bun.

SHAWARMA: Shawarma is a Levantine Arab meat preparation, where lamb,

chicken, turkey, beef, veal, or mixed meats are placed on a spit, and may be grilled

for as long as a day.


CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN

3.1 Methodology

Methodology is defined as a framework that is used to structure, plan, and control

the process of developing an information system. It is used to refer to a specific

series of steps, methods, techniques and procedures which governs the collection,

analysis and design of a particular project. In the dynamic world, the subject

methodology, system analysis and design mainly deal with the software

development activities (Uba, 2011).

A design methodology is a systematic programming approach of well-defined

procedure that should be followed in carrying out a thorough design project or

defined as the analysis of the principles of methods, rules and postulates employed

by a discipline. An adequately suitable methodology would ensure a very detailed

design work and ensure that a higher degree of accuracy and efficiency is adopted.

The design methodology used helps to ensure that a thorough study of the present

system is carried out, thus helping the project designer to completely understand

the modus operandi of the present existing system so as to know how the new

system should be structured and the functionalities needed in it to address the

seemingly, existing problems discovered. This helps to know if there should be a


perfective maintenance of the existing system or if only improvement (preventive

maintenance) should be made.

3.1.1 Choice of Methodology

The System will adopt the object oriented approach to system design, which has

enormous benefits. It is an evolutionary and iterative process that encompasses

abstractions of the system attributes and behaviours using necessary tools such as

Unified Modeling language (UML).

Object oriented analysis and design methodology is used to analyze the present

system as well as to design the proposed system with the primary aim of;

4. Identifying the problems inherent in the present system.

5. Investigating the causes of these problems

6. Proffering solutions to the manual systems

3.1.2 Justification of Methodology

6. It speeds up application development and requires less programming efforts.

7. Modules created in OOP can be re-used in other programs.

8. Programs can be modified by adding or removing modules.


The Object-Oriented Analysis and Design Methodology (OOADM) perform four

major activities namely:

1. Modeling the functional description of the system. To achieve this the

following steps has to be taken:

a) Identifying all actors and use cases

b) Construct a use case model

c) Document use case course of events

d) Define the analysis use case.

2. Finding and identifying business objects. To achieve this task, the steps

given below must be accomplished.

a) Review each use case to find potential objects (which are usually noun

corresponding to business entities or events)

b) Select the proposed objects.

3. Organizing the objects and identifying their relationships. To achieve this

task, the steps given below must be accomplished.

a) Identify associations and multiplicity

b) Identify generalization/specification relationships


c) Identify aggregation relationships

d) Prepare class diagram.

4. Model the behavior of each object using state chart diagram. MrsEze, u.f

(2008).

3.2 Method of Data Collection

During the course of this study, the researcher applied different method of finding

fact. The methods include.

3.1.1 Interview

The researcher visited Le’ Cafe FAST FOOD to find out about the processes

involved in ordering food, random customers were also interviewed. The facts and

answers incurred from the discussion made it possible for the researcher to begin

the design of the computerized system.

3.2.2 References to Written Document and Manual

The researcher visited some libraries and made references to already written

document for more details concerning this study. To this effect, the fact provided

by the referenced materials made it possible for the completion of the project.
3.2.3 Internet

Other relevant materials needed for the completion of this project work were

gotten from the internet through search engines like google, dock-dock-go, etc.

3.3 Analysis of the Existing System

Throughout the system analysis, an in-depth, study of end-user information is

conducted, for producing functional requirement of the proposed system. Data

about the existing ordering system is collected through several fact-finding

techniques such as website visit and document review, at the beginning of this

stage. The data collected facilities information required during detailed analysis. A

study on the current system is performed based on the collected data. As a result,

user requirement of the proposed system are determined. At the end of this stage,

requirement specification is produced as deliverable.

The existing system happens to be a non computerized operating system were all

operations are done manually by the waiter carrying paper and to take down the

order of the customer or making an order over the counter. This leads to mistakes

because the waiter might not understand what the customer had ordered therefore

serving him/her a different menu. This could be so embarrassing because the

customer might not take it lightly with the waiter which may lead to

misunderstanding.
3.4 Analysis of Proposed System

The aim of the proposed system is to develop a computerized crime recording

system over the limitation of the existed system. With the proposed system there

will be no loss of information whenever crime information is submitted to the

database, the information can be backed up and referred to anytime of the day.

It is the purpose of the new system to address all the problems plaguing the present

system. This system will do the analyzing and storing of information either

automatically or interactively. It will make use of PhP-MYSQL. This will be like

this: a report is generated conforming to particular information needed by the

management via the monitor. This will require the input of necessary data and

record of fast food ordering and delivery and then a report is generated.

The proposed system will also have some other features such as:

1. Accuracy in handling of data

2. The volume of paper work will be greatly reduced.

3. Fast rate of operation as in making the ordered food available and delivered on

time.

4. Flexibility (i.e. it can be accessed at any time)

5. Easy way to back up or duplicating data in CD’s in case of data loss

6. Better storage and faster retrieval system

7. Errors in the reports will be greatly minimized.


3.5 Problem of the Existing System

Due to manual means being employed by the fast food restaurants, it is very

difficult to satisfy the wants and needs of the customers. Most of the problems

include:

1. Mistakes are made when taking the orders of the customers

2. The process of collecting customers’ purchases order is very tedious. This

makes it impossible to deliver goods on time.

3. It leads to lack of understanding between the customers and the employees.

4. The record keeping system is poor. Losses of vital records have been reported in

the past consequently. Besides, protecting the file system from unauthorized access

is a problem that has defiled solution.

5. Unnecessary time is wasted conveying information through the ladder of

authority. Management at times seeks to get a copy of the customer’s order form

and this may take a lot of time to obtain it.

6. It causes reduction of production flow.

 These are the major problems facing the existing system and would be

corrected with the help of the proposed system.

3.6 Justification of the New System


The proposed system is developed to manage ordering activities in fast food

restaurant. It helps to record customer submitted orders. The system should cover

the following functions in order to support the restaurant’s business process for

achieving the objectives:

1. To allow the customer to make order, view order and make changes before

submitting their order and allow them make payment through prepayment card or

credit card or debit card.

2. To provide interface that allows promotion and menu.

3. Tools that generate reports that can be used for decision making

4. A tool that allows the management to modify the food information such as price,

add a new menu and many others as well as tools for managing user, system menu

and promotion records.


CHAPTER FOUR

SYSTEM IMPLEMENTATION, TESTING AND INTEGRATION

4.1 System Implementation

The system is designed with several interaction cues on each web page that makes

up the web application (Best choice). These cues are well-defined such as to make

several functionality that the application exposes to collect, process and output

data. At the end of this design, an on-line site that is capable of running on a local

server will be realized. In addition this, a full database driven site with good user

interface will be achieved.

The system was implemented using Xampp server and a web browser. The

implementation began with the site definition, which involves the following steps

i. Planning,

ii. Chose a browser,

iii. Organize the structure, under which you have to choose a folder and a folder

structure that would be used to store the site files. This also determined the

server that would be used, for instance, remote server or Local server.

iv. After the site was defined, the next step of the implementation phase was to

translate the design into the required forms, and all the tables required in the
database were built and the data binding done with the HTML code and sql

language.

4.2 Input Specification and Design

The system is designed to accept several input details efficiently through input

forms and user clicks. The data captured through the user keystrokes and clicks are

received by specific modules on the system and relayed to the back-end of the

system for processing. Input is collected using the following page modules:

Index.php: This is used to capture preliminary user navigation information and

preference information which gives the system a method of personalizing the page

for the user on the next visit.

Admn_login.php: This is used to capture information about the administrative

personnel who controls content and display on the system.

Fig 4.1 LOGIN PAGE


4.3 Output Specification and Design

The system is designed in such away that it efficiently provides output to the user

promptly and in a well organized manner. The format for the several output are

make available on the output web pages. Output can be relayed using the following

page modules:

Product_list.php: This display output information for the list of food delicacies

which are currently available.

Search_result.php: This displays output information for the order report

Aboutus.php: This displays output information that talks about the

ordering outfit

Fig 4.2 OUTPUT OF THE LOGIN PAGE


4.4 File Design

System design is the specification or construction of a technical, computer-based

solution for the business requirements identified in a system analysis (Jeffrey .L.

Whitten et al. 2010) System design is concerned with establishing how to deliver

the functionality that was specified in analysis while at the same time, meeting

non-functional requirements that may sometimes conflict each other. System

design is focused on making high-level decisions concerning the overall structure

of the system. It also involves establishing protocols and standards for the design

activities. (Simon Bennet et al, 2012).

System design is divided into stages:

 Logical (implementation independent): This is concerned with those aspects

of the system that can be designed without knowledge of the implementation

platform.

 Physical (implementation dependent): This is concerned with those aspects

of the system that are dependent on the implementation platform that will be

used.

In the object oriented analysis and design. The following would be used to model

the payroll system.

 Structural chart.
 Data flow diagram (DFD).

 Architectural diagram

A model is the act of drawing one or more graphical representations of a system.

Modeling is the process of abstracting and organizing significant features of part of

the real world. Organization chart. Top-down modular design

 Structural chart: A structure chart is a top-down modular design tool,

constructed of squares representing the different modules in the system, and

lines that connect them.

4.5 Database Design

The database system used to implement the back-end of the system is

MySql.Access to the system was made possible by a graphical interface

(phpMyadmin) with an ISAM engine. The database name is Best choice and the

structure of the data tables in the database are as follows:

a) Customer

b) Contact

c) Food

d) Manager

e) Orders
f) Resturants

Table 1 CUSTOMER

Field Type Null Key Default

username Varchar(30) No None

fullname Varchar(30) No None

Email Varchar(30) No None

contact Varchar(30) No None

address Varchar(50) No None

password Varchar(30) No None

Table 2 CONTACT

Field Type Null Key Default

Name Varchar(250) No None

Email Varchar(250) No None

Mobile Varchar(250) No None


Subject Varchar(250) No None

Message Varchar(250) No None

Table 3 FOOD

Field Type Null Key Default

F_ID Int(30) No None

Name Varchar(30) No None

Price Int(30) No None

Description Varchar(200) No None

R ID Int(30) No None

Image path Varchar(200) No None

Optiona Varchar(10) No None

Table 4 MANAGER

Field Type Null Key Default

username Varchar(30) No None

fullname Varchar(30) No None

Email Varchar(30) No None


contact Varchar(30) No None

address Varchar(50) No None

password Varchar(30) No None

Table 5 ORDERS

Field Type Null Key Default

Order ID Int(30)

F_ID Int(30) No None

foodname Varchar(30) No None

Price Int(30) No None

Quantity Int(30) No None

Order_date date No None

Username Varchar(30) No None

R ID Int(30) No None

Table 6 RESTURANTS

Field Type Null Key Default

R_ID Int(30) No None

name Varchar(30) No None

email Varchar(30) No None

contact Varchar(30) No None


address Varchar(50) No None

M ID Varchar(30) No None

4.6 Justification of Programming Language Used

In every design phase of any computer-based system, the choice of a programming

language is always a problem. Many factors are put into consideration before

choosing any language.

Some of the factors include:

 Clarity of language syntax

 The nature of the problem

 Cost of translation

 Portability of the program etc.

However, for this project, the programming technologies chosen include HTML,

PHP, CSS and MySQL. They are chosen because it is a web based system that

we’re designing. They also make use of object linking and embedding, this allows

the programmer to make use of other packages such as MySQL, Access, Excel,

Dbase etc. These features and other features make it easier to program with the

technologies listed above.


Finally, the choice of PHP in this project is made because the project deals with

capturing and recording of system events, which is well accomplished using PHP.

The language is chosen also because it is simpler and the programmer’s errors and

mistakes can be detected immediately they are made unlike DOS programs where

errors can only be detected during compilation. The program was chosen because it

is portable. It can run on any platform or machine.

4.7 System Requirements

The system will run well on any system that meets the following requirements:

1. Windows 7 and later with Wamp server installed

2. Internet Explorer or Mozilla Firefox

3. Hard Disk size of 50 GB minimum

4. RAM Size of 1GB Minimum

5. Super VGA with at least 32 MB

4.8 Testing And Integration

In the course of this design, the development was done in modules. Each module

was implemented separately and tested. Every stage entails debugging, which was

done and all error fixed. The entire system was integrated by joining each module
to work with the main system. At the end of the integration, the entire system was

tested and confirmed Ok.

4.8.1 The Test Plan

The test activities were carried out in stages. Each module was tested after and

during Design using visual basic debugger.

4.8.2 System Testing

The modules tested include the module discussed earlier in the previous chapters.

Each of these modules was tested with some test data. After each debugging stage,

the module would be integrated into the main system.

4.8.3 Main System Driver Testing

The main driver, being the Home Page of the recruitment portal was tested for

proper connectivity to the database. Improper linkage to database was

immediately corrected and assurance was made to see that data were adequately

retrieved and presented without errors.

4.8.4 Database Testing


Database testing was tested basically for connectivity and storage. The test started

with the design stage, where efforts were ensured that the correct data

representation was made.


REFERENCES

Peter D. Nyheim, Francis M. Mcfadden, and Daniel J. Connelly (2015).


Technology Strategies for Hospitality Industry, Peason Prentice Hall, Upper
Saddle River, New Jasey, United State of America.

Dana V. Tesone (2016). Hospitality, Information Systems and E-commerce, John


Wiley & Sons Inc, Hoboken, New Jasey, United State of America

Abel, E.E. & Obuten, E. (2015). ‘Restaurant customer self-ordering system: a


solution to reduce customer/guest waiting time at the point of sale’, International
Journal Computer Applications, vol. 111, no. 11.

Ngai E. W. T., Suk F. F., and Lo S. Y. Y. (2018). Development of an RFID-based


sushi Managment: The Case of a Conveyor-belt Sushi Restaurant, International
Journal of Economics, Volume 112, Page 630-645

Beltis, A. J. (2016) 9 Advantages of an Online Food Ordering System. Available


at: https://pos.toasttab.com/blog/online-food-ordering-system (Accessed: 7 July
2017).
APPENDIX I

PROGRAM INTERFACES
APPENDIX II

PROGRAM SOURCE CODES


<form class="login100-form validate-form needs-validation" method="POST"
action="login" novalidate="">
<span class="login100-form-title p-b-43">
Login to continue
</span>
<?php $cust->login(); ?>
<div class="wrap-input100 validate-input" data-validate="Valid email is
required: [email protected]">
<input class="input100" type="text" name="email">
<span class="focus-input100"></span>
<span class="label-input100">Enter Email</span>
</div>

<div class="wrap-input100 validate-input" data-validate="Password is


required">
<input class="input100" type="password" name="pass" data-toggle="tooltip"
data-placement="top" data-original-title="Min 6 characters.">
<span class="focus-input100"></span>
<span class="label-input100">Password</span>
</div>

<div class="flex-sb-m w-full p-t-3 p-b-32">


<div class="contact100-form-checkbox">
<input class="input-checkbox100" id="ckb1" type="checkbox"
name="remember-me">
<label class="label-checkbox100" for="ckb1">
Remember me
</label>
</div>

<div>
<a href="login?forgotPassword" class="txt1">
Forgot Password?
</a>
</div>
</div>

<div class="container-login100-form-btn">
<button class="login100-form-btn" type="submit"
name="login_submit">Login</button>
</div>

<div class="text-center p-t-46 p-b-20">


<span class="no-account">
Don't have an account? <span class="no-account-a"><a
href="register">Click here</a></span> to register.
</span>
</div>
<div>
<?php isset($_SERVER['HTTP_REFERER']) ? $goback =
$_SERVER['HTTP_REFERER'] : $goback = "index" ?>
<a href="<?php echo $goback; ?>"><button type="button" class="go-back-
phone login100-form-btn">Go back</button></a>
</div>
</form>
<?php require_once 'includes/config.php';
isset($_SERVER['HTTP_REFERER']) && !isset($_SESSION['REFERER']) ?
$_SESSION['REFERER'] = $_SERVER['HTTP_REFERER'] : 0;
isset($_SESSION['CUSTOMER']) ? redirect("index") : 0;
?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Best Choice Restaurant - Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Google Fonts -->
<link rel="stylesheet" href="css/fonts.css">
<!--
===========================================================
====================================-->
<link rel="icon" type="image/png" href="img/favicon.png" />
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css"
href="lib/bootstrap/css/bootstrap.min.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="lib/font-awesome/css/font-
awesome.min.css">
<link rel="stylesheet" type="text/css" href="loginpage/css/util.css">
<link rel="stylesheet" type="text/css" href="loginpage/css/main.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="loginpage/css/login.css">
</head>

<body style="background-color: #666666;">

<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<?php
if (isset($_GET['forgotPassword'])) {
include('forgotPassword.php');
} else {
include('loginAccount.php');
}
?>
<script>
// Example starter JavaScript for disabling form
submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function()
{
// Fetch all the forms we want to
apply custom Bootstrap validation styles to
var forms =
document.getElementsByClassName('needs-validation');
// Loop over them and prevent
submission
var validation =
Array.prototype.filter.call(forms, function(form) {

form.addEventListener('submit', function(event) {
if (form.checkValidity()
=== false) {

event.preventDefault();

event.stopPropagation();
}
form.classList.add('was-
validated');
}, false);
});
}, false);
})();
</script>

<div class="login100-more" style="background-image:


url('loginpage/images/login_copy.jpg');">
<div id="header">
<div id="logo" class="pull-left">
<h1><a href="index#intro"
class="scrollto">Best Choice</a></h1>
<!-- <a href="#intro"><img
src="img/logo.png" alt="" title="" /></a>-->
</div>
</div>
<footer id="footer">
<div class="container">
<div class="row">
<?php
isset($_SERVER['HTTP_REFERER']) ? $goback =
$_SERVER['HTTP_REFERER'] : $goback = "index" ?>
<a href="<?php echo
$goback; ?>"><button class="login100-form-btn">Go back</button></a>
</div>
</div>
</footer>
</div>

</div>
</div>
</div>
<div id="preloader"></div>
<!--
===========================================================
====================================-->
<script src="lib/jquery/jquery.min.js"></script>
<script src="loginpage/vendor/bootstrap/js/popper.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
<script src="loginpage/js/main.js"></script>
<script src="js/main.js"></script>
<script>
$(function() {
$('[data-toggle="tooltip"]').tooltip();
})
</script>
</body>

</html>
<?php include("includes/front/top.php"); ?>

<link rel="stylesheet" href="css/item.css">

</head>

<body>
<?php include("includes/front/header_static.php"); ?>

<section id="portfolio" class="section-bg">


<!-- Page Content -->
<div class="container container-main">
<header class="section-header">
<!-- <h3 class="section-title"></h3> -->
</header>

<div class="row">
<div class="col-md-3 categories-left">
<h3 class="my-3 sub-heading">Other Categories
to choose from</h3>
<div class="accordion" id="accordionExample">
<?php $cust-
>display_categories_sidebar(); ?>
</div>

</div>
<div class="col-md-5 shadow item-main">
<?php $cust->display_item_page(); ?>
</div>
<div class="col-md-4">
<div class="cart-buttons">
<h3 class="my-3 sub-heading">Order
now</h3>

<?php !isset($itid) ? $itid = $_GET['itid'] :


0; ?>
<?php $cust->add_cart(); ?>
<?php $cust->remove_cart(); ?>

<?php

if (isset($_SESSION['CART'])) {
foreach ($_SESSION['CART'] as $i
=> $item) {
if (isset($_SESSION['CART']
[$i]) && in_array(base64_decode($_GET['itid']), $_SESSION['CART'][$i])) {
$qty =
$_SESSION['CART'][$i]['QUANTITY'];
}
if (!isset($_SESSION['CART']
[$i])) {
unset($qty);
}
}
}

if (isset($qty) && $qty < 10) {


?>

<a href="item?itid=<?php echo


$itid; ?>&cart=<?php echo $itid; ?>">
<button class="btn btn-cart btn-
add-cart btn-lg">
<span class="icon text-
white-50">
<i class="fas fa-
cart-plus"></i>
</span>
<span class="text">Add
to cart</span>
</button>
</a>
<?php
} else if (!isset($qty)) { ?>
<a href="item?itid=<?php echo
$itid; ?>&cart=<?php echo $itid; ?>">
<button class="btn btn-cart btn-
add-cart btn-lg">
<span class="icon text-
white-50">
<i class="fas fa-
cart-plus"></i>
</span>
<span class="text">Add
to cart</span>
</button>
</a>
<?php
} else {
?>
<a tabindex="-1" data-
toggle="tooltip" data-placement="top" title="Max 10 units allowed per item">
<button class="btn btn-cart btn-
add-cart btn-lg">
<span class="icon text-
white-50">
<i class="fas fa-
cart-plus"></i>
</span>
<span class="text">Add
to cart</span>
</button>
</a>
<?php
}
?>

<div class="cart-icons">

<?php
if (isset($qty) && $qty < 10) {
?>

<a href="item?itid=<?php echo


$itid; ?>&cart=<?php echo $itid; ?>" class="cart-item-icon mr-2"><i class="fas fa-
plus-circle"></i></a>
<?php
} else if (!isset($qty)) {
?>
<a href="item?itid=<?php echo
$itid; ?>&cart=<?php echo $itid; ?>" class="cart-item-icon mr-2"><i class="fas fa-
plus-circle"></i></a>
<?php
} else {
?>
<a tabindex="-1" class="cart-
item-icon mr-2" data-toggle="tooltip" data-placement="bottom" title="Max 10
units allowed per item"><i class="fas fa-plus-circle"></i></a>
<?php
}
?>
<div class="mr-2 badge badge-
secondary badge-pill cart-item-quantity">x<?php isset($qty) ? print($qty) :
print("0"); ?></div>

<a href="item?itid=<?php echo


$itid; ?>&reduce=<?php echo $itid; ?>" class="cart-item-icon"><i class="fas fa-
minus-circle"></i></a>

</div>
<br><br>
<a href="cart">
<button class="btn btn-cart btn-goto-
cart btn-danger btn-lg">
<span class="icon text-white-
50">
<i class="fas fa-arrow-
right"></i>
</span>
<span class="text">Goto
cart</span>
</button>
</a>
</div>

<?php $cust->display_cart_in_item(); ?>

</div>
</div>

<!-- Portfolio Item Row -->


<!-- /.row -->

<!-- Related Items Row -->


<h3 class="my-4 sub-heading">Related Items</h3>

<div class="row portfolio-container">

<!-- Team Member 1 -->


<?php $cust->related_items(); ?>
<!-- Team Member 4 -->
</div>
<!-- /.row -->

</div>
<!-- /.container -->
</section>

<?php include("includes/front/footer.php"); ?>


<?php
include("includes/front/top.php");
?>
<link rel="stylesheet" type="text/css" href="loginpage/css/util.css">
<link rel="stylesheet" type="text/css" href="css/contactform.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="css/contactregular.css">
<link rel="stylesheet" href="css/index.css">
</head>

<body>

<?php include("includes/front/header_static.php"); ?>

<!--==========================
Intro Section
============================-->
<section id="intro">
<div class="intro-container">
<div id="introCarousel" class="carousel slide carousel-fade"
data-ride="carousel">

<div class="carousel-inner" role="listbox">

<div class="carousel-item active">


<div class="carousel-background"><img
src="img/banner.jpg" alt=""></div>
<div class="carousel-container">
<div class="carousel-content">
<h2>Welcome</h2>
<p>Hey there! Hungry? You're
at the right place. You can choose from various food items from our menu divided
into different categories to fulfill all your hunger fetishes. Home delivery available
24x7 throughout Ebonyi.</p>
<a href="#services" class="btn-
get-started scrollto">View our menu</a>
</div>
</div>
</div>

</div>
</div>
</div>

</section><!-- #intro -->

<main id="main">
<!--==========================
About Us Section
============================-->
<section id="about">
<div class="container">

<header class="section-header">
<h3>About Us</h3>
<p>We are one of the best restaurants in
Mangalore striving to provide exellence in food. Our chefs are the best in town and
the quality is a cut above which makes us stand out from all other places.</p>
</header>

<div class="row about-cols">

<div class="col-md-4 wow fadeInUp">


<div class="about-col">
<div class="img">
<img src="img/about-
mission.jpg" alt="" class="img-fluid">
<div class="icon"><i
class="ion-ios-speedometer-outline"></i></div>
</div>
<h2 class="title"><a href="#">Our
Mission</a></h2>
<p>
Striving towards excellent food
quality and service, improving quality every single day and making availability of
excellent service during any hour.
</p>
</div>
</div>

<div class="col-md-4 wow fadeInUp" data-wow-


delay="0.1s">
<div class="about-col">
<div class="img">
<img src="img/about-plan.jpg"
alt="" class="img-fluid">
<div class="icon"><i
class="ion-ios-list-outline"></i></div>
</div>
<h2 class="title"><a href="#">Our
Plan</a></h2>
<p>
Reach out to youngsters in
every corner of Mangalore and provide excellent food quality and services
throught social media and online presence.
</p>
</div>
</div>

<div class="col-md-4 wow fadeInUp" data-wow-


delay="0.2s">
<div class="about-col">
<div class="img">
<img src="img/about-
vision.jpg" alt="" class="img-fluid">
<div class="icon"><i
class="ion-ios-eye-outline"></i></div>
</div>
<h2 class="title"><a href="#">Our
Vision</a></h2>
<p>
Extend our brances from
Mangalore to other places in the near future. Providing franchises to the ones
interested in entrepreneurship and those who are passionate about it.
</p>
</div>
</div>

</div>

</div>
</section><!-- #about -->

<!--==========================
Categories Section
============================-->
<section id="services">
<div class="container">

<header class="section-header wow fadeInUp">


<h3>Our Menu</h3>
<p>Choose from the various food items below
which are divided into different categories. </p>
</header>

<div class="row">

<?php $cust->display_categories_homepage(); ?>

</div>

</div>
</section>
<!--==========================
Categories Section
============================-->
<!--==========================
Contact Section
============================-->
<section id="contact" class="section-bg wow fadeInUp">
<div class="container">

<div class="section-header">
<h3>Contact Us</h3>
<p>Do not hesitate to call us on our contact
number or drop us a mail. We would be happy to hear from you !</p>
</div>

<div class="row contact-info">

<div class="col-md-4">
<div class="contact-address">
<i class="ion-ios-location-
outline"></i>
<h3>Address</h3>
<address>Near Checkpost, Ebonyi,
Nigeria</address>
</div>
</div>

<div class="col-md-4">
<div class="contact-phone">
<i class="ion-ios-telephone-
outline"></i>
<h3>Phone Number</h3>
<p><a href="tel:+91824
2262593">0824 2262593</a></p>
</div>
</div>

<div class="col-md-4">
<div class="contact-email">
<i class="ion-ios-email-outline"></i>
<h3>Email</h3>
<p><a
href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>

</div>
<div class="limiter">

<div class="container-login100">
<div class="wrap-login100">
<form class="login100-form validate-
form" method="post" action="index">
<div class="row">
<div class="col-lg-6">

<div class="wrap-
input100 validate-input" data-validate="Do not leave name field blank">
<input
class="input100" type="text" name="fname">
<span
class="focus-input100"></span>
<span
class="label-input100">First Name</span>
</div>
</div>
<div class="col-lg-6">
<div class="wrap-
input100 validate-input" data-validate="Valid email is required: [email protected]">
<input
class="input100" type="email" name="email">
<span
class="focus-input100"></span>
<span
class="label-input100">Email</span>
</div>
</div>
</div>

<div class="wrap-input100
validate-input" data-validate="Do not leave subject field blank">
<input class="input100"
type="text" name="fname">
<span class="focus-
input100"></span>
<span class="label-
input100">Subject</span>
</div>
<hr>
<div class="wrap-input100
input-textarea validate-input" data-validate="Message is required">
<textarea
class="input100"></textarea>
<span class="focus-
input100"></span>
<span class="label-
input100">Message</span>
</div>

<div class="flex-sb-m w-full p-


t-3 p-b-32">

</div>

<div class="container-
login100-form-btn">
<button class="login100-
form-btn">
Send Message
</button>
</div>

</form>
</div>
</div>

</div>
</div>
</section><!-- #contact -->

</main>
<?php include("includes/front/footer.php"); ?>
<?php include("includes/front/top.php"); ?>
<?php if (!isset($_POST['checkout_submit'])) {
redirect("cart");
} //disallowing access
?>
<?php
if (isset($_POST['total_amount']) && isset($_POST['quantity']) &&
isset($_POST['handling_charge'])) {
//condition
if (($_SESSION['CUSTOMER']['amountToPay'] !=
$_POST['total_amount']) || ($_SESSION['CUSTOMER']['totalQuantity'] !=
$_POST['quantity']) || ($_SESSION['CUSTOMER']['handling'] !=
$_POST['handling_charge'])) {
redirect("cart");
unset($_SESSION['CUSTOMER']['amountToPay']);
unset($_SESSION['CUSTOMER']['totalQuantity']);
unset($_SESSION['CUSTOMER']['handling']);
} else {
unset($_SESSION['CUSTOMER']['amountToPay']);
unset($_SESSION['CUSTOMER']['totalQuantity']);
unset($_SESSION['CUSTOMER']['handling']);
}
}
?>
<link rel="stylesheet" href="css/checkout2.css">

</head>

<body>

<!--==========================
Header
============================-->
<?php include("includes/front/header_static.php"); ?>

<main id="main">
<!--==========================
Cart Section
============================-->
<section id="about">
<div class="container">

<header class="section-header">
<h3>Checkout</h3>
</header>

<div class=" about-cols">

<div class="row">
<!-- <div class="col-lg-12 p-5 bg-white
rounded shadow-sm mb-5"> -->

<!-- Shopping cart table -->


<div class="col-md-4 order-md-2 mb-4">
<?php $cust-
>display_cart_in_checkout(); ?>
<?php //unset($_SESSION['CART']);
?>
</div>
<div class="col-md-8 order-md-1">
<h4 class="mb-3">Billing
address</h4>

<form class="needs-validation was-


validated" method="POST" action="payment">
<div class="row">
<div class="col-md-12
mb-3">
<label
for="firstName">Name <span class="text-note">&nbsp;(Cannot be
modified)</span></label>
<input type="text"
class="form-control" name="fname" id="firstName" placeholder="<?php echo
$_SESSION['CUSTOMER']['NAME']; ?>" pattern=".{1,}[a-zA-Z]" required=""
disabled="">
<div
class="invalid-feedback">
Valid first
name is required.
</div>
</div>
</div>

<div class="mb-3">
<label
for="email">Email <span class="text-note">&nbsp;(Cannot be
modified)</span></label>
<input type="email"
disabled class="form-control" name="email" id="email" placeholder="<?php echo
$_SESSION['CUSTOMER']['EMAIL']; ?>">
<div class="invalid-
feedback">
Please enter a
valid email address for shipping updates.
</div>
</div>

<div class="mb-3">
<label
for="address">Address Line 1</label>
<input type="text"
class="form-control" id="address" name="address1" placeholder="1234 Main St"
required="" pattern=".{8,}" required title="8 characters minimum">
<div class="invalid-
feedback">
Please enter your
shipping address. (8 characters minimum)
</div>
</div>

<div class="mb-3">
<label
for="address2">Address Line 2 <span
class="text-muted">(Optional)</span></label>
<input type="text"
class="form-control" name="address2" id="address2" placeholder="Apartment or
suite">
</div>

<div class="row">
<div class="col-md-4
mb-3">
<label
for="country">Zip</label>
<select
class="custom-select d-block w-100" id="country" name="zip" required="">
<option
value="" selected="selected">Choose...</option>
<?php
$cust->display_pincodes(); ?>
</select>
<div
class="invalid-feedback">
Please select
a valid zip code.
</div>
</div>
<div class="col-md-4
mb-3">
<label
for="state">State</label>
<select disabled
class="custom-select d-block w-100" id="state" required="">
<!-- <option
value="" selected="selected">Choose...</option> -->
<option
value="Ebonyi">Ebonyi</option>
</select>
<div
class="invalid-feedback">
Please
provide a valid state.
</div>
</div>
<div class="col-md-4
mb-3">
<label
for="zip">City</label>
<select disabled
class="custom-select d-block w-100" id="zip" required="">
<option
value="Ishiagu">Ishiagu</option>
</select>
<!-- <input
disabled type="text" class="form-control" id="zip" placeholder="" required=""> --
>
<div
class="invalid-feedback">
City
required.
</div>
</div>
<div class="col-md-6
mb-3">
<label
for="lastName">Phone Number</label>
<input type="tel"
class="form-control" name="phone_number" id="lastName" placeholder=""
required="" maxlength="10" minlength="10" pattern="[0-9]{10}">
<div
class="invalid-feedback">
Valid phone
number required.
</div>
</div>
<div class="col-md-6
mb-3">
<label
for="lastName">Alternate Phone Number</label>
<input type="tel"
class="form-control" name="alt_phone_number" id="lastName" placeholder=""
pattern="[0-9]{10}" maxlength="10" minlength="10">
<div
class="invalid-feedback">
Valid phone
number is required.
</div>
</div>
</div>
<span class="text-note">If you
cannot find your zip code in the drop-down, we do not deliver to your location yet!
</span>
<hr class="mb-4">
<hr class="mb-4">

<h4
class="mb-3">Payment</h4>

<div class="d-block my-3">


<div class="custom-
control custom-radio">
<input id="credit"
name="payment_method" type="radio" value="cod" class="custom-control-input"
required="">
<label
class="custom-control-label" for="credit">Cash on Delivery</label>
</div>
<div class="custom-
control custom-radio">
<input id="debit"
name="payment_method" type="radio" value="prepaid" class="custom-control-
input" required="">
<label
class="custom-control-label" for="debit">Credit Card / Debit Card / UPI / PayTM
wallet</label>
</div>
</div>
<input type="hidden"
name="TXN_AMOUNT" value="<?php echo sprintf("%.2f", $cust-
>amountToPay); ?>">
<input type="hidden"
name="ORDER_ID" value="<?php echo rand(1, getrandmax()); ?>">
<input type="hidden"
name="CUST_ID" value="<?php echo $_SESSION['CUSTOMER']
['CUSTOMERID']; ?>">
<input type="hidden"
name="state" value="Ebonyi">
<input type="hidden"
name="city" value="Ishiagu">

<hr class="mb-4">
<button class="btn btn-dark
btn-lg btn-block shadow-button" type="submit" name="address_submit">Place
Order</button>
</form>
<script>
// Example starter JavaScript
for disabling form submissions if there are invalid fields
(function() {
'use strict';

window.addEventListener('load', function() {
// Fetch all the
forms we want to apply custom Bootstrap validation styles to
var forms =
document.getElementsByClassName('needs-validation');
// Loop over them
and prevent submission
var validation =
Array.prototype.filter.call(forms, function(form) {

form.addEventListener('submit', function(event) {
if
(form.checkValidity() === false) {

event.preventDefault();

event.stopPropagation();
}

form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
</div>
<!-- End -->
<!-- </div> -->
<!-- col-lg-12 -->
</div>

</div>

</div>
</section><!-- #about -->

</main>

<!--==========================
Footer
============================-->

<?php include("includes/front/footer.php"); ?>


<?php require_once 'includes/config.php';
isset($_SESSION['CUSTOMER']) ? redirect("index") : 0;
?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Best Choice Restaurant - Create Account</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Google Fonts -->
<link href="css/fonts.css" rel="stylesheet">
<!--
===========================================================
====================================-->
<link rel="icon" type="image/png" href="img/favicon.png" />
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css"
href="lib/bootstrap/css/bootstrap.min.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="lib/font-awesome/css/font-
awesome.min.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="loginpage/css/util.css">
<link rel="stylesheet" type="text/css" href="loginpage/css/main.css">
<!--
===========================================================
====================================-->
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="loginpage/css/register.css">
</head>

<body style="background-color: #666666;">


<div class="limiter">
<div class="container-login100">
<div class="wrap-login100 form-row">
<form class="login100-form validate-form needs-
validation was-validated" method="POST" action="register" novalidate="">
<span class="login100-form-title p-b-43">
Create account
</span>
<?php
if (!isset($_GET['s'])) {
$cust->register_account();
?>
<div class="row">
<div class="col-lg-6">

<div class="wrap-input100
validate-input" data-validate="Do not leave name field blank">
<input class="input100"
type="text" name="fname" pattern="[A-Za-z]{2,30}" required="" data-
toggle="tooltip" data-placement="top" data-original-title="Min 2 characters.
Alphabets only.">
<span class="focus-
input100"></span>
<span class="label-
input100">First Name</span>
</div>
</div>
<div class="col-lg-6">
<div class="wrap-input100
validate-input" data-validate="Do not leave name field blank">
<input class="input100"
type="text" name="lname" pattern="[A-Za-z]{2,30}" required="" data-
toggle="tooltip" data-placement="top" data-original-title="Min 2 characters.
Alphabets only.">
<span class="focus-
input100"></span>
<span class="label-
input100">Last Name</span>
</div>
</div>
</div>

<div class="wrap-input100 validate-input"


data-validate="Valid email is required: [email protected]">
<input class="input100" type="text"
name="email" required="">
<span
class="focus-input100"></span>
<span class="label-
input100">Email</span>
</div>
<hr>
<div class="wrap-input100 validate-input"
data-validate="Password is required">
<input class="input100"
type="password" name="pass" pattern=".{6,}" data-toggle="tooltip" data-
placement="top" data-original-title="Min 6 characters." required="">
<span
class="focus-input100"></span>
<span class="label-
input100">Password</span>
</div>

<div class="wrap-input100 validate-input"


data-validate="Password is required">
<input class="input100"
type="password" name="pass_confirm" pattern=".{6,}" data-toggle="tooltip" data-
placement="top" data-original-title="Min 6 characters." required="">
<span
class="focus-input100"></span>
<span class="label-
input100">Confirm Password</span>
</div>

<div class="flex-sb-m w-full p-t-3 p-b-32">


<div class="contact100-form-
checkbox">
<input class="input-
checkbox100" id="ckb1" type="checkbox" name="remember_me">
<label class="label-
checkbox100" for="ckb1">
Remember me
</label>
</div>

</div>

<div class="container-login100-form-btn">
<button type="submit"
class="login100-form-btn" name="register_submit">
Create Account
</button>
</div>

<div class="text-center p-t-46 p-b-20">


<span class="no-account">
Already have an account?
<span class="no-account-a"><a href="login">Click here</a></span> to sign in.
</span>
</div>
<div>
<?php
isset($_SERVER['HTTP_REFERER']) ? $goback =
$_SERVER['HTTP_REFERER'] : $goback = "index" ?>
<a href="<?php echo $goback; ?
>"><button type="button" class="go-back-phone login100-form-btn">Go
back</button></a>
</div>
<?php
}
if (isset($_GET['s'])) {
if ($_GET['s'] == 1 && isset($_GET['cid']))
{
setMessage("A verification link has
been sent to your Email ID. Please click on the link and verify your email ID. <a
href='register?s=1&cid=" . $_GET['cid'] . "&resend'>Click here</a> to resend the
verification link. ");
$cust->resend_verify_email();
}
if ($_GET['s'] == 1 &&
isset($_GET['resend']) && !isset($_GET['cid'])) {
$cust->resend_verify_email();
}
if ($_GET['s'] == 2 &&
isset($_GET['email']) && isset($_GET['key'])) {
$cust->verify_email();
}
}
?>
</form>
<script>
// Example starter JavaScript for disabling form
submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function()
{
// Fetch all the forms we want to
apply custom Bootstrap validation styles to
var forms =
document.getElementsByClassName('needs-validation');
// Loop over them and prevent
submission
var validation =
Array.prototype.filter.call(forms, function(form) {

form.addEventListener('submit', function(event) {
if (form.checkValidity()
=== false) {

event.preventDefault();

event.stopPropagation();
}
form.classList.add('was-
validated');
}, false);
});
}, false);
})();
</script>

<div class="login100-more" style="background-image:


url('loginpage/images/login_copy.jpg');">
<div id="header">
<div id="logo" class="pull-left">
<h1><a href="index#intro"
class="scrollto">Best Choice</a></h1>
<!-- <a href="#intro"><img
src="img/logo.png" alt="" title="" /></a>-->
</div>
</div>
<footer id="footer">
<div class="container">
<div class="row">
<?php
isset($_SERVER['HTTP_REFERER']) ? $goback =
$_SERVER['HTTP_REFERER'] : $goback = "index" ?>
<a href="<?php echo $goback ?
>"><button class="login100-form-btn">Go back</button></a>
</div>
</div>
</footer>
</div>

</div>
</div>
</div>
<div id="preloader"></div>
<!--
===========================================================
====================================-->
<script src="lib/jquery/jquery.min.js"></script>

<script src="loginpage/vendor/bootstrap/js/popper.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>

<script type="text/javascript">
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<!--
===========================================================
====================================-->
<script src="loginpage/js/main.js"></script>
<script src="js/main.js"></script>
</body>

</html>
<?php include("includes/front/top.php"); ?>

<link rel="stylesheet" href="css/cart.css">


</head>
<body>

<!--==========================
Header
============================-->
<?php include("includes/front/header_static.php"); ?>

<main id="main">
<!--==========================
Cart Section
============================-->
<section id="about">
<div class="container">

<header class="section-header">
<h3>Cart</h3>
</header>
<div class=" about-cols">

<div class="row">
<div class="col-lg-12 p-5 bg-white rounded
shadow-sm mb-5">
<div class="cart-subheading">
<h4>Order details</h4>
</div>
<!-- Shopping cart table -->
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th
scope="col" class="border-0 ">
<div
class="p-2 px-3 text-uppercase"></div>
<!--
<hr id="vertical-line"> -->
</th>
<th
scope="col" class="border-0 ">
<div
class="py-2 text-uppercase"></div>
<!--
<hr id="vertical-line"> -->
</th>
<th
scope="col" class="border-0 ">
<div
class="py-2 text-uppercase"></div>
<!--
<hr id="vertical-line"> -->
</th>
<th
scope="col" class="border-0 ">
<div
class="py-2 text-uppercase"></div>
<!--
<hr id="vertical-line"> -->
</th>
</tr>
</thead>
<tbody>
<?php $cust-
>display_cart_page(); ?>
<?php $cust-
>delete_item_cart(); ?>
</tbody>
</table>
</div>
<!-- End -->
</div>
</div>

<div class="row py-5 p-4 bg-white rounded


shadow-sm">
<div class="col-lg-6">
</div>
<div class="col-lg-6">
<div class="bg-light rounded-pill px-
4 py-3 text-uppercase font-weight-bold">Order summary </div>
<div class="p-4">
<p class="mb-4">Handling
charges will be charged based on the order quantity.</p>
<ul class="list-unstyled mb-4">
<li class="d-flex justify-
content-between py-3 border-bottom"><strong class="text-muted">Order Subtotal
</strong><strong>NGN&nbsp;<?php echo $cust->totalPrice; ?></strong></li>
<?php
if ($cust->totalQuantity
> 2 || $cust->totalQuantity === 0) {
$cust->handling =
0;
} else {
$cust->handling =
40;
}
?>
<li class="d-flex justify-
content-between py-3 border-bottom"><strong class="text-muted">Handling
charges</strong><strong>NGN&nbsp;<?php echo $cust->handling;
?></strong></li>
<?php
$cust->amountToPay =
$cust->totalPrice + $cust->handling;
?>
<li class="d-flex justify-
content-between py-3 border-bottom"><strong class="text-muted">Total</strong>
<h5 class="font-
weight-bold">NGN&nbsp;<?php echo $cust->amountToPay; ?></h5>
</li>
</ul>
<?php
$cust->flag = 0;
if (($cust->totalQuantity == 0
&& $cust->totalPrice == 0)) {
$disabled = "disabled ";
} else {
if (!$cust-
>check_current_orders()) {
$disabled = "";
} else {
$cust->flag = 1;
$disabled =
"disabled ";
}
}
if (isset($cust->totalQuantity)
&& $cust->totalQuantity <= 20) {
if (!
isset($_SESSION['CUSTOMER']['EMAIL'])) {
echo '
<a tabindex="-1" data-toggle="tooltip" data-placement="bottom"
title="Please login before placing an order. " class="btn btn-dark rounded-pill py-2
btn-block shadow-button">Proceed to checkout</a>
';
} else {
?>
<form
action="checkout" method="POST">
<input
type="hidden" name="total_amount" value="<?php echo $cust->amountToPay; ?
>">
<input
type="hidden" name="quantity" value="<?php echo $cust->totalQuantity; ?>">
<input
type="hidden" name="handling_charge" value="<?php echo $cust->handling; ?
>">
<?php

$_SESSION['CUSTOMER']['amountToPay'] = $cust->amountToPay;

$_SESSION['CUSTOMER']['totalQuantity'] = $cust->totalQuantity;

$_SESSION['CUSTOMER']['handling'] = $cust->handling;
?>
<?php
if ($cust-
>flag) {
echo '
<a tabindex="-1" data-toggle="tooltip" data-
placement="bottom" title="Cannot place orders when there`s an existing order.
Please place the order after the current order is delivered. " class="btn btn-dark
rounded-pill py-2 btn-block shadow-button">Proceed to checkout</a>
';
} else {
if
($cust->totalPrice > 0) {

echo '
<button type="submit" name="checkout_submit" class="btn
btn-dark rounded-pill py-2 btn-block shadow-button">Proceed to
checkout</button>
';
} else
{

echo '
<button type="submit" disabled class="disabled btn btn-
dark rounded-pill py-2 btn-block shadow-button">Proceed to checkout</button>
';
}
}
?>
</form>
<?php
}
?>
<?php
} else {
?>
<a tabindex="-1" data-
toggle="tooltip" data-placement="bottom" title="Max 20 units allowed per order.
Please modify your order. " class="btn btn-dark rounded-pill py-2 btn-block
shadow-button">Procceed to checkout</a>
<?php
}
?>

</div>
</div>
</div>

</div>

</div>
</section><!-- #about -->

</main>

<!--==========================
Footer
============================-->

<?php include("includes/front/footer.php"); ?>

You might also like