You are on page 1of 133

Project Report for Online Apparel Store

PROJECT
SYNOPSIS

Page | 1
Project Report for Online Apparel Store

1. Title of the project:


Online Apparel Store

2. Introduction:
There is no denying the fact that e-Commerce has entered India and is here to stay.
Even the small and medium retailers of the country want to ride the wave and are
ready to make a fortune out of the market place concept. It is now when e-
Commerce is the most growing sector of Information Technology. So I have kept the
concept of e-Commerce in mind and developed an “Online Based Apparel Store” for
my BCSP-064 project.
Online Apparel Store is an online store through which internet users can buy clothes,
shoes, accessories etc. from this website. Users can browse through various products
from different brands belonging to different price ranges. Users have to create a new
account using the registration page or he/she can directly buy products using the
default “Guest” account. The user can also update the quantity or remove products
from the cart by clicking on the “Go to Cart” button, after finalizing the cart the user
can proceed to the checkout page where he/she can select the payment method via
“PayPal” or “Cash on Delivery” and make the payment.

3. Objectives:

a. The application will enable a visitor to register with the application.

b. The application will enable visitors to perform activities such as search for items,
buy that online, and view the latest products.

c. The application will enable a registered user to select items for purchase using
the shopping cart.

d. The application will have an administrator’s page, which will enable


administrators to maintain user details and manage the shopping items in the
inventory.

e. The application will allow users to search for products based on multiple
keywords.

f. The key objective of this application is to provide detailed information about


popular products at one place for which they have to go the shopping complex
online to save time of our users. The search option in this application enables
users to search for specific products and item.

Page | 2
Project Report for Online Apparel Store

4. Project Category:
Relational Database Management System (Online Website)

5. Tools/Platform:
Tools: Adobe Dreamweaver, XAMPP.
Platform: Windows XP SP-2 and above.
DBMS: MySQL (XAMPP).
Programming Language: HTML, PHP, SQL, JQuery, Bootstrap
Minimum Hardware Requirements: Pentium or AMD Processor with 1.8 GHz or
above, 1 GB RAM, 500 MB of Hard disk space.

6. A) Problem Statement or definition:


Clothes, shoes and accessories are one of the most bought products by people of
every age group. Currently there are many e-Commerce websites which sell these
items online, but most of them have other items such as electronic items, books, etc.
available in their websites which make their websites more complicated and difficult
to use.
Also, many people from small towns are still now not aware of these websites and
their operations. A majority of people buy cheap clothes from retail shops in local
markets at very high rates.
So, I am developing this website keeping in mind some of the drawbacks of the
current situation of the e-Commerce sector and how I can avoid these drawbacks
and present a simple, minimal website for the customers which would enable them
to buy products such as clothes, shoes and accessories of international brands such
as Nike, Adidas, Puma etc. at reasonable rates.

B) Software Requirement Specification (SRS):


1) Background:
The developing website will change the way of online shopping and will make it easy for
people belonging to every age group to buy products online.

2) Overall Description:
This website will provide simple and clean user interfaces without complex options.
Users will be able to open this website in any device such as PC, Tablets or Smartphones as
this website is completely responsive and will fit any screen size. Users can browse products
on the basis of brands or categories and can also click on every product to see the product
details.

Page | 3
Project Report for Online Apparel Store

Users will be able to buy products only after registering to the website and after they have
brought the products a confirmation email will be sent to them on their respective email
addresses.

3) Interfaces:
This front end of the website contains mainly 5 interfaces:

3.1) Main page:


This page is the home page of the website, this will be the page which opens as soon as
a user opens this website. This page will contain some products which are ordered
randomly.

3.2) Customer Registration:


This page will open when a user clicks on the “Sign Up” link. This page will enable a user
to create a new account in the website for purchasing products. This page will have a
basic form with a few fields such as Username, Address, Email etc.

3.3) My Account:
This page will open when a user clicks on the “My Account” link. This page will show the
account details of the customer.

3.4) Shopping Cart:


This is the main “Shopping Cart/Bag” of the website. Whenever a user adds a product to
the cart the product will automatically go the cart. Later, the user will be able to update
the quantity of the products and also can delete the product from this cart. This page
will open on clicking the “Go to Cart” link.

3.5) Admin Panel:


This interface is the most important part of the website. Using this interface the admin
will log in to the website and then he/she can update, delete or insert new products,
categories and brands. It will also let the admin to check customer’s accounts and the
transactions.

The database of this website is created using XAMPP which is a free open-source cross
platform web-server. The database can be exported from the XAMPP software for
portability and can be implemented in any other server or PC.

Page | 4
Project Report for Online Apparel Store

4) Functional Requirements 1.1: Registration Operation


Functional Requirement ID: FR1
Requirement Title: Registration Operation
Requirement Description:
 New Users must enter all the required personal details such as Username,
Password, Phone No., Address etc.
 User clicks on the “Create Account” button.
 System should authenticate and create a new account of the user.

Business Rationale: Allows users to register to the website’s database and buy
products.
Exception Scenarios: If user misses any form field or enters invalid details then a
popup message will be shown regarding the error.
Dependencies: Authentication process of the system.

4.1) Functional Requirements 1.2: Login Operation

Functional Requirement ID: FR2


Requirement Title: Login Operation
Requirement Description:
 Registered users enter User ID and Password
 User clicks on the “Login” button.
 System should authenticate and create a valid user session upon successful
authentication and redirect user to homepage.

Business Rationale: Allows registered users to buy products and provide


personalisation features later.
Exception Scenarios: If user enters invalid details then a popup message will be shown
regarding the error.
Dependencies: Authentication process of the system.

4.2) Functional Requirements 1.3: Search Operation

Functional Requirement ID: FR3


Requirement Title: Search Operation
Requirement Description:
 User enters keywords such as Product Name, Brand Name, Category or Colour
of the product in the search bar and clicks on “Search” button.
 Search function should retrieve the matching records from product database.
 Search results will be displayed in the homepage itself

Page | 5
Project Report for Online Apparel Store

Business Rationale: Helps users to find product(s) easily without too much effort. This
will be supplemented by product recommendation and similar products to boost sales
value in future.
Exception Scenarios: “No products found!” will be displayed if no products match the
criteria.
Dependencies: FR2: Users should be logged in.

4.3) Functional Requirements 1.4: Shopping Cart Operation

Functional Requirement ID: FR4


Requirement Title: Shopping Cart Operation
Requirement Description:
 The shopping cart function should display all the products added by the user in
the shopping cart when “Go to Cart” button is clicked.
 While displaying the products, it should get the correct price of the product
from the database.
 It should allow the users to proceed to Checkout in the shopping cart.

Business Rationale: Allows users to buy products and give them full control of their
transactions.
Exception Scenarios: If user adds the same product to cart then pop up will show
regarding it and if the product is not available then the user will not be able to add the
product to the cart.
Dependencies:
FR2: Users should be logged in.
FR3: Users should add at least one product to proceed to the checkout operation.

4.4) Functional Requirements 1.5: Checkout Operation

Functional Requirement ID: FR5


Requirement Title: Checkout Operation
Requirement Description:
 The checkout function should display the final total amount, the shipping
address and the payment type.
 It should support the user to enter shipping address, PayPal account details for
completing the transaction procedure.
 After the payment is successfully completed it should display the order details
and also send a detailed email to the registered email address.

Page | 6
Project Report for Online Apparel Store

Business Rationale: Provide users flexible payment methods and other options.
Exception Scenarios: If the redirection to PayPal is not completed then appropriate
error message will be displayed.
Dependencies:
FR2: Users should be logged in.
FR3: Users should add at least one product to proceed to the checkout operation and
clicked the checkout button.

5) Performance Requirements:
 All pages should load within 2 seconds.
 Search results should be displayed within 1-2 seconds.

6) Design Constraints:
 Webpages should be designed in HTML 4.0 transitional standards.
 W3C Web Accessibility Standards should be followed including keyboard
navigation, alternate titles for images etc.

7) Logical Database Requirements:


 Existing product database will be leveraged and no changes to database is
planned for this project.

8) Software System Attributes Requirements:

Reliability: This proposed website should provide 100% accurate search results and
checkout function should end reliably within 5-7 seconds
Availability: Proposed website should be available in all regions of India. All upgrades,
patches and fixes should be done without shutting down the application. There should
be a disaster recovery environment to handle natural disaster.
Security:
 Login operation should be done using transport layer security (HTTPS).
 All usernames and passwords should be encrypted in the database, which will
be done in future.
 There should be well-defined password policy covering change frequency,
invalid attempts allowed etc.

Maintainability:
 All code artefacts should have proper documentation.
 All code components should be thoroughly tested and the test coverage should
be more than 80%.

Page | 7
Project Report for Online Apparel Store

C) Project Planning:

Effort: For project development, initially the concepts of e-Commerce, HTML, PHP, MySQL and
Bootstrap Frontend Framework has been studied. Then the Requirement Specification document
has been prepared. Then the proposed model of the software will be identified. At last the
website design, PHP coding etc. will be done.

Cost: 2 Programmers can work simultaneously for 2 months to develop the website. But as I am
doing this alone it will take around 3-4 months to complete the project. Software cost and Print
cost are involved in this project.

Resource: Software like Adobe Dreamweaver, Browser, XAMPP, Bootstrap package and
Minimum hardware infrastructure.

Project Duration: Approximately 8 Months.

D) Project Scheduling: Gantt chart Analysis

Page | 8
Project Report for Online Apparel Store

E) Analysis: Data Flow Diagrams

Page | 9
Project Report for Online Apparel Store

Page | 10
Project Report for Online Apparel Store

Page | 11
Project Report for Online Apparel Store

Analysis: Entity Relationship Diagram

Page | 12
Project Report for Online Apparel Store

Analysis: Use Case Diagram

F) Complete Structure of the System:


Module Identification and Description:
1.) Login and Registration:
This module will let the user to login into the system. The user will be able to buy products
by from the store. Guest users will be able to register and create a new account in the
system by using the Registration function.

2.) Product Details:


Every product that will be available in the website will have an attribute called details (a
general description of the product). On clicking the “details” button users will be able to see
the details of the products in the same page.

3.) Search Products:


This process will help the user to search products by entering keywords like price, colour,
brand or category and pressing the search button. The system will automatically search the
database for the matching keyword and proper search results will be shown.

Page | 13
Project Report for Online Apparel Store

4.) Add to Cart Process:


When the user clicks on the “Add to Cart” button the product will be added to the shopping
cart of the website. The default value of the quantity will be 1, but the user can change this
quantity by going to the cart and changing the values and clicking on “Update Cart” to
finalise it. After that the user can click on “Checkout” button to proceed to the payment
gateway.

5.) Admin Panel: This page will be a separate panel only for the administrators. The admins
will be able to login in to the system and perform several tasks such as Insert Product, Delete
Product, Insert New Brands and Categories, Manage Customers etc. through this panel.

6.) Checkout: The checkout module will enable the user to proceed to the payment options via
PayPal. The module will retrieve the total cart price from the database and prepare a bill for
the regarding transaction.

7.) Automatic Email Generation: After the transaction has been successfully made, this
module will generate an email which will be sent to the user’s account within few minutes.
This email will also act as a confirmation letter for the transaction.

Data Structure:
1.) Data Dictionary:

Table Name Description


brands This table will be used to store all the brands of the products
available in the website.
cart This is the main cart table, where all the details of the shopping cart
will be stored.
categories This table will be used to store all the categories of the products
available in the website.
products This is the table where all the details about the products will be
stored in the database.
customers This table is for storing all the details of the customers and their
accounts.

2.) Table Structure in Details:


a.) brands:

Field Name Data Type Size (Width) Constraints


brand_id int 100 Primary Key
brand_title text 255 Not null

Page | 14
Project Report for Online Apparel Store

b.) cart:

Field Name Data Type Size (Width) Constraints


p_id int 10 Primary Key
ip_add varchar 255 Not null
qty int 10 Not null

c.) categories:

Field Name Data Type Size (Width) Constraints


cat_id int 100 Primary Key
cat_title text 255 Not null

d.) products:

Field Name Data Type Size (Width) Constraints


product_id int 10 Primary Key
cat_id int 10 Not null
brand_id int 10 Not null
date timestamp 6 Not null
product_title text 255 Not null
product_img1 text 255 Not null
product_img2 text 255 Not null
product_img3 text 255 Not null
product_price int 10 Not null
product_des text 255 Not null
product_status text 10 Not null
product_keyword text 255 Not null

