Vous êtes sur la page 1sur 129

ABSTRACT

ALMONDIA, RALOU A. and RICO, KYEMBERLY A. Southern


Philippines Agri-Business and Marine and Aquatic School of Technology,
Malita, Davao Occidental, May 2018. “MALITA E-COMMERCE
WEBSITE” Undergraduate Capstone Project.

Adviser: OBEA RIZZI B. OMBOY

Malita E-commerce website is a system that focuses on buy and

sell of products online. The system is very important to Malita Davao

Occidental to enhance the marketing strategy and it gives way to those

people who have less time to visit the market place. The system aimed to

design a web-page that enhances marketing through online advertising,

online buying and selling. Designing a web-page that will enable customer

to search product online, view product description and creating a web

portal where consumer can purchase and order products. The system flow

is the administrator will be the one that manages the user, manages the

system and the maintenance. The vendor will post product at the website

and the customer will visit the website, view product and order product.

Malita, Davao Occidental is currently using the manual method of

marketing. The researchers want to improve the manual process of

marketing through online marketing so that the customers can easily view
the products posted by the different suppliers. As a solution, the

researchers develop an E-commerce website where residents of Malita can

either sell or buy products online.


MALITA E-COMMERCE WEBSITE

RALOU A. ALMONDIA
KYEMBERLY A. RICO

CAPSTONE PROJECT STUDY SUBMITTED TO THE FACULTY OF THE


SOUTHERN PHILIPPINES AGRI-BUSINESS AND MARINE AND
AQUATIC SCHOOL OF TECHNOLOGY, MALITA, DAVAO
OCCIDENTAL, IN PARTIAL FULFILLMENT OF
THE REQUIREMENTS FOR THE
DEGREE OF

BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

MAY 2018
To our families and loved ones.
ACKNOWLEDGMENT

The researcher’s would like to extend their sincere gratitude to

their parents who have never stopped supporting and encouraging them

to go beyond the limit to develop their capstone project.

Special thanks to the faculty who served as committee members:

Miss. Antonette R. Albarracin, Prof. Bailina P. Dalam and to the

researcher’s Department Chairman Prof. Joselito J. Mebolos for the

support, patience, encouragement and the useful suggestions. To their

adviser Miss. Obea Rizzi B. Omboy, who provided the detailed guidance

and support in the preparation of this capstone project.

To the researchers’ classmates who always gave their support and

assistance in times of hardship and for giving cheers in every

accomplishment.

Most of all, to the source of their strength, knowledge, vision and

wisdom, Heavenly Father God, without His guidance this will not be

successful.
TABLE OF CONTENTS

PRELIMINARY PAGES PAGE

ABSTRACT i
TITLE PAGE iii
APPROVAL SHEET iv
DEDICATION v
ACKNOWLEDGMENT vi
TABLE OF CONTENTS vii
LIST OF FIGURES x
LIST OF TABLES xii
LIST OF APPENDICES xiii

CHAPTER

I BACKGROUND OF THE STUDY


Introduction 2
Objectives of the Study 3
Significance of the Study 4
Scope and Limitations of the Study 4
Definition of Terms 5

II REVIEW OF RELATED LITERATURE


Reduction in Consumers’ Purchasing Cost by Online 7
Shopping
Benefits and risk related with E-commerce Define 8
the e-commerce
A trust-based consumer decision-making model in 8
electronic commerce: The role of trust,
perceived risk, and their antecedents
National information ecology: A new institutional 8
economics perspective on global e-commerce
adaption
Assessing and enhancing e-business processes 9
Factors affecting the adoption of intranets and 9
extranets by SMEs a UK study.
Consumer Acceptance of Electronic Commerce: 10
Integrating Trust and Risk with the
Technology Acceptance Model
Gaining Customer Trust: A Conceptual Guide for the 11
Salesperson
Social Media and Network Monitoring, Social 12
Analytics
Brand Competition in Fashion E-Commerce 13
The Importance of E-Mail Marketing in E-Commerce 14

III TECHNICAL BACKGROUND


Technicality of the Study 15
Details of Technologies Used 16
How the Project Works 17

IV METHODOLOGY
Research Locale 19
Population of the Study 20
Operational Feasibility 20
Technical Feasibility 22
Compatibility Checking 22
Relevance of the Technology 23
Schedule Feasibility 25
Economic Feasibility 26
Cost and Benefit of the Project 26
Data and Process Modeling 27
Object Modeling 34
Data Design 44
Security 52
Software Specification 52
Hardware Specification 53
Programming Environment 54
Test Plan 55

V SUMMARY, CONCLUSION AND


RECOMMENDATIONS
Summary 58
Conclusion 59
Recommendations 59
BIBLIOGRAPHY 60

APPENDICES 62

CURRICULUM VITAE 115


LIST OF FIGURES

FIGURE PAGE

1 Vicinity Map 19

2 System Functional Decomposition Diagram 21

3 Schedule Feasibility 25

4 Data Process Modeling 28

5 System Flowchart of the Administrator 29

6 System Flowchart of the Vendor 30

7 System Flowchart of the Customer 31

8 Context Diagram 32

9 Data Flow Diagram of the System 33

10 Use Case of the System 35

11 Class Diagram of the System 36

12 Sequence Diagram of the Administrator 37

13 Sequence Diagram of the Vendor 39

14 Sequence Diagram of the Customer 40

15 Activity Diagram of the Administrator 41

16 Activity Diagram of the Vendor 42


17 Activity Diagram of the Customer 43

18 Entity Relationship Diagram of the System 44

19 Development Diagram of the System 55


LIST OF TABLES

TABLE PAGE

1 Result of Compatibility Checking 23

2 Cost Analysis of the Project 26

3 Benefits Analysis of the Project 27

4 Data Dictionary 45

5 Software Specifications 53

6 Hardware Specifications 54
LIST OF APPENDICES

APPENDIX PAGE

I Relevant Source Code 62

II Evaluation Tool 86

III Sample Input/Output/Reports 88

IV Users Guide 100

V Relevant Documents 113

VI Grammarian’s Certification 114


CHAPTER I

BACKGROUND OF THE STUDY

Introduction

The concept of e-commerce is getting some intensive popularity

day by day in existing business environment. Almer et al., (2010) has

reflected that it is basically a process through which, customers as well as

organizations undertake all their commercial transaction with the help of

the Internet. Also, there are a number of different activities such as

Internet marketing, online transaction processing, electronic funds

transfer (EFT), online payment of shopping bills, and electronic data

interchange (EDI), that can be categorized under the E-commercial

activities.

E-commerce is an online market which has been growing rapidly

and changing business patterns over the past years. It has contributed the

manufacturers, distributors and customers way of the using the Internet.

It is important to know how customers influence the features of the


Internet to make purchasing decisions. Online shopping can offer best

product choices.

E-commerce is a term for any type of business, commercial and

transactions which involves the transfer of information across the

Internet. It covers a range of different types of business, from customer

based retail sites, through action or music sites, to business exchanges

trading goods and services between corporations. It is currently one of

the most important aspects of the Internet to emerge.

The municipality of Malita is the main economic center of the

province of Davao Occidental. Agriculture and fishery are two of the many

industries of the municipality. Being far from other major urban centers in

its vicinity like Digos City, Davao City , and General Santos City, and

although only a town of Malita. Thus as economic activity in the town

continues its rapid growth; Malita will soon become the province's first

component city for years to come.

In Malita, Davao Occidental they are using traditional marketing

and advertising strategies to market their products. The vendor will travel

their products just to display and usually the customer will visit at the

market to buy products. Furthermore, it is one the fast gaining ground as

an accepted and used business paradigm. More and more business


houses are implementing websites providing functionality for performing

commercial transaction.

Objective of the Study

Generally, the objective of the study is to develop a buy and sell

website to assist the marketing process of Malita, Davao Occidental.

Specifically, the study aimed:

1. To design a web-page that enhances marketing through:

1.1 Online product advertising;

1.2 Online buying and selling.

2. To design a web-page that enable customers to:

2.1 Search product online

2.2 View products description

3. To create a web portal where consumer can purchase and order

products.

Significance of the Study

The study is significant to the vendor since it will assist them

through the Malita E-commerce Website. They don’t have to rent an area

to display their product. In this study they can have product to post
online. They don’t have to allocate much time in travelling their whole

product to be displayed in the market. Also, they don’t have to allocate

much time in visiting the market.

Customers can directly view and choose the products. The

customers well organize to undertake all their commercial transaction with

the help of the Internet. As long as the customer is connected to the

Internet the customer can order the product. Customer can search the

product and the description online.

To the researchers, this study can improve their knowledge in

technopreneurship and also for the upcoming researchers. It can also help

the researchers to widely open up their minds in the fields of business. It

can also help them learn and earn more ideas about business.

Scope and Limitation of the Study

E-commerce website was implemented at Municipality of Malita,

Davao Occidental. Moreover, this system can be applicable to the other

places as long as they visit the website. The seller can post their products

online. In terms of payment, the system can accept cash-on-delivery and

PayPal. If the order product is above One Thousand Pesos (Php1,000.00)

then you can avail the free shipping. If the product is out of stock then it
will appear to the product information quantity that the product is out of

stock. The limitation doesn’t deal with credit card and debit cards, inability

to experience the product before purchase and can’t identify scam.

Definition of Terms

Browser – refers to a computer program which acts as a tool launch the

Malita E-commerce website.

Commission Report - refers to the commission of the administrator

on every product sold by the vendors.

Customer – in the system, the customer is also known as the buyer.

They have the capability to access the system in terms of

purchasing products.

E-commerce – refers to the activity of buying or selling of products on

online services

Internet – refers to the computer network that facilitates the

transmission and communication of data that are shown on the

website.

Marketing – refers to the way of making the customers satisfied to the

products being posted by the vendors.

Plugins – refers to the tools to customize the web pages of the system.
Posting – refers to the vendor’s way of advertising the products.

Themes – refers to the graphical design of the system.

Vendor – refers to the supplier of the products to be posted on the

website.
CHAPTER II

REVIEW OF RELATED LITERATURE

According to Basu and Muylle (2007) companies can gain two

fundamental types of benefits from e-Business. There are generally

described as Value Creation or Value Enhancement for one or more of a

company’s stakeholder groups, and Lower cost of providing goods and

services to the market place under Value Creation include Improvement in

internal and external communication through effective e-marketing.

Increment of sales through an e-commerce website integrated with a back

office systems and Improvement in supplier relations and productivity

through collaborative workspaces. And examples under Lower cost are

reduction in communication and travel cost using online meeting tools,

shared workspaces and benefits license free open source alternatives to

proprietary software.

In this support Xiao and Benbasat (2007) have also explain that

concept of e-commerce is quite wide as it includes business to business

(B2B), Business to customer (B2C) and Customer to customer (C2C)


transaction. There are different activities and function that can be

undertaken online with the help of e-commerce.

Along with this, they also elaborated that in addition to financial

