Project Report (E-Commerce)

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

SCHOOL OF ENG.

AND TECHNOLOGY
DEPATMENT OF COMPUTER SCIENCE ENGINEERING AND IT

PROJECT REPORT
ON
E-COMMERCE SHOPING WEBSITE

SUBMITTED BY: SUBMITTED TO:


Sonu Kumar Mrs. Sonali Mathur
Abodh Kumar
5th Sem

ABSTRACT
The thesis aimed to develop an online shop using open-source technologies (PHP,
HTML, CSS, JavaScript, MySQL and Apache Web Server) for electronics products in
Ghana where customers will be able to buy products online.
The designed application will have an admin view and the public or guest view. The
admin view is meant for the administrator to update the products, change prices,
remove and add products and also manage customers. The customer view will be
accessible to the customers, and they will be able to handle their information such as
their name, ad- dress, and contact. Also, the customer will be able to order for products
from the shop.

CONTENTS
1.INTRODUCTION
2.TOOLS AND TECHNOLOGIES
a) PHP
b) CSS
c) JAVASCRIPT
d) MySQL
e) XAMPP
f) PhpMyAdmin
3.APPLICATION AND DESCRIPTION
4.DATABASE GUI DESIGN
a) Database
b) Customer Interface layout
c) Management Interface design
5.IMPLEMENTATION
a) Description
b) Implementation of functions
6.TESTING
a) Testing shopping cart
b) Customer checking out
7.CONCLUSION

INTRODUCTION
E-commerce (electronic commerce or EC) is the buying and selling of goods and
services, or the transmitting of funds or data, over an electronic network, primarily the
internet. These business transactions occur either as business-to-business, business-
to- consumer, consumer-to-consumer or consumer-to-business.
E-commerce shops have become part of our daily lives. Technological advancement
has made it possible for people to sit in the convenience of their homes and still shop
online without going to a physical shop. Africans have also joined the trend of e-
commerce business, so this project is meant to design an eCommerce online shop so
that the people in Ghana (Africa)will be able to purchase their goods and services
online.
This project is mainly divided into two main categories: The Administrators and the
Customers/Users.
The store manager and the staff members operate as the administrators. They can add,
edit, update products or, delete products thus they able to change the names of
products, change prices and, add or remove products.
The customer can search for products selection, update the cart, remove products from
the cart and check out from the shop. The customer is also able to update his
information such as names, address and other data.
The User is only able to browse the online shop and add a product to the cart. The user
is limited to the use of the shop.
This thesis contains eight chapters to explain the project. The first chapter introduces
the project; the second chapter defines the tools and technology used for the project,
and the third chapter describes the application and description of the process. The
fourth chapter represents the MVC layout, the fifth defines the database and the Gui
designs, the sixth chapter explains the implementation process, and the seventh
chapter describes the testing of the shop and its features, the eight chapter describes
the conclusion of the whole project. The ninth chapter illustrates possible future
improvement to the shop.

TOOLS AND TECHNOLOGIES


These are the necessary tools and materials needed to build the website both the front-
end and the back-end. These include software and open source materials.

PHP
PHP is a server-side scripting language that is used to develop Static websites or
Dynamic websites or Web applications. It is designed for web development to
implement dynamic web pages and can be embedded into HTML for it to be displayed.
Figure 2 demonstrates how the web server operates.
Figure 2: Demonstrating how the web server Operates using PHP

CSS
CSS is simply referred to as Cascading Style Sheets.CSS is used to define styles for
web pages, including the design, layout, and variations in the display for different de-
vices and screen sizes.
The general structure of

CSS Basic syntax:

selector {property: value}

HTML tag you want to modify

the property you want to change

The value you want the property to take


Example:

p {text-align: center;
color: black;
font-family: arial}
CSS can be used in a separate style sheet or used in the webpage

<!DOCTYPE html>
<html lang=”en-US”>
<head>
<metacharset=”UTF-8”>
<link rel=”stylessheet” type=”text/css” href= “mystyle.css”/>
</head>
JAVASCRIPT
JavaScript is a high-level language which could be used independently or inculcated
into the webpage. It can be used to, handle requests and responses and also add
dynamic behavior and also store information on a website.