e.) customers:

Field Name Data Type Size (Width) Constraints


customer_id int 10 Primary Key
customer_ip varchar 100 Not null
customer_name text 255 Not null
customer_email varchar 100 Not null
customer_pass varchar 10 Not null
customer_add varchar 255 Not null
customer_contact varchar 255 Not null

Page | 15
Project Report for Online Apparel Store

G) Process Logic Diagram:

H) Report Generation:
a) Customers List
b) Available Products List
c) Customer Account Details
d) Transaction Report
e) Confirmation of Transaction Report

I) Future Scope:
This system can be implemented and used by business organisations who are willing to sell their
products online. Nowadays most of the domestic and international companies are selling products
online due to its advantages. Online stores are cheap to set up and requires very less man power
compared to big malls and shops. Inventory can be easily maintained and managed by a few back-
end administrators.

This system can also be used in small organisations like institutes, offices, hospitals etc. to place
orders for office items from their personal stores or warehouses and can be used by any employee
of the organisation.

Page | 16
Project Report for Online Apparel Store

PROJECT
REPORT

Page | 17
Project Report for Online Apparel Store

INTRODUCTION:
7. Title of the project:
Online Apparel Store

8. Introduction:
There is no denying the fact that e-Commerce has entered India and is here to stay.
Even the small and medium retailers of the country want to ride the wave and are
ready to make a fortune out of the market place concept. It is now when e-
Commerce is the most growing sector of Information Technology. So I have kept the
concept of e-Commerce in mind and developed an “Online Based Apparel Store” for
my BCSP-064 project.

Online Apparel Store is an online store through which internet users can buy clothes,
shoes, accessories etc. from this website. Users can browse through various products
from different brands belonging to different price ranges. Users have to create a new
account using the registration page or he/she can directly buy products using the
default “Guest” account. The user can also update the quantity or remove products
from the cart by clicking on the “Go to Cart” button, after finalizing the cart the user
can proceed to the checkout page where he/she can select the payment method via
“PayPal” or “Cash on Delivery” and make the payment.

Page | 18
Project Report for Online Apparel Store

OBJECTIVES:

a. The application will enable a visitor to register with the application.

b. The application will enable visitors to perform activities such as search for items,
buy that online, and view the latest products.

c. The application will enable a registered user to select items for purchase using
the shopping cart.

d. The application will have an administrator’s page, which will enable


administrators to maintain user details and manage the shopping items in the
inventory.

e. The application will allow users to search for products based on multiple
keywords.

f. The key objective of this application is to provide detailed information about


popular products at one place for which they have to go the shopping complex
online to save time of our users. The search option in this application enables
users to search for specific products and item.

g. The users will be able to purchase the products and pay via Online payment
portal “PayPal”

h. The Administrator will be able to manage the content of the store by adding new
products, adding new categories and brands and also delete them whenever
required.

PROJECT CATEGORY:
Relational Database Management System (Online Website)

Page | 19
Project Report for Online Apparel Store

TOOLS/ENVIRONMENT:

Tools: Adobe Dreamweaver, XAMPP.


Platform: Windows XP SP-2 and above.
DBMS: MySQL (XAMPP).
Programming Language: HTML, PHP, SQL, JQuery, Bootstrap
Minimum Hardware Requirements: Pentium or AMD Processor with 1.8 GHz or
above, 1 GB RAM, 500 MB of Hard disk space.

SOFTWARE REQUIREMENT
SPECIFICATION (SRS):
(According to IEEE Standard 830 for SRS)

1) Introduction
1.1 Purpose:
The purpose of this phase is to understand the exact requirement of the
system and to document them properly. This activity is usually done to
document all functions, performance and interfacing requirements for the
software designing and management. The intended audience of this
document include the site administrator of the Online Store and the end
users. Other intended audience include development team, analysts, design
team, testing team etc.

1.2 Scope of the Product:


The scope of the Online Apparel Store is to provide users easy access to
apparels of international brands and a user friendly interface so that people
belonging to every group can easily use this system.

Key Goals of the “Online Apparel Store”:


a) Provide very simple and user-friendly interface and shopping experience.
b) Provide website administrators a user friendly content management
system for.
c) Provide a responsive website so that users can visit the website using
their smartphones.
d) The ease of payment through safe and secure PayPal portal.

Page | 20
Project Report for Online Apparel Store

1.3 Definitions, Acronyms and Abbreviations:

Term Definition
User Online Users or Customers of online apparel store
Admin Administrator who maintains the website

1.4 Overview:
The document is organised as follows: Second section mainly provides the
interfaces and third section provides details about the important functional
and non-functional requirements.

2) General Description
2.1 Product Perspective:

This website will provide simple and clean user interfaces without complex
options.
Users will be able to open this website in any device such as PC, Tablets or
Smartphones as this website is completely responsive and will fit any screen
size. Users can browse products on the basis of brands or categories and can
also click on every product to see the product details.

Users will be able to buy products as guests or after registering to the


website and after they have brought the products a confirmation email will
be sent to them on their respective email addresses.

2.2 Product Functions:

Login:
All the registered users will be able to login to their respective accounts and buy
the products, view their account and order details.

Customer Registration:
Users who are not registered to the website will be able to click the sign up link
to register and create an account in the website so that they can purchase the
products properly.

Search Product:
Users will be able to search products using the search bar which works by
searching products with similar keywords.

Page | 21
Project Report for Online Apparel Store

Add to Cart:
After selecting the desired product users will be able to add the products to the
cart to proceed to checkout. The cart also provides functions to update product
quantity and remove products if the user wants

Checkout:
When the users finalize their cart they can click the “Proceed to Checkout”
button to proceed for the final payment via PayPal.

2.3 User Characteristics:

Online Users:
These users are the customers of the Online Store who will access the system
online. The users can be from any part of the world and their preferred language
is English. We will assume that the users will have minimum technical knowledge
and hence a User-Friendly Interface has been designed.

Site Administrator (Admin):


Administrator is responsible for maintaining the website and will be involved in
software fixes, content management and regular maintenance.

2.4 General Constraints:


 The homepage will currently display only six products at time in a random
manner.
 Some interfaces of the system may not open properly in portable devices
like smartphones or tablets.
 There is no option to filter out certain products, only sorting can be done
according to categories or brands.

3) Specific Requirements

3.1 External Interface Requirements:


This section provides details of all inputs and outputs including hardware,
software, communication and mock-up prototypes.

3.1.1 Main System Interfaces:

Page | 22
Project Report for Online Apparel Store

Main page:

This page is the home page of the website, this will be the page which opens as
soon as a user opens this website. This page will contain some products which
are ordered randomly.

Customer Registration:

This page will open when a user clicks on the “Sign Up” link. This page will enable
a user to create a new account in the website for purchasing products. This page
will have a basic form with a few fields such as Username, Address, Email etc.

My Account:

This page will open when a user clicks on the “My Account” link. This page will
show the account details of the customer.

Shopping Cart:

This is the main “Shopping Cart/Bag” of the website. Whenever a user adds a
product to the cart the product will automatically go the cart. Later, the user will
be able to update the quantity of the products and also can delete the product
from this cart. This page will open on clicking the “Go to Cart” link.

Admin Panel:

This interface is the most important part of the website. Using this interface the
admin will log in to the website and then he/she can update, delete or insert new
products, categories and brands. It will also let the admin to check customer’s
accounts and the transactions.

The database of this website is created using XAMPP which is a free open-source
cross platform web-server. The database can be exported from the XAMPP
software for portability and can be implemented in any other server or PC.

3.1.2 Hardware Interfaces:

There is no direct hardware interface specifically for the Online Store. This is a
web application which runs on application server hosted in-house on enterprise
hardware.

3.1.3 Software Interfaces:

 Database: XAMPP Admin Panel is the most preferred database interface


for viewing and controlling the database directly.
 Content management: The admin panel provided in the system is the
interface through which the administrator can have complete control of
the inventory and users of the website.

Page | 23
Project Report for Online Apparel Store

3.1.4 Communication Interfaces:

There are no specific communication interface requirements. The existing OS and


network infrastructure will be used.

3.2 Functional Requirements:

Functional Requirements 1.1: Registration Operation


Functional Requirement ID: FR1
Requirement Title: Registration Operation
Requirement Description:
 New Users must enter all the required personal details such as Username,
Password, Phone No., Address etc.
 User clicks on the “Create Account” button.
 System should authenticate and create a new account of the user.

Business Rationale: Allows users to register to the website’s database and buy
products.
Exception Scenarios: If user misses any form field or enters invalid details then a
popup message will be shown regarding the error.
Dependencies: Authentication process of the system.

Functional Requirements 1.2: Login Operation


Functional Requirement ID: FR2
Requirement Title: Login Operation
Requirement Description:
 Registered users enter User ID and Password
 User clicks on the “Login” button.
 System should authenticate and create a valid user session upon
successful authentication and redirect user to homepage.

Business Rationale: Allows registered users to buy products and provide


personalisation features later.
Exception Scenarios: If user enters invalid details then a popup message will be
shown regarding the error.
Dependencies: Authentication process of the system.

Page | 24
Project Report for Online Apparel Store

Functional Requirements 1.3: Search Operation


Functional Requirement ID: FR3
Requirement Title: Search Operation
Requirement Description:
 User enters keywords such as Product Name, Brand Name, Category or
Colour of the product in the search bar and clicks on “Search” button.
 Search function should retrieve the matching records from product
database.
 Search results will be displayed in the homepage itself

Business Rationale: Helps users to find product(s) easily without too much
effort. This will be supplemented by product recommendation and similar
products to boost sales value in future.
Exception Scenarios: “No products found!” will be displayed if no products
match the criteria.
Dependencies: FR2: Users should be logged in.

Functional Requirements 1.4: Shopping Cart Operation


Functional Requirement ID: FR4
Requirement Title: Shopping Cart Operation
Requirement Description:
 The shopping cart function should display all the products added by the
user in the shopping cart when “Go to Cart” button is clicked.
 While displaying the products, it should get the correct price of the
product from the database.
 It should allow the users to proceed to Checkout in the shopping cart.

Business Rationale: Allows users to buy products and give them full control of
their transactions.
Exception Scenarios: If user adds the same product to cart then pop up will show
regarding it and if the product is not available then the user will not be able to
add the product to the cart.
Dependencies:
FR2: Users should be logged in.
FR3: Users should add at least one product to proceed to the checkout
operation.

Page | 25
Project Report for Online Apparel Store

Functional Requirements 1.5: Checkout Operation


Functional Requirement ID: FR5
Requirement Title: Checkout Operation
Requirement Description:
 The checkout function should display the final total amount, the shipping
address and the payment type.
 It should support the user to enter shipping address, PayPal account
details for completing the transaction procedure.
 After the payment is successfully completed it should display the order
details and also send a detailed email to the registered email address.

Business Rationale: Provide users flexible payment methods and other options.
Exception Scenarios: If the redirection to PayPal is not completed then
appropriate error message will be displayed.
Dependencies:
FR2: Users should be logged in.
FR3: Users should add at least one product to proceed to the checkout operation
and clicked the checkout button.

3.3 Performance Requirements: The following are the key performance


requirements:
 All the pages should load within 5-8 seconds.
 Search results should be displayed within 5 seconds.
 Checkout should happen within 10 -15 seconds after selecting payment
method.
3.4 Design Constraints: The Online Apparel Store should adhere the following
standards:
 Web pages should be designed using HTML 5.0 transitional standards.
 Bootstrap Framework should be used to make the website responsive
and well designed.
 W3C Web Accessibility standards (Web Content Accessibility Guidelines
(WCAG)) should be followed including keyboard navigation, alternate
titles for images etc.

3.5 Logical Database Requirement:


Existing database will be leveraged and no changes to database is planned for
the Online Apparel Store.

Page | 26
Project Report for Online Apparel Store

3.6 Software System Attributes Requirements:

3.6.1 Reliability:
The Online Apparel Store should provide reliable and relevant search results at
all times. The checkout operation should end reliably within 5 seconds.

3.6.2 Availability:
The Online Apparel Store should be available 99.99% of times on the World Wide
Web. All software updates, fixes, maintenance should be done without shutting
down the whole system. There should be a disaster recovery environment to
handle natural disasters.

3.6.3 Security:
 Login operations should be performed using the transport layer security