friction, e-commerce measures are also used for the purpose of

accomplishing some other important commercial transaction such as

exchange of important information through electronic data interchange

(EDI) in B2B business transactions and marketing of product through

internet.

There are a number of different reasons behind increasing

popularity e-commerce related activities undertaken by individual and

business organizations. In this context, Kim, Ferrin and Rao (2008) have

elaborated that the convenience and easiness are of major consideration

related with the phenomena of E-commerce. In comparison to traditional

business transaction, virtual commercial transactions are quite easy and

effective be carried out. It takes lesser amount of time and efforts from

the side of customers.

Kim et al., (2008) have also stated that e-commerce is a new way

of undertaking business transactions which are getting popularity day by

day. They also illustrated that e-commerce in terms of cyber transaction in

which there is a virtual transaction of money takes place between two


different entities. In the views of the author, cyber transaction can be

considered as the measure in which, both customer and organization

interacts with different virtual means of communication such as email,

mobile devices and telephones and accomplish their business transaction

online.

Zhu and Thatcher (2010) have added further that e-commerce

transactions save some significant amount of time to customers. E-

commerce has provided a way to the customer through which, he can

easily undertake shopping and other related business transaction while

sitting at his home. Zhu and Thatcher has also stated that e-commerce

measures also provide 24/7 facilities of undertaking business and

commercial transactions, which cannot be possible in the case of

traditional measures of business transaction.

Windrum and Berranger (2010) suggest that the commercial

benefits of e-commerce lie in five areas. First, firms are able to expand

their geographical reach. Second, important cost benefits lie in improved

efficiency in procurement, production and logistics processes. Third, there

is enormous scope for gaining through improved customer

communications and management. Fourth, the Internet reduces barriers

to entry for new market entrants and provides an opportunity for small
firms to reorient their supply chain relationships to force new strategic

partnerships.

Alnemr et al., (2010) have reflected that E-commerce is basically a

process through which, customers as well as organizations undertakes

there all their commercial transaction with the help of internet. As per the

author, there are number of different activities such as internet marketing,

online transaction processing, electronic funds transfer (EFT), online

payment of shopping bills, and electronic data interchange (EDI), that can

be categorized under the E-commercial activities.

Swan and Nolan (2013) stated of what are the behavioral sciences

know about trust to industrial sales situations. Trust between an industrial

buyer and salesperson is defined cognitively and behaviorally. A model of

this trust-building process is presented and appropriate behaviors for sales

representatives who wish to build trust are discussed. The interactions

between experience, general knowledge, and trust building are examined

in light of possible situations a sales representative might encounter. The

findings suggest that both firm and salesperson can act positively to build

and maintain trust with their clients.

According to Pavlou (2014) the primary constructs for capturing

consumer acceptance of E-commerce are intention to transact and on-line


transaction behavior. This includes the theory of reasoned action (TRA) as

applied to a technology-driven environment; technology acceptance model

(TAM) variables (perceived usefulness and ease of use) are posited as key

drivers of e-commerce acceptance. The practical utility of TAM stems from

the fact that e-commerce is technology-driven. The proposed model

integrates trust and perceived risk, which are incorporated given the

implicit uncertainty of the e-commerce environment. The proposed

integration of the hypothesized independent variables was justified by

placing all the variables under the nomological TRA structure and

proposing their interrelationships. The resulting research model is tested

using data from two empirical studies. The first, exploratory study

comprises three experiential scenarios with 103 students. The second,

confirmatory study uses a sample of 155 on-line consumers. Both studies

strongly support the e-commerce acceptance model by validating the

proposed hypotheses.

Rogers (2015) social analytics is the end state result set that arises

from social media integration with Business Intelligence, and this has

created a new and exciting form of insights for business users, helping

them in understanding the actual movement of the s-curve, and assisting

in creating blue ocean strategy in the marketplace. Social media can be


defined as a collection of content created by people using accessible

publishing technologies, thereby creating information in formats that are

varied and drives user participation and potential drivers and insights into

how people discover, read and share news, information and content,

simply transforming into conversations and is the democratization of

information, transforming people from content readers into information

publishers. To benefit from integrating and connecting all the data, we will

focus on going beyond just monitoring social media and the associated

networking. Social Networks are becoming a mainstream part of our lives.

People of all ages and backgrounds are using social networks to express

opinions, share information, follow brands, and consume content. Each

network provides a unique value proposition to its users and fills specific

needs for interaction.

According to Heuer et al., (2015) shopping online as an alternative

to in-store shopping can make much of traditional retail less attractive.

There exists an obvious relationship between e-commerce and the

demand for commercial real estate that accommodates physical retail

shops. Substantial evidence supports the idea that the demand for

physical shops has been affected by the rapid development of e-

commerce in China. In order to better understand the sustainability of the


commercial real estate market in a context of rapidly developing e-

commerce in China, this study seeks to clarify the relationship between e-

commerce and the demand for commercial real estate. Methods of

inductive and comparative analysis are adopted. The findings show that

from 2009 to 2013, the slowing growth rate of commercial property sales

and the accelerating vacancy rate of commercial properties are closely

related to the dramatic growth of e-commerce. We also found that

different forms of commercial properties–supermarkets, department

stores and shopping centers–are differently affected by the rise of e-

commerce. However, due to the respective advantages and disadvantages

associated with online and offline shopping, physical stores will not be

completely eclipsed by virtual retail shopping.

According to Kemper et al., (2015) stated that when developing

pricing strategies, it is highly important for managers to understand brand

competition resulting from price promotions within a store. According to

Madlenak et al., (2017) online marketing is an integral part of e-

commerce nowadays and includes many different ways company’s

presentation such as e-mail marketing, context marketing, social media,

affiliate marketing and so on. The fundamental metrics used in e-mail

marketing as a delivery rate, open rate and click through the rate. The
eye tracking technology was also used to analyze of internet users at

mailbox.

According to Kosuke et al., (2016), the development of online

shopping services is stimulated by both retailers and consumers.

Compared to the brick-and-mortar type of stores, the online shopping

retailers can save selling cost, such as rent and labor cost, and consumers

who purchase items via online shopping site also can save time for

shopping trips. In this study, they confirm how the online shopping affects

retailer's selling cost and consumer's purchasing cost compared with the

case of shopping at brick-and-mortar stores. Furthermore, they examine

how delivery manners affects retailer's and consumer's cost, concluding

that the online shopping retailers should clearly introduce the delivery

charge independent from the price of the items.


CHAPTER III

TECHNICAL BACKGROUND

Technicality of the Study

The marketing strategy in Malita, Davao Occidental is the manual

marketing in which the vendor and the customer occasionally go to the

market place to buy and sell products. In this strategy the vendor and

customer must allocate much time to go over their transactions at the

market. Malita E-commerce website was implemented to the Municipality

Malita, Davao Occidental as a web portal where can consumer and the

vendor can buy and sell product online. Without going to the market they

can choose a posted product as long as they are connected to the

Internet.

In contrast with the current marketing strategy of Malita, Davao

Occidental, the researchers developed a system that can improve the

marketing strategy of the Malita, Davao Occidental. E-commerce website

was implemented as a gateway to online marketing.


Details of the Technology Used

The developer used WordPress as a tool to develop this website

with the help of its plugins and theme which is the WooCommerce plugin

for creating an online store that includes products information,

transactions such as mode of payments and orders; WPBakery Page

Builder for creating webpage layouts, WC Product Vendors for multi-

vendor marketplace setup that allows vendors to manage their own

products and earn commissions, and Slider Revolution for creating

slideshow images in the website. Also, Shopkeeper was used as the theme

of the website that organizes the posted products in the website,

GetBootied tool plugin to activate the Shopkeeper theme and All-in-one

plugin used as a migration tool in exporting and importing files from local

server to online server. Windows 7 Ultimate 64-bit was the operating

system used by the developer.

In addition, the developer used Sublime Text 2 as the text editor,

Google Chrome 64-bit (version 1.3.33.5) as the default web browser. Also,

InfinitFree for free and unlimited web hosting, Freenom for creating

website’s domain name. WAMP Server (version 2.4) which is the localhost

for offline development and has PhpMyAdmin (v5.4.16), Apache (v2.4.4),


and MYSQL (v5.6.12). In hardware, the developer used Acer Aspire 5738Z

15.6 inch Laptop with the specification of Intel Pentium Dual Core

Processor T3200, 2.00 Gigahertz, 2.00 Giga Bytes DDR2 (Double Data

Rate) RAM (Random Access Memory), and has 150 HDD (Hard Disk

Drive). Smart Bro 4G LTE (Fourth Generation Long Term Evolution) pocket

Wi-Fi was consumed as a network resource in order to access the website.

How the Project Works

E-commerce website functions only when it is connected to the

Internet. The website requires a login for authorize user such as

administrator and seller. The administrator has a privilege to accept

registration from the seller who wants to apply as user of the website.

The registration can be done on the user’s web page. Afterwards, the

system sends notification through e-mail that the users have been

successfully registered and can use the website.

In the vendor section, only the vendor has the authority to manage

the products, cater the customers, track orders, view sales record. The

customer can directly view the product posted by the seller. To order a

certain product, the customer must fill-up an information form for delivery

purposes. The role of the administrator is to approve the vendors’ product


to be sold. The vendor is the supplier of the products and the customer is

the person who browses and orders the product.


CHAPTER IV

METHODOLOGY

Research Locale

The system was conducted at Malita, Davao Occidental. With an

area of 883.37 square kilometers (341.07 sq. mi), a latitude of

6°20'59.99" north and a longitude of 125° 31' 59.99" east.

Figure 1. Vicinity Map of Malita, Davao Occidental


Population of the Study

The population of the study was composed of vendors, customers,

and a system administrator. The vendors are the ones who sell and

manage the products posted in the website and process customer’s order

and shipping. The customers are the ones who view and order products in

the website. The system administrator is in charge of managing the

system, maintains, updates and approve vendors request to sell products

in the website.

Operational Feasibility

Since the municipality of Malita is still in progress, an e-commerce

website would be of much help for the improvement of the community

and its residents. If the website will be fully operational, many of the

Malitaños would gain an advantage. This is due to the online posting that

the vendors can do to introduce their products.

Figure 2 shows the system’s functional decomposition diagram. The

users are the vendors, customers, and administrator who have different

roles in the system. The vendor is the main source of the product, he or

she can sell or manage products and customers’ order, manage shipping
and view sales report. The customer can order products, view recent

orders, manage shipping and billing addresses and edit password and

account details. The role of administrator is the one that manages user,

approved vendor’s request, manage system, update features,

maintenance checker and manage the commission report.

Malita
E-commerce
Website
Vendor Customer Administrator

Sell Products Order Product Manage User


Manage Products View Recent Approved Vendor’s
Orders Request
Manage Customers Manage Shipping Update
Order and Billing Features
Manage Shipping Addressesand
Edit Password Maintenance
View Sales Report Account Details Checker
Commission Report
Figure 2. System’s Functional Decomposition Diagram