MySQL
MySQL is a free source database system, and it enables the cost-effective delivery of
reliable and a high-performance and scalable Web-based and embedded database
applications. It is a relational database system(RDBMS). It is a high performing program
and scalable to meet the demands of users and data. MySQL is written in C and C++,
so it is compatible with most of the operating systems available around the world.

XAMPP
XAMPP is an integrated development surrounding, which incorporates Apache HTTP
Server, MySQL Database, and PHP, Mercury, PERL or Python on a home Windows
based computer. Apache is a free web server. MySQL is an open source database.
XAMPP is used in collaboration with, PHP, MySQL and, Windows 8 operating system.
PhpMyAdmin
PhpMyAdmin is a free and open source MySQL management program application
written in PHP and was first launched in 1998 under the GNU preferred Public License.
It is cross-platform help for the essential working structures and helps management of
more than one server. It supports most MySQL capabilities and has an intuitive net
interface. It additionally has supports developing PDF graphics of data-base layout,
importing information from CSV and SQL formats as well as exporting records to
various codecs such as SQL, XML, PDF and, CSV.
APPLICATION AND DESCRIPTION
Overview of the Various Parts
This project has several parts to it, but the most essential are three listed in Table 1.
Table 1: The overview of the three major parts of the shop
Administrators Customers User
Login access Login access Cannot login
Can add products Can add to cart Can add to cart
Can edit products Can edit product in carts Can edit product in carts
Can view products Can checkout Cannot check out
Can delete customer None None

Administrators Detailed Attribute

 Admin register
The administrator needs to register before they can have access to the core data of the
shop.

 Admin login
The admin logs in and can view, add products, manage customers.

 Admin Edit
The Admin can make changes to the shop such as delete customers, add a customer or,
upload new products.

 Manage Customer
The administrator has the authority to delete or add a customer.
Customer Detailed Attribute

 sign up
This refers to registering as a customer. The registered member has a lot of privileges associated
with the shop when one becomes a customer.
 Login
After the user has registered, the user becomes a customer, and he or she can log in with
their personal information.
 View
The customer can see all the products in the catalog and able to look at the products and
some features on the homepage.
 Edit
The customer can make changes to their data displayed on the customer page.
 Update Cart
This refers to putting or removing products from a shopping cart.

Figure 5 is the use case diagram of the shop. One can see the essential
attributes associated with both Administrator and Customers/Users.

USE CASE DIAGRAM

The Various Management Unit


The Administrators play the management role. They make sure everything in the shop
runs smoothly. Table 2 lists the various management units.
Table 2: Administrators management table
 User registration
The Users will use their exclusive information to register. After filling the form and
submitting it, the html5 checks to see if all the fields entered by the user are correct. If
the area is not correctly filled the user remains on the same page but if the
requirements are met the data goes to the database (table "customers") and saves the
in- formation of the User. The User then becomes a customer, and he or she is then
directed to the login webpage of the shop. Figure is the diagram that shows the flow of
the User's registration.
USER REGISTRATION DIAGRAM
 Customer login
The customer will use his particular data e-mail and password to log into the shop. After
submitting the form, the html5 checks if all the fields have been filled correctly. If the
condition is not met the customer remains on the same page but if the fields are
correctly filled the customer login information is sent to the database to check if the data
entered into the areas are same as the ones used to register to the database. If it is
correct, the customer is redirected to his homepage, and he can successfully pick
products and check out if they are done shopping. Figure shows below the flow diagram
of customer login.

Figure: Customer login function

 Administrator Registration
The Administrator will use his particular data such as name, e-mail, and
password. After submitting the form, the html5 checks to see if all the fields
entered by the admin is correct. If the filed are not correctly filed, or conditions
are not met the admin remains on the same page but if all requirements are
met admin's information goes to the database and saves the data in the
"Admins" in the database. After that, the administrator is directed to the admin
webpage to log in. The Figure shows below the administrator registration
diagram.
 Administrator Login