(HTTPS).
 Important fields of the database should be validated for SQL injection
scenarios and HTML reserved word scenarios.

3.6.4 Maintainability:
All code and artefacts should have proper documentation.
 All code components should be thoroughly tested and the test coverage
should be more than 80%.

PROJECT PLANNING:
Effort:
For project development initially the concepts of E-Commerce, HTML, PHP, MySQL and
Bootstrap Front-End Framework has been studied. Then the requirement specification
document has been prepared. Then the proposed model of the website will be prepared
and finally the design, coding and testing will be done.
Cost:
Programmers can complete this project within 2 months working simultaneously. As I am
developing this website alone it took me around 3-4 months to develop and design this
website. Software and print costs are involved in this project.
Resource:
Software packages like Adobe Dreamweaver, Adobe Photoshop, XAMPP, Bootstrap Package
and minimum hardware infrastructure is required.
Project Duration:
Approximately 6 Months.

Page | 27
Project Report for Online Apparel Store

ANALYSIS:
Data Flow Diagrams:
1) DFD Level 0:

2) DFD Level 1:

Page | 28
Project Report for Online Apparel Store

3) DFD Level 2 of 3.0:

4) DFD Level 2 of 6.0:

Page | 29
Project Report for Online Apparel Store

5) DFD Level 2 of 7.0:

Page | 30
Project Report for Online Apparel Store

Entity-Relationship Diagram:

Page | 31
Project Report for Online Apparel Store

Use-Case Diagram:

Process Logic Diagram:

Page | 32
Project Report for Online Apparel Store

SYSTEM DESIGN:
Module Identification and Description:
1) Login and Registration:
This module will let the user to login into the system. The user will be able to buy
products by from the store. Guest users will be able to register and create a new
account in the system by using the Registration function.

2) Product Details:
Every product that will be available in the website will have an attribute called
details (a general description of the product). On clicking the “details” button users
will be able to see the details of the products in the same page.

3) Search Products:
This process will help the user to search products by entering keywords like price,
colour, brand or category and pressing the search button. The system will
automatically search the database for the matching keyword and proper search
results will be shown.

4) Add to Cart Process:


When the user clicks on the “Add to Cart” button the product will be added to the
shopping cart of the website. The default value of the quantity will be 1, but the user
can change this quantity by going to the cart and changing the values and clicking on
“Update Cart” to finalise it. After that the user can click on “Checkout” button to
proceed to the payment gateway.

5) Admin Panel:
This page will be a separate panel only for the administrators. The admins will be
able to login in to the system and perform several tasks such as Insert Product,
Delete Product, Insert New Brands and Categories, View Customers etc. through this
panel.

6) Checkout:
The checkout module will enable the user to proceed to the payment options via
PayPal. The module will retrieve the total cart price from the database and prepare a
bill for the regarding transaction.

7) Automatic Email Generation:


After the transaction has been successfully made, this module will generate an
email which will be sent to the user’s account within few minutes. This email will
also act as a confirmation letter for the transaction.
8) My Account:

Page | 33
Project Report for Online Apparel Store

The “My account” module will contain all the account details of the user who will be
logged in the system at a particular time. It will also enable the user to delete their
account, change the user password and other functions.

Database Design:
The database of “The Online Apparel Store” will have 6 tables. Each and every table is setup
with the proper Integrity constraints to work properly. The list of tables is given below:

Table Name Description


brands This table will be used to store all the brands of the products
available in the website.
cart This is the main cart table, where all the details of the shopping cart
will be stored.
categories This table will be used to store all the categories of the products
available in the website.
products This is the table where all the details about the products will be
stored in the database.
customers This table is for storing all the details of the customers and their
accounts.
admins This table is for storing all the details of the administrators of the
system.

The database design of all the tables is given below:


1) brands:

Field Name Data Type Size (Width) Constraints


brand_id int 100 Primary Key
brand_title text 255 Not null

2) cart:

Field Name Data Type Size (Width) Constraints


p_id int 10 Primary Key
ip_add varchar 255 Not null
qty int 10 Not null

Page | 34
Project Report for Online Apparel Store

3) categories:

Field Name Data Type Size (Width) Constraints


cat_id int 100 Primary Key
cat_title text 255 Not null

4) products:

Field Name Data Type Size (Width) Constraints


product_id int 10 Primary Key
cat_id int 10 Not null
brand_id int 10 Not null
date timestamp 6 Not null
product_title text 255 Not null
product_img1 text 255 Not null
product_img2 text 255 Not null
product_img3 text 255 Not null
product_price int 10 Not null
product_des text 255 Not null
product_status text 10 Not null
product_keyword text 255 Not null

5) customers:

Field Name Data Type Size (Width) Constraints


customer_id int 10 Primary Key
customer_ip varchar 100 Not null
customer_name text 255 Not null
customer_email varchar 100 Not null
customer_pass varchar 10 Not null
customer_add varchar 255 Not null
customer_contact varchar 255 Not null

6) admins:

Field Name Data Type Size (Width) Constraints


user_id int 10 Primary Key
user_email varchar 255 Not null
user_pass varchar 255 Not null

Page | 35
Project Report for Online Apparel Store

User Interfaces:
1) Online Apparel Store Home Page:

Page | 36
Project Report for Online Apparel Store

2) Product details page:

3) User registration page:

4) User Log in page:

Page | 37
Project Report for Online Apparel Store

5) My Account page:

6) Cart page:

Page | 38
Project Report for Online Apparel Store

7) Admin login page:

8) Admin panel home page:

Page | 39
Project Report for Online Apparel Store

9) Admin panel - Insert New Product:

10) Admin panel – View all Products:

Page | 40
Project Report for Online Apparel Store

11) Admin panel – Insert New Category:

12) Admin panel – View all Categories:

Page | 41
Project Report for Online Apparel Store

13) Admin panel – Insert new Brand:

14) Admin panel – View all Brands:

Page | 42
Project Report for Online Apparel Store

15) Admin panel – View all Customers:

PROGRAM CODE:
1) index.php (Home Page):
<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>

Page | 43
Project Report for Online Apparel Store

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="all_products.php">All Products</a>
</li>
<li>

Page | 44
Project Report for Online Apparel Store

<a href="my_account.php">My Account</a>


</li>
<li>
<a href="customer_registration.php">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">
<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}
?>
</span>
&nbsp;
&nbsp;

Page | 45
Project Report for Online Apparel Store

&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
&nbsp;
&nbsp;

<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";

?>

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

<hr />
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">

Page | 46
Project Report for Online Apparel Store

<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php
getBrands();
?>

</div>
</div>

<!-- Main page products-->


<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="">
<div class="caption">

<?php getPro();?>
<?php getCatPro();?>
<?php getBrandPro();?>
</div>
</div>
</div>
</div>
</div>
</div>

<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

2) cart.php (Store Cart):


<?php
session_start();
error_reporting(0);
include("Includes/db_1.php");

Page | 47
Project Report for Online Apparel Store

include("Functions/function.php");
?>
<!--<meta http-equiv="refresh" content="2,cart.php" />-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
<script>
//function LoadOnce(){
//window.location.reload();
//}
</script>
</head>

<body onload="LoadOnce()">

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>

Page | 48
Project Report for Online Apparel Store

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="all_products.php">All Products</a>
</li>
<li>
<a href="my_account.php">My Account</a>
</li>
<li>
<a href="customer_registration.php">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">
<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}

Page | 49
Project Report for Online Apparel Store

else{
echo"Guest";
}
?>
</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Mainpage</a>
&nbsp;
&nbsp;

<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";

?>
</small>
</div>
</div>
</div>

<hr />
<div class="container">

Page | 50
Project Report for Online Apparel Store

<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php
getBrands();
?>

</div>
</div>

<!-- Main cart panel-->


<h2 class="sub-header">Shopping Cart</h2>
<div class="table-responsive well-lg">
<form action="" method="post" enctype="multipart/form-data">
<table class="table table-striped">
<thead>
<tr>
<th>Remove Products</th>
<th>Products</th>
<th>Quantity</th>
<th>Price</th>
</tr>
</thead>

<?php

$total=0;
global $con;
$ip = getIp();
$sel_price = "select * from cart where ip_add='$ip'";

$run_price = mysqli_query($con,$sel_price);

while($p_price=mysqli_fetch_array($run_price)){

$pro_id = $p_price['p_id'];

$pro_price = "select * from products where product_id='$pro_id'";

Page | 51
Project Report for Online Apparel Store

$run_pro_price = mysqli_query($con,$pro_price);

while($pp_price = mysqli_fetch_array($run_pro_price)){

$product_price = array($pp_price['product_price']);

$product_title = $pp_price['product_title'];

$product_image = $pp_price['product_img1'];

$single_price = $pp_price['product_price'];

$values = array_sum($product_price);
$total +=$values;
?>

<tbody>
<tr>
<?php

if(isset($_POST['update_cart'])){

$qty = $_POST['qty'] ;

$update_qty = "update cart set qty='$qty'";

$run_qty = mysqli_query($con, $update_qty);

$_SESSION['qty']=$qty;
$total = $total*$qty;
}
?>

<td><input type="checkbox" name="remove[]" value="<?php echo $pro_id; ?>"


/></td>
<td><img src="Admin_area/product_images/<?php echo $product_image;?>"
width="80" height="100" /><br /><?php echo $product_title; ?></td>
<td><input type="text" size="1" name="qty" value="<?php if($_SESSION['qty']=='')
echo 1; else echo $_SESSION['qty']; ?>"/></td>

<td>Rs. <?php echo $single_price?></td>


</tr>
<?php } }?>
<tr>
<td colspan="3"></h5></td>
<td><h5>Sub Total : </h5><b><?php echo " Rs. ". $total;?></b></td>
</tr>

Page | 52
Project Report for Online Apparel Store

<tr>
<td><button type="submit" name="update_cart" class="btn btn-default">Update
Cart</button></td>
<td><button type="submit" name="continue" class="btn btn-default ">Continue
Shopping</button></td>
<td><button class="btn btn-default"><a href="checkout.php">Proceed to
Checkout</a></button></td>
</tr>
</tbody>

</table>
</form>

<?php
global $con;
$ip = getIp();

if(isset($_POST['update_cart'])){

foreach($_POST['remove'] as $remove_id){

$delete_product = "delete from cart where p_id='$remove_id' AND ip_add='$ip'";


$run_delete = mysqli_query($con,$delete_product);
if($run_delete){
echo "<script>window.open('cart.php','_self')</script>";
}

}
}

if(isset($_POST['continue'])){

echo "<script>window.open('index.php','_self')</script>";

}
?>
</div>
</div>
</div>
</div>

<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

Page | 53
Project Report for Online Apparel Store

3) my_account.php (User Account):


<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

Page | 54
Project Report for Online Apparel Store

<a class="navbar-brand" href="index.php">


<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="all_products.php">All Products</a>
</li>
<li>
<a href="my_account.php">My Account</a>
</li>
<li>
<a href="customer_registration.php">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data" class="navbar-
form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm" placeholder="Search
Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">

Page | 55
Project Report for Online Apparel Store

<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}
?>
</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='') total_items(); else
echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
&nbsp;
&nbsp;

<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";
}

?>
</small>
</div>
</div>
</div>

Page | 56
Project Report for Online Apparel Store

<hr />
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php
getBrands();
?>

</div>
</div>

<!-- Account Settings Button-->


<div class="container" id="product_content">
<div class="row">
<div class="pull-right col-xs-6 col-sm-3">
<div class="well">

<ul>
<li><a href="my_account.php?my_orders">My Orders</a></li>
<li><a href="my_account.php?edit_account">Edit Account</a></li>
<li><a href="my_account.php?change_pass">Change Password</a></li>
<li><a href="my_account.php?delete_account">Delete Account</a></li>

</ul>
</div>
</div>
<?php
$user = $_SESSION['customer_email'];
$get_img = "select * from customers where customer_email='$user'";
$run_img = mysqli_query($con, $get_img);
$row_img = mysqli_fetch_array($run_img);
$c_image = $row_img['customer_image'];
$c_name = $row_img['customer_name'];
$c_email = $row_img['customer_email'];
$c_cont = $row_img['customer_contact'];
$c_city = $row_img['customer_city'];

?>

Page | 57
Project Report for Online Apparel Store