Technical Feasibility

Since the Malitaños are adapting the technology trends, most of

them can access the internet using their laptops, tablets, smart phones, or

desktop computers. If they don’t have any technical resources, it is not

difficult for them, they can just buy smart phones ranging from
Php2,000.00 pesos or higher as long it has Google Play Store which can

be used to download web browsing applications to access the website.

The users don’t need to have technical expertise since the website was

built for their convenience.

Compatibility Checking

The availability of the required resources is where the proposed

system depends. Browser compatibility is the manner in which a web page

looks in different web browsers. The researcher used WordPress in

developing the system. WordPress is compatible to any web browsers

such as Internet Explorer, Mozilla Firefox, and Google chrome but the

researcher used Google chrome X64-bit. Google chrome has the ability to

take a written document in HTML language and change into a well

formatted web page that users understand. Chrome's broader support for

HTML 5 means that some pages will render more accurately in Chrome

while in Internet Explorer and Mozilla Firefox, the website is functional but

there are some objects that are not aligned. Table 1 show the browsers

were used for the compatibility checking.

Table 1. Result of Compatibility Checking


WEB BROWSERS

MOZILLA GOOGLE
INTERNET
FIREFOX CHROME
EXPLORER
SYSTEM X64-BIT

MALITA E-
COMMERCE   
WEBSITE

Relevance of the Technology

The modernization of technology for advertising products gives

better profits and solutions for traditional marketing problems. An E-

commerce trend is to utilize technology so that it can provide a good

quality of service to the customers. The vendors and the customers will

benefit from these modern methods that can lesser their effort and more

reliable compare to the previous process. This system will help them to

improve their business, to become well-known, and achieve what it aims.


Schedule Feasibility

Figure 3 shows the development time frame of the system from the start of the activity to its

completion period. The main task is to gather data in order to know every detail so that the developer can

improve the manual process into an automated system. Each bar represents its range from the starting date

to its time period.

Jul 2017 Aug 2017 Sep 2017 Oct 2017 Nov 2017 Dec 2017 Jan 2018 Feb 2018 Mar 2018 Apr 2018
Activities
7/2 7/9 7/16 7/23 7/30 8/6 8/13 8/20 8/27 9/3 9/10 9/17 9/24 10/1 10/8 10/15 10/22 10/29 11/5 11/12 11/19 11/26 12/3 12/10 12/17 12/24 12/31 1/7 1/14 1/21 1/28 2/4 2/11 2/18 2/25 3/4 3/11 3/18 3/25 4/1 4/8 4/15 4/22

1 Data Gathering
2 Database Design
3 Initial Design of GUI
4 System Building
5 System testing
6 Evaluation
7 Finalizing
Economic Feasibility

To evaluate economic feasibility, the cost and benefits associated

with the proposed study was analyzed. The capital cost of the project

affects the economic assessment.

Cost and Benefit of the Project

Table 2 shows the cost of the project. It is composed of system,

domain, server with a total amount of Php15,000.00. These should be

estimated and included in the overall cost of the project.

Table 2. Cost Analysis for Malita E-commerce Website


Cost Benefit Analysis for Malita E-commerce Website

Costs

Category Item Qty Price Total

System Malita E-commerce 1 Php10,000.00 Php10,000.00


Website
Domain 1 Php2,000.00 Php3,000.00

Web hosting 1 Php3,000.00 Php2,000.00

Total Cost Php15,000.00


Table 3. Cost Analysis for Malita E-commerce Website
Benefits (estimated per annum)

Tangible (Faster product, service look-up, ordering,

saving time and money.)

Intangible (Can reach more vendors and Improved

customer response.)

Total Benefits

Return of investment

Data and Process Modeling

Figure 5 shows the input, process, and output diagram of the

system. Vendor and customer information and product information is the

main input. The processes of the system are buying, selling, customers

order, shipments and search record. The output of the system is the

product ordered, transaction history and the sales report. The researcher

used this diagram as a guide in developing the project to meet the

objectives and achieve its purpose.


INPUT PROCESS OUTPUT
 Vendor and  Buying  Product
Customer  Selling Ordered
Information  Transaction
 Product  Costumers History
Information order  Sales Reports
 Shipment
 Shipments
Information
 Search record  Product
Information

Figure 4. Input, Process, and Output Diagram of the System

Figure 5 shows the administrator flowchart of the Malita E-

commerce website. It starts in searching the website. Administrator

account manages the user and the system. Under manage user,

administrator can add, edit, update, and remove user’s account. Further,

under manage system, administrator can update and do the maintenance

of the system.
Start

Contact System
LOGIN
Administrator

NO

Is Username &
Confirmation NO
Password Correct?

YES

Manage
Manage User Maintenance
System

Update
Add, Edit, Features
Update, Remove

View
Reports

LOGOUT
Database

End

Figure 5. System Flowchart of the Administrator


Figure 6 shows the vendor’s user account that manages products

and customers. Under manage products, vendor can add, update, and

edit product information. In manage customer, vendor can add, update,

and edit customers information. The vendor can post products, track

orders, view delivered products, and view sales report.

Start

LOGIN

NO
Registration

Is Registered?
YES

Administrator’s
YES
YES Approval Email

Is Username &
Confirmation NO
Password?

Contact System
NO
YES Administrator
Vendor

Manage
Manage View Sales
Sell Products Customers
Products Report
Order
YES

Administrator’s Add, Edit, Manage View, Edit


Approval Update, Remove Shipping Profile

Change
Password
LOGOUT
End

Figure 6. System Flowchart of Vendor


Figure 7 shows the customer’s user account that can view its

recent orders, manage shipping and billing addresses, and edit password

and account details.

Start

LOGIN

NO
Registration

Is Registered?

YES
YES

Is Username &
Confirmation NO
Password?

Contact System
NO Administrator

YES
Customer

View recent
Manage Shipping Edit &
Order
& Billing Password
Addresses Account Details

Shipping & Billing


Password & Account
Addresses Save
Details Updated

LOGOUT

End

Figure 7. System Flowchart of Customer


Figure 8 show context diagram of the system. The diagram

represents the external entities that interact with its role of the system

such as, administrator, vendor, and customer. The administrator interacts

the following: Commission report, vendor request, maintenance checker,

features and the user’s information. The vendor interacts also with the

sales report, product information customer’s information, orders, vendor’s

information, shipment and pay commission. And customer also interacts

with the product information, customer’s information, and customer order

and confirms the shipment.

Figure 8. Context Diagram


Figure 9 shows the data flow diagram within the system. Also, it

shows the destination of all data that are encoded by the user.

Administrator Login Info. 1.0 Administrator Login Info.


Administrator 1 User Database
Login

Data

1.4 1.2 Vendor Login Information


Vendor
Approve Vendor
Registration

2 Post Database
Product information
Vendor Information

Vendor Approval Email


Customers Order Data 2.2
Product Approval

Vendor user Login, Password 1.3 Process Order

Approved Vendor
1.5 Products
Login Customer Login Information

Email Invoice Order Information 3 Order Database


Product Information

1.6 Approved Vendor Products 2.1


Payment Option
Product 2.0
Sell Products Payment
Information 1.8
Shipping Address

Review Order
Order Data

1.9

Product Information 1.7 Shipping address form


Checkout
Customer user Login, password
Customer Login/Register
/Customer Information

2.3

Ordered Information
Shipment

Figure 9. Data Flow Diagram of the System


Object Modeling

Figure 10 shows the use of use case diagram of the system. This is

a case to case manner in showing the relation and co re-relation of its

module. Use cases by primary actors; 1. Post Product – The vendor post

product in the website in order to be seen by the customers. 2. Purchase

Items – the product chosen by the customer will be added in the order

list. 3. Information form – the customer is given a task to fill-up the

information form in order for the vendor to know the complete address of

the customer for the delivery process. 4. Process Order delivery – ones

the customer is done filling the form, the vendor process the order

delivery and gives the date of delivery to the customer. 5. Track orders –

the vendor tracks literally to avoid delaying of orders and to assure that all

the product ordered is already delivered. 6. Registration – is only

managed by the administrator to maintain the security of the system.


Post Products

Browse Product Process Products


Ordered Vendor
<<include>>

Order Products
<<include>>

<<include>>

Customer information
Customer Track Orders

Confirm Shipment

Registration

Administrator

Figure 10. Use Case Diagram of the System


Figure 11 shows the classes use to develop this system. The arrow

shows that every class is connected to each other. Each class has an

attributes with their corresponding nodes. Also, it shows in the diagram

that every class has a relationship with the other class. In every class

there are arrows that defines what kind of relationship does the class have

and this arrows are inheritance, aggregation, association, and

composition.

Figure 11. Class Diagram of the System


Figure 12 show the sequence diagram of the administrator. As

shown in the diagram, the system interacts with the administrator of the

system. It includes verification, one of the securities of the system. The

administrator can manage users, approved vendors request, manage the

system, update’s new features, view commission reports, and

maintenance checker.

Malita E-commerce
Administrator Website

Login

Verify

Administrator's Dashboard

Manage Users

Vendors Request

Approved Vendors Request

Manage System

Update Features

Reports

View Commission Reports

Maintenance Checker

Figure 12. Sequence Diagram of the Administrator


Figure 13 show the sequence diagram of the vendor. As shown in

the diagram, the system interacts with the user of the system. It includes

verification, one of the securities with this system. The sequences starts

filling up the registration form and wait for the administrator to send an

approval mail. When the administrator approves the vendor, the vendor

can now login and the system verifies if it is a valid user. The vendor will

directed into its dashboard and the vendor can now sell products but it

needs administrator’s approval in order to be published in the system. The

vendor can manage products, customers order, shipping, view sales

report and pay for commission.


Malita E-commerce
Website

Vendor

Register

Send Approval Email

Login

Verify

Vendor's Dashboard

Sell Products

Administrator's Approval

Manage Products

Manage Customers Order

Manage Shipping

Sales Report

View Sales Report

Pay Commission

Figure 13. Sequence Diagram of the Vendor


Figure 14 show the sequence diagram of the customer. As shown

in the diagram, the sequence starts in registration then login, the system

verifies if it is a valid user. The customer was directed to my account or its

dashboard; the customer can view recent orders, manage shipping and

billing addresses, and edit password and account details.

Malita
E-commerce
Website
Customer

Register/Login

Verify

Customer's Dashboard

View Recent Orders

Manage Shipping and Billing Addresses

Save Shipping and Billing Addresses

Edit Password and Account Details

Update Password and Account Details

Figure 14. Sequence Diagram of the Customer


Figure 15 show the activity of the administrator inside the system.

The administrator can manage the users; approved vendors request,

manage the system, update new features, and maintenance checker.

Figure 15. Activity Diagram of the Administrator


Figure 16 show the activity of the vendor inside the system. The

vendors manage the products; manage customers order, view sales

