usman, ukasha...declaration this is to certify that this thesis/report entitled home of groceries...
TRANSCRIPT
THE DESIGN AND IMPLEMENTATION OF HOME OF GROCERIES
TRADER APPLICATION
BY
USMAN, Ukasha
BU/16C/IT/2163
COMPUTING AND APPLIED SCIENCES
BAZE UNIVERSITY
ABUJA
January, 2021
The Design And Implementation Of Home of Groceries Trader
Application
Thesis Submitted in Partial Fulfilment of the Requirement
for the Degree of
B. Sc.
In
Computer Science [Information System Management]
By
Usman, Ukasha
To
The Department of Computer Science
Baze University, Abuja
JANUARY, 2021
DECLARATION
This is to certify that this Thesis/Report entitled Home of Groceries Trader Application, which
is submitted by Ukasha Usman in partial fulfilment of the requirement for the award of degree
for B.Sc. in Information Technology to the Department of Computer Science, Baze University
Abuja, Nigeria, comprises of only my original work and due acknowledgement has been made
in the text to all other materials used.
Date: January, 2021 Name of Student: Ukasha Usman
APPROVED BY Dr C.V. Uppin
Head
Department of Computer Science
ii
CERTIFICATION
This is to certify that this Thesis/Report entitled Home of Groceries, which is submitted by
Ukasha Usman in partial fulfilment of the requirement for the award of degree for B.Sc. in
Information Technology to the Department of Computer Science, Baze University Abuja,
Nigeria is a record of the candidate’s own work carried out by the candidate under my/our
supervision. The matter embodied in this thesis is original and has not been submitted for the
award of any other degree.
Date: January, 2021 Supervisor: Mr Nasiru Aboki
iii
APPROVAL
This is to certify that the research work, Dental Management System and the subsequent
preparation by Ukasha Usman with BU/16C/IT/2163 has been approved by the Department of
Computer Science, Faculty of Computing and Applied Science, Baze University, Abuja, Nigeria.
By
Mrs Florence Peter Date/Sign
1st Supervisor
Mr Nasiru Aboki Date/Sign
2nd Supervisor
Dr. C. V. Uppin Date/Sign
Head, Department of Compuer Sciences
Prof. MOHAMMED HAMMAWA BABA Date/Sign
Dean, Faculty of Computing and Applied Science
Prof. Ahmed Baita Garko
External Examiner Date/Sign
iv
DEDICATION
This report is dedicated to Almighty Allah (SWA), the creator, the most merciful, source of
my wisdom, knowledge, inspiration and thoughtful, my parents, my lecturers my friends and
every other person that has aided in getting me to where I am today. Without them this
wouldn’t
have been possible. I will forever be grateful to them and to the All Mighty for making
everything possible.
v
ACKNOWLEDGEMENT
I express gratitude toward God Almighty for his leniency and effortlessness that kept me all
through my B.Sc. Also, to my Lovely parents my Father Alh. Usman Sahabi Kaura, my
Mother Haj Fatima Usman and my siblings and my appreciation for their direction and for
giving me the essential help, I value it a great deal and I LOVE you, Dad and Mom.
In addition, I really appreciate BAZE UNIVERSITY for giving me the chance to experience
this B.Sc. program. My appreciation goes to all my lecturers I really appreciate all your effort
towards grooming me up to achieve all this. My Pleasure goes to you all, I express my
gratitude towards all of you for your support, analysis, recommendation, advice and redresses.
I would also like to thank everybody else that added to the achievement of my B.Sc. program
friends and family. The is undoubtedly a wonderful experience for me
vi
ABSTRACT
In this day and age the process of buying and selling of commodities are usually done not
physically but virtually, with the current situation that the world is in at the moment the process
of going to the market to buy groceries is a major risk to both the seller and the buyer. But not
only that, some people are often skeptical when buying things of that sort (i.e., groceries) in a
supermarket where the guidelines of the novel- Covid19 are followed, they then to feel safer
and more comfortable going to the traditional market where they are able to get prices direct
from the sellers themselves there’s a comforting feeling in doing things the old ways. Now,
Home of Groceries trader App is an app that is developed to tackle the aforementioned.
The purpose of the website is to enable users to surf through and find all their necessary needs
from all part of the nation. Also, to tackle the issue of the trust, buyers are given prices straight
from the market sellers, because on our platform everything is done and controlled by the
clients including insertion, delete and editing of the products are all done by the seller, so the
users get the way he normally buys groceries with the help of technology. The application also
helps the customers track previous transactions include the price of that product and from
which seller the product was gotten from for future reference. Also, a user can have a detailed
search of a vendor by entering the name of that product in the search bar, the user can also
choose to select the category of the product which will give him access to all the product that
fall under that category, also, a user can choose to search a user based on the location which
the user is. The main idea of developing Home of Groceries trader App is to give the users a free
and fair market space where both the party of the seller and the customer can enjoy a seamless
experience at the same time making their lives easier and safer. The Methodologies that will be
adopted in the development of this project will be the Waterfall methodology and the Agile
methodology. The waterfall methodology was chosen because when developing the
application, the best way to follow was systematic approach which means all the processes
involved lead to one another just like in the waterfall method. Although, since they are some
unknowns the Agile method was adopted to design those processes. The Application was
implemented using JavaScript for the logic and SQL for the backend.
vii
TABLE OF CONTENTS
ABSTRACT ............................................................................................................................................................................... VI
CHAPTER 1: INTRODUCTION ..........................................................................................................................................1
1.1 OVERVIEW .................................................................................................................................................................1 1.2 BACKGROUND AND MOTIVATION ..........................................................................................................................1 1.3 STATEMENT OF THE PROBLEM ..............................................................................................................................2 1.4 AIM AND OBJECTIVES ..............................................................................................................................................2 THE AIM OF THE PROJECT IS TO ..............................................................................................................................................2 1. RECOGNIZE THE PRESENT CHALLENGES FACE BY GROCERIES TRADERS IN NIGERIA. ...................................2 2. DESIGN AND IMPLEMENT AN ONLINE PLATFORM FOR THE GROCERIES TRADERS TO SHOWCASE THEIR
PRODUCTS ONLINE TO THE VAST MAJORITY OF INTERESTED BUYERS. .............................................................................3 3. MAKE IT EASIER FOR BUYER TO BUY GROCERIES JUST LIKE BEFORE BUY BETTER AND WITH ADDED
FEATURES. ..................................................................................................................................................................................3 1.5 SIGNIFICANCE OF THE PROJECT .............................................................................................................................3 1.6 PROJECT RISKS ASSESSMENT .................................................................................................................................3 1.7 SCOPE/PROJECT ORGANIZATION ..........................................................................................................................7
CHAPTER 2: LITERATURE REVIEW ............................................................................................................................8
2.1 INTRODUCTION .........................................................................................................................................................8 2.2 HISTORICAL OVERVIEW ..........................................................................................................................................8 2.3 RELATED WORK ................................................................................................................................................... 10 2.4 SUMMARY ............................................................................................................................................................... 13
CHAPTER 3: REQUIREMENTS ANALYSIS AND DESIGN ............................................................................... 14
3.1 OVERVIEW .............................................................................................................................................................. 14 3.2 PROPOSED METHODOLOGY ................................................................................................................................. 14
3.2.1 Waterfall Development Methodology ............................................................................................................... 14 3.3.2 Agile Development Methodology ......................................................................................................................... 15
3.3 APPROACH TO CHOSEN METHODOLOGY/METHODS ...................................................................................... 16 3.3.1 WATERFALL METHODOLOGY APPROACH ..................................................................................................... 17 3.3.2 AGILE METHODOLOGY APPROACH ................................................................................................................... 18
3.4 TOOLS AND TECHNIQUES ..................................................................................................................................... 20 3.4.1 Hardware Requirement ..................................................................................................................................... 20 3.4.2 Software Requirement ........................................................................................................................................ 20
3.5 ETHICAL CONSIDERATION ................................................................................................................................... 21 3.6 REQUIREMENT ANALYSIS .................................................................................................................................... 21
3.6.1 Responsibility Matrix ........................................................................................................................................... 22 3.7 REQUIREMENTS SPECIFICATIONS ....................................................................................................................... 23
3.7.1 Functional Requirement Specifications ...................................................................................................... 23 3.8 SYSTEM DESIGN ..................................................................................................................................................... 25
3.8.1 Application Architecture .................................................................................................................................. 25
viii
3.8.2 Use Case .................................................................................................................................................................... 28 3.8.3 Sequence Diagram ................................................................................................................................................. 30 3.8.4 Dataflow Diagram ................................................................................................................................................. 30 ........................................................................................................................................................................................................ 32 3.8.5 Entity-Relationship Diagram (ERD) .............................................................................................................. 33
3.9 SUMMARY ............................................................................................................................................................... 34
CHAPTER 4: IMPLEMENTATION AND TESTING .............................................................................................. 34
4.1 OVERVIEW .............................................................................................................................................................. 34 4.2 MAIN FEATURES .................................................................................................................................................... 34
USER INTERFACE .................................................................................................................................................................. 34 37 38 4.3 IMPLEMENTATION PROBLEMS ............................................................................................................................ 43 4.4 OVERCOMING IMPLEMENTATION PROBLEMS .................................................................................................. 44 4.5 TESTING .................................................................................................................................................................. 44
4.5.1 Tests Plans (for Unit Testing, Integration Testing, and System Testing) ....................................... 44 4.5.2 Test Suite (for Unit Testing, Integration Testing, and System Testing) ........................................... 45 4.5.3 Test Traceability Matrix ...................................................................................................................................... 46 ........................................................................................................................................................................................................ 49 ........................................................................................................................................................................................................ 50 ........................................................................................................................................................................................................ 52 4.5.4 Test Report Summary (for Unit Testing, Integration Testing, and System Testing) ................... 54
4.5.5 ERROR REPORTS AND CORRECTIONS ................................................................................................................ 54 4.6 USE GUIDE .............................................................................................................................................................. 55 56
........................................................................................................................................................................................................ 57
4.7 SUMMARY ............................................................................................................................................................... 59
CHAPTER 5: DISCUSSION, CONCLUSION, AND RECOMMENDATIONS ............................................. 59
5.1 OVERVIEW .............................................................................................................................................................. 59 5.2 OBJECTIVE ASSESSMENT ...................................................................................................................................... 59 5.3 LIMITATIONS AND CHALLENGES ......................................................................................................................... 60 5.4 FUTURE ENHANCEMENTS .................................................................................................................................... 60 5.5 RECOMMENDATIONS............................................................................................................................................. 60 5.6 SUMMARY ............................................................................................................................................................... 61
REFERENCES ......................................................................................................................................................................... 62
APPENDICES .......................................................................................................................................................................... 64
ix
LIST OF TABLES
TABLE 1.1: RISK AND ASSESSMENT OF PROJECT ............................................................................................................ 3
TABLE 1.2: RISK ASSESSMENT MATRIX ......................................................................................................................... 4
TABLE 1.3: SWOT ANALYSIS ........................................................................................................................................ 6
TABLE 3.1: RESPONSIBILITY MATRIX ........................................................................................................................... 22
TABLE 3.2: FUNCTIONAL REQUIREMENT SPECIFICATIONS ........................................................................................... 23
TABLE 3.2: NON-FUNCTIONAL REQUIREMENT SPECIFICATIONS .................................................................................. 24
TABLE 4.1: TEST PLAN TREE ........................................................................................................................................ 44
TABLE 4.2: TEST PLAN TREE ........................................................................................................................................ 44
TABLE 4.3 TEST SUITE PERFORMED ........................................................................................................................... 45
TABLE 4.4: TEST TRACEABILITY MATRIX .................................................................................................................... 45
TABLE 4.5: TEST SUMMARY REPORT ........................................................................................................................... 53
x
LIST OF FIGURES
FIGURE 2. 1: GLOBALDATA CONSUMER RESEARCH (1ST FEBRUARY 2018)............................................................................................... 9 FIGURE 2. 2: FRESH DIRECT APPLICATION (WWW.FRESHDIRECT.COM) .................................................................................................. 10 FIGURE 2. 3: JUMIA GROUP APPLICATION(WWW.JUMIA.NG) ...................................................................................................................... 12
FIGURE 3. 1: TECH TARGET (JUNE, 2009) .................................................................................................................................................... 15 FIGURE 3. 1: TECH TARGET (JUNE, 2009) ........................................................................................ ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 2: AGILE METHOD (GOOGLE, 2020) ........................................................................................................................................... 16 FIGURE 3. 2: AGILE METHOD (GOOGLE, 2020) ............................................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 3: APPLICATION ARCHITECTURE FOR HOMEPAGE ..................................................................................................................... 26 FIGURE 3. 3: APPLICATION ARCHITECTURE FOR HOMEPAGE ......................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 4: APPLICATION ARCHITECTURE FOR ADMIN PAGE .................................................................................................................. 27 FIGURE 3. 4: APPLICATION ARCHITECTURE FOR ADMIN PAGE ...................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 5: APPLICATION ARCHITECTURE FOR SELLER PAGE.................................................................................................................. 27 FIGURE 3. 5: APPLICATION ARCHITECTURE FOR SELLER PAGE...................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 6: APPLICATION ARCHITECTURE FOR CUSTOMER PAGE ............................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 6: APPLICATION ARCHITECTURE FOR CUSTOMER PAGE ........................................................................................................... 27 FIGURE 3. 7: APPLICATION ARCHITECTURE FOR FINDING A VENDOR ........................................................................................................ 28 FIGURE 3. 7: APPLICATION ARCHITECTURE FOR FINDING A VENDOR ............................................ ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 8: USE CASE DIAGRAM ..................................................................................................................................................................... 29 FIGURE 3. 8: USE CASE DIAGRAM ......................................................................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 9: SEQUENCE DIAGRAM .................................................................................................................................................................. 30 FIGURE 3. 9: SEQUENCE DIAGRAM ...................................................................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 10: DATAFLOW DIAGRAM LEVEL 0............................................................................................................................................... 31 FIGURE 3. 10: DATAFLOW DIAGRAM LEVEL 0................................................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 11: DATAFLOW DIAGRAM LEVEL 1............................................................................................................................................... 32 FIGURE 3. 11: DATAFLOW DIAGRAM LEVEL 1................................................................................... ERROR! BOOKMARK NOT DEFINED. FIGURE 3. 12: ENTITY RELATIONSHIP DIAGRAM .......................................................................................................................................... 33
FIGURE 4 1: HOME.............................................................................................................................................................................................. 35 FIGURE 4 2: CART PAGE .................................................................................................................................................................................... 36 FIGURE 4 3: REGISTRATION PAGE ................................................................................................................................................................... 37 FIGURE 4 4: ADMIN CUSTOMER UPDATE FORM PAGE ................................................................................................................................. 37 FIGURE 4 5: ADMIN CUSTOMER UPDATE FORM PAGE ................................................................................................................................. 38 FIGURE 4 6: AVAILABLE PRODUCT PAGE FOR A SELLER .............................................................................................................................. 38 FIGURE 4 7: CUSTOMER PROFILE PAGE .......................................................................................................................................................... 39 FIGURE 4 8: RECENT PURCHASES HISTORY PAGE ........................................................................................................................................ 40 FIGURE 4 9: USER ACCOUNT UPDATE FORM ................................................................................................................................................. 40 FIGURE 4 10: PAYMENT PAGE ....................................................................................................................................................................... 41 FIGURE 4 11: ADD PRODUCT PAGE ............................................................................................................................................................. 42 FIGURE 4 12: UPDATE MESSAGE PAGE ...................................................................................................................................................... 42 FIGURE 4 13: ABOUT PAGE ............................................................................................................................................................................ 43 FIGURE 4 14: INCORRECT REGISTRATION ERROR MESSAGE ....................................................................................................................... 47 FIGURE 4 15: INCORRECT LOGIN INFORMATION .......................................................................................................................................... 48 FIGURE 4 16: SUCCESSFUL REGISTRATION OF A NEW USER ....................................................................................................................... 49 FIGURE 4 17: ACCOUNT UPDATE SUCCESSFUL .............................................................................................................................................. 50 FIGURE 4 18: ADDING A NEW PRODUCT TO THE INVENTORY ...................................................................................................................... 51 FIGURE 4 19: PAYSTACK CONNECTION TEST ............................................................................................................................................. 52 FIGURE 4 20: SUCCESSFUL PAYMENT USING PAYSTACK .......................................................................................................................... 53 FIGURE 4 21: INSTALL VISUAL STUDIO CODE 2013 ABOVE WITH MICROSOFT SQL SERVER ............................................................. 55 FIGURE 4 22: OPEN THE APPLICATION USING HOME OF GROCERIES ....................................................................................................... 56 FIGURE 4 23: RUN THE APPLICATION USING INTERNET EXPLORER .......................................................................................................... 57 FIGURE 4 24: SERVER DIRECTORY (DATABASE) .......................................................................................................................................... 57 FIGURE 4 25: SURF THROUGH THE PAGES WITH SOLUTION EXPLORER .................................................................................................... 58
xi
xii
LIST OF ABBREVIATIONS
CPU Central Processing Unit
ERD Entity Relationship Diagram
IT Information Technology
1
CHAPTER 1: INTRODUCTION
1.1 Overview
The process of buying and selling of commodities has longed changed over the past decades with new
ways emerging from different cultures to different views it has now been transformed into a different
platform in the form of E commerce,
Home of Groceries trader App is as the name implies, it is a platform for buying and selling of groceries
online, the website will be created to assist the everyday life of the user in getting one of the necessity
of life, when you want to get groceries normally you go to the market and buy and when buying it is
normal to check different vendors in the market and when buying what are the basic things and factors
that determine which vendor one buys from, simple, some go for the lower price and some might go
for the “better” ones which they presume more healthier or organic. And what Home of Groceries trader
App is designed to do covers all that and more, it gives a free market space to both the customer and
the seller just like before and with added functions, the Home of Groceries trader App will be able to
perform deliveries to the door step so you can be at home and eat healthy.
Many merchants in wuse2 market acknowledged that on a normal day they get a lot of customers that
request delivery to their personal homes due to the conjunction and the stress that is required to go to
the market regularly and with the current situation the world is in at the moment there’s no better time
to avoid crowds, social distancing is the way the world works now and Home of Groceries trader App will
be there to ease people’s stress.
1.2 Background and Motivation
Going to the market to buy groceries is something that people hold as a norm, some people still prefer
to be there and ask the prices of a few merchants to compare before deciding which to buy from, now
what Home of Groceries trader App is designed to do is already being done but with no major audience,
the only few of the customers that are able get groceries delivered to them usually get the numbers of
2
the merchants that they bought products from in the past or some that have an agent that goes to the
vendors and buys it for them.
Both those solutions are not really dependable because those that have the agent on ground some may
not be actually buying at the fixed price because they are now buying from two people the vendor has
his profit and the agent has his to, and those customers that call the vendors directly don’t normally
get the products at the desired time because there is no any organized delivery system that works on
standby and sometimes time is of the essence.
Now what Home of Groceries trader App is designed to do is to provide a better solution for that it will
help both the seller and the buyer with a platform that will solve all their problems you can buy from
many vendors and with a price that’s monopoly and get the product delivered to your door step,
however let’s not forget that the main purpose of grocery trader app is to allow vendors to showcase
their product online for easy access to customers. Home of Groceries trader App will tackle the
aforementioned problems, hence the motivation behind the development of this app.
1.3 Statement of the Problem
Vendors in a market like wuse 2 or any other place in the nation, a study shows that roughly only 15%
use the internet platform to sell their products that means there a market space of about almost 85% that
is untapped and that number of platforms that do similar things that exist are just a few which means the
market is not crowded.
And with the current pandemic the need for social distancing is very high at the moment the world is
bleeding sometimes even if you want to go to the market by yourself if you think about it you’re risking
your life when you don’t have to, Home of Groceries trader App will help in that area by keeping people at
home and taking the risk for them.
1.4 Aim and Objectives
The aim of the project is to
1. Recognize the present challenges face by groceries traders in Nigeria.
3
2. Design and implement an online platform for the groceries traders to showcase their products
online to the vast majority of interested buyers.
3. Make it easier for buyer to buy groceries just like before buy better and with added features.
1.5 Significance of the Project
The implementation of the project has the potential to benefit the Nigeria society and the world in its
entirety. This research will create ease to Nigeria and the world in general should they choose to be
involved, providing them with easy access to market vendors of their choice and safe and favourable
transaction method. Also, they will be a succinct report on each phase of the implementation of the
project and there will be room for further development and update.
Home of Groceries trader App allows vendors in Nigeria play a better role in the day-to-day activities of
the citizens in their nation. The company provides a better medium for support of the less privileged.
More of such lives are touched, and dreams are being made true with the Home of Groceries trader App.
This creates a better society with less crime, hatred, and envy amongst citizens. This positive
development could extend to other countries and spread across all its axes, thereby making the world a
better place to live in. And helps prevents the spread of the novel COVID19.
1.6 Project Risks Assessment
The following are the risk of this study that cannot be controlled but will be put into consideration and
confronted during development and life span of the project.
Table 1.1: Risk and Assessment of Project
RISK ASSESSMENT
Loss of work due to application (IDE) failure,
loss or force majeure
Weekly data backup to at least 2 or more hard
drives.
4
Lack of project resources All necessary and required resources will be
made available before the commencement of the
project or before it is needed for use.
Software development platform availability
(Unavailability of API’s)
Alternative
Alternative API’s will be searched for and made
available. Software requirements will also be
identified in good time for possible contentious
software.
Project Cost Project may overrun its budget, therefore room
for extra funding if the need arises will be
created
Inability to carry out research due to
hardware/software damage.
Be vigilant and observant of both hardware and
software resources. Encrypt resource where
possible and necessary to prevent unauthorized
access
Project Delivery Every possible measure that can ensure the
punctual delivery of the software will be taken
e.g. consistency and not wasting time. Failure to
deliver the software will not occur unless
inevitable.
Table 1.2: Risk Assessment Matrix
5
Identified Risk Likelihood of
Occurrence
Difficulty in
time detection
Potential impact Overall Risk to
Project
Loss of work due
to application
(IDE) failure, loss
or force majeure
Medium High High High
Lack of project
resources
Medium Low Medium Medium
Software
development
platform
availability
(Unavailability of
API’s)
Low Medium Medium Medium
Project Cost High Medium Medium High
Inability to carry
out research due
to
hardware/software
damage.
Low Medium Low Low
SWOT Analysis
The SWOT analysis provides information that is useful to compare HOG capabilities, advantage and the
6
disadvantage compared to competitive environment in which it operates. It is an instrument in strategy
formulation and selection. Risk of this project are categorized as Strengths, Weaknesses, Opportunities
and Threats.
Table 1.3: SWOT Analysis
Strength Weakness Opportunities Threats
To enable the system,
compete in the
worldwide market.
Dependency on
retailers/ shopper’s
relationship.
Less time
consumption time
Prone to computer
hackers due to it
being a web based
system.
Bring a competitive
environment for
Groceries traders to
sell their products at
the actual market
values.
Will bring many
customers for the
sellers and from
different sides.
Similar application
may exist.
Diverse product
Portfolio.
Well established
competitors.
7
1.7 Scope/Project Organization
This describes how the chapters of the project are organized. The report consists of five chapters as
outlined below:
Chapter 1: provides a general overview of what the whole project is all about such as
background and motivation, statement of the problem, aims and objectives,
significance of the project, and project risk assessment.
Chapter 2: provides Literature Review introduction historical overview, related work and
summary.
Chapter 3: This chapter depicts the Requirement Analysis and Design.
Chapter 4: This includes the implementation and testing of the project’s components
Chapter 5: Discussion, conclusion, and recommendation are in this chapter. Finally
reference and appendices part is in last part the report.
8
CHAPTER 2: LITERATURE REVIEW
2.1 Introduction
This chapter is based on the literature review of the techniques and technology used in this thesis.
Section2.2 is based on the Historical overview of Groceries shopping Apps. Section2.3 gives
descriptions of some of the literature available with regards to a Groceries shopping Apps in solving the
research question. Lastly, section 2.4 is a summary of the entire chapter.
2.2 Historical Overview
The term Groceries Stores is a lingo used by the people of the United Kingdom, whereas the people in
United State usually refer to it as supermarket and here in Nigeria we simple refer to it as a market.
Which we all use to describe any self-service shop offering a wide variety of food, household products
and beverages, organized into sections and or sections.
The traditional market occupies a huge amount of space usually because of how it is normally arranged,
it is usually situated near a residential area in other to be convenient to consumers. The basic appeal is
the availability of a broad selection of goods from different vendors under a single roof, at a relatively
low price.
The concept of the term market in the modern age dates back 100 years ago when the first groceries
shop was opened on the 11th September 1916, by a man named Clarence Saunders who opened the first
Piggly Wiggly in the town of Memphis, Tennessee. He came up with the first idea of self-service model
that has since changed the business drastically in different ways that things had long been done in the
past. At an old style grocery, customers would pass a grocery list to a clerk, who would then put items
together for shoppers in one bag. At Piggly Wiggly then the shoppers did their own choosing and now
then, products had to do the tempting.
John Stanton of Saint Joseph University, a professor of food marketing has this to say about the
invention of Piggly Wiggly “That [method] meant consumers could make decisions as to what it was
they wanted to buy, and that really led to companies trying to catch consumers’ attention. It’s really the
origin of branding”.
9
Figure 2. 1: GlobalData Consumer Research (1st February 2018)
Figure 2. 1: GlobalData Consumer Research (Febuary, 2018)
The early pioneers of the online platform for groceries date back to the 1990s in the early days of the
.com business, significantly the early movers in the industry were not supermarkets or food
manufacturers, but technology companies dedicated to use their coding knowledge to improve a sectors
they believed to be ripe for change, companies like HomeGrocer and Webvan were one of the first
online supermarket, though they had good momentum at the beginning with Webvan bagging almost $1
billion in investments for its confidence in the future of online grocery order with an engineering and
construction firm to build out new warehouses and infrastructure to support them. But despite all that
their fate was not a happy one because in the early 2000s HomeGrocer was losing money, eventually
sold up to Webvan. Subsequently, Webvan filed for bankruptcy in early 2001(the same brand was later
bought by Amazon).
But throughout that time to the modern day, online is once again a battle ground for groceries. But with
the lessons of the past the field is no longer dominated by technology firms or pure-play online retailers.
Instead it is now crowded with traditional groceries chains, some examples are Target, Walmart and
even Amazon-owned whole foods.
Some of the issues that were faced by the early pioneer are still relevant and are still issues online
grocers are working through. But supermarkets have a lot of strategic advantages that make their venture
into online more like to bring success.
10
Figure 2. 2: Fresh Direct Application (www.freshdirect.com)
And with the current rise of automation and robotics in picking and packing, means that the new wave
of online innovation and investment will likely succeed, perhaps the start of the true internet grocery
revolution.
For the year 2020, according to the study titled “Grocery’s New Reality: The Pandemic’s Lasting impact
on U.S Grocery Shopping Behavior” is said that the online groceries percentage of over $1.04 trillion
groceries market is projected at 10.2%, or about $106 billion, up from 3.4% or $34.54 billion, compared
to the $2.02 billion market in the year 2019. And by 2025 the online grocery’s dollar share stand to
climb up to $250.26 billion of the estimated to $1.16 trillion overall groceries market.
This is the brief history of Grocery shopping, its inception and up to date usage, a brief history of the
PHP programming language which will be used to implement the app and reasons for choosing PHP and
also the operating system the application will be built for and why that operation system was chosen.
2.3 Related Work
Fresh Direct
11
Fresh Direct is an online grocery shopping website which use sophisticated mobile and web-based
technologies, the company was formed in the year 1999 by its founders Joe Fedele and Jason
Ackerman. FreshDirect is one of the most earlies pioneers of the online grocery delivery services in
the US it made the move into the cyber space in New York market in 2002, by then it was popularly
accepted by the people because of its convenience and comparatively low prices than many
supermarkets in the town.
The company was one of the early proponents of the move toward food sustainability and in short
time rapidly grew in popularity by providing to the “urban and socially-conscious consumers”. It
rapidly reduces the time of deliveries by buying direct from farms, still taking in consideration the
organic food and locally grown items also holds a certification of sustainable seafood vendor. And
with deliveries available in most cities such as Bronx, New York, Philadelphia and also Washington
DC metropolitan areas FreshDirect has become popular among consumers who want schedule specific
delivery times.
Features:
➢ Offers a variety of fresh and fully prepared products
➢ It is a convenient for alternative for grocery shopping
➢ Also provides scheduled delivery to ensure freshness.
Drawbacks:
➢ The availability only in selected areas.
➢ Limited selection of organic and specialty ingredients.
➢ Delivery fee is expensive.
➢ Lack of adequate acknowledgement of the vendors.
12
Figure 2. 3: Jumia Group Application(www.jumia.ng)
Jumia Group
Jumia Group is a company which operates in a range of online marketplaces, it was initially founded by
its founders Jeremy Hodara and Sacha Poignonnec in the year 2013. The headquarters which is located
at Yaba, Lagos state, Nigeria. The company started as a startup for an organization called the Rocket
Internet, however with the sudden rapid growth and success of the company made it possible for the
company to secure strategic investors such as the CDC, and huge players like the Goldman Sachs, MTN
and even Orange. In the year 2016 on the 23rd of June, the Africa Internet Group (AIG), Jumia Market’s
parent company made the announcement of merging all its e-commerce companies under the Jumia
franchise. As a result, platforms such as food, real estate, automobile and general goods market became
a part of the Jumia franchise.()
In the year 2015, Jumia market village was created, an offline store developed due to lack of trust and
for customers who were skeptical about the product at first with the safety of online transactions, it was
designed to make a safe space for the customer to interact with sellers directly and for the less educated
customers who could not use the internet.
13
By the better half of 2019 the jumia app was already operating in several African countries including
Kenya, Nigeria, Egypt and Uganda among others. In Kenya the jumia app is the most popular online
shopping platform in the country. And the company is the first tech unicorn in Africa as a whole.
Jumia Food is a convenient way for ordering and delivery of ready-made food and raw materials direct
from vendors. The application connects you to many options to choose from. Orders are delivered to
your doorsteps, offices or wherever you may be, to make orders all one needs is the Jumia Food App on
the phone, tablet or computer.
Features:
➢ When using the platform, you get ample time to decide what to get what you want
➢ It is easy to view your previous orders for easy and quick re-ordering
➢ Flexible payment methods.
➢ Developed with PHP and JavaScript
Drawbacks:
➢ The problem of having duplicate business Model: people criticize it for that because it adopts
business model of companies like eBay due to its link with Rocket Internet.
➢ Lack of adequate acknowledgement of the direct vendors on the platform.
➢ A lot of complains with system being down for a long period of time.
➢ Prioritize more on the ready-made food aspect.
2.4 Summary
The literature reviewed in this chapter helps to the conclusion that grocery shopping application using
the PHP and JavaScript language is a more common way to design compared to other languages.
Although they aren’t many existing grocery shopping applications here in Abuja, the few that are
available still help in shaping the industry as we know it even though they are still some
14
improvements to be made to really make the industry to be of high standards. Even though customers
are not trusting at first to buy products from new and upcoming businesses some still have an open
mind to trying new things that are for their best interest and that’ll make their life easier. That being
said developing the software as a web application will be the best approach at the moment in terms of
easy access and extra functionalities and also using PHP and JavaScript as the best programming
language for this project’s development.
CHAPTER 3: REQUIREMENTS ANALYSIS AND DESIGN
3.1 Overview
This chapter is based on the requirement analysis and design that will be adopted over the course of
the development of this project. Section 3.2 will talk about the proposed development methodology
that will be used in carrying out the project. Section 3.3 will focus mainly on the approach of the
chosen methodology/methods, Section 3.4 consists of the tool and techniques that will be used. While
section 3.5 will be the ethical consideration, section 3.6 will be all the list of the requirement analysis
while 3.7 will consist of the functional and non- functional requirements section 3.8 will consist of the
system design and other analyst tools and lastly section 3.9 will now be the summary of the chapter.
3.2 Proposed Methodology
In this project two development methodologies will be used during the design process. Which are:
❖ The Waterfall development Methodology
❖ The Agile Development Methodology
❖
3.2.1 Waterfall Development Methodology Which is also called the linear-sequential life cycle model. In the waterfall model, each and every phase
must be completed in its entirety before the next phase can commence. In the end of each phase a review
15
Figure 3. 1: Tech Target (June, 2009)
takes place to determine if the said project is on the track and whether or not to continue or discard the
project. It is straight forward and ease to operate. A figure below shows the rapid prototyping model of
the waterfall methodology (Tutorials 2018).
The water fall methodology is used because from inception of the project, everything goes with a flow.
All the components are arranged and will be gotten one after the other but to certain extent, it might
reach to the point where some unknown components may arise, hence the use of the Agile Methodology.
3.3.2 Agile Development Methodology
Agile is a software development methodology which is used to build software incrementally using short
iterations of 1 to 4 weeks so that the development process is aligned with the changing business needs.
16
Figure 3. 2: Agile Method (Google, 2020)
Instead of a single development process of 6 to 18 months where all the requirements and risk are
predicted upfront, Agile method adopts the process of frequent feedback where a workable product is
delivered after 1 to 4 weeks iteration. A figure below shows the rapid prototyping model of the agile
Methodology (Tutorials 2018).
Agile Methodology will be used on this project because there are some unknown components which will
require a trial-and-error type of approach. This project has to be tested multiple times until a desired
result is achieved. That’s why the use of the Agile Method is important here.
3.3 Approach to Chosen Methodology/Methods
The waterfall design approach is one of the oldest and frequently used approach in SDLC Model in
software Engineering to ensure success of a project. In Waterfall approach the whole process of the
software development is categorized into several phases. Sub sequentially in this project the waterfall
model is used in the same manner, the outcome of one phase triggers the next phase sequentially.
Agile methodology is an iterative, team-based approach in software development. This approach usually
involves a rapid delivery of an application in complete functional components. Instead of creating tasks
and schedules, it categorizes all time as “time-boxed” and put into phases called “sprints”. Each sprint
17
has a defined duration (usually in weeks) with a running list deliverable, planned at the start of the
sprint. Deliverables are prioritized by business value as determined by the customer. If all the planned
work for the sprint cannot be completed, work is reprioritized and the information is used for future
sprint planning (Tutorials, 2018).
3.3.1 WATERFALL METHODOLOGY APPROACH
Requirement and analysis: All of the possible requirements of the system will be captured in this
phase and documented in the required specified document. In this phase, investigations of how the
current system is and its limitations will be analyzed, then an improvement will be set in place.
System Design: all the finding from the first phase will be examined and studied in the phase and the
system design is prepared. The system design helps in specifying hardware and system requirements that
help in defining the overall system architecture.
Implementation: In the implementation phase the most important functions are carried out here. With
inputs from the system design, the system will first be developed in small programs called units, which
will then be integrated in the next phase. Each unit will then be developed and tested for its functionality
which is referred to as Unit Testing. Skills and proper training are vital therefor, documentation of the
system will be developed as it is implemented.
Integration and Testing: In this stage, unit testing will be conducted. All the unit developed in the
implementation phase are integrated into a system after testing of each unit. After the integration stage
the entire system is tested for any faults and failures.
18
Development of System: This only comes when all the prior phases have been executed, once the
functional and non-functional testing is done, the product is deployed to the client or released into the
market.
Maintenance: After the development phase, there might still be some issues that will come up from the
client environment. To fix those issues, patched are released. Also, to enhance the product some better
versions can be released. Plus, maintenance is done to deliver these changes in the customer
environment.
Advantages of the waterfall model:
❖ Simple and easy to understand and use.
❖ Clearly defined stages.
❖ Process and results are well documented.
❖ Easy to manage due to the rigidity of the model- each phase has specific deliverable and review
process.
❖ Well understood milestones.
Disadvantages of the waterfall Model:
❖ Not suitable for the projects where requirements are at a moderate to high risk of changing.
So, risk and uncertainty are high with this process model.
❖ No working software is produced until late during the life cycle.
❖ Not a good model for complex and object-oriented projects.
❖ High amount of risk and uncertainty.
3.3.2 AGILE METHODOLOGY APPROACH Concept: Project are envisioned and prioritized.
Inception: Team member are identified, funding is put in place, and initial environments and
requirements are discussed.
19
Iteration/Construction: The development team works to deliver a working software based on the
iteration requirements and feedback gotten.
Release: Quality Assurance testing, internal and external training, documentation development, and
final release of the iteration into production.
Production: Ongoing support of the software.
Retirement: End-of-life activities, including customer notification and migration.
Advantages of Agile Methodology
❖ Development is often more user-focused, likely a result of more and frequent direction from
the customer.
❖ There is overall less risk since the project output is reviewed along the way equally, it saves
more money and time from unnecessary expenditures, because providing value for user will
be prioritized.
❖ Dividing into sprints gives the team the opportunity to focus on the individual stages and
work faster.
Disadvantages of Agile Methodology
❖ The approach may seem simple but in reality, is very hard to execute. It requires commitment
and for everyone to be on the same page, ideally in the same physical space.
❖ Agile works best when members of the development team are completely dedicated to the
project.
20
❖ A high level of interaction between the clients and developers is required, which can take
time and make the process difficult.
3.4 Tools and Techniques
These are the resources and techniques that will be adopted over the course of the project’s development
life cycle. In this system the user requirement is PC with standard configuration and other computing
devices.
3.4.1 Hardware Requirement ❖ Core i3 processor
❖ A laptop/Desktop
❖ Keyboard & Mouse
❖ 2GB RAM or higher
❖ Minimum of 200GB Hard Disk
❖ DVDRW/ROM
3.4.2 Software Requirement ❖ Windows 8 and above
❖ Office 2013 and above
❖ Database Administrator
❖ Microsoft project.
21
3.5 Ethical Consideration
All sources will be acknowledged and mentioned during the development of the software;
credit will be given to all sources. Other people’s ideas will not be stolen, instead the
project will be developed and then worked on until an optimal solution is gotten. No
fraudulent activity will be conducted over the course of this project development and all
words will be kept. Everyone involved in the development of the project will be serious
minded and will hold up his/her end of the bargain. The software will be developed and
delivered on time using legal steps and procedures. Insolence and unethical behaviors
shall not be tolerated.
3.6 Requirement Analysis
The process of requirements analysis was mainly through:
❖ Research: which includes reading papers (mostly articles published), watching videos and
surfing the internet for valid information.
❖ Interviews (focus groups): includes discussion with traditional market vendors and getting more
information from them and new ideas on how the said system should operate and look like.
❖ Observation: Other grocery shopping applications were looked at and analyzed to have a better
understanding of the said project.
Requirement Analysis also called Requirement Engineering is the process of determining
user expectations for a new or modified product. It involves frequent communication with
system users. It is a process that involves all the activities required to create and maintain
system requirements documentation.
The essential principles for requirement engineering activities are:
❖ Understand the problem: the problems that user of OHRS may face are to be found
out and should be solved. This can be done by performing the data gathering
techniques like questionnaire, interviews, observation, etc.
❖ Modelling and analyzing the problem: Structured analysis is used as the modelling
technique which helps in analyzing the problems found in OHRS.
❖ Requirement validation: Requirement conflict, negotiations can be solved
because users of OHRS may be of different background.
22
❖ Requirement management: in the early phases of requirement analysis, requirements continue to
evolve software development phase, so there is a need to manage the changes as the problem
evolves.
❖ Communication problem: the project managers of OHRS are required to establish
information between the customer and the developer which is achieved through
project specification, documentation and review meetings of the developer’s team.
3.6.1 Responsibility Matrix This identifies the individuals or department roles that will be assigned certain categories of activities
and also defines the extent of responsibility and relationship among groups. The following table will
illustrate the main responsibilities of the project and responsibility of each holder.
Table 3.1: Responsibility Matrix Member Position Responsibility
Mr. Ukasha Usman Project Manager Manages the project
Mr. Ukasha Usman System Analyst Determines the actual
requirement of the system
Mr. Ukasha Usman Programmer Writes the codes of the
project
Mr. Ukasha Usman Database Administrator Design and implement the
database
Mr. Ukasha Usman Software Tester Test the entire system to
ensure free bugs
Mr. Ukasha Usman Graphic Designer Design graphical component
3.6.2 Fact Finding Techniques Interviews (Focus groups), here discussions took place with a group of traditional groceries vendors
where ideas were gotten on how the system should look like and how it should be operated. The
approach to use interview is one of the common techniques that is used in gathering data and or
information. To get a good result both parties must conduct themselves and the questions must relate to
23
the topic and clear to the interviewers so the questions can be understood easily by them. Selecting the
right people for the interview can also help in providing important and accurate information about the
system.
Reasons for interview (Focus groups):
❖ Obtain sensitive issues that or privilege information that the participant may not be willing to
write.
❖ To obtain responses that cannot be observed through predefined questionnaire responses.
❖ To get detailed information.
❖ To have better understanding of the problems faced by the traditional grocery seller. Majority of
the traditional grocery sellers are not literate, therefore conversing with them was the most
effective way of obtaining information regarding this project.
Observation: During this phase, other grocery trader applications were analyzed in order to understand
the project better. During the development of this project, similar auto trader applications were observed
to get a better understanding of the project and to be familiar with the system in its entirety.
3.7 Requirements Specifications
3.7.1 Functional Requirement Specifications
Table 3.2: Functional Requirement Specifications
Req.
No.
Description Type
R-01 The server should be compatible with all android and IOS devices Functional
R-02 The application should include a user-friendly interface Functional
R-03 A Search Box where user and search for items Functional
24
R-04 The Admin shall be able to upload, delete view and edit available
products.
Functional
R-05 The Admin shall be able to add and delete both customers and sellers Functional
R-06 The system should have a Login page and sign-up page which will
allow users to login or create an account.
Functional
R-07 The admin shall be able to login with admin details Functional
R-08 The Admin should be able to receive feedback from users Functional
R-09 The system shall have About Us, Services, Login, On Demand
Register and Contact section in the home page.
Functional
R-010 The user shall be able to buy any type of product Functional
R-011 The buyers shall be able to buy from any seller after login Functional
R-012 The users shall be able to logout Functional
R-013 The application should allow the buyers to contact the seller for more
information and bargains on products.
Functional
R-014 The Seller can upload, delete view and edit his/her products. Functional
R-015 The user shall be able to update their account even after registration. Functional
R-16 The customer shall be able to see recent vendors which he has
previously purchased product from with their prices.
Functional
Table 3.3 Non-Functional Requirement Specifications
Req.
No.
Description Type
R-101 When launched, the app should stay running unless there is an
intentional shutdown of the application or the platform.
Performance
R-102 The system should have a feedback box which will allow the users
to see feedback to admin of the system.
Quality
R-103 The system should show the transaction History of the user for
security purposes.
Security
25
R-104 The system should have a social media link that will allow user t
share product via social media.
Performance
3.8 System Design
This chapter depicts the system design and unified modelling language (UML). Several UML diagrams
were adopted over the course of development process such as the Data Flow Diagram, Application
Architecture, Entity Relation Diagram and Sequence Diagram.
3.8.1 Application Architecture
26
Figure 3. 3: Application Architecture for Homepage
27
Figure 3. 5: Application Architecture for Seller Page
Figure 3. 6: Application Architecture for Customer Page
Figure 3. 4: Application Architecture for Admin Page
28
Figure 3. 7: Application Architecture for finding a vendor
3.8.2 Use Case
29
Figure 3. 8: Use Case diagram
30
Figure 3. 9: Sequence Diagram
3.8.3 Sequence Diagram
3.8.4 Dataflow Diagram
31
Figure 3. 10: Dataflow Diagram level 0
32
Figure 3. 11: Dataflow Diagram level 1
33
Figure 3. 12: Entity Relationship Diagram
3.8.5 Entity-Relationship Diagram (ERD)
34
3.9 Summary
This chapter contains the system design, the diagrammatic representation of the analyst tools. It is based
on the requirement analysis and design that will be adopted over the course of the development of this
project. It also has the proposed development methodology that will be used in carrying out this project,
approach to chosen methodology/methods, it also consists of the tool and techniques that will be used.
Its talks about the ethical consideration and the list of requirement analysis, functional and non-
functional requirements system design and other analyst tools such as Entity Relationship Diagram, use
case, sequence diagram, application architecture and dataflow diagram and finally section 3.9 will be the
summary of the chapter.
CHAPTER 4: IMPLEMENTATION AND TESTING
4.1 Overview
This chapter depicts how the project was implemented (Supreme Cars Auto Trades). It shows the
main features of the project, their implementation and purposes. Also, it shows the steps required to
use or work around the project, and understand the system process in its entirety. It also talks about
the project testing using different test environment and the results (expect result and returned result). It
also introduces the GUI that was implemented to make interaction more comfortable and user friendly
when users are surfing through the app.
4.2 Main Features
After firing up the application, the user surfs through the following interfaces to carry out their activities.
USER INTERFACE
35 Figure 4 1: Home
36
Figure 4 2: Cart Page
37
Figure 4 4: Admin Customer Update form Page
Figure 4 3: Registration Page
38
Figure 4 5: Admin Customer Update form Page
Figure 4 6: Available Product Page for a seller
39
Figure 4 7: Customer Profile Page
40
Figure 4 8: Recent Purchases History Page
Figure 4 9: User Account Update Form
41
Figure 4 10: Payment Page
42
Figure 4 12: Update Message Page
Figure 4 11: Add Product Page
43
Figure 4 13: About Page
4.3 Implementation Problems
The major problems face generally faced during the development of this project were Time and the
lack of adequate assistance, though my supervisor did their best but writing some of the codes was not
as easily expected and with the situation the world is in contacting my supervisors was an issue due to
network problems, time scheduling and so on. The project was implemented using Visual Studio Code
so not much problem rose from there. Also, during the implementation SQL syntaxes was giving
much problem, a new database connection had to be employed and executed. Also, any functionality
that are not met or may come up in later stages can be implemented in later versions.
44
4.4 Overcoming Implementation Problems
Time management to make use of all available resources to ensure the project has become successful
was applied. Also, all the SQL syntaxes need to make the project successful had to be redone twice
under a great deal of pressure
4.5 Testing
In this testing approach, the test data are usually derived from the specifications of the project and then
applied to test all the possible entries or combinations as input. Then, the actual result was then
compared with the expected result in each test case. If both results are the same then the test can be a
successful one. Meaning the programmer when conducting the test is more concerned with the actual
result produced by the program itself than the internet construct of the program. The online system is
very massive and well controlled which is why System testing was picked as the testing technique to aid
in simplifying the testing process and make a well documented result. The system consists of many web
pages and each page has many links and validations that make the system effective and efficient
therefore the use of System Testing was imperative. Such testing’s were also carried out like Unit
Testing and Integration testing etc.
4.5.1 Tests Plans (for Unit Testing, Integration Testing, and System Testing)
❖ During the implementation phase, bugs of different priority occurred. Some of these bugs were
minor while others halted the progression of the application. Testing was performed while
implementation was in progress.
❖ Unit testing was also performed: After each and every integration of a function of a line of
code, the application was built to check for exceptions.
45
❖ Integration Testing: Usually the entire application was constantly checked after a huge
integration (such as, addition of reminder component of the application).
❖ System testing was performed to test the system in its entirety.
Table 4.1: Test Plan Tree
S/N Customer 1. Customer can be able to register
2. Customer shall view all the vendors and their products
3. Customer can sell a his/her product
4. Customer has to login to have access to a vendor products
5. Customer can be able to login
6. Customer can be able to add product to his inventory
7. Customer can view all the available product from all the vendors
8. Customers can be able to perform CRUD functions on his products
9. Customer can be able to update his account information
10. Customers can buy a product.
Table 4.2: Test Plan Tree S/N Admin
11. Admin can add products
12. Admin can view all the orders done by the customers
13. Admin can perform CRUD functions on all customer
14. Admin can view customer information
15. Admin can perform CRUD function on all products
16. Admin can be able to login
4.5.2 Test Suite (for Unit Testing, Integration Testing, and System Testing)
46
Table 4.3 Test Suite Performed
Req. No. Description Type
R-101
When launched, the application shall stay running unless
there is an intentional shutdown of the application or the
platform.
Performance
4.5.3 Test Traceability Matrix
Table 4.4: Test Traceability Matrix
47
Figure 4 14: Incorrect Registration error Message
CASE 1
OBJECTIVES To test validation in Registration Page
TEST DATA Click on Registration
EXPECTED RESULT An error Massage
ACTUAL RESULT Is as below
CONCLUSION Successfully
48
Figure 4 15: Incorrect Login Information
CASE 2
OBJECTIVES To test validation in Login Page
TEST DATA Click on Submit
EXPECTED RESULT An error Massage
ACTUAL RESULT Is as below
CONCLUSION Successfully
49
Figure 4 16: Successful Registration of a new User
CASE 3
OBJECTIVES To Register a new User
TEST DATA Click on Submit
EXPECTED RESULT Successful Message
ACTUAL RESULT Is as below
CONCLUSION Successfully
50
Figure 4 17: Account update successful
CASE 3
OBJECTIVES To Update Account Information
TEST DATA Click on Update
EXPECTED RESULT Successful Message
ACTUAL RESULT Is as below
CONCLUSION Successfully
51
Figure 4 18: Adding a new product to the inventory
CASE 3
OBJECTIVES To Add a New Product
TEST DATA Click on Upload
EXPECTED RESULT Successful Message
ACTUAL RESULT Is as below
CONCLUSION Successfully
52
Figure 4 19: PAYSTACK connection test
CASE 3
OBJECTIVES To Validate PAYSTACK Connection
TEST DATA Click on Pay
EXPECTED RESULT Successful Message
ACTUAL RESULT Is as below
CONCLUSION Successfully
53
Figure 4 20: Successful Payment using PAYSTACK
CASE 3
OBJECTIVES To Validate Payment
TEST DATA Click on Pay
EXPECTED RESULT Successful Message
ACTUAL RESULT Is as below
CONCLUSION Successfully
54
4.5.4 Test Report Summary (for Unit Testing, Integration Testing, and System
Testing)
Table 4.5: Test Summary Report
No Test Performed Action
1. To test validation in Registration Page Pass
2. To Register a New User Pass
3 To verify cars are added to the inventory Pass
4. To change Password Pass
5. To add product Pass
6. To update Product information Pass
7. To update Users account Passs
8. To add product image Pass
9. To add user profile image Pass
10. Admin to CRUD Users information Pass
11. Admin to add product Pass
4.5.5 Error Reports and Corrections
No error report was detected in testing stage. All the test came out successful.
55
Figure 4 21: Install Visual Studio Code 2013 Above with Microsoft SQL Server
4.6 Use Guide
56
Figure 4 22: Open the Application Using Home of Groceries
57
Figure 4 23: Run the Application using Internet Explorer
Figure 4 24: Server Directory (Database)
58
Figure 4 25: Surf through the pages with solution Explorer
59
4.7 Summary
This chapter shows that overall implementation and testing of the project was carried out. It was a
success and a lot of issues were encountered during the test stage but was debugged and fixed
eventually. Therefore, so far, the testing was a success because the components and functionalities are
working fine.
CHAPTER 5: DISCUSSION, CONCLUSION, AND
RECOMMENDATIONS
5.1 Overview
This chapter consists of the achievement and objectives of the project which are outlined. It also
includes the limitations and challenges faced over the course of the project, both recommendation and
future enhancement that will be implemented in time are also stated.
5.2 Objective Assessment
The achievements of the whole project are:
• Skill on how software development is in real life.
• Important business and people skills where developed while gathering requirement.
• Ability to interpret and implement project to standard.
• Ability to develop Online Grocery Trader for Home of Groceries to this standard.
• A testing was done which 80% was successful.
• Acquired skills to develop and understand how web application works.
60
5.3 Limitations and Challenges
• Communication: Communication with traditional grocery vendors was not easy because a lot of them
were not aware of the online platform which they could take advantage of, therefor they were clueless.
And there’s limit to the amount of people you can contact at a time due to the novel COVID-19 virus,
social distancing has to be practiced.
• Performance: In the century, speed matters. A lot of JavaScript was incorporate in the project to make it a
lot faster.
• Trust: When explaining the application to a new user (i.e a market vendor) we always encounter the issue
of trust, before one can trust you with his/her account details you have to convince him. And have a
strong prof for him to even consider trusting you.
5.4 Future Enhancements
The application will have many features which will be implemented in its future versions, some of these
enhancements will increase security, some will make the application more user friendly and some will
help people in purchasing their grocery’s and much more.
Some future enhancements will include:
• The application will be able to have a deductive reasoning. Which means it will be able to interpret what a
customer will get based on his previous purchases.
• An application version will be released which will be compatible with IOS devises, Android OS,
Blackberry OS and Windows OS.
• The application will have a list of direct agents and their details. So that a customer can just pick a
number of an accredited agent and contact him for anything he might want.
5.5 Recommendations
The application in the future may require the use of credit card to allow payment, therefore SSL should
be used to allow safe and secure transactions and data transfer. Also, a feedback should be sent to report
complain or to enable user to give suggestions. Finally, all physical transaction should be carried out in
public places to avoid any illicit activities
61
5.6 Summary
Home of Groceries is a web application that allows vendors from the traditional market to showcase
their products to interested buyers. The application also allows vendors from all over the region to
register and post their products as well as business transactions. Although we still have some
improvements to implement, the core functionalities specified for the project has been achieved.
Alternatively, in the next phase of development, there are some additional functionalities to be added.
With enough time and resources features such as a more detailed search modal, product suggestions
deductive reasoning and other functionalities will be incorporated to make the application more
accessible and functional. Hopefully this application will help a lot of people.
62
REFERENCES
Tutorials P. (2016). TutorialsPoint simply easy learning. 1st ed. [ebook] p.1. Available at:
https://www.tutorialspoint.com/agile/agile_tutorial.pdf (Accessed on 15/12/2020).
Wikipedia. (2020). wikipedia [Online] Available at: https://en.wikipedia.org/wiki/Legacy_system
(Accessed on 10/12/2020).
Fresh, C (2020) Fresh Direct [Online]. Available at: https:.//
https://www.freshdirect.com/browse.jsp?id=about_overview (Accessed on 10/12/2020 ).
Jumia (2020). Jumia [Online] Available at: https://www.jumia.com.ng (Accessed on 20/12/2020).
Jumia unifies Jovago, Kaymu, Carmudi, others (June 23, 2016) Available at:
https://www.premiumtimesng.com/business/business-news/205835-jumia-unifies-jovago-kaymu-
carmudi-others.html (Accessed On 10/12/2020).
10 FMCG trends to watch out for in 2018, (2018) Available at:
https://www.onespace.com/blog/2018/10/online-grocery-lessons-history/ (Accessed on 10/01/2021).
ASHLEY ROSS. (September 2016). The Surprising Way a Supermarket Changed the World [Online]
Available at: https://time.com/4480303/supermarkets-history/ (Accessed on 08/01/2021).
Wikipedia. (2020). Wikipedia [Online] Available at: https://en.wikipedia.org/wiki/Jumia_Group
(Accessed On 28/12/2020).
63
64
APPENDICES
ADMIN (LOGIN INTERFACE CODE)
<?php
session_start();
include ("header.php");
include ("../connect.php");
if(isset($_POST["btn_submit"])){
$usrN= $_POST['user'];
$Password= $_POST['pswd'];
echo $usrN." ".$Password;
$mysqlquery="SELECT * FROM `super_admin` where user= '$usrN' AND pswd ='$Password'";
$result = $conn->query($mysqlquery);
if ($row=$result->fetch_assoc()){
// Redirect to seller dashboard page
$Vemail=$row['Email'];
$Vpass=$row['password'];
if($Vemail =! $Email || $Vpass != $Password){
echo " wrong password or email"; ?>
<script> alert( "wrong password or email"); </script>
<?php
}
else
{
$_SESSION['user_name'] = $usrN;
// Redirect to user dashboard page
header("Location: home.php");
65
} else {
echo "<div class='form'>
<h3>Incorrect Username/password.</h3><br/>
<p class='link'>Click here to <a href='login.php'>Login</a> again.</p>
</div>";
}
}
else {
//echo $conn->error();
}
?>
<div class="card-header py-3">
<h3 align= "center" class="m-0 font-weight-bold text-primary">Admin Login</h3>
</div>
<div class= "container">
<form method= "post">
<input type= "text" name= "Email" class= "form-
control" placeholder= "Enter your Email: "/>
<input type= "password" name= "password" class= "form-
control" placeholder= "Enter your password: "/>
<input type= "submit" name= "btn_submit" class="btn btn-primary" value= "submit"/>
</form>
</div>
<?php include ("footer.php");?>
66
ADMIN (INDEX PAGE SOURCE CODE)
<!DOCTYPE html>
<html lang="en">
<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="">
<title>Admin</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-
free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i
,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-
dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-
center" href="home.php">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-laugh-wink"></i>
</div>
<div class="sidebar-brand-text mx-3"> Admin Profile </div>
</a>
<!-- Divider -->
67
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<li class="nav-item active">
<a class="nav-link" href="home.php">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<!-- Heading -->
<div class="sidebar-heading">
Controls
</div>
<!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item">
<a class="nav-link" href="Orders.php">
<i class="fas fa-fw fa-shopping-cart"></i>
<span>orders</span>
</a>
<li class="nav-item">
<a class="nav-link collapsed" href="index.php" data-toggle="collapse" data-
target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
<i class="fas fa-fw fa-cog"></i>
<span>Functions</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-
parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Add Functions:</h6>
<a class="collapse-item" href="addSeller.php">Add Seller</a>
<a class="collapse-item" href="deleteSeller.php">Delete Seller</a>
<a class="collapse-item" href= "delete_customer.php">Delete Customer </a>
<a class="collapse-
item" href= "Message_center.php">Update Message center </a>
</div>
</div>
</li>
<!-- Nav Item - Utilities Collapse Menu -->
<li class="nav-item">
68
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-
target="#collapseUtilities" aria-expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-wrench"></i>
<span>Utilities</span>
</a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<!-- Heading -->
<div class="sidebar-heading">
Addons
</div>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<?php include ("header.php");?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.hero-image {
background-image: url("img/hog_logo.png");
background-color: #cccccc;
69
height: 600px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
</style>
</head>
<body>
<div class="hero-image">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-
top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-
circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Search -->
<form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-
0 mw-100 navbar-search">
<div class="input-group">
<input type="text" class="form-control bg-light border-
0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-
addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</div>
</form>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
70
<!-- Nav Item - Search Dropdown (Visible Only XS) -->
<li class="nav-item dropdown no-arrow d-sm-none">
<a class="nav-link dropdown-
toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
<i class="fas fa-search fa-fw"></i>
</a>
<!-- Dropdown - Messages -->
<div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-
in" aria-labelledby="searchDropdown">
<form class="form-inline mr-auto w-100 navbar-search">
<div class="input-group">
<input type="text" class="form-control bg-light border-
0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-
addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</div>
</form>
</div>
</li>
<!-- Nav Item - Alerts -->
<li class="nav-item dropdown no-arrow mx-1">
<a class="nav-link dropdown-
toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
<i class="fas fa-bell fa-fw"></i>
<!-- Counter - Alerts -->
<span class="badge badge-danger badge-counter">0+</span>
</a>
<!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-
right shadow animated--grow-in" aria-labelledby="alertsDropdown">
<h6 class="dropdown-header">
Alerts Center
</h6>
<!-- Nav Item - Messages -->
<li class="nav-item dropdown no-arrow mx-1">
71
<a class="nav-link dropdown-
toggle" href="orders.php" id="messagesDropdown" role="button" data-
toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-envelope fa-fw"></i>
<!-- Counter - Messages -->
<span class="badge badge-danger badge-counter">0</span>
</a>
<!-- Dropdown - Messages -->
<div class="dropdown-list dropdown-menu dropdown-menu-
right shadow animated--grow-in" aria-labelledby="messagesDropdown">
<h6 class="dropdown-header">
Message Center
</h6>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-
toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-
600 small">Admin Profile</span>
</a>
<!-- Dropdown - User Information -->
<!--<div class="dropdown-menu dropdown-menu-right shadow animated--grow-
in" aria-labelledby="userDropdown">
<a class="dropdown-item" href="#">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Profile
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
Settings
</a>
<a class="dropdown-item" href="#">
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
Activity Log
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-
target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
72
</a>
</div>-->
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1>
<!--<a href="#" class="d-none d-sm-inline-block btn btn-sm btn-
primary shadow-sm"><i class="fas fa-download fa-sm text-white-
50"></i> Generate Report</a>
-->
</div>
</div>
</div>
</body>
</html>
USER (LOGIN MODAL USER INTERFACE CODE)
<?php
session_start();
include ("header.php");
include ("connect.php");
if(isset($_POST["btn_submit"])){
$Email= $_POST['Email'];
$Password= $_POST['password'];
73
echo $Email." ".$Password;
$query = "SELECT * FROM `seller` WHERE Email='$Email' AND password='$Password'";
$result = $conn->query($query);
if ($row=$result->fetch_assoc()){
// Redirect to seller dashboard page
$Vemail=$row['Email'];
$Vpass=$row['password'];
if($Vemail =! $Email || $Vpass != $Password){
echo " wrong password or email"; ?>
<script> alert( "wrong password or email"); </script>
<?php
}
else
{
$_SESSION['Email'] = $Email;
// Redirect to user dashboard page
header("Location: seller-page");
}
}
else{
?>
<script> alert( "User not found in the database"); </script>
<?php
"User not found in the database";
echo $conn->error;
}}
74
?>
<div class="card-header py-3">
<h3 align= "center" class="m-0 font-weight-bold text-primary">Seller Login</h3>
</div>
<div class= "container">
<form method= "post">
<input type= "Email" name= "Email" class= "form-
control" placeholder= "Enter your Email: "/>
<input type= "password" name= "password" class= "form-
control" placeholder= "Enter your password: "/>
<input type= "submit" name= "btn_submit" class="btn btn-primary" value= "submit"/>
<a href="Registration.php" class="btn btn-
info" role="button">Registration</a>
</form>
</div>
<?php include ("footer.php");?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>HOG</title>
75
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/shop-homepage.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/boot
strap.min.css" integrity="sha384-
Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymou
s">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-
KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymou
s"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-
ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymou
s"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integ
rity="sha384-
JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymou
s"></script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-
brand" href="index.php"><img src="img/h_logo.png" style="width:150px; height:40px" /></
a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-
label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Home
<span class="sr-only">(current)</span>
76
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="About.php">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="services.php">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.php">Log in</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Contact.php">Contact</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="customer-page">Profile</a>
</li>
</li>-->
</ul>
</div>
</div>
</nav>
USER (REGISTERATION MODAL USER INTERFACE) <?php include ("connect.php") ;
include ("header.php") ?>
<?php
if(isset($_POST["btn_submit"])){
$firstname =$_POST['firstName'];
$lastname =$_POST['lastName'];
$Address =$_POST['address'];
$phone= $_POST['PhoneNumber'];
$Email= $_POST['Email'];
$Password= $_POST['password'];
$userName = $_POST['UserName'];
77
$sqlquery="insert into customer(first_Name, last_Name, cus_Email, address, password, ph
one_num, user_name) values ('$firstname','$lastname','$Email', '$Address', '$Password',
'$phone', '$userName')";
$res =$conn -> query($sqlquery);
if($res != null){
echo "<script>alert('Registration Successful')</script>";
}
else{
echo mysqli_error($conn)."<script>alert('Opps, Please Try Again')</script>";
}
}
?>
<div class="card-header py-3">
<h3 class="m-0 font-weight-bold text-primary">Customer Registration Page</h3>
</div>
<div class= "container">
<form method= "post">
<input type= "text" name= "firstName" class= "form-
control" placeholder= "Enter first Name: "/>
<input type= "text" name= "lastName" class= "form-
control" placeholder= "Enter Last Name: "/>
<input type= "text" name= "address" class= "form-
control" placeholder= "Enter your address: "/>
<input type= "phone" name= "PhoneNumber" class= "form-
control" placeholder= "Enter your phone Number: "/>
<input type= "Email" name= "Email" class= "form-
control" placeholder= "Enter your Email: "/>
<input type= "password" name= "password" class= "form-
control" placeholder= "Enter your password: "/>
<input type= "text" name= "UserName" class= "form-
control" placeholder= "Enter your User Name: "/>
<input type= "submit" name= "btn_submit" class="btn btn-primary" value= "submit"/>
</form>
78
</div>
<?php include ("footer.php");?>
USER (FIND PRODUCT USER INTERFACE CODE)
<?php
session_start();
include ("connect.php");
include ("header.2.php");
$id =$_SESSION['cus_Email'];
//$s_id= $_SESSION['Email'];
if (!isset($id)){
header("location: login.php ");
}
$catid=$_GET['id'];
$transid=$_GET['name'];
if(isset($transid)){
$total=$_SESSION['totalprice'];
$mysqlq="insert into orders (order_id, order_description,total_price_paid) values ('$tr
ansid','$id','$total')";
$res =$conn ->query($mysqlq);
}
if($res != null){
echo "<script>alert('Paid Successful')</script>";
79
header("Location:home.php");
}
else{
echo mysqli_error($conn);
}
require_once("dbcontroller.php");
$db_handle = new DBController();
if(!empty($_GET["action"])) {
switch($_GET["action"]) {
case "add":
if(!empty($_POST["quantity"])) {
$productByCode = $db_handle-
>runQuery("SELECT * FROM tblproduct where code='" . $_GET["code"] . "'");
$itemArray = array($productByCode[0]["code"]=>array('name'=>$productByCode[
0]["name"], 'code'=>$productByCode[0]["code"], 'quantity'=>$_POST["quantity"], 'price'=
>$productByCode[0]["price"], 'image'=>$productByCode[0]["image"]));
if(!empty($_SESSION["cart_item"])) {
if(in_array($productByCode[0]["code"],array_keys($_SESSION["cart_item"]
))) {
foreach($_SESSION["cart_item"] as $k => $v) {
if($productByCode[0]["code"] == $k) {
if(empty($_SESSION["cart_item"][$k]["quantity"])) {
$_SESSION["cart_item"][$k]["quantity"] = 0;
}
$_SESSION["cart_item"][$k]["quantity"] += $_POST["quant
ity"];
}
}
} else {
$_SESSION["cart_item"] = array_merge($_SESSION["cart_item"],$itemAr
ray);
}
} else {
$_SESSION["cart_item"] = $itemArray;
}
}
break;
case "remove":
if(!empty($_SESSION["cart_item"])) {
80
foreach($_SESSION["cart_item"] as $k => $v) {
if($_GET["code"] == $k)
unset($_SESSION["cart_item"][$k]);
if(empty($_SESSION["cart_item"]))
unset($_SESSION["cart_item"]);
}
}
break;
case "empty":
unset($_SESSION["cart_item"]);
break;
}
}
?>
<HTML>
<HEAD>
<TITLE>H O G</TITLE>
<link href="style.css" type="text/css" rel="stylesheet" />
</HEAD>
<BODY>
<div id="shopping-cart">
<div class="txt-heading">Shopping Cart</div>
<a id="btnEmpty" href="cart_index.php?action=empty">Empty Cart</a>
<?php
if(isset($_SESSION["cart_item"])){
$total_quantity = 0;
$total_price = 0;
?>
<table class="tbl-cart" cellpadding="10" cellspacing="1">
<tbody>
<tr>
<th style="text-align:left;">Name</th>
<th style="text-align:left;">Code</th>
<th style="text-align:right;" width="5%">Quantity</th>
<th style="text-align:right;" width="10%">Unit Price</th>
<th style="text-align:right;" width="10%">Price</th>
<th style="text-align:center;" width="5%">Remove</th>
</tr>
<form method = "POST">
<script src="https://js.paystack.co/v1/inline.js"></script>
81
<button type="button" onclick="payWithPaystack()"> Pay </button>
</form>
<?php
foreach ($_SESSION["cart_item"] as $item){
$item_price = $item["quantity"]*$item["price"];
?>
<tr>
<td><img src="<?php echo substr($item["image"],3); ?>" style="width:100
px; height:100px;" /><?php echo $item["name"]; ?></td>
<td><?php echo $item["code"]; ?></td>
<td style="text-align:right;"><?php echo $item["quantity"]; ?></td>
<td style="text-align:right;"><?php echo "₦".$item["price"]; ?></td>
<td style="text-
align:right;"><?php echo "₦ ". number_format($item_price,2); ?></td>
<td style="text-
align:center;"><a href="cart_index.php?action=remove&code=<?php echo $item["code"]; ?>"
class="btnRemoveAction"><img src="img/trash.png" alt="Remove Item" style="width:30px;
height:30px" /></a></td>
</tr>
<?php
//$code = $item["code"];
$total_quantity += $item["quantity"];
$total_price += ($item["price"]*$item["quantity"]);
}
?>
<tr>
<td colspan="2" align="right">Total:</td>
<td align="right"><?php echo $total_quantity; ?></td>
<td align="right" colspan="2"><strong><?php echo "₦ ".$total_price; ?></strong></td>
<td><?php $totalprice=$total_price*100;
$_SESSION['totalprice']=$total_price;
?></td>
</tr>
</tbody>
</table>
<?php
} else {
?>
<div class="no-records">Your Cart is Empty</div>
82
<?php
}
?>
</div>
<div id="product-grid">
<div class="txt-heading">Products</div>
<?php
$product_array = $db_handle-
>runQuery("SELECT * FROM tblproduct where category ='$catid'
ORDER BY id ASC");
if (!empty($product_array)) {
foreach($product_array as $key=>$value){
$imgpath=$product_array[$key]["image"];
?>
<div class="product-item">
<form method="post" action="cart_index.php?action=add&code=<?php echo $prod
uct_array[$key]["code"]; ?>">
<div class="product-
image"><img src="<?php echo substr($imgpath,3); ?>"style="width:200px; height:150px;">
</div>
<div class="product-tile-footer">
<div class="product-
title"><?php echo $product_array[$key]["name"]; ?></div>
<div class="product-
price"><?php echo "₦".$product_array[$key]["price"]; ?></div>
<div class="cart-action"><input type="text" class="product-
quantity" name="quantity" value="1" size="2" /><input type="submit" value="Add to Cart"
class="btnAddAction" /></div>
</form>
</div>
</BODY>
</HTML>
</div>
</div>
</div>
<!-- /.row -->
83
</div>
<!-- /.col-lg-9 -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<?php
}
}
?>
<!-- place below the html form -->
<script>
function payWithPaystack(){
var price= "<?php echo $totalprice; ?>";
var handler = PaystackPop.setup({
key: 'pk_test_ac1970a73dba86a6fc2de971b231ef025e137004',
email: '[email protected]',
amount: price,
ref: ''+Math.floor((Math.random() * 1000000000) + 1), // generates a pseudo-
unique reference. Please replace with a reference you generated. Or remove the line ent
irely so our API will generate one for you
metadata: {
custom_fields: [
{
display_name: "Mobile Number",
variable_name: "mobile_number",
value: "+2348012345678"
}
]
},
callback: function(response){
alert('success. transaction ref is ' + response.reference);
var javascriptVariable = response.reference;
window.location.href = "cart_index.php?name="+ javascriptVariable+"& action=empty";
},
84
onClose: function(){
alert('window closed');
}
});
handler.openIframe();
}
</script>
<?php include ("footer.php");?>
USER (HOMEPAGE INTERFACE CODE)
<?php session_start();
if($_SESSION['cus_Email'] != null){
echo "hello Mr".$_SESSION['cus_Email']
;
}
?>
<div align= "left" id="carouselExampleIndicators" class="carousel slide" data-
ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img style="width:500px;height:450px" class="d-block w-
100"src="img/sellerimg.jpg" alt="First slide">
</div>
<div class="carousel-item">
85
<img class="d-block w-
100" style="width:500px;height:450px" src="img/apple.jpg" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-
100" style="width:500px;height:450px" src="img/customerimg.jpg" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-
slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-
slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<?php
include ("connect.php");
include ("header.2.php"); ?>
<div class="container">
<div class="jumbotron" content="width=device-width, initial-scale=1">
<h1 align= "center" class="display-4">Home Of Groceries</h1>
<p align= "center" class="lead">Your No.1 stop for fresh and cheap Groceries</p>
<hr class="my-4">
<form align= "center" action="SearchByState.php" method="POST">
<select name="states_of_nigeria" id="select">
<option>Pick a state</option>
<option>ABUJA FCT</option>
86
<option>ABIA</option>
<option>ADAMAWA</option>
<option>AKWA IBOM</option>
<option>ANAMBRA</option>
<option>BAUCHI</option>
<option>BAYELSA</option>
<option>BENUE</option>
<option>BORNO</option>
<option>CROSS RIVER</option>
<option>DELTA</option>
<option>EBONYI</option>
<option>EDO</option>
<option>EKITI</option>
<option>ENUGU</option>
<option>GOMBE</option>
<option>IMO</option>
<option>JIGAWA</option>
<option>KADUNA</option>
<option>KANO</option>
<option>KATSINA</option>
<option>KEBBI</option>
<option>KOGI</option>
<option>KWARA</option>
<option>LAGOS</option>
<option>NASSARAWA</option>
<option>NIGER</option>
<option>OGUN</option>
<option>ONDO</option>
<option>OSUN</option>
<option>OYO</option>
<option>PLATEAU</option>
<option>RIVERS</option>
<option>SOKOTO</option>
<option>TARABA</option>
<option>YOBE</option>
<option>ZAMFARA</option>
</select>
<input type="submit" name = "btn-search2" class="btn btn-info" value="Search"/>
</form>
87
<form class="form-
control" align= "center" action="SearchByUser.php" method= "POST" >
<div class="input-group">
<input type="text" name="txt_search" class="form-control bg-light border-
0 small" placeholder="Search a user...." aria-label="Search" aria-describedby="basic-
addon1">
<div class="input-group-append">
<input name="btn-search" type="submit" class="btn btn-info" value="Search" />
</div>
</div>
</form>
</div>
<p class="lead">
<a class="btn btn-primary btn-lg" href="Contact.php" role="button">Direct Agent</a>
</p>
<?php
$sqlq="select DISTINCT category from tblproduct";
$res =$conn -> query($sqlq);
while($rows = $res->fetch_assoc()){
?>
<a href="cart_sort.php?id=<?php echo $rows['category']; ?>" class="list-group-
item"><?php echo $rows['category']; ?></a>
<?php
}
?>
<div class="row">
<?php
$sqlselect="select * from seller";
88
$result =$conn -> query($sqlselect);
while($rows = $result->fetch_assoc()){
?>
<div class="col-lg-4 col-md-5 mb-3">
<div class="card h-70">
<a href="cart_index.php?id="><img class="card-img-top img-
circle" style="height:250px;" src ='<?php echo $rows['Profile_pic'];?>' ></a>
<div class="card-body">
<h4 class="card-title">
<a href="cart_index.php?id=<?php echo $rows['user_name']; ?>" class="btn btn-
danger" role="button"> <?php echo $rows['user_name'];?></a>
</h4>
<h4> <?php echo $rows['description'];?></h4>
*<h8><?php echo $rows['address'];?></h8>
<p class="card-text">*<?php echo $rows['phone_num'];?>!</p>
</div>
<div class="card-footer">
<small class="text-muted">★ ★ ★ ☆ ☆</small>
</div>
</div>
</div>
<?php
}
?>
</div>
<!-- /.row -->
</div>
<!-- /.col-lg-9 -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
</div>
89
<marquee class="primary">
<?php
$sqlselect="select * from updates";
$res =$conn -> query($sqlselect);
while($rows = $res->fetch_assoc()){
?>
<?php echo $rows['Message']."| ";}?></marquee>
<?php include ("footer.php");?>
90
91