<?php
if(!$_SESSION['customer_email']==''){
if(!isset($_GET['my_orders'])){
if(!isset($_GET['edit_account'])){
if(!isset($_GET['change_pass'])){
if(!isset($_GET['delete_account'])){
echo"
<p style=''><img src='Customers/customer_images/$c_image' width='100'
height='130'/></p>
<h5><b>NAME:</b>$c_name</h5>
<h5><b>EMAIL:</b>$c_email</h5>
<h5><b>ADDRESS:</b>$c_cont</h5>
<h5><b>CITY:</b>$c_city</h5>";

echo "<b>You can check your order status by clicking this<a


href='my_account.php?my_orders'> link</a></b>";
}
}
}
}

}
else
echo "<img src='loginfirst.png' style='margin-left:170px; margin-top:15px;'>";
?>
<?php
if(isset($_GET['edit_account'])){
include("edit_account.php");
}
if(isset($_GET['change_pass'])){
include("change_pass.php");
}
if(isset($_GET['delete_account'])){
include("delete_account.php");

}
?>
</div>
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>

4) customer_registration.php (Page to Create a new Account):

Page | 58
Project Report for Online Apparel Store

<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">

Page | 59
Project Report for Online Apparel Store

<li>
<a href="all_products.php">All Products</a>
</li>
<li>
<a href="my_account.php">My Account</a>
</li>
<li>
<a href="customer_registration.php">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">
<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}

Page | 60
Project Report for Online Apparel Store

?>
</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
&nbsp;
&nbsp;

<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";

?>
</small>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php

Page | 61
Project Report for Online Apparel Store

getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php
getBrands();
?>

</div>
</div>

<!-- Main page products-->


<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-8">
<div class="">
<div class="caption">
<h1 class="text-center login-title">New Registration</h1>

<form method="post" action="customer_registration.php"


enctype="multipart/form-data">
<div class="form-group">
<label for="exampleInputEmail1">Name</label>
<input type="text" class="form-control" id="c_name" name="c_name"
placeholder="Full Name" required autofocus>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Email</label>
<input type="email" class="form-control" id="c_email" name="c_email"
placeholder="Valid Email" required>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="c_pass" name="c_pass"
placeholder="Password" required>
</div>
<div class="form-group">
<label for="exampleInputFile">Upload Profile Picture</label>
<input type="file" id="c_img" name="c_img">
</div>
<div class="form-group">
<select class="form-control" id="c_country" name="c_country" required>
<option>India</option>
<option>Nepal</option>

Page | 62
Project Report for Online Apparel Store

<option>Bangladesh</option>
<option>Pakistan</option>
<option>Sri Lanka</option>
<option>Bhutan</option>
</select>
</div>
<label for="exampleInputEmail1">City</label>
<input type="text" class="form-control" id="c_city" name="c_city" placeholder=""
required>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Contact</label>
<input type="text" class="form-control" id="c_cont" name="c_cont"
placeholder="" required>
</div>

<button type="submit" id="submit" name="register" class="btn btn-


default">Create Account</button>

</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
if(isset($_POST['register'])){
$ip = getIp();
$c_name = $_POST['c_name'];
$c_email = $_POST['c_email'];
$c_pass = $_POST['c_pass'];
$c_country = $_POST['c_country'];
$c_city = $_POST['c_city'];
$c_cont = $_POST['c_cont'];
$c_img = $_FILES['c_img']['name'];
$c_img_tmp = $_FILES['c_img']['tmp_name'];

move_uploaded_file($c_img_tmp,"Customers/customer_images/$c_img");
$insert_c = "INSERT INTO `myshop`.`customers` (`customer_id`,
`customer_ip`, `customer_name`, `customer_email`, `customer_pass`,
`customer_country`, `customer_city`, `customer_contact`, `customer_image`)
VALUES (NULL, '$ip', '$c_name', '$c_email', '$c_pass', '$c_country', '$c_city',
'$c_cont', '$c_img')";

$run_c = mysqli_query($con,$insert_c);

Page | 63
Project Report for Online Apparel Store

if($run_c){
$sel_cart = "select * from cart where ip_add='$ip'";
$run_cart = mysqli_query($con,$sel_cart);
$check_cart = mysqli_num_rows($run_cart);

if($check_cart==0){
$_SESSION['customer_email']=$c_email;

echo "<script>alert('Account Created Successfully')</script>";


echo "<script>window.open('my_account.php','_self')</script>";

}
else{
$_SESSION['customer_email']=$c_email;

echo "<script>alert('Account Created Successfully')</script>";


echo "<script>window.open('checkout.php','_self')</script>";

}
}
}

?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

5) customer_login.php (Login Page of users):

<?php
include("Includes/db_1.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Page | 64
Project Report for Online Apparel Store

<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>
<!-- Main page products-->
<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="">
<div class="caption">

<div class="container">
<div class="row">
<div class="col-sm-4 col-md-4 col-md-offset-2">
<h1 class="text-center login-title">Please Log In</h1>

<form method="post" action="checkout.php" enctype="multipart/form-data">


<input type="text" class="form-control" placeholder="Email" required autofocus
name="email"><br />
<input type="password" class="form-control" placeholder="Password" required
name="pass"><br />
<button class="btn btn-lg btn-primary btn-block" type="submit" name="login">
Sign in</button>

</form>
<?php
if(isset($_POST['login'])){
$c_email = $_POST['email'];
$c_pass = $_POST['pass'];

Page | 65
Project Report for Online Apparel Store

$sel_c = "select * from customers where customer_pass='$c_pass' AND


customer_email='$c_email'";
$run_c = mysqli_query($con,$sel_c);

$check_customer = mysqli_num_rows($run_c);
if($check_customer==0){
echo "<script>alert('Password or Email Do Not Match')</script>";
exit();
}
$ip = getIp();

$sel_cart = "select * from cart where ip_add='$ip'";


$run_cart = mysqli_query($con,$sel_cart);
$check_cart = mysqli_num_rows($run_cart);

if($check_customer>0 AND $check_cart==0){


$_SESSION['customer_email']=$c_email;

echo "<script>alert('Logged In Successfully')</script>";


echo "<script>window.open('my_account.php','_self')</script>";

}
else{
$_SESSION['customer_email']=$c_email;

echo "<script>alert('Logged In Successfully')</script>";


echo "<script>window.open('checkout.php','_self')</script>";

}
}
?>

<a href="customer_registration.php" class="pull-left">Create an account </a>


</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>

Page | 66
Project Report for Online Apparel Store

</html>

6) change_password.php (Page to change password of account):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>
<body>
<div class="col-md-4">
<h1 class="text-center login-title">Change Password</h1>
<form method="post" action="" enctype="multipart/form-data">
<div class="form-group">
<label for="exampleInputpass">Current Password</label>
<input type="password" class="form-control" id="current_pass"
name="current_pass" placeholder="" required autofocus>
</div>
<div class="form-group">
<label for="exampleInputnewPassword1">New Password</label>
<input type="password" class="form-control" id="new_pass" name="new_pass"
placeholder="" required>
</div>
<div class="form-group">
<label for="exampleInputnewagainPassword1">New Password Again</label>
<input type="password" class="form-control" id="new_pass_again"
name="new_pass_again" placeholder="" required>
<button type="submit" id="submit" name="change_password" class="btn btn-
info">Change Password</button>

Page | 67
Project Report for Online Apparel Store

</div>
</div>
<?php
include("Includes/db_1.php");
if(isset($_POST['change_password'])){
$user = $_SESSION['customer_email'];
$current_pass = $_POST['current_pass'];
$new_pass = $_POST['new_pass'];
$new_pass_again = $_POST['new_pass_again'];
$sel_pass = "select * from customers where customer_pass='$current_pass' AND
customer_email='$user'";
$run_pass = mysqli_query($con,$sel_pass);
$check_pass = mysqli_num_rows($run_pass);
if($check_pass==0){
echo "<script>alert('Your Currrent Password is Incorrect')</script>";
exit();
}
if($new_pass!=$new_pass_again){
echo"<script>alert('Passwords Do not Match')</script>";
exit();
}
else{
$update_pass = "update customers set customer_pass='$new_pass' where
customer_email='$user'";
$run_update = mysqli_query($con,$update_pass);
echo"<script>alert('Password Changed Successfully')</script>";
echo"<script>window.open('my_account.php','_self')</script>";

}
}
?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>

7) checkout.php (Final Checkout page):


<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Page | 68
Project Report for Online Apparel Store

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="">All Products</a>
</li>
<li>

Page | 69
Project Report for Online Apparel Store

<a href="my_account.php">My Account</a>


</li>
<li>
<a href="#">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge"> <?php if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}?></span>
&nbsp;
&nbsp;
&nbsp;

Page | 70
Project Report for Online Apparel Store

&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"0><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";
}
?>
</small>
</div>
</div>
</div>
<hr />
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php

Page | 71
Project Report for Online Apparel Store

getBrands();
?>
</div>
</div>
<!-- Main page products-->
<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="">
<div class="caption">
<?php
if(!isset($_SESSION['customer_email']))
{
include("customer_login.php");
}
else{
include("payment.php");
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

8) delete_account.php (Page to Delete user account):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

Page | 72
Project Report for Online Apparel Store

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>
<div class="col-md-4 of">
<h5 class="">Do you really want to delete your account ?</h5>
<form method="post" action="" enctype="multipart/form-data">
<button type="submit" id="submit" name="yes" class="btn btn-sm btn-info">Yes, I
do</button>
<button type="submit" id="submit" name="no" class="btn btn-sm btn-danger">No, I
don't</button>
</form>
</div>
<?php
include("Includes/db_1.php");
$user = $_SESSION['customer_email'];
if(isset($_POST['yes'])){
$delete_customer = "delete from customers where customer_email='$user'";
$run_customer = mysqli_query($con,$delete_customer);
if($run_customer==true){
$_SESSION['customer_email']=='';
session_destroy();
session_unset();
echo"<script>alert('Account has been Deleted')</script>";

echo"<script>window.open('index.php','_self')</script>" ;
}
}
if(isset($_POST['no'])){
echo"<script>alert('Thank You')</script>";
echo"<script>window.open('my_account.php','_self')</script>" ;
}

Page | 73
Project Report for Online Apparel Store

?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

9) details.php (Product Detail Page):

<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">


<div class="container">

Page | 74
Project Report for Online Apparel Store

<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="all_products">All Products</a>
</li>
<li>
<a href="my_account.php">My Account</a>
</li>
<li>
<a href="customer_registration">Sign Up</a>
</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->

Page | 75
Project Report for Online Apparel Store

</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">
<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}
?>
</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;

&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
&nbsp;
&nbsp;

Page | 76
Project Report for Online Apparel Store

<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";
}
?>
</small>
</div>
</div>
</div>
<hr />
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>
<div class="list-group" id="brands">
<?php
getBrands();
?>

</div>
</div>

<!-- Main page products-->


<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="">
<div class="caption">
<?php
if(isset($_GET['pro_id'])){

Page | 77
Project Report for Online Apparel Store

$product_id = $_GET['pro_id'];

$get_pro = "select * from products where product_id='$product_id'";


$run_pro = mysqli_query($con, $get_pro);
while ($row_pro=mysqli_fetch_array($run_pro)){

$pro_id = $row_pro['product_id'];
$pro_title = $row_pro['product_title'];
$pro_price = $row_pro['product_price'];
$pro_img = $row_pro['product_img1'];
$pro_desc = $row_pro['product_des'];

echo "<div id='single_product'>

<img src='Admin_area/product_images/$pro_img' width='300'


height='400'/>
</div>
";
}
}
?>
<?php
if(isset($_GET['pro_id'])){
$product_id = $_GET['pro_id'];

$get_pro = "select * from products where product_id='$product_id'";


$run_pro = mysqli_query($con, $get_pro);
while ($row_pro=mysqli_fetch_array($run_pro)){

$pro_id = $row_pro['product_id'];
$pro_title = $row_pro['product_title'];
$pro_price = $row_pro['product_price'];
$pro_img = $row_pro['product_img1'];
$pro_desc = $row_pro['product_des'];
echo "
<div id='buttons'>
<h2>$pro_title</h2/>
<h5>Price :Rs $pro_price</h5>
<h4>$pro_desc</h4>
<a href='index.php'><button class='btn btn-xs btn-success'>Go to
Mainpage</button></a>
<a href='index.php?add_cart=$pro_id''><button class='btn btn-xs btn-
info'>Add to Cart</button></a>

Page | 78
Project Report for Online Apparel Store

</div>
</div>
";
}
}