report, view and edit profile, and change password.

Figure 16. Activity Diagram of the Vendor


Figure 17 show the activity of the customer inside the system. The

customer can view the recent orders, manage shipping and billing

addresses, edit password and account details.

Figure 17. Activity Diagram of the Customer


Data Design

Figure 19 explains the entities available in the system. Its entities

play the vital role in developing this system. It shows the relationship of

every table in the system. The foreign key indicates that every table has

relationship with the other table.


has
has

wp_prefixposts
wp_mprefixwoocommerce_orde wp_mprefixwcpv_commissions
wp_mprefixusers r_item_meta
PK ID
PK id
PK ID PK meta_id
post_author
order_id
user_login FK order_item_id
post_date_gmt
order_item_id
user_pass meta_key
post_content
order-date
user_pass meta_value
post_title
vendor-id
user_email
post_excerpt
vendor_name
user_url wp_mprefixmeta
post_status
has product_id
user_registered PK meta_id
commennt-status
variation-id
user_activation_key
ping-status FK post_id
product_name
user_status
post-password meta_key
variation_attributes
display_name
post-name meta_value
has product_amount
to_ping has
product_quantity
pinged wp_
has mprefixwoocommerce_order_ite wp_mprefixusermeta
product_
ms shipping_amount
post-modified
PK umeta_id
PK order_item-id
post_modified_ product_shipping_ta
gmt FK user_id x_amount
order_item_name

post-parent meta_key product_tax_amoun


order-item_type t

guid meta_value
order-id product_commission
-amount
menu_order

total_commission_a
post_type has mount

post-mime_type commission_status
wp_mprefixterms
wp_mprefixwoocomerce_shippi
comment-count ng_zones paid_date
PK term_id
PK zone_id
name
zone_name
slug
wp_mprefixwoocomerce_shippi
wp_mprefixwoocomerce_shippi zone_order ng_zone_methods
ng_zone_locations termgroup
has PK method_id
PK location_id

wp_mprefixtermmeta
FK zone_id
zone_id has

PK meta_id instance_id
location_code
method_order
location_type has FK term_id

is_enabled
meta_key

meta_value

Figure 18. Entity Relationship Diagram of the System


Data Dictionary

Data dictionary is a centralized repository of information about meaning, relationships to other data,

origin, usage and format. Below are the lists of tables. It shows the table’s name with its attribute name,

contents of the data, data type, format of the data, range, is it required or not, primary key or foreign key

and the referenced table in which the foreign key is shown.

Table 4. Shows the list of tables in the system.


TABLE NAME ATTRIBUTE CONTENTS TYPE FORMAT RANGE REQUIRED PK OR FK
NAME FK REFERENCED
TABLE
Wp_mprefixter term_id Id of terms bigint(20) Y PK
ms
name name Varchar(200) Xxxxxxxx Y
slug slug Varchar(200) Xxxxxxxx Y
team_group team group bigint(10) Y
Wp_mprefixpost ID ID bigint(20) Y PK
s
post_author Post of author bigint(20) Y
post_date_gmt Date and Time datetime mm-dd-yy Y
post_content Post content datetime mm-dd-yy Y
post_title Post title longtext Xxxxxxxx Y
Xxxxxxxx
post_excerpt Post excerpt text Y
Xxxxxxxx
post_status Post status text Y
Xxxxxxxx
comment_status Comment status varchar(20) Y
Ping status varchar(20) Xxxxxxxx
ping_status Y
Post password varchar(20) Xxxxxxxx
post_password Y
Post name varchar(255) Xxxxxxxx
post-name Y
ping varchar(200) Xxxxxxxx
to-ping Y
pinged text Xxxxxxxx
pinged
post modified text Xxxxxxxx Y
post_modified
post modified datetime mm-dd-yy Y
post_modified_gm
t gmt Y
post content datetime mm-dd-yy
post_content_filte Y
red filtered
Y
post_parent post parent longtext Xxxxxxxx
Y
guid guid varChar(255 Xxxxxxxx
Y
menu-order menu order )
post type bigint(20) Xxxxxxxx Y
post_type
post_mime_type post mime type varchar(255) Y

comment_count comment count int(11) Xxxxxxxx Y


varchar(20)

Wp_mprefixuser ID ID Bigint(20) Y PK
s
User_login User login Varchar(60) Xxxxxxxx Y
User_pass User pass Varchar(255) Xxxxxxxx Y
User_nicname User nicname Varchar(50) Xxxxxxxx Y
User_url User url Varchar(100) Xxxxxxxx Y
User_registered User registered Datetime mm-dd-yy Y
User activation
User_activation_ Varchar(255) Xxxxxxxx Y
key Y
key
User status int(11) Y
User_status
Display name Xxxxxxxx Y
Display_name varchar(250)

wp_mprefixwoo Order_item_id Order item id bigint(20)


Y PK
commerce_orde
Order_item_name Order item text Xxxxxxxx
r_items Y
Order_item_type name varchar(200) Xxxxxxxx
Y
Order_id Order item type bigint(20)
Y FK Order_id
Order id

Wp_mprefixwcp id Commission id bigint(20) Y PK


v_commissions
order_id Order id bigint(20) Y FK order_id
order_item_id Order item id bigint(20) Y FK order_item_id
order_date Order date datetime mm-dd-yy Y
vendor_id Vendor id bigint(20) Y FK vendor_id
vendor_name Vendor name longtext Xxxxxxxx Y
product_id Product id bigint(20) Y FK product_id
variation_id Variation id bigint(20) Y FK variation_id
product-name Product name longtext Y
Xxxxxxxx
variation_attribute Variation longtext Y
s attributes Xxxxxxxx
bigint(20) Y
product_amount Product amount
longtext Y
product_quantity Product quantity Xxxxxxxx
longtext Y
product_shippping Product shipping Xxxxxxxx
longtext
_amount amount
Xxxxxxxx
longtext Y
product_shipping- Product
Xxxxxxxx
tax_amount shipping-tax longtext Y
amount
product_tax-
amount Product tax Xxxxxxxx
longtext Y
amount
procdutc_commiss
ion-amount Product
commission bigint(20 )
total_commission- Y
amount
amount Y
Total bigint(20 )
commission_statu
commission
s Xxxxxxxx
amount Varchar(20) Y
paid-date
Commission
status mm-dd-yy
datetime Y
Paid date
meta_id bigint(20 )
wp_mprefixwoo Meta id of order Y PK
commerce_orde
order_item_id Id of order item bigint(20 ) Y FK order_item_id
r_item_meta
meta_key Meta key varChar(255 Xxxxxxxx Y
)
meta_value Meta value Y
Xxxxxxxx
longtext

meta_id meta id of term bigint(20)


wp_mprefixter Y PK
mmeta
post_id id of post bigint(20) FK post_id
Y
meta_key meta key varChar(255 Xxxxxxxx
) Y
meta_value meta value Xxxxxxxx
longtext Y

umeta_id meta id of user bigint(20)


Wp_mprefixuser Y PK
meta
user_id id of user bigint(20) Y FK user_id

meta_key meta key varChar(255 Xxxxxxxx Y


)
meta_value meta value Xxxxxxxx Y
longtext

wp_mprefixwoo zone_id Id of zone bigint(20)


commerce_ship
zone_name Zone name varChar(200 Xxxxxxxx Y
ping_zone
)
zone_location Zone location Xxxxxxxx Y
varChar(200
)
wp_mprefixwoo location_id Id of location bigint(20) Y PK
commerce_ship
zone_id Id of zone bigint(20) Y FK zone_id
ping_zone_locat
ions location_code Location code varChar(200 Xxxxxxxx Y
)
location_type Location type Xxxxxxxx Y
varChar(40)
method_id Id of method bigint(20) Xxxxxxxx Y PK
wp_mprefixwoo
commerce_ship zone_id Id of zone bigint(20) Xxxxxxxx Y FK zone_id
ping_
instance_id Id of instance varChar(200 Y FK instance_id
zone_methods
method_order Method order ) Y
is_enabled Is enabled bigint(20) Y
tinyint(10)

Wp_mprefixpost meta_id Id of meta bigint(20) Y


meta post_id Id of post bigint(20) Xxxxxxxx Y PK post_id
meta_key Meta key varChar(255 Y
Xxxxxxxx
meta_value Meta value ) Y
longtext

FK = Foreign Key
PK = Primary Key

Varchar = Variable Character length data (1-2,000 characters)

Blob = Image data

Bigint = Integer data

Tinyint = Integer data

Int = Integer data


100

Security

To protect WordPress users, the platform has features intended to

support site security. WordPress user account passwords are salted and

hashed based on the Portable PHP Password Hashing Framework.

WordPress permission system is used to control access to private

information such registered users, commenters email addresses, privately

published content, etc. In WordPress, a password strength meter was

included in the core software, providing additional information to users,

setting their passwords, and hints on increasing strength.

A few of the options built into WordPress includes automatic

WordPress version updates, theme and plugin notification updates, user

roles that allow controlling access to different capabilities within the

website, and complex password generation. Behind the scenes,

WordPress shares sets of functions and APIs with developers which can

protect data and limit hackers' ability to penetrate WordPress installations.

Software Specification

Software specification is a description of software used to develop

the system. It refers to the list of software needed to achieve the


101

objective of the study. Table 5 shows the list of software being used in

the system.

Table 5. Software Specification


v NAME OF SOFTWARE SPECIFICATION
All-in-one plugin v6.65
Apache v2.4.4
GetBootied tools plugin v2.3.2
MYSQL v5.6.12
Operating System Windows 7 Ultimate x64
PhpMyAdmin v5.4.16
Shopkeeper theme v2.4.2
Slider Revolution plugin v5.4.6.3.1
Sublime Text 2 Build 3124
Web Browser Google Chrome X64
WAMPSERVER v1.3.33.5
Woocommerce plugin v2.4
WC Product Vendors plugin v3.3.3
WP Bakery plugin v2.0.27
WordPress v2.4.2

Hardware Specification

Hardware specification refers to the system requirements where

electronic components are recommended for the development of the


102

system. Table 6 shows the list of hardware being used in the system and

its specification.

Table 6. List of Requirement Hardware

NAME OF HARDWARE SPECIFICATIONS

Laptop ACER Aspire


Central Processing Unit (CPU) Intel(R) Pentium(R) Dual Core
2.00 GHz
RAM (Random Access Memory) 2.00 GB
HDD (Hard Disk Drive) 150 GB
Smart Bro Pocket Wi-Fi 4G LTE (Long Term Evolution)

Programming Environment

For front-end development, the developer used WordPress that

contains HTML, CSS, JavaScript, plugins and themes. WordPress is a free

and open-source content management system (CMS) based

on PHP and MySQL.

The developer used MySQL as back end of the system. MySQL is an

open source RDBMS (Relational Database Management System) and uses

structured query language (SQL). It serves as the data storage that all the

information users and products.


103

Figure 20 shows what hardware and software components are