When the admin logs into the Administrators webpage the html5 checks to see
if Condi tiions are met when logging in. If all the information provided are
correct, the data is sent to the database to check if the data corresponds to the
information used to register. If it matches to the information provided by the
Administrator, a page opens, and the admin can have access to the
administrator's webpage if not the administrator is restricted from having
access to management webpage. The Figure shows the administrator log in
diagram.
Figure: Administrator Login diagram

MVC UNIT OF SHOPPING CART


The three parts of the MVC software structure perform the following:
View – Shows the interface that the person sees (usually, a webpage). The
view additives provide records to the user and moves to the
Controller for manipulating data.
Model – Defines the statistics for the software (typically, the facts is saved
in a database (DB)).
The controller provides the interface between the View and the model.
Back-end Module layout
This includes Units such as products, brand, category, orders and,
customer management modules. Figure 11 shows the diagram of the
back-end module.

Figure: Back-end system management diagram.

The back-end module/Unit is used to manage the backend of the shop. This is only available to
the administrators. They can manipulate the shop to suit the conditions they have set for the
shop. They also make sure that customers have a good experience when visiting the shop
by updating products, deleting products, executing orders to ware- houses, and managing
customers.
DATABASE GUI DESIGN
Design for database and GUI application
Database
MySQL database is used to save software data for this project. MySQL is relational
database management, and it is free of charge. All of the information’s kept in a
select- editable, and every table has particular range columns and rows. It has eight
tables named as admins, brands, cart, categories, customers, orders, payments and
products.
Figure 12 shows the ER-diagram of the eight tables in the database.

Figure: ER-diagram of the shop


The ER-diagram has a specific name and it consists of columns and rows.
For each table, we need to mark at the least one area as a primary key. The primary
key is usually specified in a particular table. The table "admins" is created to store all
the Admin’ information. It consists of eight distinctive fields referred to as columns to
shop admin id, first name, last name, email, and password. The email and the
password are essential because they are needed for one to login into the shop.
"admin_id" is the primary KEY. Many columns of one table may be described as
primary KEY. Each column has a name, a datatype and different non- obligatory
attributes. Figure shows only displays different brands of products, brand identity and
also the descriptions of the multiple brands.
Figure: registered customer's in the store
The customers who have registered to the online shop have their data automatically
stored in the database. This information is only available to the technical
administrators. The administrator can delete, edit, and update customer
information.
 Customer Interface layout
Consumer refers to customers and non-customers. These are individuals who visit
the shop either to buy products or to browse. There are two categories of interfaces
namely the Consumer and the Administrator interface. The administrator has higher
authority over the customer in the shop. The admin can edit, replace a product and,
manipulate data in the shop. The customer can browse a product, add a product to
the cart, change personal information, check shopping history and checkout or log
out. The User, on the other hand, can only browse and add a product to cart. The
homepage or interface is the index page of the shop so can be accessed when the
address is typed into a browser. The webpage has products images, names, prices,
product categories and product brands. The webpage has a registration link, login
link, cart, company contact information. A picture of the homepage is shown in
Figure below.
 Registration web page
This registration page is only for users who wish to become customers. They have to
meet the required filled standard for them to register successfully; otherwise, they
will remain on the same page. When they register, their information is saved directly
to the "customer". This registration file "customer_registration.php" is run with a code
editor.
 Login web page
Customers will have the right to log in with their information such as e-mail and pass-
word. The information is sent to the database to check for a match. If no match is
found the customer remains on the same page, otherwise he is directed to the
customer page. This can be accessed by running "customer_login.php" file with an
editor.
 Customer purchasing product
Figure shows below the link involved when the customer is making a purchase of a
product in the shop.

Diagram of the customer making a purchase

 Customer Account page


This web page can be accessed if customer information matches with the
one in the database that was used to initially register. The customer
is able to edit his data, orders, orders, password, log out.

 Shopping Cart
The customer can add products to the shopping cart. They can also update the
shopping cart from time to time until they are done shopping. After that, they
can check out by clicking on the checkout button.

Figure: Shopping Cart

 Payment