?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

10) edit_account.php (Page to Edit User Account):

<?php
$user = $_SESSION['customer_email'];
$get_customer = "select * from customers where customer_email='$user'";
$run_customer = mysqli_query($con, $get_customer);
$row_customer = mysqli_fetch_array($run_customer);

$c_id = $row_customer['customer_id'];
$name = $row_customer['customer_name'];
$email = $row_customer['customer_email'];
$country = $row_customer['customer_country'];
$city = $row_customer['customer_city'];
$cont = $row_customer['customer_contact'];
$image = $row_customer['customer_image'];

?>

<div class="container" id="product_content">


<div class="row">
<div class="row">
<div class="col-md-8">
<div class="">
<div class="caption">

Page | 79
Project Report for Online Apparel Store

<h1 class="text-center login-title">Edit Account Information</h1>

<form method="post" action="" enctype="multipart/form-data">


<div class="form-group">
<label for="exampleInputEmail1">Name</label>
<input type="text" class="form-control" id="c_name" name="c_name"
value="<?php echo $name;?>" required autofocus>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Email</label>
<input type="email" class="form-control" id="c_email" name="c_email"
value="<?php echo $email;?>" required>
</div>
<div class="form-group">
<label for="exampleInputFile">Upload Profile Picture</label>
<input type="file" id="c_img" name="c_img"><img
src="Customer/customer_images/<?php echo $image;?>" width="40" height="80">
</div>
<div class="form-group">
<select class="form-control" id="c_country" name="c_country" required>
<option>India</option>
<option>Nepal</option>
<option>Bangladesh</option>
<option>Pakistan</option>
<option>Sri Lanka</option>
<option>Bhutan</option>
</select>
</div>
<label for="exampleInputEmail1">City</label>
<input type="text" class="form-control" id="c_city" name="c_city" value="<?php
echo $city;?>" required>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Contact</label>
<input type="text" class="form-control" id="c_cont" name="c_cont" value="<?php
echo $cont;?>" required>
</div>

<button type="submit" id="submit" name="update" class="btn btn-default">Update


Info</button>
</form>
</div>
</div>
</div>

Page | 80
Project Report for Online Apparel Store

</div>
</div>
</div>
<?php
if(isset($_POST['update'])){
$ip = getIp();
$customer_id = $c_id;
$c_name = $_POST['c_name'];
$c_email = $_POST['c_email'];
$c_pass = $_POST['c_pass'];
$c_country = $_POST['c_country'];
$c_city = $_POST['c_city'];
$c_cont = $_POST['c_cont'];
$c_img = $_FILES['c_img']['name'];
$c_img_tmp = $_FILES['c_img']['tmp_name'];

move_uploaded_file($c_img_tmp,"Customers/customer_images/$c_img")
;
$update_c = "update customers set customer_name='$c_name',
customer_email='$c_email', customer_pass='$c_pass',
customer_country='$c_country', customer_city='$c_city',
customer_contact='$c_cont', customer_image='$c_img' where
customer_id='$customer_id'";

$run_update= mysqli_query($con,$update_c);
if($run_update){
echo "<script>alert('Your account has been successfully
updated')</script>";
echo "<script>window.open('my_account.php','_self')</script>";

}
}
?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>

11) logout.php (Page to Logout):


<?php
session_start();
session_destroy();

Page | 81
Project Report for Online Apparel Store

echo"<script>window.open('index.php','_self')</script>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>
<body>
<!-- Main page products-->
<div class="container">
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

12) results.php (Search Bar results page ):

<?php
error_reporting(0);
session_start();
include("Includes/db_1.php");
include("Functions/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Page | 82
Project Report for Online Apparel Store

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Online Store</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img src="Images/Brandlogo3.png" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li>
<a href="all_products.php">All Products</a>
</li>
<li>
<a href="Customer/my_account.php">My Account</a>
</li>
<li>

Page | 83
Project Report for Online Apparel Store

<a href="#">Sign Up</a>


</li>
<li>
<a href="cart.php">Shopping Cart</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
<!--Search-Bar-->
<form method="get" action="results.php" enctype="multipart/form-data"
class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" name="user_query" class="form-control input-sm"
placeholder="Search Products">
</div>
<button type="submit" name="search" class="btn btn-info btn-sm">Go</button>
</form>
<!--End-Search-Bar-->
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<hr />
<?php
cart();

?>
<div class="container">
<div class="row">
<div class="well pull-right">
Welcome :<span class="badge">
<?php
if(isset($_SESSION['customer_email'])){
echo $_SESSION['customer_email'];
}
else{
echo"Guest";
}
?>
</span>
&nbsp;
&nbsp;

Page | 84
Project Report for Online Apparel Store

&nbsp;
&nbsp
Items : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_items(); else echo "N/A";?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
Cart Amount : <span class="badge"><?php if(!$_SESSION['customer_email']=='')
total_price(); else echo "N/A"; ?></span>
&nbsp;
&nbsp
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<a href="cart.php">Go To Cart</a>
&nbsp;
&nbsp;
<?php
if(!isset($_SESSION['customer_email'])){
echo "<a href='checkout.php'>Login</a>";

}
else{
echo "<a href='logout.php'>Logout</a>";
}
?>
</small>
</div>
</div>
</div>
<hr />
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-3">
<h3>CATEGORIES</h3>
<div class="list-group" id="cats">
<?php
getCats();
?>
</div>
<hr />
<h3>BRANDS</h3>

Page | 85
Project Report for Online Apparel Store

<div class="list-group" id="brands">


<?php
getBrands();
?>
</div>
</div>
<!-- Main page products-->
<div class="container" id="product_content">
<div class="row">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="">
<div class="caption">
<?php

if(isset($_GET['search'])){
$search_query = $_GET['user_query'];

$get_pro = "select * from products where product_keyword like


'%$search_query%'";
$run_pro = mysqli_query($con, $get_pro);
while ($row_pro=mysqli_fetch_array($run_pro)){

$pro_id = $row_pro['product_id'];
$pro_cat = $row_pro['cat_id'];
$pro_brand = $row_pro['brand_id'];
$pro_title = $row_pro['product_title'];
$pro_price = $row_pro['product_price'];
$pro_img = $row_pro['product_img1'];

echo "<div id='single_product'>


<img src='Admin_area/product_images/$pro_img' />
<h5 align='center'>$pro_title</h5/>
<h6 align='center'>Price : Rs $pro_price</h6>
<div id='buttons'>
<a href='details.php?pro_id=$pro_id'><button class='btn btn-xs btn-
warning'>Details</button></a>
<a href='index.php?add_cart=$pro_id''><button class='btn btn-xs btn-
info'>Add to Cart</button></a>
</div>
</div>
";

Page | 86
Project Report for Online Apparel Store

}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>

13) db_1.php (Database Connectivity):


<?php
$con = mysqli_connect("localhost","root","","myshop");
if(mysqli_connect_errno())
{
echo "Failed to Connect MYSQL: ". mysqli_connect_error();
}
?>

14) functions.php (Page containing various functions):

<?php
$con = mysqli_connect("localhost","root","","myshop");
if(mysqli_connect_errno())
{
echo "Failed to Connect MYSQL: ". mysqli_connect_error();
}
//Function to Get User IP Address
function getIp() {
$ip = $_SERVER['REMOTE_ADDR'];

Page | 87
Project Report for Online Apparel Store

if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
return $ip;
}
//Function to add products to Cart
function cart(){
if(isset($_GET['add_cart'])){
global $con;
$ip = getIp();
$pro_id = $_GET['add_cart'];
$check_pro = "select * from cart where ip_add='$ip' AND p_id='$pro_id'";
$run_check = mysqli_query($con, $check_pro);
if(mysqli_num_rows($run_check)>0){
echo "<script>alert('PRODUCT ALREADY ADDED')</script>";
}
else{
$insert_pro = "insert into cart (p_id,ip_add) values ('$pro_id','$ip')";
$run_pro = mysqli_query($con, $insert_pro);
echo "<script>window.open('index.php ','_self')</script>";
}
}
}
//Geting total Items in Cart
function total_items(){
if(isset($_GET['add_cart'])){
global $con;
$ip = getIp();
$get_items = "select * from cart where ip_add='$ip'";
$run_items = mysqli_query($con,$get_items);
$count_items = mysqli_num_rows($run_items);
}
else {
global $con;
$ip = getIp();
$get_items = "select * from cart where ip_add='$ip'";
$run_items = mysqli_query($con,$get_items);
$count_items = mysqli_num_rows($run_items);
}
echo $count_items;
}
//Function to get total price of items

Page | 88
Project Report for Online Apparel Store

function total_price(){
$total=0;
global $con;
$ip = getIp();
$sel_price = "select * from cart where ip_add='$ip'";
$run_price = mysqli_query($con,$sel_price);
while($p_price=mysqli_fetch_array($run_price)){
$pro_id = $p_price['p_id'];
$pro_price = "select * from products where product_id='$pro_id'";
$run_pro_price = mysqli_query($con,$pro_price);
while($pp_price = mysqli_fetch_array($run_pro_price)){
$product_price = array($pp_price['product_price']);
$values = array_sum($product_price);
$total +=$values;
}
}
echo " Rs. ". $total;
}
//Function to get dynamic categories
function getCats(){
global $con;
$get_cats = "select * from categories";
$run_cats = mysqli_query($con, $get_cats);
while($row_cats=mysqli_fetch_array($run_cats))
{
$cat_id = $row_cats['cat_id'];
$cat_title = $row_cats['cat_title'];
echo "<a href='index.php?cat=$cat_id' class='list-group-item'>$cat_title</a>";
}
}
//Function to get dynamic Brands

function getBrands(){
global $con;
$get_brands = "select * from brands";
$run_brands = mysqli_query($con, $get_brands);
while($row_brands=mysqli_fetch_array($run_brands)){
$brand_id = $row_brands['brand_id'];
$brand_title = $row_brands['brand_title'];
echo "<a href='index.php?brand=$brand_id' class='list-group-
item'>$brand_title</a>";
}

Page | 89
Project Report for Online Apparel Store

}
//Function to get products on mainpage
function getPro(){
if(!isset($_GET['cat'])){
if(!isset($_GET['brand'])){
global $con;

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


$run_pro = mysqli_query($con, $get_pro);
while ($row_pro=mysqli_fetch_array($run_pro)){

$pro_id = $row_pro['product_id'];
$pro_cat = $row_pro['cat_id'];
$pro_brand = $row_pro['brand_id'];
$pro_title = $row_pro['product_title'];
$pro_price = $row_pro['product_price'];
$pro_img = $row_pro['product_img1'];

echo "<div id='single_product'>


<img src='Admin_area/product_images/$pro_img' />
<h5 align='center'>$pro_title</h5/>
<h6 align='center'>Price : Rs $pro_price</h6>
<div id='buttons'>
<a href='details.php?pro_id=$pro_id'><button class='btn btn-xs btn-
warning'>Details</button></a>
<a href='index.php?add_cart=$pro_id''><button id='cart_btn' class='btn btn-xs btn-
info'>Add to Cart</button></a>
</div>
</div>
";
}

}
}
}
//Function to get category wise products
function getCatPro(){
if(isset($_GET['cat'])){
$cat_id = $_GET['cat'];
global $con;

$get_cat_pro = "select * from products where cat_id='$cat_id'";


$run_cat_pro = mysqli_query($con, $get_cat_pro);
while ($row_cat_pro=mysqli_fetch_array($run_cat_pro)){

Page | 90
Project Report for Online Apparel Store

$pro_id = $row_cat_pro['product_id'];
$pro_cat = $row_cat_pro['cat_id'];
$pro_brand = $row_cat_pro['brand_id'];
$pro_title = $row_cat_pro['product_title'];
$pro_price = $row_cat_pro['product_price'];
$pro_img = $row_cat_pro['product_img1'];

echo "<div id='single_product'>

<img src='Admin_area/product_images/$pro_img' />


<h5 align='center'>$pro_title</h5/>
<h6 align='center'>Price :Rs $pro_price</h6>
<div id='buttons'>
<a href='details.php?pro_id=$pro_id'><button class='btn btn-xs btn-
warning'>Details</button></a>
<a href='index.php?add_cart=$pro_id''><button class='btn btn-xs btn-info'>Add to
Cart</button></a>
</div>
</div>
";

}
}
}
//function to get brand wise products
function getBrandPro(){
if(isset($_GET['brand'])){
$brand_id = $_GET['brand'];
global $con;

$get_brand_pro = "select * from products where brand_id='$brand_id'";


$run_brand_pro = mysqli_query($con, $get_brand_pro);
while ($row_brand_pro=mysqli_fetch_array($run_brand_pro)){

$pro_id = $row_brand_pro['product_id'];
$pro_cat = $row_brand_pro['cat_id'];
$pro_brand = $row_brand_pro['brand_id'];
$pro_title = $row_brand_pro['product_title'];
$pro_price = $row_brand_pro['product_price'];
$pro_img = $row_brand_pro['product_img1'];

echo "<div id='single_product'>

Page | 91
Project Report for Online Apparel Store

<img src='Admin_area/product_images/$pro_img' />


<h5 align='center'>$pro_title</h5/>
<h6 align='center'>Price :Rs $pro_price</h6>
<div id='buttons'>
<a href='details.php?pro_id=$pro_id'><button class='btn btn-xs btn-
warning'>Details</button></a>
<a href='index.php?add_cart=$pro_id''><button class='btn btn-xs btn-info'>Add to
Cart</button></a>
</div>
</div>
";

}
}

?>

15) index.php (This is the home page of the Admin panel):