being connected in this system and what component are being used and

how they are connected.

<< device >>


:application server
v >>
<< Artifact
:
:Malita E-commerce
Website

<< device >> << device >>


:Application
v server :Database Server
<< Artifact >> << Artifact >>
:Product :MySql
:
Information
System Module
Figure 19. Development Diagram of the System

Test Plan

The test plan is a document outlining the procedure on how the

platform performed, tested and validated its functionality and modules.

Test was conducted by its quality and assurance to see if the system met

the satisfied requirements and see if the users are satisfied with overall

functionality of the system. The researcher’s method in testing is by

demonstrating the functionality of each module using computer consisting

of the software and hardware specification.


104

In addition, the researchers used an evaluation tool to scale the

functionality of the system and satisfaction of the users. Based on the

result of the evaluation, the users are satisfied by the system’s

functionality but there are some functions that are difficult for them to

use.
105

CHAPTER V

SUMMARY, CONCLUSION AND RECOMMENDATIONS

Summary

The purpose of the study was to develop an e-commerce website

for Malita, Davao Occidental. The researchers used content management

system to develop the website. Also, tools and plugins were utilized to

make the website even more interactive. Base on the result of the testing

and evaluation, the study was able to meet user requirements.

Conclusion

Based on the result of the testing, it was concluded that the system

was able to perform all functions base on the objectives of the study. The

result of the evaluation shows that the users agreed to use the system. It

also showed that the task difficulty of using the system was easy.

Recommendations

During the testing of the system, the following recommendations

were sought:
106

1. Add more modes of payments particularly the following:

a. Bayad Center

b. Debit Card

c. Bank Transfer

d. Electronic Bill Payment

e. Mobile Payments and

f. Electronic Check

2. Add an email notification feature that will inform the vendor

that an order has been made by a customer.


107

BIBLIOGRAPHY

MIYATAKE, K., NEMOTO, T., NAKAHARAI, S., & HAYASHI, K.


(2016). Reduction in Consumers’ Purchasing Cost by Online
Shopping. Transportation Research Procedia. Volume 12, Pages
656-666.

ALMER . (2015) Benefits and risk related with E-commerce; Define


the e-commerce.
KIM, D. J., FERRIN, D. L., & RAO, H. R. (2003). A trust-based
consumer decision-making model in electronic commerce: The role of
trust, perceived risk, and their antecedents: Decision Support Systems
Volume 44 Pages 544-564.

ZHU, L. & THATCHER, S. M. (2003). National information ecology: A


new institutional economics perspective on global e-commerce adoption:
Electronic Commerce Research, Volume 11.

BASU, A., & MUYLLE, S. (2007) Assessing and enhancing e-business


processes: Electronic Commerce Research and Applications; Volume 10
Pages 437–499.

WINDRUM, P., BERRANGER, & PASCALE. (2003). Factors affecting


the adoption of intranets and extranets by SMEs a UK study.

PAVLOU, P. A. (2014). Consumer Acceptance of Electronic Commerce:


Integrating Trust and Risk with the Technology Acceptance Model;
International Journal of Electronic Commerce. Volume 7, 2003, 101-134.

SWAN, J. E. & NOLAN, J. J. (2013). Gaining Customer Trust: A


Conceptual Guide for the Salesperson. Volume 5, 1985, 39-48.

MARTIN, H., KIANICKOVA, E., & MADLENAK, E. (2017). The


importance of e-mail marketing in e-commerce. Procedia Engineering:
ELSEVIER Inc. Volume 192, 2017, 342-347.

KRISHNAN, K., & ROGERS, S. P. (2015). Social Media and Network


Monitoring: A volume in MK Series on Business Intelligence 2015 , 107-
113.
108

KRISHNAN, K., & ROGERS, S. P. (2015). Social Analytics in THE


Enterprise. A volume in MK Series on Business Intelligence, Pages 11-21

HEUER, D., BRETTEL, M., & KEMPER, J. (2015). Brand competition in


fashion e-commerce; Volume 14, Issue 6, October–November
2015, 514-522.
109

APPENDICES

Appendix I. Relevant Source Code

Login