This is the final stage of the shopping experience. The customer who is
satisfied with their choice of product and price can now pay with online or
pay on delivery.
Management Interface design
The administrator must enter his username, email, and password. The html5
will check if all the fields are filled. If field conditions are not met the
admin remain on the same page; otherwise, his information is saved in
the database. He is directed to the login page to login. Figure below
shows the administrator registration form.
Figure: Administrator’s registration page

Figure: Admin login page


The administrators can log in with their email and password. If there is no
match for the information provided, he or she will remain on the same
page until the correct data are inserted into the login space.
IMPLEMENTATION
This chapter contains the functions for implementation.
 Description
The created online store is based entirely on free source applications and
with the intention to cut cost. All of the functionalities need to be
carried out in an orderly manner. The customer or user interfaces are
critical because the administrator interface will be used to manage
the activities on the customer interface. The technologies used for the
project is HTML5, CSS3, PHP, and MySQL.
 Implementation of functions
Customer interface and administrator interface are the main interfaces
created in this project. With the customer and admins interface, I
used HTML and CSS. The HTML was used to create the structure of
the page whiles the CSS was used to style the page. PHP is a
dynamic language, so I used it to automatically fetch information from
the database unto the web pages without rewriting every data by
hand.

 Basic HTML of the shop


This is the basic HTML of the shop. PHP is used to enclose the file
because the project will use PHP in most of the project otherwise the
system will fail to work with the data- base. The DOCTYPE
declaration is a simple indication that the page is written in HTML.
The content of the page shows the title, links, logos, and the CSS
used in styling the webpage.

 Basic CSS of the shop


The basic CSS used for the project. It has the body, banner, main and side-
bars frames. They are also padded whiles the sidebar headers font
size is sized to be 1.8em(29px).
 Available products in the shop
Any user with an internet connection can access the online shop. The user
can surf the webpage to see what is available on the website. To get
the product, we create a function called "get prod()" which also has a
connection to the database. When "get prod()" function is called a
relationship is established in the database to retrieve products from
the table product in the database. The quantity of the products was
restricted to display six on the webpage.

$get_pro = "select * from products order by RAND() LIMIT 0,6"


shows the code for displaying products. "echo" is used to display the
products with its details, beneath is the code.
 User Registration
The User will insert his personal information including an image into the
registration form. After submitting the form, a connection is
established with the database which saves the data. The IP address
of the customer is also sent to the database to be kept.
Figure: User registration code
The user is expected to provide the necessary information shown in the Figure
above. Any missing space or wrong information may lead to the customer not being
able to register.
 TESTING
To affirm the online store assessments had been made at distinct stages of the task;
I checked the reliability of all of the functions. The test is built on the customer/user
and Management Unit. The customer test proved that an account could be created,
login can be established, the cart can be loaded with products and the customer can
check out when done shopping. The administrator can create an account and log in
afterward. The admin can then manage all the content in the shop.
Testing shopping cart
Some quantity of products was inserted into the shopping cart, and then I proceeded
to check out. When I checked out and tested with Paypal, the cart became empty.
This indicates that the cart works appropriately as it should. The "cart.php" file is
responsible for handling the cart of the shop. When an editor runs the file "cart.php"
the cart() function is called which insert products into the database. After that, the
view cart() function can also be invoked to show the product in the cart. The
customer can manipulate his cart such as updating the cart or, adding a product to
cart.

Customer checking out


The customer can only check out if he has logged in as a customer. Without being a
customer, he is unable to checkout successfully.
CONCLUSION

The electronic shop was developed using PHP, MySQL, HTML and CSS
technology. Any consumer can browse products, add, replace or
delete a product from the cart.
The consumer can log in, with his information such as his email and
password. If the login does not go through, the user can re-register or
ask to change the password. After login, the user can see the product
in the cart and proceed onwards. The product can be paid with
PayPal. The administrator can verify the order; However, the
consumer can still look at the orders in his or her account. The
ordered price is saved in the database.

FUTURE IMPROVEMENT

Invoices need to be implemented in the shop, emails and notifications needs to be


sent to customers for new arrivals or discount. The shop has to have a search
engine where users and customers can search for the various product from the
shop. Debit and credit cards needs to be implemented in the shop as well. There
have to be language varieties so that none-English users and customers can shop
easily without any difficulty.

You might also like