<?php
session_start();
if(!isset($_SESSION['user_email'])){
echo "<script>window.open('login.php?not_admin=Not Authorised as Administrator
!','_self')</script>";

}
else{

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Panel</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">

<!-- Optional theme -->


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>

Page | 92
Project Report for Online Apparel Store

#single_product{
float:left;
margin:20px;
margin-bottom:30px;
}
#buttons{
margin:40px;
}
body{ background:white;
};
.main_wrapper{
width:1000px;
height:auto;
margin:auto;
}
#header{
width:1000px;
height:120px;
background:url(images/header.jpg);
border-bottom:5px groove black;
}
#left{
width:1059px;
height:600px;
background-color:#CCC;
float:left;
border:1px groove #003;
margin-left:40px;

}
#right{
width:250px;
height:600px;
background:
#FC6;
float:right;
border:2px groove black;
}

</style>
</head>

<body>
<!-- Admin Controls -->

Page | 93
Project Report for Online Apparel Store

<div class="main_wrapper" align="center">


<div id="navbar">
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.php">
<img alt="Brand" src="Brandlogo_ADMIN.png" />
</a>

</div>
</div>
</nav>
</div>
<div id="right">
<h3 style="text-align:center">ADMIN CONTROLS</h3>
ADMIN: <span class="badge">
<?php
if(isset($_SESSION['user_email'])){
echo $_SESSION['user_email'];
}
?>
</span><br /><br />
<b><a href="logout.php">LOGOUT</a></b>
<ul class="list-group well-sm">
<a href="index.php" class="list-group-item">HOME</a>
<a href="index.php?insert_product" class="list-group-item">INSERT NEW PRODUCT</a>
<a href="index.php?view_products" class="list-group-item">VIEW ALL PRODUCTS</a>
<a href="index.php?insert_cat" class="list-group-item">INSERT NEW CATEGORIES</a>
<a href="index.php?view_cats" class="list-group-item">VIEW ALL CATEGORIES</a>
<a href="index.php?insert_brand" class="list-group-item">INSERT NEW BRAND</a>
<a href="index.php?view_brands" class="list-group-item">VIEW ALL BRANDS</a>
<a href="index.php?view_customers" class="list-group-item">VIEW CUSTOMERS</a>
<a href="index.php?view_orders" class="list-group-item disabled">VIEW ORDERS</a>
<a href="index.php?view_payments" class="list-group-item disabled">VIEW PAYMENTS</a>
<br />
<a href="../index.php">Return to the Store</a>

</ul>