<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<?php do_action( 'woocommerce_before_customer_login_form' ); ?>
<?php if ( get_option( 'woocommerce_enable_myaccount_registration' )
=== 'yes' ) : ?>
<div class="u-columns col2-set" id="customer_login">
<div class="u-column1 col-1">
<?php endif; ?>
<h2><?php esc_html_e( 'Login', 'woocommerce' ); ?></h2>
<form class="woocommerce-form woocommerce-form-login login"
method="post">
<?php do_action( 'woocommerce_login_form_start' ); ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-
row form-row-wide">
<label for="username"><?php esc_html_e( 'Username or email address',
'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text
input-text" name="username" id="username" value="<?php echo ( !
empty( $_POST['username'] ) ) ?
esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php //
@codingStandardsIgnoreLine ?>
</p>
<p class="woocommerce-form-row woocommerce-form-row--wide form-
row form-row-wide">
<label for="password"><?php esc_html_e( 'Password',
'woocommerce' ); ?> <span class="required">*</span></label>
110

<input class="woocommerce-Input woocommerce-Input--text input-text"


type="password" name="password" id="password" />
</p>

<?php do_action( 'woocommerce_login_form' ); ?>


<p class="form-row">
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-
nonce' ); ?>
<button type="submit" class="woocommerce-Button button"
name="login" value="<?php esc_attr_e( 'Login',
'woocommerce' ); ?>"><?php esc_html_e( 'Login',
'woocommerce' ); ?></button>
<label class="woocommerce-form__label woocommerce-form__label-for-
checkbox inline">
<input class="woocommerce-form__input woocommerce-form__input-
checkbox" name="rememberme" type="checkbox" id="rememberme"
value="forever" /> <span><?php esc_html_e( 'Remember me',
'woocommerce' ); ?></span>
</label>
</p>
<p class="woocommerce-LostPassword lost_password">
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php
esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
</p>
<?php do_action( 'woocommerce_login_form_end' ); ?>
</form>
<?php if ( get_option( 'woocommerce_enable_myaccount_registration' )
=== 'yes' ) : ?>
</div>
<div class="u-column2 col-2">
<h2><?php esc_html_e( 'Register', 'woocommerce' ); ?></h2>
<form method="post" class="register">
<?php do_action( 'woocommerce_register_form_start' ); ?>
<?php if ( 'no' ===
get_option( 'woocommerce_registration_generate_username' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-
row form-row-wide">
<label for="reg_username"><?php esc_html_e( 'Username',
'woocommerce' ); ?> <span class="required">*</span></label>
111

<input type="text" class="woocommerce-Input woocommerce-Input--text


input-text" name="username" id="reg_username" value="<?php echo ( !
empty( $_POST['username'] ) ) ?
esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php //
@codingStandardsIgnoreLine ?>`
</p>
<?php endif; ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-
row form-row-wide">
<label for="reg_email"><?php esc_html_e( 'Email address',
'woocommerce' ); ?> <span class="required">*</span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--
text input-text" name="email" id="reg_email" value="<?php echo ( !
empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) :
''; ?>" /><?php // @codingStandardsIgnoreLine ?>
</p>
<?php if ( 'no' ===
get_option( 'woocommerce_registration_generate_password' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-
row form-row-wide">
<label for="reg_password"><?php esc_html_e( 'Password',
'woocommerce' ); ?> <span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-
Input--text input-text" name="password" id="reg_password" />
</p>
<?php endif; ?>
<?php do_action( 'woocommerce_register_form' ); ?>
<p class="woocommerce-FormRow form-row">
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-
nonce' ); ?>
<button type="submit" class="woocommerce-Button button"
name="register" value="<?php esc_attr_e( 'Register',
'woocommerce' ); ?>"><?php esc_html_e( 'Register',
'woocommerce' ); ?></button>
</p>
<?php do_action( 'woocommerce_register_form_end' ); ?>
</form>
</div>
</div>
112

<?php endif; ?>


<?php do_action( 'woocommerce_after_customer_login_form' ); ?>

Product vendor registration

<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class WC_Product_Vendors_Registration {
public function __construct() {
if ( is_admin() ) {
add_action( 'wp_ajax_wc_product_vendors_registration', array( $this,
'registration_ajax' ) );
add_action( 'wp_ajax_nopriv_wc_product_vendors_registration',
array( $this, 'registration_ajax' ) );
} else {
add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts' ) );
}
return true;
}
public function add_scripts() {
wp_enqueue_script( 'wcpv-frontend-scripts' );
$localized_vars = array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'ajaxRegistrationNonce' =>
wp_create_nonce( '_wc_product_vendors_registration_nonce' ),
'success' => __( 'Your request has been submitted. You will be
contacted shortly.', 'woocommerce-product-vendors' ),
);
wp_localize_script( 'wcpv-frontend-scripts', 'wcpv_registration_local',
$localized_vars );
return true;
}
public function registration_ajax() {
$this->registration_form_validation( $_POST['form_items'] );
113

return true;
}
public function include_form() {
// check if template has been overriden
if ( file_exists( get_stylesheet_directory() . '/woocommerce-product-
vendors/shortcode-registration-form.php' ) ) {
include( get_stylesheet_directory() . '/woocommerce-product-
vendors/shortcode-registration-form.php' );
} else {
include( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/shortcode-
registration-form.php' );
}
return true;
}
public function registration_form_validation( $form_items = array() ) {
global $errors;
if ( ! is_array( $form_items ) ) {
parse_str( $_POST['form_items'], $form_items );
}
$form_items = array_map( 'sanitize_text_field', $form_items );
if ( ! isset( $form_items ) ) {
wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-product-vendors' ) );
}
if ( ! wp_verify_nonce( $_POST['ajaxRegistrationNonce'],
'_wc_product_vendors_registration_nonce' ) ) {
wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-product-vendors' ) );
}
// handle form submission/validation
if ( ! empty( $form_items ) ) {
$errors = array();
if ( ! is_user_logged_in() ) {
if ( empty( $form_items['firstname'] ) ) {
$errors[] = __( 'First Name is a required field.', 'woocommerce-product-
vendors' );
}
if ( empty( $form_items['lastname'] ) ) {
$errors[] = __( 'Last Name is a required field.', 'woocommerce-product-
vendors' );
}
114

if ( empty( $form_items['username'] ) ) {
$errors[] = __( 'Username is a required field.', 'woocommerce-product-
vendors' );
}
if ( ! empty( $form_items['username'] ) &&
username_exists( $form_items['username'] ) ) {
$errors[] = __( 'Please choose a different username.', 'woocommerce-
product-vendors' );
}
if ( empty( $form_items['email'] ) ) {
$errors[] = __( 'Email is a required field.', 'woocommerce-product-
vendors' );
}
if ( empty( $form_items['confirm_email'] ) ) {
$errors[] = __( 'Confirm email is a required field.', 'woocommerce-
product-vendors' );
}
if ( $form_items['confirm_email'] !== $form_items['email'] ) {
$errors[] = __( 'Emails must match.', 'woocommerce-product-vendors' );
}
if ( ! empty( $form_items['email'] ) && false !==
email_exists( $form_items['email'] ) ) {
$errors[] = __( 'Email already exists in our system.', 'woocommerce-
product-vendors' );
}
if ( ! filter_var( $form_items['email'], FILTER_VALIDATE_EMAIL ) ) {
$errors[] = __( 'Email is not valid.', 'woocommerce-product-vendors' );
}
}
if ( empty( $form_items['vendor_name'] ) ) {
$errors[] = __( 'Vendor Name is a required field.', 'woocommerce-
product-vendors' );
}
// check that the vendor name is not already taken
// checks against existing terms from "wcpv_product_vendors" taxonomy
if ( ! empty( $form_items['vendor_name'] ) &&
term_exists( $form_items['vendor_name'],
WC_PRODUCT_VENDORS_TAXONOMY ) ) {
115

$errors[] = __( 'Sorry that vendor name already exists. Please enter a
different one.', 'woocommerce-product-vendors' );
}
if ( empty( $form_items['vendor_description'] ) ) {
$errors[] = __( 'Vendor Description is a required field.', 'woocommerce-
product-vendors' );
}
do_action( 'wcpv_shortcode_registration_form_validation', $errors,
$form_items );
$errors =
apply_filters( 'wcpv_shortcode_registration_form_validation_errors',
$errors, $form_items );
// no errors, lets process the form
if ( empty( $errors ) ) {
if ( is_user_logged_in() ) {
$this->vendor_registration_form_process( $form_items );
} else {
$this->vendor_user_registration_form_process( $form_items );
}
} else {
wp_send_json( array( 'errors' => $errors ) );
}
}
}
public function vendor_registration_form_process( $form_items ) {
$current_user = wp_get_current_user();
$vendor_name = $form_items['vendor_name'];
$vendor_desc = $form_items['vendor_description'];

$term_args = apply_filters( 'wcpv_registration_term_args', array(


'description' => $vendor_desc,
) );
// add vendor name to taxonomy
$term = wp_insert_term( $vendor_name,
WC_PRODUCT_VENDORS_TAXONOMY, $term_args );
// no errors, term added, continue
if ( ! is_wp_error( $term ) && ! empty( $current_user ) ) {
// add user to term meta
$vendor_data = array();
116

$vendor_data['admins'] = $current_user->ID;
update_term_meta( $term['term_id'], 'vendor_data', $vendor_data );
$args['user_id'] = $current_user->ID;
$args['user_email'] = $current_user->user_email;
$args['first_name'] = $current_user->user_firstname;
$args['last_name'] = $current_user->user_lastname;
$args['user_login'] = __( 'Same as your account login', 'woocommerce-
product-vendors' );
$args['user_pass'] = __( 'Same as your account password',
'woocommerce-product-vendors' );
$args['vendor_name'] = $vendor_name;
$args['vendor_desc'] = $vendor_desc;
// change this user's role to pending vendor
wp_update_user( array( 'ID' => $current_user->ID, 'role' =>
'wc_product_vendors_pending_vendor' ) );
do_action( 'wcpv_shortcode_registration_form_process', $args,
$form_items );
echo 'success';
exit;
} else {
global $errors;
if ( is_wp_error( $current_user ) ) {
$errors[] = $current_user->get_error_message();
}
if ( is_wp_error( $term ) ) {
$errors[] = $term->get_error_message();
}
wp_send_json( array( 'errors' => $errors ) );
}
return true;
}
public function vendor_user_registration_form_process( $form_items ) {
$username = $form_items['username'];
$email = $form_items['email'];
$vendor_name = $form_items['vendor_name'];
$vendor_desc = $form_items['vendor_description'];
$firstname = $form_items['firstname'];
$lastname = $form_items['lastname'];
$password = wp_generate_password();
117

$args = apply_filters( 'wcpv_shortcode_register_vendor_args', array(


'user_login' => $username,
'user_email' => $email,
'user_pass' => $password,
'first_name' => $firstname,
'last_name' => $lastname,
'display_name' => $firstname,
'role' => 'wc_product_vendors_pending_vendor',
) );
$user_id = wp_insert_user( $args );
$user = get_user_by( 'id', $user_id );
$password_reset_key = get_password_reset_key( $user );
$term_args = apply_filters( 'wcpv_registration_term_args', array(
'description' => $vendor_desc,
) );
// add vendor name to taxonomy
$term = wp_insert_term( $vendor_name,
WC_PRODUCT_VENDORS_TAXONOMY, $term_args );
// no errors, user created and term added, continue
if ( ! is_wp_error( $user_id ) && ! is_wp_error( $term ) ) {
// add user to term meta
$vendor_data = array();
$vendor_data['admins'] = $user_id;
update_term_meta( $term['term_id'], 'vendor_data', $vendor_data );
$args['user_id'] = $user_id;
$args['vendor_name'] = $vendor_name;
$args['vendor_desc'] = $vendor_desc;
$args['password_reset_key'] = $password_reset_key;
do_action( 'wcpv_shortcode_registration_form_process', $args,
$form_items );
echo 'success';
exit;
} else {
global $errors;
if ( is_wp_error( $user_id ) ) {
$errors[] = $user_id->get_error_message();
}
if ( is_wp_error( $term ) ) {
$errors[] = $term->get_error_message();
118

}
wp_send_json( array( 'errors' => $errors ) );
}
return true;
}
}

Add product

<?php

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
the_title( '<h1 class="product_title entry-title">', '</h1>' );
global $post;
$short_description = apply_filters( 'woocommerce_short_description',
$post->post_excerpt );
if ( ! $short_description ) {
return;
}
?>
<div class="woocommerce-product-details__short-description">
<?php echo $short_description; // WPCS: XSS ok. ?>
</div>
<p class="stock <?php echo esc_attr( $class ); ?>"><?php echo
wp_kses_post( $availability ); ?></p>
<p class="price"><?php echo $product->get_price_html(); ?></p>
<table class="shop_attributes">
<?php if ( $display_dimensions && $product->has_weight() ) : ?>
<tr>
<th><?php _e( 'Weight', 'woocommerce' ) ?></th>
<td class="product_weight"><?php echo
esc_html( wc_format_weight( $product->get_weight() ) ); ?></td>
</tr>
<?php endif; ?>
<?php if ( $display_dimensions && $product->has_dimensions() ) : ?>
119

<tr>
<th><?php _e( 'Dimensions', 'woocommerce' ) ?></th>
<td class="product_dimensions"><?php echo
esc_html( wc_format_dimensions( $product-
>get_dimensions( false ) ) ); ?></td>
</tr>
<?php endif; ?>
<?php foreach ( $attributes as $attribute ) : ?>
<tr>
<th><?php echo wc_attribute_label( $attribute->get_name() ); ?></th>
<td><?php
$values = array();
if ( $attribute->is_taxonomy() ) {
$attribute_taxonomy = $attribute->get_taxonomy_object();
$attribute_values = wc_get_product_terms( $product->get_id(),
$attribute->get_name(), array( 'fields' => 'all' ) );
foreach ( $attribute_values as $attribute_value ) {
$value_name = esc_html( $attribute_value->name );

if ( $attribute_taxonomy->attribute_public ) {
$values[] = '<a href="' . esc_url( get_term_link( $attribute_value-
>term_id, $attribute->get_name() ) ) . '" rel="tag">' . $value_name .
'</a>';
} else {
$values[] = $value_name;
}
}
} else {
$values = $attribute->get_options();
foreach ( $values as &$value ) {
$value = make_clickable( esc_html( $value ) );
}
}
echo apply_filters( 'woocommerce_attribute',
wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
?></td>
</tr>
<?php endforeach; ?>
</table>
120

if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
return;
}
global $product;
$columns =
apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
$post_thumbnail_id = $product->get_image_id();
$wrapper_classes =
apply_filters( 'woocommerce_single_product_image_gallery_classes',
array(
'woocommerce-product-gallery',
'woocommerce-product-gallery--' . ( has_post_thumbnail() ? 'with-
images' : 'without-images' ),
'woocommerce-product-gallery--columns-' . absint( $columns ),
'images',
) );
?>
</figure>
</div>
if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
return;
}
global $product;
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids && has_post_thumbnail() ) {
foreach ( $attachment_ids as $attachment_id ) {
echo
apply_filters( 'woocommerce_single_product_image_thumbnail_html',
wc_get_gallery_image_html( $attachment_id ), $attachment_id );
}
}
?>

Add to Cart

<?php
if ( ! defined( 'ABSPATH' ) ) {
121

exit;
}
global $product;
?>
<div class="woocommerce-variation-add-to-cart variations_button">
<?php
do_action( 'woocommerce_before_add_to_cart_quantity' );
woocommerce_quantity_input( array(
'min_value' => apply_filters( 'woocommerce_quantity_input_min',
$product->get_min_purchase_quantity(), $product ),
'max_value' => apply_filters( 'woocommerce_quantity_input_max',
$product->get_max_purchase_quantity(), $product ),
'input_value' => isset( $_POST['quantity'] ) ?
wc_stock_amount( $_POST['quantity'] ) : $product-
>get_min_purchase_quantity(),
) );
do_action( 'woocommerce_after_add_to_cart_quantity' );
?>
<button type="submit" class="single_add_to_cart_button button
alt"><?php echo esc_html( $product-
>single_add_to_cart_text() ); ?></button>
<input type="hidden" name="add-to-cart" value="<?php echo
absint( $product->get_id() ); ?>" />
<input type="hidden" name="product_id" value="<?php echo
absint( $product->get_id() ); ?>" />
<input type="hidden" name="variation_id" class="variation_id" value="0"
/>
</div>
//External
global $product;
if ( ! $product->is_purchasable() ) {
return;
}
echo wc_get_stock_html( $product );
if ( $product->is_in_stock() ) : ?>
<?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
<form class="cart" action="<?php echo esc_url( get_permalink() ); ?>"
method="post" enctype='multipart/form-data'>
<?php
122

do_action( 'woocommerce_before_add_to_cart_quantity' );
woocommerce_quantity_input( array(
'min_value' => apply_filters( 'woocommerce_quantity_input_min',
$product->get_min_purchase_quantity(), $product ),
'max_value' => apply_filters( 'woocommerce_quantity_input_max',
$product->get_max_purchase_quantity(), $product ),
'input_value' => isset( $_POST['quantity'] ) ?
wc_stock_amount( $_POST['quantity'] ) : $product-
>get_min_purchase_quantity(),
) );
do_action( 'woocommerce_after_add_to_cart_quantity' );
?>
<button type="submit" name="add-to-cart" value="<?php echo
esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button
button alt"><?php echo esc_html( $product-
>single_add_to_cart_text() ); ?></button>
do_action( 'woocommerce_after_add_to_cart_button' );
?>
<?php endif; ?>

Checkout

<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<div class="woocommerce-billing-fields">
<?php if ( wc_ship_to_billing_address_only() && WC()->cart-
>needs_shipping() ) : ?>
<h3><?php _e( 'Billing &amp; Shipping', 'woocommerce' ); ?></h3>
<?php else : ?>
<h3><?php _e( 'Billing details', 'woocommerce' ); ?></h3>
<?php endif; ?>
<?php do_action( 'woocommerce_before_checkout_billing_form',
$checkout ); ?>
<div class="woocommerce-billing-fields__field-wrapper">
123

<?php
$fields = $checkout->get_checkout_fields( 'billing' );
foreach ( $fields as $key => $field ) {
if ( isset( $field['country_field'], $fields[ $field['country_field'] ] ) ) {
$field['country'] = $checkout->get_value( $field['country_field'] );
}
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
}
?>
</div>
<?php do_action( 'woocommerce_after_checkout_billing_form',
$checkout ); ?>
</div>
<?php if ( ! is_user_logged_in() && $checkout-
>is_registration_enabled() ) : ?>
<div class="woocommerce-account-fields">
<?php if ( ! $checkout->is_registration_required() ) : ?>
<p class="form-row form-row-wide create-account">
<label class="woocommerce-form__label woocommerce-form__label-for-
checkbox checkbox">
<input class="woocommerce-form__input woocommerce-form__input-
checkbox input-checkbox" id="createaccount" <?php checked( ( true
=== $checkout->get_value( 'createaccount' ) || ( true ===
apply_filters( 'woocommerce_create_account_default_checked', false ) ) ),
true ) ?> type="checkbox" name="createaccount" value="1" />
<span><?php _e( 'Create an account?', 'woocommerce' ); ?></span>
</label>
</p>
<?php endif; ?>
<?php do_action( 'woocommerce_before_checkout_registration_form',
$checkout ); ?>
<?php if ( $checkout->get_checkout_fields( 'account' ) ) : ?>
<div class="create-account">
<?php foreach ( $checkout->get_checkout_fields( 'account' ) as $key =>
$field ) : ?>
<?php woocommerce_form_field( $key, $field, $checkout-
>get_value( $key ) ); ?>
<?php endforeach; ?>
<div class="clear"></div>
124

</div>
<?php endif; ?>
<?php do_action( 'woocommerce_after_checkout_registration_form',
$checkout ); ?>
</div>
<?php endif; ?>
if ( ! $checkout->is_registration_enabled() && $checkout-
>is_registration_required() && ! is_user_logged_in() ) {
echo
apply_filters( 'woocommerce_checkout_must_be_logged_in_message',
__( 'You must be logged in to checkout.', 'woocommerce' ) );
return;
}
?>
<form name="checkout" method="post" class="checkout woocommerce-
checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>"
enctype="multipart/form-data">
<?php if ( $checkout->get_checkout_fields() ) : ?>
<?php
do_action( 'woocommerce_checkout_before_customer_details' ); ?>
<div class="col2-set" id="customer_details">
<div class="col-1">
<?php do_action( 'woocommerce_checkout_billing' ); ?>
</div>
<div class="col-2">
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
</div>
</div>
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
<?php endif; ?>
<h3 id="order_review_heading"><?php _e( 'Your order',
'woocommerce' ); ?></h3>
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
<div id="order_review" class="woocommerce-checkout-review-order">
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
</div>
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
</form>
<?php do_action( 'woocommerce_after_checkout_form', $checkout ); ?>
125

<form id="order_review" method="post">

<table class="shop_table">
<thead>
<tr>
<th class="product-name"><?php esc_html_e( 'Product',
'woocommerce' ); ?></th>
<th class="product-quantity"><?php esc_html_e( 'Qty',
'woocommerce' ); ?></th>
<th class="product-total"><?php esc_html_e( 'Totals',
'woocommerce' ); ?></th>
</tr>
</thead>
<tbody>
<?php if ( count( $order->get_items() ) > 0 ) : ?>
<?php foreach ( $order->get_items() as $item_id => $item ) : ?>
<?php
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
continue;
}
?>
<tr class="<?php echo
esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item',
$item, $order ) ); ?>">
<td class="product-name">
<?php
echo apply_filters( 'woocommerce_order_item_name', esc_html( $item-
>get_name() ), $item, false ); // @codingStandardsIgnoreLine
do_action( 'woocommerce_order_item_meta_start', $item_id, $item,
$order, false );
wc_display_item_meta( $item );
do_action( 'woocommerce_order_item_meta_end', $item_id, $item,
$order, false );
?>
</td>
<td class="product-quantity"><?php echo
apply_filters( 'woocommerce_order_item_quantity_html', ' <strong
class="product-quantity">' . sprintf( '&times; %s', esc_html( $item-
126

>get_quantity() ) ) . '</strong>', $item ); ?></td><?php //


@codingStandardsIgnoreLine ?>
<td class="product-subtotal"><?php echo $order-
>get_formatted_line_subtotal( $item ); ?></td><?php //
@codingStandardsIgnoreLine ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
<tfoot>
<?php if ( $totals = $order->get_order_item_totals() ) : ?>
<?php foreach ( $totals as $total ) : ?>
<tr>
<th scope="row" colspan="2"><?php echo $total['label']; ?></th><?php
// @codingStandardsIgnoreLine ?>
<td class="product-total"><?php echo $total['value']; ?></td><?php //
@codingStandardsIgnoreLine ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tfoot>
</table>
<div id="payment">
<?php if ( $order->needs_payment() ) : ?>
<ul class="wc_payment_methods payment_methods methods">
<?php
if ( ! empty( $available_gateways ) ) {
foreach ( $available_gateways as $gateway ) {
wc_get_template( 'checkout/payment-method.php', array( 'gateway' =>
$gateway ) );
}
} else {
echo '<li class="woocommerce-notice woocommerce-notice--info
woocommerce-info">' .
apply_filters( 'woocommerce_no_available_payment_methods_message',
__( 'Sorry, it seems that there are no available payment methods for your
location. Please contact us if you require assistance or wish to make
alternate arrangements.', 'woocommerce' ) ) . '</li>'; //
@codingStandardsIgnoreLine
127

}
?>
</ul>
<?php endif; ?>
<div class="form-row">
<input type="hidden" name="woocommerce_pay" value="1" />
<?php wc_get_template( 'checkout/terms.php' ); ?>
<?php do_action( 'woocommerce_pay_order_before_submit' ); ?>
<?php echo apply_filters( 'woocommerce_pay_order_button_html',
'<button type="submit" class="button alt" id="place_order" value="' .
esc_attr( $order_button_text ) . '" data-value="' .
esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) .
'</button>' ); // @codingStandardsIgnoreLine ?>
<?php do_action( 'woocommerce_pay_order_after_submit' ); ?>
<?php wp_nonce_field( 'woocommerce-pay' ); ?>
</div>
</div>
</form>
<ul class="order_details">
<li class="order">
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
<strong><?php echo esc_html( $order-
>get_order_number() ); ?></strong>
</li>
<li class="date">
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo esc_html( wc_format_datetime( $order-
>get_date_created() ) ); ?></strong>
</li>
<li class="total">
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order-
>get_formatted_order_total() ); ?></strong>
</li>
<?php if ( $order->get_payment_method_title() ) : ?>
<li class="method">
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order-
>get_payment_method_title() ); ?></strong>
128

</li>
<?php endif; ?>
</ul>
<?php do_action( 'woocommerce_receipt_' . $order-
>get_payment_method(), $order->get_id() ); ?>
<div class="clear"></div>
?>

Order product

<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WC_Order_Item extends WC_Data implements ArrayAccess {
protected $data = array(
'order_id' => 0,
'name' => '',
);
protected $cache_group = 'order-items';
protected $meta_type = 'order_item';
protected $object_type = 'order_item';
public function __construct( $item = 0 ) {
parent::__construct( $item );
if ( $item instanceof WC_Order_Item ) {
$this->set_id( $item->get_id() );
} elseif ( is_numeric( $item ) && $item > 0 ) {
$this->set_id( $item );
} else {
$this->set_object_read( true );
}
$type = 'line_item' === $this->get_type() ? 'product' : $this->get_type();
$this->data_store = WC_Data_Store::load( 'order-item-' . $type );
if ( $this->get_id() > 0 ) {
$this->data_store->read( $this );
}
}
129

public function apply_changes() {


if ( function_exists( 'array_replace' ) ) {
$this->data = array_replace( $this->data, $this->changes );
} else { // PHP 5.2 compatibility.
foreach ( $this->changes as $key => $change ) {
$this->data[ $key ] = $change;
}
}
$this->changes = array();
}
public function get_order_id( $context = 'view' ) {
return $this->get_prop( 'order_id', $context );
}
public function get_name( $context = 'view' ) {
return $this->get_prop( 'name', $context );
}
public function get_type() {
return;
}
public function get_quantity() {
return 1;
}
public function get_tax_status() {
return 'taxable';
}
public function get_tax_class() {
return '';
}

public function get_order() {


return wc_get_order( $this->get_order_id() );
}
public function set_order_id( $value ) {
$this->set_prop( 'order_id', absint( $value ) );
}
public function set_name( $value ) {
$this->set_prop( 'name', wc_clean( $value ) );
}
public function is_type( $type ) {
130

return is_array( $type ) ? in_array( $this->get_type(), $type ) : $type


=== $this->get_type();
}
public function calculate_taxes( $calculate_tax_for = array() ) {
if ( ! isset( $calculate_tax_for['country'], $calculate_tax_for['state'],
$calculate_tax_for['postcode'], $calculate_tax_for['city'] ) ) {
return false;
}
if ( '0' !== $this->get_tax_class() && 'taxable' === $this-
>get_tax_status() && wc_tax_enabled() ) {
$calculate_tax_for['tax_class'] = $this->get_tax_class();
$tax_rates = WC_Tax::find_rates( $calculate_tax_for );
$taxes = WC_Tax::calc_tax( $this->get_total(),
$tax_rates, false );
if ( method_exists( $this, 'get_subtotal' ) ) {
$subtotal_taxes = WC_Tax::calc_tax( $this->get_subtotal(), $tax_rates,
false );
$this->set_taxes( array( 'total' => $taxes, 'subtotal' =>
$subtotal_taxes ) );
} else {
$this->set_taxes( array( 'total' => $taxes ) );
}
} else {
$this->set_taxes( false );
}
do_action( 'woocommerce_order_item_after_calculate_taxes', $this,
$calculate_tax_for );
return true;
}
public function get_formatted_meta_data( $hideprefix = '_', $include_all
= false ) {
$formatted_meta = array();
$meta_data = $this->get_meta_data();
$hideprefix_length = ! empty( $hideprefix ) ? strlen( $hideprefix ) : 0;
$product = is_callable( array( $this, 'get_product' ) ) ? $this-
>get_product() : false;
$order_item_name = $this->get_name();
foreach ( $meta_data as $meta ) {
131

if ( empty( $meta->id ) || '' === $meta->value || ! is_scalar( $meta-


>value ) || ( $hideprefix_length && substr( $meta->key, 0,
$hideprefix_length ) === $hideprefix ) ) {
continue;
}
$meta->key = rawurldecode( (string) $meta->key );
$meta->value = rawurldecode( (string) $meta->value );
$attribute_key = str_replace( 'attribute_', '', $meta->key );
$display_key = wc_attribute_label( $attribute_key, $product );
$display_value = sanitize_text_field( $meta->value );
if ( taxonomy_exists( $attribute_key ) ) {
$term = get_term_by( 'slug', $meta->value, $attribute_key );
if ( ! is_wp_error( $term ) && is_object( $term ) && $term->name ) {
$display_value = $term->name;
}
}
// Skip items with values already in the product details area of the product
name.
if ( ! $include_all && $product && $product->is_type( 'variation' ) &&
wc_is_attribute_in_product_name( $display_value, $order_item_name ) )
{
continue;
}
$formatted_meta[ $meta->id ] = (object) array(
'key' => $meta->key,
'value' => $meta->value,
'display_key' =>
apply_filters( 'woocommerce_order_item_display_meta_key',
$display_key, $meta, $this ),
'display_value' =>
wpautop( make_clickable( apply_filters( 'woocommerce_order_item_displa
y_meta_value', $display_value, $meta, $this ) ) ),
);
}

return
apply_filters( 'woocommerce_order_item_get_formatted_meta_data',
$formatted_meta, $this );
}
132

public function offsetSet( $offset, $value ) {


if ( 'item_meta_array' === $offset ) {
foreach ( $value as $meta_id => $meta ) {
$this->update_meta_data( $meta->key, $meta->value, $meta_id );
}
return;
}

if ( array_key_exists( $offset, $this->data ) ) {


$setter = "set_$offset";
if ( is_callable( array( $this, $setter ) ) ) {
$this->$setter( $value );
}
return;
}
$this->update_meta_data( $offset, $value );
}
public function offsetUnset( $offset ) {
$this->maybe_read_meta_data();
if ( 'item_meta_array' === $offset || 'item_meta' === $offset ) {
$this->meta_data = array();
return;
}

if ( array_key_exists( $offset, $this->data ) ) {


unset( $this->data[ $offset ] );
}
if ( array_key_exists( $offset, $this->changes ) ) {
unset( $this->changes[ $offset ] );
}

$this->delete_meta_data( $offset );
}
public function offsetExists( $offset ) {
$this->maybe_read_meta_data();
if ( 'item_meta_array' === $offset || 'item_meta' === $offset ||
array_key_exists( $offset, $this->data ) ) {
return true;
}
133

return array_key_exists( $offset, wp_list_pluck( $this->meta_data, 'value',


'key' ) ) || array_key_exists( '_' . $offset, wp_list_pluck( $this-
>meta_data, 'value', 'key' ) );
Appendix II. Evaluation tool
134
135
136

Appendix III. Sample Input/Output/Reports

Input

Login

1. Input username or email address.

2. Input password.
137

Register

1. Input email address.

2. Input password.
138

Vendor Registration

1 2

3
4 5

1. Input first name

2. Input last name

3. Input login username

4. Input email

5. Input confirmation email

6. Input vendor name

7. Input something about your company and what you sell.


139

Add product

1 2

7 8
140

10

1. Input product name

2. Input product additional description

3. Input product price

4. Input product sale price

5. Input product SKU number

6. Input product quantity

7. Input product attribute name

8. Input product attribute value

9. Input product tags

10. input product description


141

Checkout

1
1 2
3
4
5
6
7
8 9

10
11

1. Input first name

2. Input last name

3. Input company name

4. Input street name

5. Input apartment or dormitory name

6. Input town or city name

7. Input state or country name

8. Input postcode or zip


142

9. Input phone or mobile number

10. Input email address

11. Input order notes

Output

Product
143

Checkout

Order
144

Administrator

Login or Register
145

Vendor

Reports

Orders
146

Customers

Stocks
147

Vendors
148

Appendix IV. Users Guide

Home Page

1 8
2 3 4 5 7
1. Click home to return in the home page.

2. Click shop to view all products and its categories and tags.

3. Click about us to know the developers information.

5. Click sell on ME-CW to register as a vendor in the website.

6. Click cart to view the product you choose.

7. Click account to view your account.

4. Click sign up if you want to create an account.

8. Click the Search Bar to search the product you’ve looking for.
149

9. Click shop now and you will link directly to Shop

Shop

3
2
150

5
151

1. Product search box to search the product you want.

2. Adjust product filter by price to view the products from low to high

price.

3. Choose sort by popularity, average rating, newness, price – low to

high or high to low, to view the product trends and prices.

4. Product categories are where you can find any product based on its

category.

5. Product Tags are the same with product categories.

Product Page

1
4

2 3
152

1. Click Choose option to choose the product’s attributes.

2. Click product quantity to choose how many products you want to

order.

3. Click add to cart to add the product you want to order.

4. Click lesser than button to view the next product.

5. Click the greater the button to view the previous Product.

6. Click any tabs to view product description, additional information, and

reviews.
153

Cart

1
2
3 4 5

1. Click x button to remove the item in the cart.

2. Edit item quantity if you want to add more.

3. Click update cart if you done editing.

4. Click proceed to checkout for payment.

5. Click continue shopping if you want to shop more.


154

Checkout

6
2 5
3 4

1. Fill-up the billing details for shipping purposes.

2. If you want to create an account, click the create account radio button.

3. Click ship to different address radio button if you want to ship your

order in your different address.

4. if want add some order notes, you add it the order notes section.

5. Click payment option to choose what kind of payment do you want, its

either Cash-on-delivery or PayPal.

6. Click place order if you are done.


155

7. Click login if you are a returning customer.

Vendor Registration Form

1. Fill-up the vendor registration form.

2. Click register button if you are done.


156

Vendor’s Dashboard

1
2
3

4
5

1. Click to view dashboard.

2. Click orders to view all the orders.

3. Click add media if you want add some photos, music, and video.

4. Click products to add, edit, update, remove and view all products.

5. Click profile if you want to edit your profile.


157

Add Product

5 6
7

10

11
12 9

14 13
16 15
158

1. Product name textbox is where the product name encoded.

2. Product description is where the additional product description

encoded.

3. Choose product layout is to choose what kind of layout you like, is it

inherit or style 1 to 4.

4. Click save to draft button if you want to finish it later.

5. Preview product button is to view the product created.

6. Click submit for review button to approve the product you’ve created

by the administrator.

7. Choose Product type is to choose what type of product you are

selling, is it simple or variable product.

8. Choose where your product belongs in product category by clicking

the checkbox.

9. Click the link label schedule to set a date for product’s sale.

10. Click general tab to set the products price, sale price, and

commission.

11. Click inventory tab to set the product’s SKU number and quantity

12. Click attributes tab to add the products attribute like per and size.

13. Click add button to add the product tags you encoded in the textbox.
159

14. Click the set product image link label will link to the library to choose

the product’s image if existing, if not, you can upload image by

clicking the upload button in the library.

15. Click add product gallery image link label for additional product

image.

16. Product description is where the main product description encoded.

Administrator

2
3
4
5
6
7

1. Click dashboard to view net sales, top seller, processing and on-hold

orders, low stocks and out of stocks products.

2. Click pages to add, edit, update, and remove.


160

3. Click WooCommerce to change order status into processing, on-hold,

completed, and to view reports such as weekly, monthly, and yearly

sales. Also, to configure settings such as store address, products,

shipping, checkouts, emails, and API.

4. Click products to view vendor’s products and approved, add, edit,

update, and remove products. Also, to add categories, tags, attributes,

and vendors.

5. Click commissions to view paid, unpaid, and void vendor’s

commissions.

6. Click appearances to add new themes, customize web pages, add

widgets, menus, install required plugins, and theme editor.

7. Click plugins to add new and view installed plugins.

8. Click users to approved vendors, view all the users, and change their

role.
161

APPENDIX V. Relevant Documents


162

Appendix VI. Grammarian’s Certification

May 5, 2018

G R A M M A R I A N’ S C E R T I F I C A T E

This is to certify that the undersigned reviewed and went through

all the pages of the proposed capstone project entitled “GOVERNOR

NONITO D. LLANOS SR. NATIONAL HIGH SCHOOL WEB-BASED

STUDENT INFORMATION SYSTEM” as against the set of structural

rules that govern the composition of sentences, phrases, and words in the

English language.

Signed:

CHARMIE MARIE P. DELA CRUZ, MAED


Grammarian
163

CURRICULUM VITAE

Personal Data
Name : Kyemberly A. Rico
Adress : Poblalcion Malalag,
Davao del Sur
Birthday : January 23, 1997
Place of Birth : Lamanan Calinan Davao
City
Sex : Female
Height : 5’4
Weight : 42 kls.
Status : Single
Religion : Aglipayan Christian Church
Nationality : Filipino
Tribe : Bisaya
Parents
Father : Primo R. Rico Jr.
Mother: Marissa A. Rico

Education Background
Elementary
School : Malalag Central Elementary
School
Year attended : 2009-2010
Award/Honors : With honors
Received
Secondary
School : Davao del Sur School of fisheries
Year attended : 2013-2014
Award/Honors : N/A
Received
College
School : Southern Philippines Agri-
Business and Marine and
Aquatic School of Technology
164

Year attended : 2014-2018

Award/Honors : N/A
Received

Work Experience
Agency : Sur Telemedia T.V. Network

Inclusive Dates : February-May 2018


Position/Designation : On-the-Job-Training

Affiliation
Name of Organization : InfoTech Society
Position : Member
Inclusive Dates : 2014-2018
165

CURRICULUM VITAE

Personal Data
Name : Ralou A. Almondia
Adress : Sangay, Malita Davao
Occidental
Birthday : April 9, 1996
Place of Birth : Sangay, Malita Davao
Occidental
Sex : Male
Height : 5’3
Weight : 60 kls.
Status : Single
Religion : Roman Catholic
Nationality : Filipino
Tribe : Bisaya
Parents
Father : Raul A. Almondia
Mother: Nenevilla A. Almondia

Education Background
Elementary
School : Sangay Elementary School
Year attended : 2009-2010
Award/Honors : With honors
Received
Secondary
School : Mariano Peralta National High
School
Year attended : 2013-2014
Award/Honors : N/A
Received
College
School : Southern Philippines Agri-
Business and Marine and
Aquatic School of Technology
166

Year attended : 2014-2018

Award/Honors : N/A
Received

Work Experience
Agency : SPAMAST Registrar
Inclusive Dates : February-May 2018
Position/Designation : On-the-Job Training

Affiliation
Name of Organization : InfoTech Society
Position : Member
Inclusive Dates : 2014-2018

Vous aimerez peut-être aussi