</div>
<div id="left">
<?php
if(isset($_GET['insert_product'])){
include("insert_product_main.php");

Page | 94
Project Report for Online Apparel Store

if(isset($_GET['view_products'])){
include("view_products.php");

if(isset($_GET['edit_pro'])){
include("edit_pro.php");

if(isset($_GET['insert_cat'])){
include("insert_cat.php");

if(isset($_GET['view_cats'])){
include("view_cats.php");

if(isset($_GET['edit_cat'])){
include("edit_cat.php");

}
if(isset($_GET['insert_brand'])){
include("insert_brand.php");

if(isset($_GET['view_brands'])){
include("view_brands.php");

if(isset($_GET['edit_brand'])){
include("edit_brand.php");

if(isset($_GET['view_customers'])){
include("view_customers.php");

Page | 95
Project Report for Online Apparel Store

?>
</div>
</div>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html><?php }?>

16) insert_product_main (Insert Product page):

<?php
include("Includes/db_1.php");
include("Includes/function.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert Product</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>

<body>

<form method="post" action="insert_product_main.php" enctype="multipart/form-data">

<div class="container">
<div class="row">
<div class="pull-left col-md-6">
<table width="1000" height="550" align="left" border="0px" class="table table-bordered
table-condensed">
<tr>
<td>
<b>Product Title</b></td>

Page | 96
Project Report for Online Apparel Store

<td><input type="text" name="product_title" /></td>


</tr>

<tr>
<td><b>Product Category</b></td>
<td>
<select name="product_cat">
<option>Select Category</option>
<?php
$get_cats = "select * from categories";
$run_cats = mysqli_query($con, $get_cats);
while($row_cats=mysqli_fetch_array($run_cats)){
$cat_id = $row_cats['cat_id'];
$cat_title = $row_cats['cat_title'];

echo "<option value='$cat_id'>$cat_title</option>";


}
?>
</select>
</td>
</tr>

<tr>
<td><b>Product Brand</b></td>
<td>
<select name="product_brand">
<option>Select Brand</option>
<?php
$get_brands = "select * from brands";
$run_brands = mysqli_query($con, $get_brands);
while($row_brands=mysqli_fetch_array($run_brands)){
$brand_id = $row_brands['brand_id'];
$brand_title = $row_brands['brand_title'];

echo "<option value='$brand_id'>$brand_title</option>";


}
?>
</select>
</td>
</tr>

<tr>
<td><b>Product Image 1</b></td>
<td><input type="file" name="product_img1" /></td>

Page | 97
Project Report for Online Apparel Store

</tr>

<tr>
<td><b>Product Image 2</b></td>
<td><input type="file" name="product_img2" /></td>
</tr>

<tr>
<td><b>Product Image 3</b></td>
<td><input type="file" name="product_img3" /></td>
</tr>

<tr>
<td><b>Product Price</b></td>
<td><input type="text" name="product_price" /></td>
</tr>

<tr>
<td><b>Product Description</b></td>
<td><textarea name="product_des" cols="20" rows="10"></textarea></td>
</tr>

<tr>
<td><b>Product Keyword</b></td>
<td><input type="text" name="product_keyword" /></td>
</tr>

<tr align="center">
<td colspan="2"><input type="submit" name="insert_product" value="Insert Product"
/></td>
</tr>
</table>
</div>
</div>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST['insert_product'])){

//Text Field Variables

$product_title = $_POST['product_title'];

Page | 98
Project Report for Online Apparel Store

$product_cat = $_POST['product_cat'];
$product_brand = $_POST['product_brand'];
$product_price = $_POST['product_price'];
$product_desc = $_POST['product_des'];
$status = 'on';
$product_keyword = $_POST['product_keyword'];

//Image Variables

$product_img1 = $_FILES['product_img1']['name'];
$product_img2 = $_FILES['product_img2']['name'];
$product_img3 = $_FILES['product_img3']['name'];

//Temporary Image Names

$temp_name1 = $_FILES['product_img1']['tmp_name'];
$temp_name2 = $_FILES['product_img2']['tmp_name'];
$temp_name3 = $_FILES['product_img3']['tmp_name'];

if($product_title=='' OR $product_cat=='' OR $product_brand=='' OR $product_img1=='' OR


$product_price=='' OR $product_desc=='')
{
echo "<script>alert('PLEASE FILL ALL FIELDS')</script>";
}
else{
//Uploading Images
move_uploaded_file($temp_name1,"product_images/$product_img1");
move_uploaded_file($temp_name2,"product_images/$product_img2");
move_uploaded_file($temp_name3,"product_images/$product_img3");
$insert_product = "insert into products
(cat_id,brand_id,date,product_title,product_img1,product_img2,product_img3,product_pri
ce,product_des,product_status,product_keyword) values
('$product_cat','$product_brand',NOW(),'$product_title','$product_img1','$product_img2','
$product_img3','$product_price','$product_desc','$status','$product_keyword')";
$run_product = mysqli_query($con,$insert_product);
if($run_product){
echo "<script>alert('Product Inserted Successfully')</script>";
echo "<script>window.open('index.php?insert_product','_self')</script>";
}
}
}
?>

Page | 99
Project Report for Online Apparel Store

17) insert_brand.php (Insert new Brand page):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert Brand</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<h3>INSERT NEW BRAND</h3>
<form method="post" action="" style="padding-left:360px;">
<div class="col-lg-6 alert alert-info">
<div class="input-group">
<input type="text" name="new_brand" class="form-control" placeholder="Insert
New Brand....." required="required">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="add_brand">Go!</button>
</span>
</div>
</div>
</form>
<?php
include("Includes/db_1.php");
if(isset($_POST['add_brand'])){

$new_brand = $_POST['new_brand'];
$insert_brand = "INSERT INTO `myshop`.`brands` (`brand_id`, `brand_title`) VALUES
(NULL, '$new_brand');";
$run_brand = mysqli_query($con, $insert_brand);
if($run_brand){
echo "<script>alert('New Brand has been Inserted')</script>";
echo "<script>window.open('index.php?view_brands','_self')</script>";
}

?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

Page | 100
Project Report for Online Apparel Store

</body>
</html>

18) insert_cat.php (Insert New Category page):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Products</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<h3>INSERT NEW CATEGORY</h3>
<form method="post" action="" style="padding-left:360px;">
<div class="col-lg-6 alert alert-info">
<div class="input-group">
<input type="text" name="new_cat" class="form-control" placeholder="Insert New
Category....." required="required">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="add_cat">Go!</button>
</span>
</div>
</div>
</form>

<?php
include("Includes/db_1.php");
if(isset($_POST['add_cat'])){
$new_cat = $_POST['new_cat'];
$insert_cat = "INSERT INTO `myshop`.`categories` (`cat_id`, `cat_title`) VALUES (NULL,
'$new_cat')";
$run_cat = mysqli_query($con, $insert_cat);

if($run_cat){
echo "<script>alert('New Category has been Inserted')</script>";
echo "<script>window.open('index.php?view_cats','_self')</script>";
}

Page | 101
Project Report for Online Apparel Store

}
?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

</body>
</html>

19) delete_brand .php (Delete specific Brand):

<?php
include("Includes/db_1.php");
if(isset($_GET['delete_brand'])){

$delete_id = $_GET['delete_brand'];

$delete_brand = "delete from brands where brand_id='$delete_id'";

$run_delete = mysqli_query($con, $delete_brand);

if($run_delete){
echo "<script>alert('The Brand Has Been Deleted')</script>";
echo "<script>window.open('index.php?view_brands','_self')</script>";

?>

20) delete_c.php (Delete Specific Customer):

<?php
include("Includes/db_1.php");
if(isset($_GET['delete_c'])){

$delete_id = $_GET['delete_c'];

$delete_c = "delete from customers where customer_id='$delete_id'";

$run_delete = mysqli_query($con, $delete_c);

Page | 102
Project Report for Online Apparel Store

if($run_delete){
echo "<script>alert('The Customer Has Been Deleted')</script>";
echo "<script>window.open('index.php?view_customers','_self')</script>";
}

}
?>

21) delete_cat.php (Delete Specific Category):

<?php
include("Includes/db_1.php");

if(isset($_GET['delete_cat'])){

$delete_id = $_GET['delete_cat'];

$delete_cat = "delete from categories where cat_id='$delete_id'";

$run_delete = mysqli_query($con, $delete_cat);

if($run_delete){
echo "<script>alert('The Category Has Been Deleted')</script>";
echo "<script>window.open('index.php?view_cats','_self')</script>";

}
}

?>

22) edit_brand.php (Edit Specific Brand):

<?php

include("Includes/db_1.php");
if(isset($_GET['edit_brand'])){
$brand_id = $_GET['edit_brand'];
$get_brand = "select * from brands where brand_id='$brand_id'";
$run_brand = mysqli_query($con, $get_brand);
$row_brand = mysqli_fetch_array($run_brand);
$brand_id = $row_brand['brand_id'];
$brand_title = $row_brand['brand_title'];

Page | 103
Project Report for Online Apparel Store

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Edit Brands</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<h3>EDIT BRANDS</h3>
<form method="post" action="" style="padding-left:360px;">
<div class="col-lg-6 alert alert-info">
<div class="input-group">
<input type="text" name="new_brand" class="form-control" value="<?php echo
$brand_title; ?>" required="required">
<span class="input-group-btn">
<button class="btn btn-default" type="submit"
name="update_brand">Update</button>
</span>
</div>
</div>
</form>
<?php
if(isset($_POST['update_brand'])){

$update_id = $brand_id;
$new_brand = $_POST['new_brand'];
$update_brand = "update brands set brand_title='$new_brand' where
brand_id='$update_id'";
$run_brand = mysqli_query($con, $update_brand);
if($run_brand){
echo "<script>alert('The Brand has been Updated')</script>";
echo "<script>window.open('index.php?view_brands','_self')</script>";
}

?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>

Page | 104
Project Report for Online Apparel Store

</body>
</html>

23) edit_cat.php (Edit Specific Category):

<?php
include("Includes/db_1.php");
if(isset($_GET['edit_cat'])){
$cat_id = $_GET['edit_cat'];
$get_cat = "select * from categories where cat_id='$cat_id'";
$run_cat = mysqli_query($con, $get_cat);
$row_cat = mysqli_fetch_array($run_cat);
$cat_id = $row_cat['cat_id'];
$cat_title = $row_cat['cat_title'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Products</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>

<h3>EDIT CATEGORY</h3>
<form method="post" action="" style="padding-left:360px;">
<div class="col-lg-6 alert alert-info">
<div class="input-group">
<input type="text" name="new_cat" class="form-control" value="<?php echo $cat_title;
?>" required="required">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="update_cat">Update</button>
</span>
</div>
</div>
</form>
<?php

Page | 105
Project Report for Online Apparel Store

if(isset($_POST['update_cat'])){
$update_id = $cat_id;
$new_cat = $_POST['new_cat'];
$update_cat = "update categories set cat_title='$new_cat' where cat_id='$update_id'";
$run_cat = mysqli_query($con, $update_cat);
if($run_cat){
echo "<script>alert('The Category has been Updated')</script>";
echo "<script>window.open('index.php?view_cats','_self')</script>";
}

}
?>
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>

24) edit_pro.php (Edit Specific Product):

<?php
include("Includes/db_1.php");
include("Includes/function.php");
if(isset($_GET['edit_pro'])){
$get_id = $_GET['edit_pro'];
$get_pro = "select * from products where product_id='$get_id'";
$run_pro = mysqli_query($con,$get_pro);
$i=0;
$row_pro=mysqli_fetch_array($run_pro);
$pro_id = $row_pro['product_id'];
$pro_title = $row_pro['product_title'];
$pro_image = $row_pro['product_img1'];
$pro_price = $row_pro['product_price'];
$pro_des = $row_pro['product_des'];
$pro_keyword = $row_pro['product_keyword'];
$pro_cat = $row_pro['cat_id'];
$pro_brand = $row_pro['brand_id'];
$get_cat = "select * from categories where cat_id='$pro_cat'";
$run_cat=mysqli_query($con,$get_cat);
$row_cat=mysqli_fetch_array($run_cat);
$category_title = $row_cat['cat_title'];
$get_brand = "select * from brands where brand_id='$pro_brand'";
$run_brand=mysqli_query($con,$get_brand);
$row_brand=mysqli_fetch_array($run_brand);

Page | 106
Project Report for Online Apparel Store

$brand_title = $row_brand['brand_title'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Edit Products</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<form method="post" action="" enctype="multipart/form-data">
<div class="container">
<div class="row">
<div class="pull-left col-md-6">
<table width="1000" height="550" align="left" border="0px" class="table table-bordered
table-condensed">
<tr>
<td>
<b>Product Title</b></td>
<td><input type="text" name="product_title" value="<?php echo $pro_title; ?>" /></td>
</tr>
<tr>
<td><b>Product Category</b></td>
<td>
<select name="product_cat">
<option><?php echo $category_title; ?></option>
<?php
$get_cats = "select * from categories";
$run_cats = mysqli_query($con, $get_cats);
while($row_cats=mysqli_fetch_array($run_cats)){
$cat_id = $row_cats['cat_id'];
$cat_title = $row_cats['cat_title'];
echo "<option value='$cat_id'>$cat_title</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td><b>Product Brand</b></td>
<td>

Page | 107
Project Report for Online Apparel Store

<select name="product_brand">
<option><?php echo $brand_title; ?></option>
<?php
$get_brands = "select * from brands";
$run_brands = mysqli_query($con, $get_brands);
while($row_brands=mysqli_fetch_array($run_brands)){
$brand_id = $row_brands['brand_id'];
$brand_title = $row_brands['brand_title'];
echo "<option value='$brand_id'>$brand_title</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td><b>Product Image 1</b></td>
<td><input type="file" name="product_img1" /><img src="product_images/<?php echo
$pro_image; ?>" width="40" height="50" /> </td>
</tr>
<tr>
<td><b>Product Image 2</b></td>
<td><input type="file" name="product_img2" /></td>
</tr>
<tr>
<td><b>Product Image 3</b></td>
<td><input type="file" name="product_img3" /></td>
</tr>
<tr>
<td><b>Product Price</b></td>
<td><input type="text" name="product_price" value="<?php echo $pro_price; ?>" /></td>
</tr>

<tr>
<td><b>Product Description</b></td>
<td><textarea name="product_des" cols="20" rows="10" /><?php echo $pro_des; ?>
</textarea></td>
</tr>
<tr>
<td><b>Product Keyword</b></td>
<td><input type="text" name="product_keyword" value="<?php echo $pro_keyword; ?>"
/></td>
</tr>
<tr align="center">

Page | 108
Project Report for Online Apparel Store

<td colspan="2"><input type="submit" name="update_product" value="Update Product"


/></td>
</tr>
</table>
</div>
</div>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST['update_product'])){
//Text Field Variables
$update_id = $pro_id;
$product_title = $_POST['product_title'];
$product_cat = $_POST['product_cat'];
$product_brand = $_POST['product_brand'];
$product_price = $_POST['product_price'];
$product_desc = $_POST['product_des'];
$status = 'on';
$product_keyword = $_POST['product_keyword'];

//Image Variables
$product_img1 = $_FILES['product_img1']['name'];
$product_img2 = $_FILES['product_img2']['name'];
$product_img3 = $_FILES['product_img3']['name'];

//Temporary Image Names


$temp_name1 = $_FILES['product_img1']['tmp_name'];
$temp_name2 = $_FILES['product_img2']['tmp_name'];
$temp_name3 = $_FILES['product_img3']['tmp_name'];

if($product_title=='')
{
echo "<script>alert('PLEASE FILL ALL FIELDS')</script>";
}
else{
//Uploading Images
move_uploaded_file($temp_name1,"product_images/$product_img1");
move_uploaded_file($temp_name2,"product_images/$product_img2");
move_uploaded_file($temp_name3,"product_images/$product_img3");
$update_product = "update products set
cat_id='$product_cat',brand_id='$product_brand',product_title='$product_title',product_pr

Page | 109
Project Report for Online Apparel Store

ice='$product_price',product_des='$product_des',product_img1='$product_img1',product_
keyword='$product_keyword' where product_id='$update_id'" ;
$run_product = mysqli_query($con, $update_product);
if($run_product){
echo "<script>alert('Product Updated Successfully')</script>";
echo "<script>window.open('index.php?view_products','_self')</script>";
}
}
}
?>

25) login.php (Admin Login Page):

<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Login</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="Styles/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css">
<style>
body{
background-image:url(background.png);
}

</style>
</head>
<body>
<div id=""
<div class="container" style="margin-left:190px; margin-top:50px;">
<div class="row">
<div class="col-md-4 col-md-offset-3">
<form class="form-signin" action="login.php" method="post">
<h3 style="color:red; text-align:center;"><?php echo @$_GET['not_admin'];
?></h3>

Page | 110
Project Report for Online Apparel Store

<h3 style="color:red; text-align:center;"><?php echo @$_GET['logged_out'];


?></h3>
<h2 class="form-signin-heading" align="center">ADMIN LOGIN</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" name="email" class="form-control"
placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" name="pass" class="form-control"
placeholder="Password" required>
<div class="checkbox">

</div>
<button class="btn btn-lg btn-primary btn-block" type="submit"
name="login">Log In</button>
</form>
</div>
</div>
</div> <!-- /container -->
<script src="JS/bootstrap.min.js"></script>
<script src="JS/jquery-2.1.4.min.js"></script>
</body>
</html>
<?php
include("Includes/db_1.php");
if(isset($_POST['login'])){

$email = mysql_real_escape_string($_POST['email']);
$pass = mysql_real_escape_string($_POST['pass']);

$sel_user = "select * from admins where user_email='$email' AND


user_pass='$pass'";
$run_user = mysqli_query($con, $sel_user);
$check_user = mysqli_num_rows($run_user);

if($check_user==0){
echo "<script>alert('Password or Email is Incorrect')</script>";

}
else{
$_SESSION['user_email']=$email;
echo "<script>alert('Admin Logged In Successfully ')</script>";
echo "<script>window.open('index.php?logged_in','_self')</script>";
}

Page | 111
Project Report for Online Apparel Store

}
?>

26) logout.php (Admin Logout Page):

<?php
session_start();
session_destroy();
echo "<script>window.open('login.php?logged_out=You Have Logged
Out','_self')</script>";
?>

27) view_brands.php (View All Brands page):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Brands</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>

<body>
<table width="1000" align="center" border="" class="table table-bordered table-
condensed">
<tr align="center">
<td colspan="6"><h3 align="center">AVAILABLE BRANDS</h3></td>
</tr>

<tr align="center">
<th>BRAND ID</th>
<th>BRAND TITLE</th>
<th>EDIT</th>
<th>DELETE</th>
</tr>
<?php
include("Includes/db_1.php");
$get_brand = "select * from brands";
$run_brand = mysqli_query($con,$get_brand);

Page | 112
Project Report for Online Apparel Store

$i=0;
while ($row_brand=mysqli_fetch_array($run_brand)){
$brand_id = $row_brand['brand_id'];
$brand_title = $row_brand['brand_title'];
$i++;
?>
<tr>

<td><?php echo $i; ?></td>


<td><?php echo $brand_title; ?></td>
<td><a href="index.php?edit_brand=<?php echo $brand_id; ?>">Edit</a></td>
<td><a href="delete_brand.php?delete_brand=<?php echo $brand_id;
?>">Delete</a></td>
</tr>
<?php }?>
</table>
</body>
</html>

28) view_cats.php (View All Categories):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Products</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>

<body>
<table width="1000" align="center" border="" class="table table-bordered table-
condensed">
<tr align="center">
<td colspan="6"><h3 align="center">AVAILABLE CATEGORIES</h3></td>
</tr>
<tr align="center">
<th>CAT. ID</th>
<th>CATEGORY TITLE</th>
<th>EDIT</th>

Page | 113
Project Report for Online Apparel Store

<th>DELETE</th>
</tr>
<?php
include("Includes/db_1.php");
$get_cat = "select * from categories";
$run_cat = mysqli_query($con,$get_cat);
$i=0;
while ($row_cat=mysqli_fetch_array($run_cat)){
$cat_id = $row_cat['cat_id'];
$cat_title = $row_cat['cat_title'];
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $cat_title; ?></td>
<td><a href="index.php?edit_cat=<?php echo $cat_id; ?>">Edit</a></td>
<td><a href="delete_cat.php?delete_cat=<?php echo $cat_id; ?>">Delete</a></td>
</tr>
<?php }?>
</table>
</body>
</html>

29) view_customers.php (View All the Customers):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Customers</title>
<link rel="stylesheet" href="Styles/bootstrap.min.css" />
<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<table width="1000" align="center" border="" class="table table-bordered table-
condensed">
<tr align="center">
<td colspan="6"><h3 align="center">REGISTERED CUSTOMERS</h3></td>
</tr>
<tr align="center">
<th>CUSTOMER ID</th>

Page | 114
Project Report for Online Apparel Store

<th>CUSTOMER NAME</th>
<th>CUSTOMER EMAIL</th>
<th>CUSTOMER IMAGE</th>
<th>DELETE</th>
</tr>
<?php
include("Includes/db_1.php");
$get_customer = "select * from customers";
$run_customer = mysqli_query($con,$get_customer);
$i=0;
while ($row_customer=mysqli_fetch_array($run_customer)){
$customer_id = $row_customer['customer_id'];
$customer_name = $row_customer['customer_name'];
$customer_email = $row_customer['customer_email'];
$customer_image = $row_customer['customer_image'];
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $customer_name; ?></td>
<td><?php echo $customer_email; ?></td>
<td><img src="../Customers/customer_images/<?php echo $customer_image; ?>"
width="40" height="50" /></td>
<td><a href="delete_c.php?delete_c=<?php echo $customer_id;
?>">Delete</a></td>

</tr>
<?php }?>
</table>
</body>
</html>

30) view_products.php (View All Products in The Store):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Products</title>

Page | 115
Project Report for Online Apparel Store

<link rel="stylesheet" href="Styles/bootstrap.min.css" />


<link rel="stylesheet" href="Styles/bootstrap-theme.min.css" />
</head>
<body>
<table width="1000" align="center" border="" class="table table-bordered table-
condensed">
<tr align="center">
<td colspan="6"><h3 align="center">PRODUCTS CURRENTLY AVAILABLE</h3></td>
</tr>
<tr align="center">
<th>S.No.</th>
<th>TITLE</th>
<th>IMAGE</th>
<th>PRICE</th>
<th>EDIT</th>
<th>DELETE</th>
</tr>
<?php
include("Includes/db_1.php");
$get_pro = "select * from products";
$run_pro = mysqli_query($con,$get_pro);
$i=0;
while ($row_pro=mysqli_fetch_array($run_pro)){
$pro_id = $row_pro['product_id'];
$pro_title = $row_pro['product_title'];
$pro_image = $row_pro['product_img1'];
$pro_price = $row_pro['product_price'];
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $pro_title; ?></td>
<td><img src="product_images/<?php echo $pro_image; ?>" width="40"
height="50" /></td>
<td>Rs. <?php echo $pro_price; ?></td>
<td><a href="index.php?edit_pro=<?php echo $pro_id; ?>">Edit</a></td>
<td><a href="delete_pro.php?delete_pro=<?php echo $pro_id;
?>">Delete</a></td>
</tr>
<?php }?>
</table>
</body>
</html>

Page | 116
Project Report for Online Apparel Store

Error Handling:
Error handling has been implemented for both client and server sides. Client side
error handling has been done with the help of javascript and server side errors are
handled by php.

Validation Checks:
Validation checks has been implemented for both client and server sides.

TESTING:
1) Test Case Design:

Functional testing is a quality assurance (QA) process and a type of black-box testing that
bases its test cases on the specifications of the software component under test. Functions
are tested by feeding them input and examining the output, and internal program structure
is rarely considered (not like in white-box testing). Functional testing usually
describes what the system does.
Functional testing does not imply that you are testing a function (method) of your module
or class. Functional testing tests a slice of functionality of the whole system.
Functional testing typically involves six steps.

1. The identification of functions that the software is expected to perform


2. The creation of input data based on the function's specifications
3. The determination of output based on the function's specifications
4. The execution of the test case
5. The comparison of actual and expected outputs
6. To check whether the application works as per the customer need.

Registration Use Case:

Test Case No. TCT-001


Functionality Registration of User
Environment User Registration Page
Procedure 1) Click on the “Sign Up” link to get to the
page.
2) Click on Create Account without filling a
field.

Page | 117
Project Report for Online Apparel Store

Expected Outcome An Error Message will show in the respective field


showing “Please fill out this field”.

Login Use Case:

Test Case No. TCT-002


Functionality Login of User
Environment User Login Page
Procedure 1) Click on the “Login” link to get to the page.
2) Enter wrong password or username in the
fields.
Expected Outcome An Error Popup Message will show in the
respective field showing “Password or Username
do not match”.

Password Change Use Case:

Test Case No. TCT-003


Functionality Change of User Password
Environment My Account Page
Procedure 1) Click on the “My Account” link to get to the
page after login.
2) Click on Change Password link.
3) Enter Wrong current password or different
passwords in the new password fields.
Expected Outcome An Error Message will show in the respective field
showing “Your current password is incorrect” or
“Your Passwords do not match”.

Add to Cart Use Case:

Test Case No. TCT-004


Functionality Adding the same product to cart
Environment Main Page and Cart
Procedure 1) Click on the “Add to Cart” link to add a
product into the cart.
2) Click again on “Add to Cart” link of the
same product.

Page | 118
Project Report for Online Apparel Store

Expected Outcome An Error Message will show in the respective field


showing “Product already added”.

Admin Login Use Case:

Test Case No. TCT-005


Functionality Visit the Admin Panel homepage.
Environment Admin Panel homepage
Procedure 1) The admin goes to the admin panel
homepage.
Expected Outcome The login screen appears and it shows a message
“Not Authorised as Administrator” unless the
admin provides valid ID and Password to login

Insert New Product Use Case:

Test Case No. TCT-006


Functionality Insert New Product without filling out fields.
Environment Admin Panel homepage
Procedure 1) The admin goes to the admin panel
homepage.
2) Clicks on the “Insert New Product” button
3) Click on Insert Product button without
filling out the fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.

Insert New Brand Use Case:

Test Case No. TCT-007


Functionality Insert New Brand without filling out fields.
Environment Admin Panel homepage
Procedure 1) The admin goes to the admin panel
homepage.
2) Clicks on the “Insert Brand” button

Page | 119
Project Report for Online Apparel Store

3) Click on Insert Brand without filling out the


fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.

Insert New Category Use Case:

Test Case No. TCT-008


Functionality Insert New Category without filling out fields.
Environment Admin Panel homepage
Procedure 1) The admin goes to the admin panel
homepage.
2) Clicks on the “Insert Category” button
3) Click on Insert Category without filling out
the fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.

2) Test Reports:

Test Case Ref No. TCT-001


Functionality Registration of User
Expected Outcome An Error Message will show in the respective field
showing “Please fill out this field”.
Data Used a) Click on the create account button without
filling out any of the fields.
b) Click on the create account button without
filling only one field.
Actual Outcome Default HTML notification shown on every empty
field as “Please fill out this field”.
Result Passed
Test Case Ref No. TCT-002
Functionality Login of User
Expected Outcome An Error Popup Message will show in the
respective field showing “Password or Username
do not match”.
Data Used a) Clicking the login button without entering
email or password.

Page | 120
Project Report for Online Apparel Store

b) Clicking the login button after entering the


email only.
c) Clicking the login button after entering
wrong password.
Actual Outcome a) Default HTML notification shown “Please
fill out this field”.
b) Default HTML notification shown “Please
fill out this field” on the password field.
c) Pop-up alert shown as “Password or Email
do not match”
Result Passed

Test Case Ref No. TCT-003


Functionality Change of User password
Expected Outcome An Error Message will show in the respective field
showing “Your current password is incorrect” or
“Your Passwords do not match”.
Data Used a) Clicking the Change Password button
without entering anything.
b) Entering wrong current passsword.
c) Entering different new passwords.

Actual Outcome a) Default HTML notification shown “Please


fill out this field”.
b) Pop-up alert shown as “Your current
password is incorrect”.
c) Pop-up alert shown as “Passwords do not
match”
Result Passed

Test Case Ref No. TCT-004


Functionality Adding the same product to cart
Expected Outcome An Error Message will show in the respective field
showing “Product already added”.
Data Used a) Add same product to cart twice.
Actual Outcome a) Pop-up shown as “Product already added”.
Result Passed

Page | 121
Project Report for Online Apparel Store

Test Case Ref No. TCT-005


Functionality Visit the Admin Panel homepage.
Expected Outcome The login screen appears and it shows a message
“Not Authorised as Administrator” unless the
admin provides valid ID and Password to login
Data Used a) Vistited the admin panel homepage.
b) Click login without entering any field.
c) Click login with wrong email or password.
Actual Outcome a) “Not Authorised as Administrator” shown
above the login panel.
b) Default HTML notification shown “Please
fill out this field”.
c) Pop-up alert shown as “Password or Email
is incorrect”
Result Passed

Test Case Ref No. TCT-006


Functionality Insert New Product without filling out fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.
Data Used a) Clicking on Insert Product without entering
any fields.
Actual Outcome a) Default HTML notification shown “Please
fill out this field”.

Result Passed

Test Case Ref No. TCT-007


Functionality Insert New Brand without filling out fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.
Data Used b) Clicking on Insert Brand without entering
any fields.

Page | 122
Project Report for Online Apparel Store

Actual Outcome b) Default HTML notification shown “Please


fill out this field”.

Result Passed

Test Case Ref No. TCT-008


Functionality Insert New Category without filling out fields.
Expected Outcome A Popup error message shows that “Please
Fill out the field”.
Data Used c) Clicking on Insert Category without
entering any fields.
Actual Outcome c) Default HTML notification shown “Please
fill out this field”.

Result Passed

The following section contains all the Input and Output screenshots of the Online Store.
a) Registration page.
b) Login Page.
c) User Password Change.
d) Adding same product to cart.
e) Admin panel login.
f) Inserting New Product
g) Inserting New Brand.
h) Inserting New Category

3) Input and Output Screens:

Registration Page:

Page | 123
Project Report for Online Apparel Store

Login Page:

Page | 124
Project Report for Online Apparel Store

User Password change:

Page | 125
Project Report for Online Apparel Store

Adding same product to Cart:

Page | 126
Project Report for Online Apparel Store

Admin Login Panel:

Page | 127
Project Report for Online Apparel Store

Insert New Product:

Page | 128
Project Report for Online Apparel Store

Insert New Brand:

Page | 129
Project Report for Online Apparel Store

Insert New Category:

Page | 130
Project Report for Online Apparel Store

SYSTEM SECURITY MEASURES:


Security is of prime importance for this web based/online application, where remote
user, located in different geographical region provides their important and valuable
data to the system. To prevent any compromise with the security of the system and

Page | 131
Project Report for Online Apparel Store

integrity of the data, a multi-level security system is proposed to be implemented in


the Online Aparrel Store.

Database/Data Security:

Database and data security has been achieved by creating diferent roles for the
users. The users are not authorized to view or modify another user’s data.

Creation of user profile and access rights:

The following are the security requirements which are being considered:
a) Every user has unique customer_id and password.
b) Any user, if provides incorrect email or password will be notified.
c) Session tracking has been implemented.
d) Administrator has the right to modify or delete any unwanted content from the
website including users.

The users of this system are divided into 2 groups. Admins and Users/Customers.

The admin or the administrator plays the role of managing and viewing entire
contents of the website.

The users can only perform functions such as browsing, purchasing and creating
accounts. They will not have the right to modify any type of content on the
website.

FURTHER ENHANCEMENTS AND FUTURE


SCOPE:

Page | 132
Project Report for Online Apparel Store

1) Further Enhancements:

The following features can be added to the system for enhancing its performance:

 Introduction of Charity Donations: The charity donation feature will


collect money based on the purchases made by individual users. Later the
users can use the collected money to donate to several charitable trusts
through out India.
 Cash on Delivery payment facility: This feature will enable the users to
pay for their purchase at the time of the delivery of the products.
 Users as product sellers: This facility will allow users to create seller
accounts in the system so that they can sell their products using the
online store. Other users will also be able to buy products based on seller
information.
 Adding a Wishlist: The wishlist functionality will allow the users to save
the products which they would like to buy in future.
 Introduction of Mobile App: The introduction of a third party mobile
application will allow users to purchase and browse the products without
using the browser. The app will work as a dedicated application of the
online store.

2) Future Scope:

This system can be implemented and used by business organisations who are
willing to sell their products online. Nowadays most of the domestic and
international companies are selling products online due to its advantages. Online
stores are cheap to set up and requires very less man power compared to big
malls and shops. Inventory can be easily maintained and managed by a few back-
end administrators. This system can also be used in small organisations like
institutes, offices, hospitals etc. to place orders for office items from their
personal stores or warehouses and can be used by any employee of the
organisation.

Page | 133

You might also like