171
1 Liverpool John Moores University School of Computing Mathematical Sciences E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT By Chris Nwaigwe Jr 22 April, 2010

E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

1    

Liverpool John Moores University

School of Computing Mathematical Sciences

E-COMMERCE SYSTEM

ANALYSIS, DESIGN

AND DEVELOPMENT

By

Chris Nwaigwe Jr

22 April, 2010

Page 2: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

2    

Abstract: E-Commerce has become a necessity for businesses, especially small

businesses looking to maximize profit by using cost effective online marketing

strategies. Adequate system analysis and design methods are required to achieve fully

functioning user-friendly and re-scalable e-Commerce systems. This study covers the

review of current e-commerce system analysis, design and implementation

methodologies. The role of e-Commerce in businesses, the legal and security issues

involved in developing e-Commerce systems, e-Commerce system architecture, design

and development strategies are critically evaluated and the most suitable methods

applied in the development of Divine Foods e-Commerce system.

Keywords: e-Commerce system, e-Commerce Architecture, Systems Development

Life Cycle, Database Design, System Security

Page 3: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

3    

Acknowledgements

In writing this report, I have to thank the management of Divine Foods, especially

Mrs. Rachel Davidson, Mr. T Ladipo and Richard Bola. Despite their busy schedule

they took the time to comprehensively specify the requirements of the Divine Foods

E-commerce system. My gratitude also goes to the other staff/personnel at DFs who

also helped by completing the questionnaire with great pace.

During the period of project research, I was guided and encouraged by my supervisor,

Mike Baskett of Liverpool John Moores University. His guidance and assistance were

great factors that facilitated the completion of this report. He always had a clear idea

about what to do and gave me extremely helpful suggestions when I was in need of

them.

I would like to say thanks to all the academic staff that taught and guided me

throughout my ICT and Multimedia Computing course at Liverpool John Moores

University. I would want to thank my sister, mum, friends and family for supporting

me throughout my studies.

Chris Nwaigwe

April, 2010

Page 4: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

4    

Table  of  Contents  Chapter 1 Introduction  ...........................................................................................................  8  

Subjects to be studied  ..........................................................................................................  8  

Background  ......................................................................................................................  8  

Target Audience  ..............................................................................................................  9  

Problems to be addressed  ...............................................................................................  9  

Aims, milestones and initial ideas.  .....................................................................................  9  

Initial Ideas  ....................................................................................................................  10  

Software and hardware constraints.  ............................................................................  10  

An outline plan of action and a time table.  ..................................................................  11  

Milestones  .......................................................................................................................  11  

Conclusion  ......................................................................................................................  12  

Chapter 2: Literature Review  ..............................................................................................  13  

Introduction to e-Commerce Systems  ..............................................................................  13  

Information and communication technology and business  ............................................  14  

EDI  ..................................................................................................................................  15  

EFT  ..................................................................................................................................  15  

Enterprise  resource  planning  (ERP)  ........................................................................  15  

e-­‐Commerce  Systems:  Case  Studies  .................................................................................  18  

ASDA  ...............................................................................................................................  18  

Tesco  ..............................................................................................................................  19  

e-­‐Commerce  Success  and  Failure  .................................................................................  20  

Requirements  of  an  e-­‐commerce  system  ....................................................................  20  

e-Commerce  Advantages  and  Disavdantages  .............................................................  21  

Advantages  ....................................................................................................................  21  

Disadvantages  ..............................................................................................................  22  

E-­‐Commerce  System  Security  ........................................................................................  23  

Risk  Analysis  ................................................................................................................  23  

Types  of  e-­‐commerce  system  attack  ........................................................................  23  

Securing  E-­‐Commerce  Systems  .....................................................................................  25  

Legal  and  Ethical  Issues  involved  in  e-­‐Commerce  .....................................................  26  

Electronic  Transactions  .............................................................................................  27  

Privacy  &  Security  .......................................................................................................  28  

Copyright  &  Trademark  .............................................................................................  29  

Page 5: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

5    

Conforming  to  e-­‐Commerce  Legal  and  Ethical  Issues  ...............................................  29  

Contracting  online  .......................................................................................................  29  

Advertising  ...................................................................................................................  30  

Compliance  with  the  Data  protection  Act  ...............................................................  30  

Distance  Selling  Regulations  .....................................................................................  30  

E-­‐Commerce  Marketing  Strategies  ...............................................................................  31  

Internet  Marketing  ..........................................................................................................  31  

Branding  ........................................................................................................................  32  

Literature  Review  Conclusion  .......................................................................................  33  

Research  methodology  ...................................................................................................  34  

Qualitative  Research  ...................................................................................................  34  

Quantitative  research  .................................................................................................  35  

Chosen  Research  Method  and  Justification  ................................................................  37  

Systems  Development  Life  Cycle  ..................................................................................  39  

SPIRAL  LIFECYCLE  .......................................................................................................  39  

RAPID  APPLICATION  DEVELOPMENT  (RAD)  /  PROTOTYPING  LIFECYCLE  .......  40  

V-­‐Shaped  SDLC  .............................................................................................................  41  

Chosen  SDLC  Method:  The  Waterfall  Model  ...........................................................  42  

Work  breakdown  structure  .......................................................................................  43  

System Development Life Cycle flowchart for Divine Foods  ...........................................  46  

Chapter  3:  Requirement  Analysis  .....................................................................................  47  

Background  on  DFs  .........................................................................................................  47  

Review  of  company  current  systems  of  business  operations  .................................  48  

Problem  identification  ...................................................................................................  50  

Project  specification  and  outline  ..................................................................................  52  

Project  objectives  of  E-­‐commerce  On-­‐line  ordering  system  ...............................  52  

End-­‐User  Requirements  .................................................................................................  54  

Benefits  of  the  Proposed  System  ..................................................................................  57  

System  Analysis  and  Design  Methodologies  ...............................................................  58  

SSADM  ............................................................................................................................  58  

Data  Flow  Diagrams  ............................................................................................................  60  

Chapter  4:  Design  ................................................................................................................  62  

System  Functional  Requirements  ................................................................................  62  

System  Technical  Specification  .....................................................................................  63  

Page 6: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

6    

Database  Design  Models  ................................................................................................  66  

Object  Oriented  Databases.  .......................................................................................  66  

Relational  DBMS  (RDBMS)  .........................................................................................  67  

Object-­‐Relational  DBMS  (ORDBMS)  .........................................................................  69  

The  differences  between  the  three  Database  Design  approaches  .....................  70  

Justification  of  Selected  Database  Model  ................................................................  72  

Justification  of  Chosen  Implementation  tools  ...........................................................  73  

PHP  vs  ASP.NET  ............................................................................................................  73  

MySQL  vs  Microsoft  SQL  server,  Oracle,  Access  and  DB2  .....................................  74  

Platform comparison  .........................................................................................................  74  

FrontPage  Vs  Dreamweaver  ......................................................................................  75  

AJAX  ................................................................................................................................  76  

Justification of Use  ............................................................................................................  77  

Data  Modelling  .................................................................................................................  78  

Entities  and  Attributes  ...............................................................................................  78  

Normalisation  ..................................................................................................................  79  

The Normal Forms  ........................................................................................................  79  

First Normal Form (1NF)  .............................................................................................  79  

Second Normal Form (2NF)  .........................................................................................  79  

Third Normal Form (3NF)  ...........................................................................................  80  

Fourth Normal Form (4NF)  .........................................................................................  80  

Applying  Normalisation  to  DFs  e-­‐Commerce  system  ............................................  80  

Entity  Relationship  Diagrams  .......................................................................................  82  

Entity  Types  ..................................................................................................................  83  

UML  Diagrams  ..................................................................................................................  85  

UML  Class  Diagram  ......................................................................................................  85  

UML:  Use  Case  Diagram  ..................................................................................................  86  

UML  Activity  Diagrams  ...............................................................................................  88  

Database  Data  Definition  ...........................................................................................  89  

Website  Design  ................................................................................................................  94  

Page  Layout  ...................................................................................................................  94  

Web  Design  Issues  .......................................................................................................  95  

Flow  Chart  Diagrams  ...................................................................................................  97  

Web  Story  Board  ..........................................................................................................  97  

Page 7: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

7    

Chapter  5:  Implementation  .............................................................................................  102  

Creating  the  Database  ...................................................................................................  102  

Website  Design  ..............................................................................................................  103  

Web  Design  in  Photoshop  ........................................................................................  103  

Slicing  in  Adobe  Fireworks  ......................................................................................  106  

Coding  in  Dreamweaver  ...........................................................................................  107  

The  Final  Web  Page  Preview  in  Browser  ..............................................................  110  

Chapter  6:  Evaluation  and  Testing  .................................................................................  114  

Further  Work  .................................................................................................................  116  

Chapter  5:  References  &  Bibliography  ..........................................................................  117  

References  ......................................................................................................................  117  

Bibliography  ...................................................................................................................  121  

Useful  Websites  ..........................................................................................................  122  

Chapter  7:  Appendix  .........................................................................................................  124  

The Login Page 2  .............................................................................................................  143  

Appendix  D  .....................................................................................................................  168  

DFs  user questionnaire/survey questions  ......................................................................  168  

Appendix  E  ......................................................................................................................  171  

Log  Book  ......................................................................................................................  171  

 

Page 8: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

8    

Chapter 1 Introduction

Subjects to be studied

e-Commerce System Analysis, Design and Implementation

This study covers the analysis, design and implementation of an e-Commerce system

using common web practices, system analysis and design methodologies. The main

subject areas of interest are database design and web development; these subject areas

encapsulate the different database development strategies, web 2.0 development

methods and standards, e-Commerce systems architecture, design and implementation

as well as other subject areas studied during the school academic year which are

relevant to this project.

Background

The aim of this project is to develop an e-Commerce system which will enable sales

and marketing of products and services online. This system must be reliable, secure,

re-scalable, and user friendly. The stakeholder of the proposed e-Commerce system:

Divine Foods (herein known as DFs) is a local, family run food manufacturing

company based in South East London. Established in 2004, its main purpose is the

production, sales and distribution of traditional African food products.

The company is primarily controlled by Ms Rachel Davidson, she is supported by

two of her daughters and six fulltime employees; they operate from a small corner

shop, handling over 50 orders every week. The company has grown reasonably since

its conception four years ago and is still growing exponentially with customers now

scattered across the UK. This local company now operates both on a Business-to-

Business (B2B) and Business-to-Customer (B2C) basis where other businesses can

make wholesale purchases and private customers can place individual orders.

There are currently twelve fulltime and several part-time employees. There are about

7 major product lines and 67 products offered by DFs, they have several suppliers in

Africa, Europe and North America that provide the raw resources needed to

manufacture their products.

DFs have over 700 customers around UK, carrying out an average of 50 in-store

transactions and 7 telephone orders daily.

Page 9: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

9    

Target Audience

This system is aimed at the current and potential customers of DFs. Current customers

will be advised and encouraged to use the online ordering system, while online

marketing strategies will be utilised for the acquisition new users and retention of

existing users of the system. The website is intended for users around the UK, though

users from other countries can register and access the website, orders can only be

accepted by management once they are certain products can be delivered without

violating any international trade laws.

Problems to be addressed

DFs is growing continuously, with more customers, products and orders. All records

are currently held on a manual filing system; as a result of this expansion this system

of operation is becoming ineffective. Data retrieval is difficult, sometimes impossible

Customers are usually left waiting for orders due to delays in order processing and

payment arrangements; the consequence being decreased income from sales revenue.

There is a lack of competitive edge as major competitors have already taken

advantage of the online environment, using some sort of e-Business and/or ordering

systems. Since DFs operate a traditional “brick and mortar” business, they are limited

to certain geographical areas of the UK. This system of operation makes targeting a

larger geographical area and competition with major rivals almost impossible.

This growth has brought on many problems as the workload on the owner and

employees has increased tremendously in the last year. In some cases, customers are

left waiting for their orders due to delays and/or errors stemming from manual data

entry and paper based filing system. In other cases orders have had to be declined as

the company cannot guarantee they can meet these orders; due to shortage in staff and

the costs of hiring more staff.

Aims, milestones and initial ideas.

Given the problems faced by DFs the aim of this project is to develop an e-Commerce

system that will automate several processes and provide around-the-clock availability

of products and services to customers; enabling customers to place orders online,

providing efficient communication channels as well as marketing and advertising

techniques (e.g. Emails, newsletters, banner ads etc). This system will store detailed

Page 10: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

10    

information of products, customers and orders and also offer more flexible and easier

methods of payment.

The website will provide a form of interaction with users; i.e

i. By incorporating a recipe blog into the website where users can post or view

recipe posts by other users

ii. By integrating with social networking websites such as facebook or twitter

Initial Ideas

The e-Commerce system can be built using either one of the following database

management systems; Microsoft SQL Server, Microsoft Access, Oracle 11g, IBM

DB2 MYSQL along with either of the following web scripting languages: PHP,

ASP.NET, HTML, PEARL.

Whichever one of these methods is used, the website will incorporate a very unique

and professional design that makes it distinct from that of DFs’ competitors. The

system will offer both the customers and DFs more convenient alternative payment

options other than cash on delivery method. The system will create advertising

avenues by;

i. creating a mailing list (with user permission), which will email monthly offers

to registered users

ii. Using clear headers to optimize search engine indexing

Software and hardware constraints.

No specialist hardware or software system will be required in the implementation of

this project. Readily available Database Management programs such as Microsoft

Access and/or SQL Server, MYSQL etc will be used; Web developments programs

such as Adobe Photoshop, Dreamweaver, Fireworks, PHP, and ASP.NET may also be

used for implementation. The database and website will be developed on a local

network using the Apache server, and then a username and password will be required

Page 11: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

11    

for access to LJMU SQL and PHP servers in order to transfer the developed system

by FTP to the hosting server.

Ajax and JavaScript programs will be used to add styles and for validation, i.e.

validation of customer registration details. The specific software for implementation

will be chosen during the Analysis stage of the project and reasons for the chosen

method of implementation will be explained in detail.

An outline plan of action and a time table.

The success of this project will be monitored through a number of ways:

i. Use of action/project plan and timetables where there will be set monthly

targets and milestones. The action plan will be discussed in details in further

sections of this report.

ii. Performance indicators in form of the number and quality of tasks

accomplished will be used, a log book is being used where all actions and/or

milestones are documented enabling effective supervision.

iii. Meetings with Divine Foods: Regular meetings will be held with the

management of DFs to discuss progress in the project and obstacles

encountered.

iv. Narrative reporting: There will be regular narrative reporting every 60 days

where a summary of the planned and executed critical activities are recounted

Milestones

The key stages of this project include:

i. Action Plan: Detailed project plan.

ii. The Analysis of the current system - methods of operation, etc. Analysis of the

proposed system – Financial analysis, feasibility studies, possible solutions to

current problems etc.

iii. Detailed Specification of the required system, end-user requirements and

system deliverables

iv. Design: System designs, ER Diagrams, database table definitions etc.

Page 12: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

12    

v. Implementation: Based on the design

vi. Testing: Black box testing, white box testing, alpha and beta testing.

vii. System Evaluation

The action plan will be developed in accordance with the above mentioned

milestones.

The initial plans discussed above are subject to changes after an in-depth interview

with the owner and employees of DFs. Questionnaires will be sent out to ensure the

end-user requirement is thoroughly understood. These interviews and subsequent

analysis will enable both the system designers and the end-users reach a compromise

on the system deliverables if all the desired or sometimes ambiguous user

requirements cannot be met.

Conclusion

This report aims to investigate the practices and issues involved in the development of

e-Commerce systems. It summarizes the author’s six months research in e-Commerce

systems analysis, design and implementation methods while developing an e-

Commerce system for Divine Foods (DFs).

The rest of this report is structured as follows: Firstly, some literature regarding e-

Commerce systems, e-Commerce legal issues, Systems development life cycle

(SDLC) is reviewed in the next section. Then the System analysis section which

reviews the company’s operations and its relation to IT systems, from here the

problems they currently encounter with the current operational methods are

established and the possible solutions to their current limitations are identified. Tasks

to be carried in order to achieve the proposed solution are also described in this

section. The requirement specifications of the proposed system are developed, based

on the employees opinions, captured by interviews and questionnaire.

Furthermore, based on client requirement, a database and a website are designed to

capture and store product, order, customer and other transactional information; enable

users and prospective customers gain uninterrupted access company and product

information

Page 13: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

13    

Chapter 2: Literature Review

Introduction to e-Commerce Systems

Kalakota and Whinston define e-commerce as “the buying and selling of information,

products and services via computer networks; [1] the computer networks primarily

being the internet. Others however use the term to encompass not only the buying and

selling described above but also the use of internet technologies such as email and

intranets to exchange or share information either within the firm or with external

stakeholders. [2] Other definitions believe e-Commerce also refers to the procedures,

policies and strategies required to support the incorporation of electronic interaction

to the business environment. A More comprehensive definition of e-Commerce would

be: the ability to perform business transactions and complete contracts involving the

exchange of goods and services between two or more parties using electronic, internet

and/or telecommunication tools, policies, strategies and techniques.

As we leap into the twenty first century, it seems as though everyone is on the internet

and more companies are establishing online presence to maintain their competitive

edge. Due to high speed internet connections, the internet has become an essential

tool for any business to compete domestically or globally.

The rapid growth of the internet has completely changed the way most businesses

operate. The internet has enable e-Commerce that offers businesses and customers a

unique channel to deliver and purchase goods and services. E-commerce uses inter-

networked computers to create and transform business relationships.

Electronic commerce can be categorised into several groups: a few of which are listed

below although more forms of e-commerce exist: Business-to-Business (B2B),

Business-to-Consumer, Consumer-to-Consumer (C2C), [3]. B2B e-commerce is

hugely rooted in electronic data interchange (EDI) networks established between

organisations and their manufactures/suppliers within a specific industry. Ecommerce

enables companies to conduct their business from prospecting to order processing and

delivery online.

B2B e-commerce includes the use of exchanges on internet-based marketplaces in

which participating companies can purchase or sell a variety of products, some

generic across industries and others specific to a given industry [4].

Page 14: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

14    

Besides B2B and B2C transactions, e-commerce transactions and interactions may

have other types:

Consumer-to-Consumer (C2C) e-commerce is used in organizations that provide

private sales and auctions between individual consumers.

Peer-to-Peer (P2P) e-commerce allows networked peer computers to share data and

processingwith each other directly; can be used in C2C, B2B, and B2C e-commerce.

Government-to-Business (G2B) and Government-to-Consumer (G2C) e-commerce

enable government organizations to provide information, interaction, business, and

services to companies and consumers respectively.

Business-to-Business-to-Consumer (B2B2C) e-commerce organizations provide

some products or services to client businesses that maintain their own customers.

eBay, for example, provides a virtual marketplace to its customers (business and

individuals) that sell products through eBay to their own customers.

Mobile Commerce (M-commerce) makes possible e-commerce transactions and

activities to be conducted in a wireless environment, for example, buying products

and services from a web site on a cell phone.

Location-based Commerce (L-commerce) provides m-commerce transactions

targeted at individuals in specific locations and at specific times, like navigation

systems in cars.

Intra-business e-commerce includes all internal organizational activities that involve

the exchange of goods, services, or information.

Collaborative Commerce (C-commerce) creates an environment where individuals or

groups communicate or collaborate online.

Information and communication technology and business

The use of Information and Communication Technology (IT/ICT) systems is an

integral part of work. It is estimated that 20 million of workers in the UK use some

form of ICT at work. Thus Keeping ICT running and delivering value is crucial to

business health. [5]

Page 15: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

15    

Enterprise systems are IT/ICT systems that connect the different functions of a

business. Examples of enterprise systems include Enterprise Resource Planning

(ERP), Customer Relationship Management (CRM), Supply Chain Management

(SCM), Product Lifecycle Management (PLM), etc. They are the integration tools that

(if properly implemented) could increase productivity by automating work process,

maintaining a single picture of corporate data and satisfying regulatory compliance

requirements. ICT further facilitates e-Commerce by providing channels for e-

commerce architectures such as Electronic data interchange (EDI) and Electronic

Funds transfer (EFT).

EDI  EDI involves the exchange of information from one company to another using a

computer network, such as the Internet. Electronic data interchange involves

computer-to-computer exchanges of invoices, orders, and other business documents

and therefore effects cost savings and improve efficiency because it minimizes the

errors that can occur if the same information has to be typed into computers more than

once. At the same time, EDI provides an easily accessible mechanism for companies

to buy, sell, and trade information. In the B2B market, major corporations have

embraced EDI systems, and in order to reduce costs and improve efficiency and

competitiveness. In the retail market, the use of EDI systems allows the retailer to

implement quick response strategies that can reduce the time they must hold

merchandise in inventory, which can result in substantial cost savings for the retailer.

EFT  EFT is a method of transferring funds automatically from one organisation or

individual to another by electronic means, such as electronic funds transfer at point

of sale (EFTPOS), which provides for the automatic transfer of money from buyer to

seller at the time of sale.

Enterprise  resource  planning  (ERP)  An Enterprise Resource Planning (ERP) system is a software platform embedded with

“best practices", providing the best ways to do the business based on common

business practices or academic theory [6]. The aim of an ERP is to improve the co-

operation and interaction between all departments in organisations (such as product

Page 16: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

16    

planning, manufacturing, purchasing, marketing and customer service department).

As an enabling key technology, as well as being an effective managerial tool, ERP

allow companies to integrate at all levels and to utilise important ERP applications

such as supply-chain management (SCM), accounting and financial management,

human resources management (HRM) and customer relationship management

(CRM). Such applications represent large, complex, computerised and integrated

information systems which can strongly influence long-term business success [7].

ERP packages evolved into their present form from the accounting tools that the large

corporations implemented for payroll processing in the 50's. Bernroider E, Tang N [7]

highlighted the fact that their functionality expanded into tracking stock levels, at first

for the purpose of financial controlling, and later covering the entire process of stock

management. Materials Requirement Planning (MRP) in the 70’s automated the

production process, by scheduling operations and material purchasing based on the

forecasted and current requirements of finished goods, and the constraints of the

production facility. Manufacturing Resources Planning (MRP-II) systems in the 80's

coordinated the entire process, from planning the purchase of materials and parts, as

well as requirements-based production capacity planning, to distribution. The term

ERP was first used by Gartner Group in the early 90's, and included multiple

applications that automated parts of business. [7]

B2C e-Commerce is the main area of interest in this project; it is mainly concerned

with the provision of uninterrupted access to an organization’s goods and services to

consumers, with minimal or no geographical boundaries. This is traditionally

achieved by creating a virtual shop online; an example of such e-commerce

architecture would include components such as shopping carts, product catalogs,

order forms and payment mechanisms with relationships between these components.

[8]

The major benefit of e-Commerce systems to small businesses like Divine Foods is

that the costs of setting up a virtual business online is considerably low compared to

that required to set up a traditional physical business premise, (i.e. costs incurred from

rent, wages, daily operational costs etc.).

Page 17: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

17    

Having a virtual online shop considerably reduces the problems of geographical

barriers, creating access to a larger customer base for organizations as the online shop

will be available to internet users anywhere in the world (unless otherwise restricted

to a certain country or geographical area) as opposed to customers visiting the

business premises to make purchases.

Web applications provide business solutions that improve the quality of goods and

services, increase the speed of service delivery; an e-commerce system will reduce the

cost of DFs business operations as fewer staff will be needed to handle telephone

orders and carry out manual data input operations. However, many ventures into web

application development fail because the systems are very complex and the user’s

requirements are continuously changing.

A new changing trend in e-commerce is associated with utilization of the Internet-

related technology and software for improving communication, information sharing,

collaboration, and functionality of the Web, which is commonly defined as Web 2.0.

Web 2.0 means proliferation of connectivity and interactivity of web-delivered

content that allows users to besides obtaining information from a web site own the

data on the Internet, gain control over this data, and add value to the web site as they

use it. The key Web 2.0 applications and services include [9]

i. Blog (web-log): a webpage consisting of brief user opinions, views, and

information, or links (also called posts), arranged chronologically within a

menu-driven format.

ii. Wiki: a webpage or set of web pages that can be easily edited by anyone who

is allowed access. A well-known example is Wikipedia, the free Internet

encyclopedia.

iii. Podcast: audio recordings, usually in MP3 format, of talks, interviews and

lectures, which can be played either on a desktop computer or on a wide range

of handheld MP3 devices.

iv. Multimedia sharing: services that facilitate the storage and sharing of

multimedia content such as video (YouTube), photos (Flickr), and podcasts

(Odeo).

Page 18: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

18    

v. Social networking: professional and social networking sites like

facebook.com and myspace. com that facilitate meeting people, finding like

minds, and sharing content.

vi. RSS: a family of formats which allow users to find out about updates to the

content of RSS-enabled websites, blogs or podcasts without actually having to

go and visit the site. Information from the website (typically, a new story’s

title and synopsis, along with the originating website’s name) is collected

within a feed (which uses the RSS format) and ‘piped’ to the user in a process

known as syndication.

e-­‐Commerce  Systems:  Case  Studies  

ASDA  ASDA is a part of the Wal-Mart group. ASDA were initially reluctant to invest

heavily into e-Commerce and online food delivery in the UK, but soon realised the

world is increasingly turning into a digital age and application of interactive web

solutions to their business choices were essential to maintaining a competitive edge.

[10] Since adopting e-commerce systems, especially between 2007 and 2008 ASDA

Grocery business grew from £180m to £300m, and Ecommerce and online home

shopping played a big part in this growth. [10] Technology deployed by the company

enabled customers to change the way they shop for example; ASDA took advantage

of emerging e-commerce techniques in improving tesco.com usability issues, this

enabled customers to cut online shopping time from an average of 1 hour to 30

minutes. [11] ASDA have used an online website to provide over 3 million homes

with over 600 general merchandise products. [10]

Ecommerce continues to be the fastest growing area of the ASDA business and the

firm is said it had invested more than £7m on e-commerce operations recently. The

benefits of such investment in e-Commerce became evident when roughly one-third

of UK households instantly had access to its online shopping service as a result. As a

result of ASDA’s investment in e-Commerce, customer satisfaction scores have taken

a big leap and customer retention rates have also made big steps forward. [70]

Page 19: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

19    

Tesco  Tesco is regarded as UK’s major online retailer. [11] In what the company called

"another excellent year" for its online food business, Tesco.com profits hit £124

million in the year to 23 February after improved order picking systems led to more

efficiency. Sales jumped 36 percent to £1.6 billion.

Tesco has invested heavily in IT and e-commerce over the years and this has played a

strong role in improving sales, the supply chain, and efficiency across the company.

The company has an in-house designed supply chain application, running on IBM

system p servers based on Unix.

In a year where profits rose 11 percent to £2.8 billion, chief executive Terry Leahy

thanked “the breadth of the group and the strength of our business model” for

delivering strong results. [12] The company's online sales grew across all its

divisions. Tesco, which serves over two-thirds of the online grocery market,

registered its one millionth web customer, a 20% increase on the previous year.

The company's two-year old warehouse in Croydon, which serves south-east London

customers only and is the first dedicated online hub, became profitable in 2008. The

warehouse handles orders with a value of over £1 million per week. [12]

Sales in non-food business Tesco Direct increased to £180 million from a virtual

standing start. The business, which is part of Tesco's general merchandise division

and has 11,000 items for sale online, had start-up costs and initial operating losses

totalling around £25m this year. Tesco said it is aiming to absorb these losses. [12]

Page 20: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

20    

e-­‐Commerce  Success  and  Failure    

The Internet has completely changed the way most businesses operate. E-commerce

uses inter-networked computers to create and transform business relationships. Web

applications provide business solutions that improve the quality of goods and services,

increase the speed of service delivery, and reduce the cost of business operations.

However, many ventures into web application development fail because the systems

are very complex and the user requirements are continuously hanging. Inefficient

communication between the end user and the developer is another contributing factor.

To successfully accomplish the development of a web application, one needs to

visually model the system s architecture. A visual model helps in coherently grasping

the changing user requirements and effectively communicates them to the

development team. Requirements analysis along with abstraction (i.e.,removing

unnecessary details) are critical factors in web application development. [13] It is

easier and more cost effective to correct an error at the requirement or design stage

than at the implementation or maintenance stage. Further, formal (i.e. rigorous)

specification provides unambiguous, precise and correct understanding of the user s

requirements.

Requirements  of  an  e-­‐commerce  system    

There are some requirements that have to be met by any solution that offers to deliver

e-commerce functionalities, some of these which are specific to DFs e-commerce

system are outlined in:

i. Security. The database system has to be secure to prevent unauthorized

access, theft and/or disruption to data and services held and offered by the

system.

ii. Scalability. The system will begin offering its service to a small number of

users but must be capable of being upgraded to a serve larger number of users

and process more transactions.

iii. Robustness. The system should be able to operate and handle various types of

data needed to function properly.

Page 21: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

21    

iv. Extensibility. The system should be able to increase the number of services

without disrupting the rest of the services offered.

v. Traceability. The system should provide on request, details of when and

where and transaction took place (i.e order history).

vi. Integrity of information. The data contained in the database system must be

preserved against malicious or unintentional attacks. Data held must not be

redundant.

vii. Flexibility. The system should be able to adapt to the ever-changing

requirements of a dynamic environment.

e-Commerce  Advantages  and  Disavdantages

Advantages  The potential benefits of e-commerce are enormous. For the consumer Cyberspace

provides an environment of near perfect competition in which prices from many

suppliers can be compared within seconds; sites such as Dealtime.com and

comparthemarket.com enable consumers to find the best online deal for whatever they

want - free of charge. For the elderly, disabled or those simply short of time, goods

may be ordered online and delivered to their doorstep. The majority of e-commerce

models employ a real world shopping metaphor complete with shopping trolley and

checkout for ease of use even by the regular everyday internet users.

Cyberspace means businesses are no longer limited to a specific geographical

location; they have a potential worldwide audience, this has in turn led to value

creation.

As previously mentioned, the main reason for the growth and proliferation of e-

commerce (pervasiveness and inexorability) is its ability to create value for an

organization that implemented the e-commerce solutions, for the customers of this

organization, and for its partners and suppliers. Value creation represents the

potential or expected and actual monetary and non-monetary results of utilizing an e-

commerce business model. The main monetary results of value creation include

Page 22: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

22    

revenue enhancement through sales growth and price differentiation, and cost

reduction related to cost of goods sold, operating costs saved as a result of the system,

and asset intensity reduction

Revenue enhancement is the first aspect of value creation. E-commerce develops a

new online channel for selling a company’s products and services along with existing

traditional channels. This potentially generates additional sales volume through this

channel, and, at the same time, can facilitate product sales through the existing

channels. For example, this is shown by ASDA and Tesco’s use of their existing

shops to act as processing centres for online food orders as opposed to developing a

separate warehouse for dealing with online orders. [10,11,12]

The revenue increase may be also associated with the ability to quickly adjust prices

depending on customer segments (for example, repeat customers will pay a higher

price than new customers will or prices of products expiring soon could be reduced

instead of disposing the products) or by increasing prices through building the

company’s brand name recognition on the Internet. In addition, e-commerce can

enable quick matching of customer demand with existing supply of products, and,

thus, provide better knowledge of what prices need to be established and promoted.

Besides the opportunity of increased revenue, e-commerce is also an important source

of cost reduction. This is the second aspect of value creation through e-commerce.

The cost of goods sold through online web sites may be reduced by providing a direct

selling channel to the customers and reducing the need for intermediaries like

wholesalers and retailers. The cost of staff wages for paying staff to deal with

telephone orders or manual entering and processing orders can be severely reduced by

an e-commerce system. E-Commerce creates opportunities for asset intensity

reduction, which means (a) reducing capital costs by effective, speedy disposition

(selling) of unnecessary or old equipment as well as excess or obsolete inventory, and

(b) more effectively using existing space by reducing inventory clutters with e-

commerce.

Disadvantages  Some products cannot be represented in Cyberspace as effectively as others. Books,

CDs and software sell well across the internet because the customer has a clear idea of

what he is getting. Goods such as clothes and audio equipment fare less well because

Page 23: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

23    

consumers like to experience them (by trying them on or listening to them) before

buying.

Legislation Dilemma: Electronic transactions separate e-business from traditional

types of businesses. When a transaction takes place, who has jurisdiction? Who has

the authority to apply law over the transaction?

For example, UK e-Commerce legislature requires organisations to comply with the

laws of every other country they provide services to. A little legislation can go a long

way toward helping parties to establish better boundaries to work within. When a

transaction that takes place between two different parties located in two different

countries goes wrong then a number of complex questions arise.

E-­‐Commerce  System  Security  

Risk  Analysis  E-commerce system is an electronic system that automates the exchange of goods and

services over the Internet in a secure environment. E-commerce systems security is

more exacting for reasons of necessity to connection of internal and external

processes. Creating an infrastructure to protect a company, its trading partners, and its

customers is crucial if businesses are realized the full potential of the Internet. As

questions can be introduced for example what components are most critical but

vulnerable, what information is confidential and needs to be protected, how will

confidentiality be ensured, what authentication system should be used, what intrusion

detection systems should be installed, who has authority and responsibility for

installing and configuring critical e-business infrastructure, what plans need to be in

place to ensure continuity or minimum disruption of service etc. [14]

Due to the anonymous nature of the internet, E-Commerce raises concerns on issues

such as trust, security and privacy.

Types  of  e-­‐commerce  system  attack   Below are a few types of attacks aimed at e-commerce systems.

i. Background attacks: hacker changes background of e-shop web sites.

ii. SQL Injection: is subset of the unverified/unauthorized user input

vulnerability and the idea is to convince the application to run SQL code that

Page 24: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

24    

was not intended. Hacker can gain access to protected data, user´s accounts,

delete data in tables etc. SQL injection is the name given to a vulnerability

caused by poor input validation in an application. It's a serious vulnerability,

which can lead to a high level of compromise - usually the ability to run any

database query.

iii. Admin Control Panel Vulnerabilities: The merchant's Control Panel on a

shopping cart is possibly a weakness in an e-commerce system. It's often

assumed that users will behave, and it's often possible for a user of a control

panel to elevate their privileges.

iv. Weak Login Forms Vulnerability: Most shopping carts have two login pages,

one for customers, and one for merchants. Either of these secured areas may

be accessed by an account with a weak login combination. An attacker can

perform a brute force attack via the login form, using a proxy or a script on a

shared server to mask their identity.

v. Price Manipulation: this occurs when hackers are able to change prices on the

website. Internet traders sometimes must find a balance between ease-of-use

for the customer, and security restrictions at the point of purchase. Payment

solutions and shopping carts offer various security features, but often they

prove too inflexible and the extra security is not enabled. If a customer does

manage to alter the price of an order, or mark an unpaid order as paid, it might

go undetected by the website software.

vi. Buffer overflows: is an anomalous condition where a process attempts to store

data beyond the boundaries of a fixed-length buffer. The result is that the extra

data overwrites adjacent memory locations.

vii. Data Leakage Vulnerability: Database-driven websites are very common, and

the parameters of a database query can often be seen in the URL of web

pages.When information is passed in the URL in this way, a malicious user

can iterate through the sequence and extract information that's held in the

website database.

viii. Denial of Service Attack: It's hard to control access to a public web server.

Although it's possible to try and control access by IP address, in practice a

Page 25: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

25    

malicious user can connect via almost unlimited free dial-up accounts,

originating from their country of choice. An e-commerce website may have

performance-intensive pages. Repeated, high-frequency requests to such pages

may cause such a strain on the web server as to severely disrupt normal

service for other users. This is a Denial of Service (DDOS) attack.

ix. Spam Relaying and Harvesting: Contact forms sometimes contain the email

address of the recipient for the email, and this can be modified in the browser,

in order to relay spam or anonymous mail, or to "bomb" mailboxes by

overloading their capacity.

x. Cross-site scripting: (XSS) occurs when an attacker introduces malicious

scripts to a dynamic form that allows the attacker to capture the private session

information.

xi. Remote command execution: command execution refers to attackers

attempting to use an existing website to execute OS commands on a web

server. By inserting system level commands into an HTTP request to the target

web server, users may be able to execute system level commands, create

system faults, or steal sensitive information from your system, if security holes

exist.

xii. Weak Authentication and Authorization: hackers are able to gain access to

information system and read, rewrite or delete data.

i. Viruses: hacker sends viruses to corrupt business data.

ii. Spamming: is the abuse of electronic messaging systems to indiscriminately

send unsolicited bulk messages.

Despite these threats posed to e-Commerce applications, there are several methods

and technologies to help server, network administrators and web developers to protect

systems against any of the attacks mentioned above.

 

Securing  E-­‐Commerce  Systems    

Page 26: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

26    

Given the possible threats to e-Commerce system, there have been recent security

developments to combat and eradicate such threats. Some of the protection measures

include and are not limited to:

i. Regular Data Backup: regular data backup is an important condition of any

efficient and safe information system. In the event of an attack, files backed up

and stored off-site can be re-instated, preventing the organisation from losing

its entire data. Data backup have to be realized so that all data have to be

renewable from backup.

ii. Use of Antivirus and anti-spyware protection: Customers should be

encouraged to use antivirus and anti-spyware protection on their individual

computers and servers.

iii. User training: User training is a vital security measure as it enhances user

knowledge and responsibility.

iv. Use of Encryption: Encryption techniques should be used to protect sensitive

information such as user passwords. E-commerce currently offers secure

server and encryption technology as a solution to the security risks associated

with transmitting data through Cyberspace. Encryption is a representation of

information in a form such that only the sender and intended recipient can

interpret it. The commonly used public key encryption involves two keys for

each user; a public one, made freely available, and a private one known only

to the user. Sensitive information (e.g. a credit card number) is encoded using

the intended recipient's public key before transmission, even if intercepted by

a hacker it is thus useless without the corresponding private key. [15]

Legal  and  Ethical  Issues  involved  in  e-­‐Commerce  

A recent survey reported that there are approximately 100 countries now enjoy

internet access, 20 million Internet hosts worldwide and over 1.8 billion internet users

[16]. Due to the ever increasing internet population and the anonymity of online

users; certain regulatory and legal issues have to be adhered to in order to develop

Page 27: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

27    

efficient e-commerce systems. As a result, strategies must be implemented that

conform to e-commerce rules and regulations. Questions arising form development of

e-Commerce systems include and are no limited to: How does copyright apply to

digital content? How can national e-Commerce laws apply to activities in cyberspace?

How to ensure privacy and data protection exist on the Web?

E-commerce presents a world of opportunity for doing businesses, reaching global

markets and purchasing without leaving the home or office. E-commerce can provide

opportunities to improve business processes, just as phones, faxes and mobile

communications have in the past. However, just as any new business tool has

associated issues and risks so does e-commerce.

The issue of law on the Internet is a complex one. Between the two all-or-nothing

extremes lies a broad spectrum of possibilities [17]. Many people revel in the freedom

to express themselves and the freedom from prohibitions such as zoning restrictions

that the Internet apparently affords. Without law, however, the Internet would be no

place to conduct business. Laws give people certainties about their rights and

responsibilities: they make life more predictable. According to Thomas Vartanian,

"Without predictability, business will not be able to act efficiently, or price services

effectively," [18].

Electronic  Transactions  

Some federal, state and territory governments encourage the adoption of electronic

commerce by enacting and enabling legalisation. In the UK many bills and acts have

been passed to resolve legal issues and make electronic transaction more

authenticated, such as The Electronic Commerce (EC Directive) Regulations 2002

[19]. The Directive was introduced to clarify and harmonise the rules of on-line

business throughout Europe with the aim of boosting consumer confidence. The EC

Directive enables contractual dealings, such as offers, acceptances and invitations, to

be conducted electronically, also allowing people to use an electronic signature to

satisfy any legal requirement.

This directive has as expected boosted electronic commerce as an effective tool for

businesses to increase their efficiency. This has reduced administrative duties, storage

Page 28: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

28    

and operational costs for businesses. In McGinty's words," This is why it is crucial

that we ensure the legal infrastructure around cyberspace is beyond doubt" [18].

Under the e-commerce directive, Organisations have the responsibility to deal with

some of the legal issues such as how to form contracts, abide by consumer protection

laws, create privacy policies and protect databases. At the moment, there are no

comprehensive set of laws or regulations that exist on an international level electronic

commerce. [19] This is mainly due to the difficulty in establishing uniform worldwide

laws for e-commerce, as different countries have different legislation; what is

considered illegal in UK might not be so in India hence the need for some legislation

within individual countries.

Since this system development is an E-commerce system which involves sales of

products via the internet, the website must ensure it’s in compliance with the EC

Directive. Because the trader and customer are not face to face at any point, with

business conducted remotely, regardless of location, the website must ensure that

online contracts can be completed and are legally binding. The e-commerce website

Privacy  &  Security  

The Privacy and Electronic Communications Regulations 2003 apply to unsolicited

electronic marketing messages sent by telephone, fax, email or text. The Privacy and

Electronic Communications Regulations 2003 (‘the regulations’) give rules that

govern electronic marketing .

This legislature sets the standards for email marketing. The e-commerce system

should make provisions for subscribers to opt out of direct marketing emails.

Individual and corporate subscribers can register their objection to receiving

unsolicited direct marketing faxes by registering their number with the Fax Preference

Service.

Unsolicited marketing material by electronic mail (this includes texts, picture

messages and emails) should only be sent if the person has chosen to receive them,

unless the email address was obtained as a result of a commercial relationship. The

individual should always be given the opportunity to stop receiving the emails. [20]

Page 29: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

29    

The e-commerce system must also ensure the safety and security of a customer's

personal information. The e-commerce system should provide the customers with

information regarding the use of their personal information, and incorporate security

procedures to limit access to customer information by unauthorised parties. Privacy

policies and procedures should be clearly explained to customers. Customer data must

be collected, stored and manipulated in compliance with the Data Protection Act 1998

[21]

Copyright  &  Trademark  

A trademark can be owned by an individual, a company, or any sort of legal entity.

When someone else tries to use that trademark (e.g., your distinctive name or logo)

without authorisation, it could be considered an illegal dilution of the distinctive

trademark. If someone uses a trademark in such a way as to dilute the distinctive

quality of the mark or trade on the owner's reputation, the trademark owner may seek

damages.

A number of important recent developments have occurred in the field of copyright

and related issues that have far-reaching implications for the industry, and are being

addressed in legislatures, judiciaries and international forums. During the last couple

of years, new laws have passed in some countries to ensure effective protection and

enforcement of rights in the digital era. Such example is the UK copyright law which

was amended in November, 2009 to include web and digital content. [22]

 

Conforming  to  e-­‐Commerce  Legal  and  Ethical  Issues  The E-commerce Regulations identify specific information about businesses that must

be provided to recipients of online services, and set down guidelines regarding

advertising and promotions. All these information must be on the website

Contracting  online  Since all the contracts are online by electronic means, customers should be able to

print and store a copy of the terms and conditions.

All technical steps required to conclude the contract, e.g. ethical methods such as

'click this box', opt in or out, organisation’s terms and conditions, etc.

Page 30: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

30    

The website must be able to conclude contracts online and customers must be

informed whether an order can be met or not. Customers should be able to go back

and correct any mistakes made in their order before the order is placed.

Once a customer has placed an order electronically, their orders must be

acknowledged with a receipt.

Advertising  Or the system concerned advertising is a major form of revenue, therefore there are

advertising regulations (usually set by OFCOM in the UK) which will affect the

system in design. Commercial adverts must clearly identify the person on whose

behalf the marketing communication is sent, together with any promotional offer.

The Regulations also cover "unsolicited commercial communications", commonly

referred to as spam. They require that these communications are identifiable from the

subject line of the email, without the need to read the rest of the message. SMS

messages are not covered for these

Compliance  with  the  Data  protection  Act  The proposed system will allow users register and log-on to the website. The personal

information collected during registration must be secure and in compliance with the

Data protection Act of 1998. i.e. Personal data held must be accurate and not held for

longer than its required.

Distance  Selling  Regulations  The Distance Selling Regulations are designed to protect customers who are not

physically present with the seller at the time of purchase. They cover purchases made

via email and the internet, together with telephone and mail order.

Under the Regulations, customers of the proposed system will have the right to have:

• details in writing about the supplier and the terms of the transaction

• written confirmation of their orders

• further information, including a notice of cancellation rights, the complaints

procedure, after-sales services and guarantees

• delivery within 30 days unless otherwise agreed

Page 31: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

31    

Consumers will have a cooling-off period of seven working days in which to cancel

the contract, starting from when the goods are received, without having to give a

reason. If no details of the cooling-off period have been given by the supplier to the

consumer, it is extended to three months.

The right to withdraw can be exercised by the consumer even after the goods have

been delivered, or the services have been provided. The consumer is entitled to

receive a full refund for a cancelled contract within 30 days.

To comply with the general information requirements of the E-commerce

Regulations, this system must:

• Display the business' name, geographic address and other contact details

including your email address

• Display details of any publicly available register in which you are entered,

together with your registration number or equivalent

• Display the particulars of the supervisory body if the service is subject to an

authorisation scheme

• Display details of any professional body with which you are registered

• Display VAT registration number

All prices must be clear and indicate whether they include tax and delivery costs. The

website must alo have a 'Legal info' page of the site where the T&Cs of the company

can be found.

E-­‐Commerce  Marketing  Strategies  The following marketing strategies will enable the proposed system grow growing by

delivering compelling, effective B2C marketing campaigns that connect, motivate and

drive consumers to act.

Internet  Marketing  Helps in developing a direct contact between the consumer and business house and

also allows the business to advertise and sell their products and services in an ease

way. The B2C campaigns employ strategies and tactics such as targeted offers and

Page 32: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

32    

coupons; limited time deals, discounts, and/or vouchers to mobilize target markets to

buy, both online and offline. The system will recognize the importance of customer

loyalty and combine merchandising and education to keep customers coming back

using newsletters, web 2.0 techniques in the form of recipe blogs .

Branding

Giving the proposed system a unique identity amidst all the competition in the market

is tough. Here’s where branding can help; personifying the business by leveraging on

brand awareness to build stronger relationships with customers. Ideally, the brand

should influence every aspect of the business operation because the successful brands

of today will be those capable of producing customer-centric business models

consistently.

Page 33: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

33    

Literature  Review  Conclusion    

E-commerce has become a significant element in the modern global economic

environment. It represents the use of a computer network, primarily the Internet, to

buy and sell products, services, information, and communication. E-commerce is also

an application of technology using the Internet. In addition, it is a tool for increasing

efficiency and lowering costs in organizations.

Having reviewed the types of e-commerce system, their architecture, advantages,

disadvantages, legal and ethical issues, the next section of this report investigates the

research methods to be used in requirements gathering for the development of the

proposed DFs system.

Page 34: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

34    

Research  methodology  A research methodology is needed for requirements gathering on the proposed

system. In order to fully understand the end-user requirements, which will be the basis

of the system design and implementation; a suitable research methodology and system

analysis method must be employed. This section of the report will critically evaluate

the current research methods in use and select the best method most suited for this

project. There are three basic research paradigms -- positivism (quantitative, scientific

approach), interpretivism, and critical science [23]

 

Qualitative  Research  Qualitative research explores attitudes, behaviour and experiences through such

methods as interviews or focus groups. It attempts to get an in-depth opinion from

participants. As it is attitudes, behaviour and experiences which are important, fewer

people take part in the research, but the contact with these people tends to last a lot

longer. Under the umbrella of qualitative research there are many different

methodologies. [25]

Unlike quantitative research, there is no overarching framework for how qualitative

research should be conducted; rather each type of qualitative research is guided by

particular philosophical stances that are taken in relation by the research to each

phenomenon (O'Brien, n. d.). [24]

Qualitative research is a type of scientific research. In general terms, scientific

research consists of an investigation that:

i. seeks answers to a question

ii. Systematically uses a predefined set of procedures to answer the

question

iii. collects evidence

iv. produces findings that were not determined in advance

v. produces findings that are applicable beyond the immediate boundaries

of the study

Page 35: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

35    

Qualitative research shares these characteristics. Additionally, it seeks to understand a

given research problem or topic from the perspectives of the local population it

involves. Qualitative research is especially effective in obtaining culturally specific

information about the values, opinions, behaviours, and social contexts of particular

populations.

There are three main methods of data collection:

Interactive interviewing People asked to verbally described their

experiences of phenomenon.

Written descriptions by participants People asked to write descriptions of their

experiences of phenomenon.

Observation Descriptive observations of verbal and

non-verbal behavior.

Analysis begins when the data is first collected and is used to guide decisions related

to further data collection.

Quantitative  research  This type of research typically includes customer surveys and questionnaires. These

can be conducted face-to-face with a clipboard and pen, over the telephone, via post

or email, online. Survey questions are usually carefully considered so that the results

will provide meaningful data (which is not usually the case).

Features of Qualitative and Quantitative research methodologies

James Neil, [26] discussed the features and comparisons of both methods of research

as shown below;

Qualitative Quantitative

The aim is a complete, detailed

description.

The aim is to classify features, count

them, and construct statistical

models in an attempt to explain

what is observed.

Page 36: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

36    

Researcher may only know roughly

in advance what he/she is looking

for.

Researcher knows clearly in

advance what he/she is looking for.

Recommended during earlier phases

of research projects.

Recommended during latter phases

of research projects.

The design emerges as the study

unfolds.

All aspects of the study are carefully

designed before data is collected.

Researcher is the data gathering

instrument.

Researcher uses tools, such as

questionnaires or equipment to

collect numerical data.

Data is in the form of words,

pictures or objects.

Data is in the form of numbers and

statistics.

Subjective - individuals’

interpretation of events is important

,e.g., uses participant observation,

in-depth interviews etc.

Objective – seeks precise

measurement & analysis of target

concepts, e.g., uses surveys,

questionnaires etc.

Qualitative data is more 'rich', time

consuming, and less able to be

generalized.

Quantitative data is more efficient,

able to test hypotheses, but may

miss contextual detail.

Researcher tends to become

subjectively immersed in the subject

matter.

Researcher tends to remain

objectively separated from the

subject matter.

Critical science, or the critical approach, explores the social world, critiques it, and

seeks to empower the individual to overcome problems in the social world. Critical

science enables people to understand how society functions and methods by which

unsatisfactory aspects can be changed. [27]

Page 37: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

37    

Chosen  Research  Method  and  Justification  The chosen research methodology for the proposed DFs e-Commerce system is the

qualitative method; it is the most complete research methodology for the proposed

system, as the requirement specification needs to be generated from qualitative data; a

view ascertained by Donald Campbell “All research ultimately has a qualitative

grounding" and Fred Kerlinger "There's no such thing as qualitative data.

Everything is either 1 or 0" [28]

Qualitative methods are typically more flexible; allowing greater spontaneity and

adaptation of the interaction between the researcher and the study participant. For

example, qualitative methods ask mostly “open-ended” questions that are not

necessarily worded in exactly the same way with each participant. With open-ended

questions, participants are free to respond in their own words; with DFs system, these

questions will be well structured with responses simply “yes” or “no.”. Such method

of using questions with abstract answers will eliminate ambiguous responses, which

may have led to poor system requirement specification. In addition, with qualitative

methods, the relationship between the researcher and the participant is often less

formal than in quantitative research. Participants have the opportunity to respond

more elaborately and in greater detail than is typically the case with quantitative

methods. In turn, researchers have the opportunity to respond immediately to what

participants say by tailoring subsequent questions to information the participant has

provided. [29]

Qualitative research methods generate statistics from target audience, usually a small

number of system end-users. This method is more suited to the proposed system as it

will target the customers and staff of DFs as opposed to collecting random

information for system requirements analysis from users of other e-Commerce

systems. Quantitative research not suited for this project as it generates statistics

through the use of large-scale survey research, using methods such as questionnaires

or structured interviews. This could include stopping individuals on the streets, or

sending questionnaires by post. Though this type of research reaches many more

people, the results will be a set of conflicting and/or redundant data.

Page 38: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

38    

The methods that will be employed in the requirements gathering for DFs system

include;

i. Participant observation is appropriate for collecting data on naturally

occurring behaviors in their usual contexts.

ii. Daily business operations and data structures will be observed.

iii. In-depth interviews are optimal for collecting data on individuals’ personal

histories, perspectives. These interviews will be conducted with the owner,

staffs and selected customers of DFs. The strength of qualitative research is its

ability to provide complex textual descriptions from interviews an

questionnaires of how people experience a given research issue. It provides

information about the “human” side of an issue – that is, the often

contradictory behaviours, beliefs, opinions, emotions, and relationships of

individuals. Qualitative methods are also effective in identifying intangible

factors, such as social norms, socioeconomic status, gender roles, ethnicity,

and religion.

Page 39: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

39    

Systems  Development  Life  Cycle  

The Systems Development Life Cycle (SDLC) is a systematic approach for

application development or system development. SDLC is the process of building the

system that result in a high quality, cost-effective, within time and efficient

application that is cheap to maintain, easy to enhance and that can work effectively.

[30] It is divided in several phases and each phase comprised of multiple steps, and

they are as follows: It is a conceptual model used in project management that

describes the stages involved in an information system development project from an

initial feasibility study through maintenance of the completed application. Various

SDLC methodologies have been developed to guide the processes involved including

the waterfall model (the original SDLC method), rapid application development

(RAD), joint application development (JAD), the fountain model and the spiral

model.

SPIRAL  LIFECYCLE  

The spiral model starts with an initial pass through a standard waterfall lifecycle,

using a subset of the total requirements to develop a robust prototype. After an

evaluation period, the cycle is initiated again, adding new functionality and releasing

the next prototype. This process continues, with the prototype becoming larger and

larger with each iteration. Hence, the “spiral.”

The theory is that the set of requirements is hierarchical in nature, with additional

functionality building on the first efforts. This is a sound practice for systems where

the entire problem is well defined from the start, such as modeling and simulating

Page 40: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

40    

software. Business-oriented database projects do not enjoy this advantage. Most of the

functions in a database solution are essentially

independent of one another, although they may make use of common data. As a

result, the prototype suffers from the same flaws as the prototyping lifecycle

described below. For this reason, the spiral lifecycle is not considered for this

database project.

Spiral Model Strengths

Provides early indication of insurmountable risks, without much cost. Users see the

system early because of rapid prototyping tools, critical high-risk functions are

developed first. The design does not have to be perfect, users can be closely tied to all

lifecycle steps early and frequent feedback from users. cumulative costs assessed

frequently

Spiral Model Weaknesses

Time spent for evaluating risks too large for small or low-risk Projects. Time spent

planning, resetting objectives, doing risk analysis and prototyping may be excessive.

The model is complex, risk assessment expertise is required, spiral may continue

indefinitely. Developers must be reassigned during non-development phase activities.

May be hard to define objective, verifiable milestones that indicate readiness to

proceed through the next iteration

RAPID  APPLICATION  DEVELOPMENT  (RAD)  /  PROTOTYPING  LIFECYCLE  RAD is, in essence, the “try before you buy” approach to software development. The

theory is that end users can produce better feedback when examining a live system, as

opposed to working strictly with documentation. RAD-based development cycles

have resulted in a lower level of rejection when the application is placed into

production, but this success most often comes at the expense of a dramatic overruns in

project costs and schedule. The RAD approach was made possible with significant

advances in software development environments to allow rapid generation and change

of screens and other user interface features. The end user is allowed to work with the

screens online, as if in a production environment. This leaves little to the imagination,

and a significant number of errors are caught using this process. For this reason a pure

Page 41: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

41    

RAD approach will not be used on this project, but instead a blend limited

prototyping will me mixed with requirements and design development during a

conventional waterfall lifecycle (an example will be the web site story board which

will be modelled in PowerPoint).

RAD Strengths

Reduced cycle time and improved productivity with fewer people means lower costs.

Time-box approach mitigates cost and schedule risk. Customer involved throughout

the complete cycle minimizes risk of not achieving customer satisfaction and business

needs. Focus moves from documentation to code (WYSIWYG). Uses modelling

concepts to capture information about business, data, and processes.

RAD Weaknesses

Accelerated development process must give quick responses to the user. Risk of never

achieving closure, hard to use with legacy systems. Requires a system that can be

modularized, developers and customers must be committed to rapid-fire activities in

an abbreviated time frame.

V-­‐Shaped  SDLC  

A variant of the Waterfall that emphasizes the verification and validation of the

product. Testing of the product is planned in parallel with a corresponding phase of

development.

Page 42: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

42    

V-Shaped Strengths

Emphasize planning for verification and validation of the product in early stages of

product development. Each deliverable must be testable, project management can

track progress by milestones. Easy to use

V-Shaped Weaknesses

Does not easily handle concurrent events, does not handle iterations or phases, does

not easily handle dynamic changes in requirements, does not contain risk analysis

activities

Chosen  SDLC  Method:  The  Waterfall  Model  The oldest model, that was originally regarded as "the Systems Development Life

Cycle" is the waterfall model; a sequence of stages in which the output of each stage

becomes the input for the next.

These stages generally follow the same basic steps but many different waterfall

methodologies give the steps different names and the numbers of steps seem to vary

depending on the system involved. The image below is the classic Waterfall model

methodology which will be used in the development of Divine Foods System; the

image illustrates the various phases involved in development life cycle.

Page 43: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

43    

Waterfall Strengths

Easy to understand, easy to use

Provides structure to inexperienced staff

Milestones are well understood

Sets requirements stability

Good for management control (plan, staff, track)

Works well when quality is more important than cost or Schedule

 

Work  breakdown  structure  The reasons for the selection of the waterfall SDLC is justified in this section. The

work breakdown structure of proposed system fits perfectly into this design method,

this is elaborated below.

Feasibility

A feasibility study will be carried out to determine if the project can be undertaken

and delivered, this study also evaluates the methods of implementation to ensure there

are adequate resources to develop the Divine Foods System. This study determines if

the project gets the go-ahead from the stakeholders. If the project is to proceed, the

feasibility study will produce a project plan for the future stages of development.

Requirement Analysis and Design

The goal of systems analysis is to gather relevant information on the proposed system,

users products and services and determine the problem(s) with the current operational

methods and attempt to fix the highlighted problems. This step involves breaking

down the system in different pieces and using diagrams such as DFDs and Use-case

diagrams to analyze the situation, analyzing project goals, breaking down what needs

to be created and attempting to engage users so that definite requirements can be

defined.

Page 44: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

44    

Analysis gathers the requirements for the system. This stage includes a detailed study

of the business needs of the organization. Options for changing the business process

may be considered. Design focuses on high level design like, what programs are

needed and how are they going to interact, low-level design (how the individual

programs are going to work), interface design (what are the interfaces going to look

like) and data design (what data will be required). During these phases, the software's

overall structure is defined. Analysis and Design are very crucial in the whole

development cycle. Much care is taken during this phase. The logical system of the

product is developed in this phase.

In systems design section of DFs e-commerce system, and operations are described in

detail, including screen layouts, process diagrams (UML activity diagrams, UML

class diagram, DFD, ERD) and other documentation.

The design stage takes as its initial input the requirements identified in the approved

requirements document. For each requirement, a set of one or more design elements

will be produced as a result of interviews, workshops, and/or prototype efforts.

Design elements describe the desired software features in detail, and generally include

functional hierarchy diagrams, screen layout diagrams, tables of business rules,

business process diagrams, pseudocode, and a complete entity-relationship diagram

with a full data dictionary. These design elements are intended to describe the

software in sufficient detail that skilled programmers may develop the software with

minimal additional input.

Implementation

In this phase the designs are translated into code. The system will be developed

according to the pre-determined functions and designs. The database will be

developed and website created using different high level programming languages like

MySQL, PHP.

Testing

In this phase the system is tested. This stage of the development life cycle will run

almost concurrently with the system implementation. Components of the system (i.e

database and website links) will be tested as they are created. At the end of the

Page 45: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

45    

project, the overall DFs system will be tested to ensure that interfaces between

modules work (integration testing), the system works on the intended platform and

with the expected volume of data (volume testing) and that the system does what the

user requires (acceptance/beta testing).

Maintenance

Inevitably the system will need maintenance. Software will definitely undergo change

once it is delivered to the customer. There are many reasons for the change. Change

could happen because of some unexpected input values into the system. A good e-

commerce system should be able to accommodate changes that could happen during

the post implementation period. The possible further development options will be

discussed in the Evaluation section of this report.

Page 46: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

46    

System Development Life Cycle flowchart for Divine Foods

Page 47: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

47    

Chapter  3:  Requirement  Analysis  

Background  on  DFs    

Divine Foods is a family run food manufacturing company based in South East

London. It was established as a petty African food producer five years ago by Mrs.

Rachel Davidson who acts as the manager; all processes and operations were carried

out in a London residential area. The main purpose of this organisation is the

production, sales and distribution of traditional African foods although a few other

categories of products have been added to their range.

Over the years the company has expanded reasonably and is still growing

exponentially with customers now scattered across the UK; the acquisition of several

new customers meant the business needed its own premises. As a result, a commercial

property was purchased two years ago where all food production, cash transactions,

administrative duties and all other operations are accomplished. The manager

currently has six fulltime and several part-time employees who assist with the day to

day running of the business; she is also assisted in food preparation by two of her

daughters.

This local company now operates both on a Business-to-Business (B2B) and

Business-to-Customer (B2C) basis where other businesses can make wholesale

purchases and private customers can place individual orders.

Page 48: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

48    

Review  of  company  current  systems  of  business  operations    

DFs operate in an agile market characterized by high variety and low volume

production systems. Their customer’s orders vary and it is understood that no one

order is ever the same, this implies that their customers require a high level of

customization and flexibility. In order keep up with customer requests, DFs has to

react with speed and agility to customer order demands.

After a several formal interviews with relevant personnel (both key users and other

administrative staff) it was observed that this company operates on an entirely manual

filed-based system; this is a very strenuous method of operation as records of

transactions with suppliers, product information, customer and order details are

manually stored, making retrieval of information very difficult. There are no

automatic processes or procedures, no ordering, e-commerce, accounting or payroll

system. Poor computer skills amongst staff, opposition to change and disinclination to

learn new procedures were cited as the main reasons why the management has been

reluctant to change or upgrade the current system. Current staffs have basic

understanding of the internet and some Microsoft office packages (e.g. Ms Word).

Divine Foods have several suppliers in Africa, Europe and America who provide the

resources needed for food manufacturing. Orders are placed on monthly basis

although the frequency of order changes depending on customer demand. When

orders are delivered, product manufacturing (or simply food production) is carried out

on large scale basis according their existing product stock-list. All products are

manufactured from raw materials purchased from suppliers in compliance with the

Food Standards Agency (FSA) standards which include the display of allergy and

nutritional contents on product packaging. [31] Manufactured products are preserved

for sale to customers. Product information including date of manufacture, use by date,

quantity in stock, ingredients, recommended serving methods, etc are manually

entered and stored in the product folder for future reference.

Orders are taken from customers over the phone or in store. Orders made in-stored are

picked up by customers, sometimes instantly if the orders can be met. Telephone

orders are becoming more popular with customers who order in bulk as transportation

of large quantities of products purchased in-store can be inconvenient since most

Page 49: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

49    

products are perishable. When telephone orders are received an employee refers to the

product folder for information on the ordered product; if the product(s) are in stock

and the order can be met, then the customer is contacted and a delivery date is agreed

upon. The order details which include delivery address, customer name, product

details, delivery date etc are then entered and stored in the order folder. Payment is

taken by the deliveryman on delivery, then an invoice and/or receipt is issued.

Once an individual or a business places an order they are given the option of being

registered as a customer where details such as customer name, address, telephone

number, etc are collected and stored in the customer folder. Registered customers who

regularly place orders are offered discounts and several incentives on sometimes

monthly basis.

Page 50: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

50    

Problem  identification    

The incessant growth of Divine Foods has brought on many problems; particularly

since they operate on a manual file-based system. The workloads on the owner and

employees have increased tremendously in the last year; customers are usually left

waiting for orders due to delays in order processing and payment arrangements.

Sometimes orders have to be declined as the company cannot guarantee they can meet

these orders, with administrative duties taking the most of staff time. The manual data

entry method has in the past, resulted in drastic loss in revenue from product sale; in

some errors arising from manual data entry have led to delays and cancellation of

orders as DFs could either not retrieve the customer and/or order information. In other

cases orders have had to be declined as the company cannot guarantee they can meet

these orders; due to the quantity of orders to be processed, shortage of staff and the

costs of hiring more staff.

A lot of employee time that should be spent on product optimisation or marketing

strategies are usually exerted on administrative duties; most times employees

physically go through the store-room or through incomprehensible product stock

folders to check for available product stock, due to the absence of a system to monitor

product inventory levels.

Since all records are currently held on a manual filing system, processes are carried

out manually i.e. orders are placed on the phone, order details manually stored and

payment being received by the delivery man when orders are delivered. This system

of operation makes targeting a larger geographical area and competition with major

rivals almost impossible. When large amounts of orders are received it usually creates

a back-log of order details to be entered into the filing system taking several weeks

and numerous staff time to resolve; thus costing the management lots of money in

employee salaries and overtime.

Divine Foods do not carry out credit/debit card transactions as this requires a

merchant account with a bank; therefore all orders made on the phone are paid for on

delivery. Not only does this create a geographic restriction on trade as they can only

accept orders for delivery in London, it also leads to losses of income/revenue as

targeting a wider geographical area will lead to more customers therefore more

Page 51: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

51    

income; this being a benefit of an e-commerce system. There is a maximum price of

£500 on each order made on the phone to minimise losses to the business should a

customer refuse to pay for items on delivery; this limits the amount of money that can

be generated from individual orders and therefore affects the overall income of Divine

Foods. This method of operation has made insuring Divine Foods a real problem as

insurers are unwilling to provide cover due to their risky business methods.

Data retrieval is another major problem. Since Divine Foods offer discounts and

promotions to specific registered customers on monthly basis; it is usually difficult to

retrieve selected customer details from their manual filing system. In most cases

customers are never informed about any offers albeit this being an important customer

acquisition and retention technique intended to lure new customers and keep existing

customers interested in the company’s products.

It is difficult to refer to order information or track orders due to the large amount of

records being held on file. When there are back-logs of orders to be recorded, it is

virtually impossible to track these orders leaving customers disillusioned with the

delivery services and Divine Foods in general.

Page 52: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

52    

Project  specification  and  outline  

Given the problems faced by DFs the aim of this project is to assist DFs in reviewing

their current business methods, designing and developing an e-Commerce system that

will automate several processes and provide around-the-clock availability of products

and services to customers; enabling customers to place orders online, providing

efficient communication channels as well as marketing and advertising techniques

(e.g. Emails, newsletters, banner ads etc). This system will include a database

component that will store detailed information of products, customers and orders and

also offer more flexible and easier methods of payment.

 Project  objectives  of  E-­‐commerce  On-­‐line  ordering  system    i. E-Commerce has made purchasing easier by a very larger margin. When it

comes to online ordering, customers are always looking for the preeminent

online ordering websites and the most competitive prices. A major objective of

this system is to provide access to customers of DFs products.

ii. Customers are very sceptical about sharing their personal details with the

company, so the system must be trustworthy. The system should offer secure

connections to enable encryption and decryption of sensitive information (e.g.

customer passwords, credit card details) using Secure Lockets Layer (SSL).

iii. This system will consist of a Database Management System (DBMS) to store

product information, order details, customer details and a front end client

website to enable users access the products held and place orders. The system

will be built on mySQL and PHP programming languages to carry out

automatic functions like invoicing, searching, encryption and decryption etc.

iv. Although adequate training will be provided to the users of the system on

completion of the project to enable easy update of information held, the

system must be user-friendly.

v. This system is expected to lead to a sharp increase in sales, as average value of

internet orders is generally higher than that of telephone orders and there will

be alternative payment methods therefore eradicating the £500 restriction on

orders.

Page 53: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

53    

vi. This system will provide around-the-clock availability of products and

services to customers; it will be very effective as there will be no busy phone

lines and a broader audience can be targeted online.

vii. The online system is expected to be very cost effective as there will be no

need for too many in-house staff; there will be a massive reduction in

personnel salary bills as majority of the current fulltime and part-time

employees who handle most telephone orders and administrative duties will no

longer be needed as a result of the new online ordering system; thus saving the

company thousands of pounds annually.

Page 54: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

54    

End-­‐User  Requirements    

From the analysis of problems faced by DFs previous sections as the results from Q1-

Q10 on the questionnaire (see appendix C and D) an end-user requirement was drawn

up with solutions to address and resolve the current limitations of DFs. The

management of Divine foods was initially asked for an end-user requirement, the user

requirement specified was faltering; though most of these requirements support the

broad organisation needs the others were ill defined wish list of system deliverables.

This is mainly due to their poor knowledge of IT and E-commerce systems.

Divine Foods require an E-Commerce system in form of a website that will automate

several processes; enabling customers to place orders online and provide efficient

communication, marketing and advertising techniques (e.g. Emails, newsletters,

banner ads etc). This system should hold detailed information of products, customers

and orders and also offer more flexible and alternative methods of payment. The

system should be secure and available 24 hours a day. The system should be easy to

use and in-house staff should be able to update the system following adequate

training. The system should comply with all legalities, DPA 1998, EU E-Commerce

Directive and all other relevant legislations.

The system should include a robust and secure database management system that can

hold and manipulate data. This system will store information on customers, products

and orders. The system should contain automatic procedures to handle day-to-day

necessary transactions e.g. calculation of total amount due on orders. The system

should automatically generate order acknowledgement letters and invoices for

customers as soon as an order is received. Once an order has been marked for delivery

indicating the customer requirements can be met, the system should automatically

generate and Email order acceptance letters as well as delivery information and

receipt (where necessary) as required by the EU Directive on E-comm. 1998/9

Page 55: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

55    

The system should allow customers to register and set up personal accounts online.

Customers should be able to create profiles, communicate with fellow customers, save

favourite products and recipes, post reviews on products and also upload product

recipes.

DFs require a system that can keep track of and easily reference previous orders or

invoices, monitor product sales rates (i.e the most purchased products). The total

number of products ordered by each customer should be recorded as this is required

for promotion purposes.

DFs require a professionally designed website product page. The product page needs

to be designed as a marketing tool. Since the products are the major items on offer,

the system should portray these products in an enticing fashion to customers.

Training procedure and help: if possible the potential new system should have an in

built user guide to offer instructions on how to use the system can be manipulated (i.e

entering new product details.

User friendly/simplicity: the new system should be easy and simple to use and the

interfaces should be user intuitive and user friendly, without long tiring steps to

perform a single activity, this could help reduce errors and user frustration that occur

as a result of system complexity.

Affordability/functionality: from the interviews and questionnaire, it is noted that

majority of DFs staff are of the opinion that cost is an important factor to consider in

selecting a new system, however a higher percentage indicate that functionality and

user friendliness are extremely important considerations in selecting a system, thus

the new system must be able to perform (in terms of scope and coverage of work

required by DFs) but still be within the a reasonable budget.

Better security rights: the new system must allow read and write only access rights to

the relevant personnel, this reduces the chances of unauthorised access to data; thus

regulating usage.

Compatibility: Since DFs do not have any computer hardware or infrastructure they

require a system that can be deployed over any operating system or computer

hardware they decide to purchase for use with the proposed system. Implementation

Page 56: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

56    

programs should be easily available and affordable. Open source software will be

used on the server to ensure the final system is not bound to a particular server-based

operating system.

It is imperative that the most modern web browser technologies are used to create the

site. This includes such strategies as using div tags and cascading style sheets to lay

out the pages, adding Ajax-style programming on layer presentations to make them

interactive and embedding Flash presentations to display animations, pictures and rich

media.

Page 57: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

57    

Benefits  of  the  Proposed  System    

Direct Benefits

i. Increased Cash Flow: Tripling of orders made by customers as a result of the

new system

ii. Reduction in personnel salary bills

iii. A minimum 20% increase in overall profitability and revenue as a result of

more efficient system and more customers.

Indirect Benefits

i. Increased accuracy of Customer and order information

ii. Reduction in costs from errors.

iii. User Friendliness and ease of use due to 24 hours availability of the system

Intangible benefits

i. Good Company Image as a result of the system means more customers

therefore more sales.

Page 58: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

58    

System  Analysis  and  Design  Methodologies    

Certain system analysis and design methodologies exits to enable system designers

really understand and model system requirements and data flows. These

methodologies and briefly reviewed below. Some of them will be applied to the DFs

e-commerce system.

SSADM  SSADM (Structured Systems Analysis and Design Methodology) is a methodology. a

system of ways of doing things especially regular and orderly procedures), used in the

analysis and design stages of systems development.

SSADM (in common with other structured methodologies) adopts a prescriptive

approach to information systems development in that it specifies in advance the

modules, stages and tasks which have to be carried out, the deliverables to be

produced and furthermore the techniques used to produce the deliverables. [32]

SSADM adopts the Waterfall SDLC discussed earlier; where each phase has to be

completed and signed off before subsequent phases can begin. SSADM is one

example of a structured methodologies, a variety of others include:

STRADIS: (Structured Analysis, Design and Implementation of Information

Systems) a methodology developed by Gane and Sarson (1979). The methodology is

based on the philosophy of top down functional decomposition and relies on the use

of Data Flow Diagrams. [32]

YSM: (Yourdon Systems Method,Yourdon, 1993). YSM is similar to STRADIS in its

use of functional decomposition, however a middle-out approach is dopted and

slightly more emphasis is placed on the importance of data structures. [33]

MERISE: (Quang and Chartier-Kastler, 1991)The methodology is widely used in ISE

in France, Spain and Switzerland. MERISE consists of three ‘cycles’, the decision

cycle, the life cycle and the abstraction cycle. The abstraction cycle is the key; in this

cycle both data and processes are viewed firstly at the conceptual level, then the

logical or organisational level and finally at the physical or operational level. [34]

Page 59: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

59    

EUROMETHOD: Euromethod could be described as a framework for the integration

of existing european methodologies rather than as a methodology in its own right.

"SSADM has been used by the government in computing since its launch in 1981. It

was commissioned by the CCTA (Central Computing and Telecommunications

Agency) in a bid to standardise the many and varied IT projects being developed

across government departments.

SSADM revolves around the use of three key techniques, namely Logical Data

Modelling, Data Flow Modelling and Entity/Event Modelling.

• Logical Data Modelling; This is the process of identifying, modelling and

documenting the data requirements of a business information system. A

Logical Data Model consists of a Logical Data Structure (LDS - The SSADM

terminology for an Entity-Relationship Model) and the associated

documentation. LDS s represent Entities (things about which a business needs

to record information) and Relationships (necessary associations between

entities).

• Data Flow modelling; this is the process of identifying, modelling and

documenting how data flows around a business information system. A Data

Flow Model consists of a set of integrated Data Flow Diagrams supported by

appropriate documentation. DFDs represent processes (activities which

transform data from one form to another), data stores (holding areas for data),

external entities (things which send data into a system or receive data from a

system and finally data flows (routes by which data can flow).

• Entity Event Modelling; This is the process of identifying, modelling and

documenting the business events which affect each entity and the sequence in

which these events occur. An Entity/Event Model consists of a set of Entity

Life Histories (one for each entity) and appropriate supporting documentation

Page 60: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

60    

Data  Flow  Diagrams    

Data flow diagrams (DFDs) will be used to describe how the DFs e-commerce system

transforms information. A Data Flow Diagram (DFD) is used to show the

relationships among the business processes within an organization to external

systems, external organizations, customers, other business processes. [33]

DFDs define how information is processed and stored and identify how the

information flows through the processes. [34] The DFs data flow diagram will enable

understanding of:

i. The data processes involved in the system, where these processes pass through, where they come from and where they go.

ii. The inputs: what happens to the data once it enters the system?

iii. The Outputs: what happens before data leaves the system?

iv. Any delays occurring between the inputs and outputs (i.e., identifying the need

for data stores).

The following symbols are generally used with DFDs:

i. Data flow is represented by a labelled arrow

ii. Processes are represented by labelled circles (bubbles)

iii. Information sources and sinks are represented by boxes

iv. Files are represented by a double line

v. Process represents a task in the system that processes data or performs some

action based on the data.

vi. Data Store represents a repository where data is saved or retrieved, but not

changed. Examples of data stores include a database.

vii. External Interactor represents an entity that exists outside the system being

modelled and which interacts with the system at an entry point: it is either the

Page 61: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

61    

source or destination of data. In this case, a human using the DFs e-commerce

system is the external entity.

Page 62: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

62    

Chapter  4:  Design    

System  Functional  Requirements  After interviewing the site's stakeholder, the next step was to create a functional

requirements document. The functional requirements are driven by business

requirements specified by DFs; functional requirements describe what the website

needs to do, and not how it does it; that will be explained in the Technical

Requirements document. The primary functional requirements of the DFs website are

elaborated below;

Page 63: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

63    

The site should present a simple interface that represents DFs as a reputable, modern

and exquisite provider of food products. DFs stressed the need for website's visual

design to reflect its branding, including the logo, colours, common images, and other

graphical elements that are used in existing marketing materials.

The home page should lead users to site's most important features; Latest products

and product offers should be accessible from here to capture attention. Product details

such as price, quantity in stock etc should be easy to change without having to directly

edit the site's web pages.

Users should be able to create profiles and user accounts; the website should include a

“My Account” page where customers can find order history, edit account details, reset

password, etc. Users should be allowed to post recipe’s and comments on the recipe

blog, any website user should be able to review products. Users should be given an

option to sign up for newsletter upon registration; this being a customer retention

strategy to keep users informed of special offers and newly added products.

The website should be built to support all modern web browsers and operating

systems to reach the broadest possible audience. The site should be functionally

identical and, as closely as possible, visually identical on all web browsers and

operating systems identified as being in common use by the target audience.

All server software should be available on multiple server platforms in the event of

later migration to another server operating system.

The functional requirements document was shared and reviewed with the stakeholder

who was satisfied.

System  Technical  Specification    

The functional requirements described above were transformed into technical

requirements to show how each page will be modelled, detailed descriptions of site

features, descriptions of requirement infrastructure, such as selected server software,

requirements for web browser compatibility. Here are some technical specifications

for the DFs website;

Page 64: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

64    

The home page, which will include the following elements:

• A graphical banner incorporating the company name and logo and an appropriate

picture pictures relevant to their area of business.

• Links to social networking websites such as facebook and twitter.

• A navigational interface that presents links to other critical web pages.

• A data entry form that allows the website visitor to search for products

• Links product categories, terms and conditions and contact us pages

• A graphical display of three most recent products, where data for the media is stored

in a server-side database.

The site will be hosted initially on a local server with the Apple Mac OSX operating

system using Apache and PHP, but should be portable to Windows and other operating

systems that are compatible with Apache and PHP. The final website will be hosted on

the university cmsproj folder. All server software should be available on multiple server

platforms in the event of later migration to another server operating system. The site will

be built using PHP as the application server and all web pages will be built as PHP files.

A common look and feel will be achieved with the use of PHP-based header and footer

files.

The final website comprises of the following pages;

The Home page: with navigational links to all other pages and a data entry form that

allows visitors to search for products directly from here.

The Products Page: which dynamically displays products and their details such as

name and price.

The About Us page: which provides website visitors with information on DFs

The More Services page: which displays all the services covered by DFs.

The Recipe Blog page: which allows the DFs customers to post and review product

recipes.

The Special Offers Page: This page dynamically displays all the DFs products on

offer.

Page 65: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

65    

Page 66: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

66    

Database  Design  Models  

In this section of this report, we examine review and select a database design method

for the development of DFs e-Commerce system.

Object  Oriented  Databases.    

Object-oriented databases employ a data model that supports object-oriented features

and abstract data types. OO databases provide unique object identifiers (OIDs) so that

the objects can be easily identified. This is similar to a primary key in the relational

model. Object-oriented databases utilize the power of object-oriented programming

languages to provide excellent database programming capability. The data in object-

oriented database management systems (OODBMSs) is managed through two sets of

relations, one describing the interrelations of data items and another describing the

abstract relationships (inheritance). These systems employ both relation types to

couple data items with procedural methods (encapsulation). As a result, a direct

relationship is established between the application data model and the database data

model. The strong connection between application and database results in less code,

more natural data structures, and better maintainability and reusability of code. OO

languages, such as C++ or Java, are able to reduce code size by not having to translate

code into a database sublanguage such as SQL and ODBC or JDBC [35, 36].

The need for object-oriented databases:

The increased emphasis on process integration is a driving force for the adoption of

object-oriented database systems. For example, the Computer Integrated

Manufacturing (CIM) area is focusing heavily on using object-oriented database

technology as the process integration framework. Advanced office automation

systems use object-oriented database systems to handle hypermedia data. Hospital

patient care tracking systems use object-oriented database technologies for ease of

use. All of these applications are characterized by having to manage complex, highly

interrelated information, which is the strength of object-oriented database systems.

Clearly, relational database technology has failed to handle the needs of complex

information systems. The problem with relational database systems is that they

Page 67: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

67    

require the application developer to force an information model into tables where

relationships between entities are defined by values.

Features of OODB

Object-Oriented DBMS (OODBMS) are DBMS which are based on an Object-

Oriented Data Model. Such data models are often inspired by OO programming

languages, such as SmallTalk or C++. OODBMS are capable of storing complex

objects, I.e., objects that are composed of other objects, and/or multi-valued attributes.

The great advantage of OODBMS is that it is not necessary to transform the UML

classes into a logical schema (e.g.,relational). Their main disadvantage is that the

technology is immature and they are only used in niche applications, such as CAD.

Greater support for complex objects; No query language is required you just retrieve

individual objects like some giant key/value store.

No relational referential integrity: though you may have one object contain a

reference to another object.

Draw Backs

A key difference between relational databases and OO databases is the way in which

relationships are handled. In OO databases, the relationships are represented explicitly

with OIDs, which improves the data access performance. In relational databases,

relationships among tuples are specified by attributes having the same domain.

The main drawback of OODBMSs has been poor performance. Unlike RDBMSs,

query optimization for OODBMs is highly complex. OODBMSs also suffer from

problems of scalability, and are unable to support large-scale systems.

Relational  DBMS  (RDBMS)  The relational model was formally introduced by Dr. E. F. Codd in 1970 [2] and has

evolved since then, through a series of writings and later through implementations by

IBM and others. A relational database is composed of many relations in the form of

two-dimensional tables of rows and columns containing related tuples. Organizing

data into tables, the form in which data is presented to the user and the programmer, is

known as the logical view of the database. The stored data on a computer disk system

Page 68: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

68    

is called the internal view. The rows (tuples) are called records and the columns

(fields in the record) are called attributes. Each column has a data type (i.e., int, float,

date). There are various restrictions on the data that can be stored in a relational

database. These are called constraints. The constraints are domain constraints, key

constraints, entity integrity constraints, and referential integrity constraints. These

constraints ensure that there are no ambiguous tuples in the database.

RDBMSs use Structured Query Language (SQL, currently SQL2) as the data

definition language (DDL) and the data manipulation language (DML). SQL includes

statements for data definition, modification, querying and constraint specification.

The types of queries vary from simple single-table queries to complicated multi-table

queries involving joins, nesting, set union/differences, and others. All processing is

based on values in fields of records.

The main disadvantages of Relational Databases include their inability to handle

application areas like spatial databases objects e.g database applications involving

images, or special types databases (e.g. involving complex numbers, arrays, etc.) and

other applications that involve complex interrelationships of data. The SQL standard

enables users to easily migrate their database applications between database systems.

In addition, users can access data stored in two or more RDBMSs without changing

the database sub-language (SQL). The other merits include rapid data access and large

storage capacity [3].

Page 69: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

69    

Object-­‐Relational  DBMS  (ORDBMS)  

The main objective of ORDBMS design was to achieve the benefits of both the

relational and the object models such as scalability and support for rich data types.

ORDBMSs employ a data model that attempts to incorporate OO features into

RDBMS. All database information is stored in tables, but some of the tabular entries

may have richer data structure, termed abstract data types (ADTs). The ORDBMS

has the relational model in it because the data is stored in the form of tables having

rows and columns and SQL is used as the query language and the result of a query is

also table or tuples (rows). The characteristics of ORDBMSs include;

• Base datatype extension,

• Support complex objects,

• Inheritance, and

• Rule Systems [39]

ORDBMSs allow users to define data types, functions and operators. As a result, the

functionality of the ORDBMSs increases along with their performance.

An example schema of a product relation which ORDBMS supports is: Product (productID, name, description, address, picture) The extra attribute "picture" is not present in the traditional EMPLOYEE type of relation of RDBMS. The datatype of "picture" is "image". Object-relational extensions to relational DBMS’s capture much of the advantages of

OODB, yet retain the relation as the fundamental abstraction. Object-Relational data

modeling supports some object-oriented concepts, while still supporting some

relational concepts:

• Inheritance -- one table can have an IS-A relationship with another table.

Likewise custom data types support inheritance.

• Distinction between a class and an object (instance of a class) that goes

beyond simply the distinction between a table and a row.

• Custom or complex data types.

Page 70: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

70    

• Relational query language.

• Referential integrity.

The  differences  between  the  three  Database  Design  approaches    

Table 1: A Comparison of Database Management Systems

Criteria RDBMS ODBMS ORDBMS

Defining standard SQL2 ODMG-2.0 SQL3 (in process)

Support for object-

oriented features

Does not support; It

is difficult to map

program object to

the database

Supports extensively

Limited support;

mostly to new data

types

Usage Easy to use

OK for

programmers; some

SQL access for end

users

Easy to use except

for some extensions

Support for complex

relationships

Does not support

abstract datatypes

Supports a wide

variety of datatypes

and data with

complex inter-

relationships

Supports Abstract

datatypes and

complex

relationships

Performance Very good

performance

Relatively less

performance

Expected to perform

very well

Product maturity Relatively old and

so very mature

This concept is few

years old and so

relatively mature

Still in development

stage so immature.

The use of SQL Extensive supports OQL is similar to SQL3 is being

Page 71: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

71    

SQL SQL, but with

additional features

like Complex

objects and object-

oriented features.

developed with OO

features

incorporated in it

Advantages

Its dependence on

SQL, relatively

simple query

optimization hence

good performance

It can handle all

types of complex

applications,

reusability of code,

less coding

Ability to query

complex

applications and

ability to handle

large and complex

applications

Disadvantages

Inability to handle

complex

applications

Low performance

due to complex

query optimization,

inability to support

large-scale systems

Low performance in

web applications

Support from

vendors

It is considered to

be highly successful

so the market size is

very large but many

vendors are moving

towards ORDBMS

Presently lacking

vendor support due

to vast size of

RDBMS market

All major RDBMS

vendors are after

this so has very

good future

Source: International Data Corporation, 1997 [40]

Page 72: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

72    

Justification  of  Selected  Database  Model  

Based on the comparisons above, the selected database model for the implementation

of the e-Commerce system is the object relational model.

ORDBMS employ a data model that adds object oriented ideas to tables." All

persistent (database) information is still in tables, but some of the tabular entries can

have richer data structure. ORDBMS is a compromise between RDBMS and

OODBMS. ORDBMS maintains a relational feel while associated with new data

types that are not present in RDBMS. These data types for example, indexing,

storage, and retrieve records of multimedia contents (e.g., pictures). It is very

important that the database can store and easily retrieve pictures as this is an

important aspect of buying and selling online.

The regular feel of RDBMS is not lost when using ORDBMS as data is stored in

tables of rows and columns, and SQL is the language for data definition,

manipulation, and query. The target and result of a query are still tables or tuples.

The main attraction to this method of design is the fact that ORDBMS can handle

complex data as many unstructured and relational database unfriendly data types will

be used throughout this system.

Dr. Michael Stonebraker, Chief Technology Officer of Informix Software, has

classified the DBMS applications into four types: simple data without query, simple

data with query, complex data without query, and complex data with query. These

four types describe file systems, Relational DBMSs, Object-Oriented DBMSs, and

object-Relational DBMS, respectively. This is why he terms ORDBMSs as "the next

wave" [41].

Page 73: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

73    

Justification  of  Chosen  Implementation  tools  

PHP  vs  ASP.NET  PHP is one of the most widely used Web programming languages today. PHP is a

powerful server-side scripting language that can be used to create dynamic websites

and applications. PHP began as “Personal Home Page”, a simple Perl hack written by

Rasmus Lerdorf in 1994. Today, PHP has come to mean “PHP: Hypertext

Preprocessor”. The chosen implementation method was selected based on the

following criteria;

Cost

PHP is an open source program. Keeping with the notion of using the least expensive

hardware to develop the Dfs e-commerce system, PHP is regarded as the most

suitable scritping language. It requires no start up costs, neither are costs incurred

over the lifetime of the application. The Apache/PHP/MySQL combination on

provides cheap, low-end hardware and local server in form of WAMP (for windows )

and IMAP (for Mac). This is not the case for /ASP/SQL Servers.

Open source software

Much of the major consumer software is distributed without cost today; e-mail clients,

Web browsers, games, and even full-service office suites are all being given away as

fast as their makers can whip up Web versions or set up FTP servers. PHP is an open

source program; one of the end-user requirements was a system built on open-source

programs.

Popularity

PHP has become one of the most widely used Web programming languages today.

[203] PHP is a powerful server-side scripting language that can be used to create

dynamic websites and applications. With over 4.5 million PHP developers and over

Page 74: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

74    

22 million Internet domains using PHP, it is easy to see the popularity of this

technology.

Platform Compatibility

PHP is platform independent, meaning it works with a wide range of operating

systems. ASP.Net is window based and only compatible with mostly Windows-based

DBMS.

Connection to Database

PHP allows connection to several types of databases as opposed to ASP.NET [39]

MySQL  vs  Microsoft  SQL  server,  Oracle,  Access  and  DB2  

Platform comparison

SQL Server only works on Windows-based platforms. In comparison with SQL

Server the flexibility of MYSQL enables its deployment across various platforms.

Cost and licensing

The most obvious and enduring difference between MySQL and SQL Server is the

price tag. MySQL and its attendant client libraries are free under the GNU Public

License; all other database packages listed above require some form of payment for

acquisition.

Access is a Single-User Application while MYSQL is a Multi-User Application using

authentication for security

Page 75: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

75    

 

FrontPage  Vs  Dreamweaver  

FrontPage has been built on top of the highly successful Microsoft Office suite. It

benefits from having a similar appearance to Microsoft Word and many of the other

Office based programs. Such a close resemblance to other office programs provides

an an easy-to-use menu system. Yet again this is only available on the Windows

platform. [101]

FrontPage has many uses similar to a word processor. The functionality for inserting

images, tables and formatting text are very similar. So the step-up from a well known

word processor, to an equally well known web editor is not that daunting. FrontPage

also has an abundance of ready to use templates, particularly useful for the novice

user.

Adobe Dreamweaver products have been designed specifically with web design in

mind and Dreamweaver is the industry standard for web editors. Dreamweaver has a

nice blend of advanced tools mixed in with a tasteful graphical user interface.

Dreamweaver CS4, the most recent version, is part of the Adobe Creative Suite CS4

Master Collection. The tight integration between applications in the Suite is

encouraging as other web development programs such as Photoshop, fireworks, flash

etc can easily integrate with Dreamweaver. It is available on cross platforms.

Dreamweaver has an extensive collection of advanced tools and may at times be a

little too complex for those who wish to merely edit pages. Fortunately, Macromedia

Contribute is available and is part of the Macromedia Studio suite and enables easy

website maintenance. "Non techies" can edit the content of pages, whilst the coding

part of the page is protected - so no banana skins here!

Page 76: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

76    

FrontPage's simplicity and ease of use often generates lots of unwanted code which

can be difficult to manage. It has been designed specifically for Internet Explorer

(I.E.) and does not fully abide by the World Wide Web Standards. This means the

web pages look perfect in I.E. but often slightly out of sync in other leading browsers

such as Mozilla Firefox and Google Chrome. Another drawback of FrontPage is that

web servers need FrontPage extensions to get some features to work.

Dreamweaver is not as easy to use and may look a little foreign and intimidating to

the novice user. The lack of beginner tools and usability may frustrate inexperienced

users. Dreamweaver is also a little pricier than FrontPage.

Dreamweaver is a professional level web editor. It has been designed to be used in a

commercial environment and benefits from having advanced web design tools.

FrontPage on the other hand was intended for the average home user with a modest

interest in web design. It is ideal for beginners.

Given the reasons cited above, Dreamweaver will be used as the web editor for this e-

commerce project.

 AJAX    

Ajax (shorthand for asynchronous JavaScript and XML) [35] is a group of interrelated

web development btechniques used on the client-side to create interactive web

applications. With Ajax, web applications can retrieve data from the server

asynchronously in the background without interfering with the display and behaviour

of the existing page. The use of Ajax techniques has led to an increase in interactive

or dynamic interfaces on web pages. Data are usually retrieved using the

XMLHttpRequest object. Despite the name, the use of XML is not actually required,

nor do the requests need to be asynchronous. [36]

Like DHTML and LAMP, Ajax is not a technology in itself, but a group of

technologies. Ajax uses a combination of HTML and CSS to mark up and style

information. The DOM is accessed with JavaScript to dynamically display, and to

allow the user to interact with the information presented. JavaScript and the

Page 77: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

77    

XMLHttpRequest object provide a method for exchanging data asynchronously

between browser and server to avoid full page reloads.

Ajax isn’t a technology. It’s really several technologies, each flourishing in its own

right, coming together in powerful new ways. Ajax incorporates:

Justification of Use

An Ajax application eliminates the start-stop-start-stop nature of interaction on the

Web by introducing an intermediary — an Ajax engine — between the user and the

server.

Instead of loading a webpage, at the start of the session, the browser loads an Ajax

engine — written in JavaScript and usually tucked away in a hidden frame. This

engine is responsible for both rendering the interface the user sees and communicating

with the server on the user’s behalf. The Ajax engine allows the user’s interaction

with the application to happen asynchronously — independent of communication with

the server. [36]

Page 78: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

78    

Data  Modelling  

Entities  and  Attributes  

This is a preliminary sketch of the entities and attributes involved in the DFs database.

This draft is subject to changes after certain design strategies and methodologies are

applied to it. Normalisation will be applied to all tables and relationships in the

system.

ORDER  

order_code  

user_name  

product_id  

product_name  

price  

quantity  

date  

order_amount  

order_status  

 

  UNREG_CUSTOMER  

unreg_id  

user_name  

address  

timestamp  

 

PRODUCT_CAT  

cat_id  

cat_name  

description  

 

 

CUSTOMER  

user_name  

password  

first_name  

last_name  

company  

address_1  

address_2  

city  

county  

postcode  

country  

telephone  

mobile  

fax  

email  

reg_date  

purchases  

logins  

 

PRODUCT  

product_id  

product_cat  

product_name  

product_desc  

price  

quantity_stock  

product_details  

product_image  

man_date  

expiry_date  

serving_idea  

 

 

 

TROLLEY  

id  

user_name  

product_id  

product_name  

price  

quantity  

date  

 

Page 79: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

79    

Normalisation    

According to Microsoft Corporation,” Normalization is the process of organizing data

in a database. This includes creating tables and establishing relationships between

those tables according to rules designed both to protect the data and to make the

database more flexible by eliminating redundancy and inconsistent dependency”.

[37] Normalization is the process of efficiently organizing data in a database. There

are two goals of the normalization process: eliminating redundant data (for example,

storing the same data in more than one table) and ensuring data dependencies make

sense (only storing related data in a table). Both of these are worthy goals as they

reduce the amount of space a database consumes and ensure that data is logically

stored. The goal of database normalization is to ensure that every non-key column in

every table is directly dependent on the key, the whole key and nothing but the key

and with this goal come benefits in the form of reduced redundancies, fewer

anomalies, and improved efficiencies.

The Normal Forms

The database community has developed a series of guidelines for ensuring that

databases are normalized. These are referred to as normal forms and are numbered

from one (the lowest form of normalization, referred to as first normal form or 1NF)

through five (fifth normal form or 5NF). In practical applications, you'll often see

1NF, 2NF, and 3NF along with the occasional 4NF.

First Normal Form (1NF)

First normal form (1NF) sets the very basic rules for an organized database:

i. Eliminate duplicative columns from the same table.

ii. Create separate tables for each group of related data and identify each row

with a unique column or set of columns (the primary key).

Second Normal Form (2NF)

Second normal form (2NF) further addresses the concept of removing duplicative

data:

i. Meet all the requirements of the first normal form.

Page 80: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

80    

ii. Remove subsets of data that apply to multiple rows of a table and place them

in separate tables.

iii. Create relationships between these new tables and their predecessors through

the use of foreign keys.

Third Normal Form (3NF)

Third normal form (3NF) goes one large step further:

i. Meet all the requirements of the second normal form.

ii. Remove columns that are not dependent upon the primary key.

Fourth Normal Form (4NF)

Finally, fourth normal form (4NF) has one additional requirement:

i. Meet all the requirements of the third normal form.

ii. A relation is in 4NF if it has no multi-valued dependencies.

Applying  Normalisation  to  DFs  e-­‐Commerce  system  

DFs Example:

Assumption: A customer can have multiple orders and an order can include multiple products. 0NF CUSTOMER ORDER (CustomerID, OrderNo, ProdCode, ProdDesc, Qty, CustAddress, DateOrdered) Achieving 1NF - remove multivalued attributes CUSTOMER (CustomerID, CustAddress) CUSTOMER ORDER (CustName, OrderNo, ProdCode, ProdDesc, Qty, DateOrdered) 2NF - remove partial dependencies CUSTOMER (CustomerID, CustAddress) ORDER LINE (OrderNo, ProdNo, Qty, DateOrdered) PRODUCT (ProdNo, ProdDesc) ORDER (OrderNo, CustomerID)

Page 81: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

81    

As above Assumption: A customer can have multiple orders but an order can be for only 1 product. CustomerID and OrderNo preassigned as keys. 0NF CUSTOMER ORDER (CustomerID, OrderNo, ProdNo, ProdDesc, Qty, CustAddress, DateOrdered) 1NF - remove multivalued dependencies CUSTOMER (CustomerID, CustAddress) ORDER (CustomerID, OrderNo, ProdNo, ProdDesc, Qty, DateOrdered) 2NF - remove partial dependencies CUSTOMER (CustomerID, CustAddress) CUSTOMER ORDER (CustomerID, OrderNo) ORDER (OrderNo, ProdNo, ProdDesc, Qty, DateOrdered) 3NF - remove transitive dependencies CUSTOMER (Customer ID, CustAddress) CUSTOMER ORDER (CustomerIDs, OrderNo) ORDER (OrderNo, ProdNo, Qty, DateOrdered) PRODUCT (ProdNo, ProdDesc) BCNF - resolve intrakey dependencies CUSTOMER (CustName, CustAddress) CUSTOMER ORDER (CustName, OrderNo) - CustName becomes just a foreign key ORDER (OrderNo, ProdNo, Qty, DateOrdered) PRODUCT (ProdNo, ProdDesc)

The same normalisation rules will be applied all over the database system where

many-to-many relationships occur. Therefore more entities will be created from the

original draft. A more comprehensive UML class diagram will be used to model the

entire system in further sections.

Page 82: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

82    

Entity  Relationship  Diagrams    

Entity Relationship Diagrams (ERD)s may be considered as graphical representations

of data definitions. Information modelling is concerned with the definition of data

within the system in terms of its meaning, composition and relationships.

DFDs show the flow of information through the system but play no part in defining

the information, apart from being a useful place from which to access data definitions.

Flows and stores on DFDs are essentially representations of information that is

defined elsewhere.

While the DFD models the active processing of information by the system, the ERD

models the static relationships amongst this information that are preserved and

maintained by the system. The ERD shows how items of data relate, statically, to each

other. ERDs cannot exist in a hierarchy, instead, either a single ERD is produced for

the entire system analysis or design (when the ERD is considered to relate to the

entire DFD hierarchy), and/or ERDs can be produced as companions to specific DFDs

that contain a large quantity of stored data, and contain the processes that create,

update, or otherwise maintain the stored data.

Page 83: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

83    

Initial draft of an ERD model for DFs

Entity  Types  An entity type is any type of object that we wish to store data about. In an entity-

relationship diagram an entity type is shown as a box. In Fig. 3.1, CUSTOMER is an

entity type. Each entity type is shown once. There may be many entity types in an

entity-relationship diagram as shown above. The name of an entity type is singular

since it represents a type.

An entity type is considered to be a set of objects. For this reason some people use the

alternative term entity set. An entity is simply one member or example or element or

instance of the type or set. So an entity is one individual within an entity type. For

example, within the entity type CUSTOMER, J. Smith might be one entity. He is an

Buy SmartDraw!- purchased copies print this document without a watermark .

Visit www.smartdraw.com or call 1-800-768-3729.

Page 84: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

84    

individual entity within the type, an element in the set, an instance of the type

'customer'.

An entity type CUSTOMER and one of its attributes Cus_no

Attributes

The data that we want to keep about each entity within an entity type is contained in

attributes. An attribute is some quality about the entities that we are interested in and

want to hold on the database. In the above diagram, the cus_no is an attribute.

Primary Key

In database design, an attribute is usually used to identify each entity from all the

others in the entity type. This attribute is known as the primary key. In some cases,

more than one attribute are used as primary keys to identify the entities. Primary keys

must be unique in each entity.

Page 85: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

85    

UML  Diagrams  

UML  Class  Diagram  

Visual modeling is a way of thinking about problems using modeling organized

around real-world ideas [38].

Models are useful for understanding problems, communicating with project team

members (customers, domain experts, analysts, designers, etc.), modelling enterprises,

preparing documentation, and designing programs and databases. UML Models

promote better understanding of the requirements by filtering out nonessential details

and establishing the most suitable architectural basis for design. Software systems that

have been thoroughly modeled tend to be more maintainable systems.

Unified Modeling Language (UML) is a language used to specify, visualize, and

document the artefacts of system under development.

UML is an attempt to standardize the artefacts of analysis and design: semantic

models, syntactic notation, and diagrams. It provides a very robust notation, which

grows from analysis into design.

Certain elements of the notation (e.g., classes, associations, aggregations, inheritance)

are introduced during analysis. Other elements of the notation (e.g., containment

implementation indicators and properties) are introduced during design. Use-Case

Diagrams model the user requirements and their interactions with the system at high

level of abstraction. They are useful for early requirements analysis because they

enforce the identification of the different users and uses of a system while at the same

time being easily understood by customers [39]. In addition, Class, Instance,

Sequence, Collaboration, Class State, Activity, and Implementation Diagrams are also

present. UML can be used to model most aspects of a system. The activity flow model

has been successfully adapted to industrial projects including a leading German

organization in the banking sector [40].

Page 86: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

86    

UML:  Use  Case  Diagram    

An important part of the Unified Modelling Language (UML) is the facilities for

drawing use case diagrams. Use cases are used during the analysis phase of a project

to identify and partition system functionality. They separate the system into actors

and use cases. Actors represent roles that can are played by users of the system. Those

users can be humans, other computers, pieces of hardware, or even other software

systems. The only criterion is that they must be external to the part of the system

being partitioned into use cases. They must supply stimuli to that part of the system,

and the must receive outputs from it.

Use cases describe the behavior of the system when one of these actors sends one

particular stimulus. This behaviour is described textually. It describes the inputs from

Page 87: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

87    

and outputs to other actors, and the behaviours that convert the inputs to the outputs.

The text of the use case also usually describes everything that can go wrong during

the course of the specified behaviour, and what remedial action the system will take.

Page 88: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

88    

UML  Activity  Diagrams    

UML activity diagrams are intended to model both computational and organisational

processes (i.e. workows) [40, 41]. However, if activity diagrams are to

succeed as a standard in the area of organisational process modeling, they should

compare favorably to the languages currently used for this purpose, that is, those

supported by existing Workow Management Systems (WFMS).

Page 89: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

89    

Database  Data  Definition    

In this section, the attributes and domains of each entity is defined. The

implementation of this system will be strongly rooted on this design.

Table structure for table customers

Field Type Null Default

customer_id int(11) No

Page 90: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

90    

title enum('Other', 'Chief', 'Dr', 'Ms', 'Miss', 'Mrs', 'Mr') No

first_name varchar(60) No

last_name varchar(60) No

email_add varchar(60) No

login_pword varchar(10) No

address_line_1 varchar(40) No

address_line_2 varchar(30) No

town_city varchar(30) No

post_code varchar(7) No

county varchar(30) No

country varchar(40) No

telephone varchar(15) No

org_or_ind enum('Individual', 'Organisation') No Individual

organisation_name varchar(30) Yes NULL

newsletter enum('No', 'Yes') No Yes

other_info varchar(250) Yes NULL

Table structure for table delivery

Field Type Null Default

delivery_ref int(6) No

order_code int(6) No

tracking_no varchar(30) Yes NULL

date_shipped date Yes NULL

ex_delivery_date date Yes NULL

delivery_details varchar(150) Yes NULL

Table structure for table delivery_items

Field Type Null Default

delivery_item_id int(6) No

delivery_ref int(6) No

odrer_item_id int(6) No

Table structure for table invoice

Page 91: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

91    

Field Type Null Default

invoice_number int(6) No

order_code int(6) No

invoice_date date No

invoice_details varchar(150) No

Table structure for table invoice_line

Field Type Null Default

invoice_line_id int(6) No

order_item_id int(6) No

invoice_number int(6) No

product_code varchar(5) No

derived_cost decimal(10,0) No

VAT decimal(10,0) No

total_cost decimal(10,0) No

other_details varchar(150) Yes NULL

Table structure for table newsletter_customers

Field Type Null Default

news_customer_id int(6) No

customer_id int(6) No

more_details varchar(150) Yes NULL

Table structure for table orders

Field Type Null Default

order_code int(6) No

customer_id int(6) No

order_date date No

order_details varchar(150) Yes NULL

Table structure for table order_items

Field Type Null Default

order_item_id int(6) No

product_code varchar(5) No

Page 92: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

92    

product_quantity double No 1

order_code int(6) No

unit_sale_price decimal(10,0) No

sub_total decimal(10,0) No

more_details decimal(10,0) Yes NULL

Table structure for table payment

Field Type Null Default

payment_ref int(6) No

invoice_number int(6) No

payment_method_code varchar(5) No

payment_date date No

amount decimal(10,0) No

Table structure for table payment_method

Field Type Null Default

payment_mehod_code enum('CHEQ', 'DBTCD', 'CRDCD', 'PAYP') No PAYP

p_method_desc varchar(40) No

more_info varchar(100) Yes NULL

Table structure for table products

Field Type Null Default

product_code varchar(5) No

product_name varchar(30) No

product_description varchar(250) No

p_cat_code varchar(5) No

units_in_stock int(11) No

unit_sale_price decimal(10,0) Yes NULL

date_manf date No

expiry_date date No

serving_sug varchar(100) Yes NULL

p_picture (50) No Enter product picture name92

nutrional_content varchar(100) Yes NULL

Page 93: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

93    

Table structure for table product_category

Field Type Null Default

p_cat_code varchar(5) No

p_cat_name varchar(30) No

p_cat_desc varchar(100) Yes NULL

more_details varchar(150) Yes NULL

Table structure for table recipe

Field Type Null Default

recipe_ref int(6) No

product_code varchar(5) No

recipe_name varchar(50) No

recipe_desc varchar(2500) No

recipe_author varchar(30) Yes NULL

date_added date No

Page 94: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

94    

Website  Design  

Page  Layout  

There are several types of layouts can be used to structure web pages. Some of these

different page layouts are discussed below.

One-Tier Site:

All the information is on one page.

Two-Tier Site:

On the main page, there is a link to each

of the six items.

Page 95: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

95    

Three-Tier Site:

On the main page, there is a link to a

page for each category.

The advantage of a one-tier site is that there are no internal links, and there is no

navigation. Everything is right there on that page. This is perfect for sites that have

very little information on them.

The two-tier site allows for a fair bit more information, but if you have a large site, it

will confront the visitor with an unsightly "Wall of Links". [42]

The DFs e-Commerce system will be a three-tier site. This format was chosen, as it

the most suitable for an e-commerce themed website. This system will enable

categorization of similar objects into the same page.

 

Web  Design  Issues    

This web site acts as the store front for the products and service to be sold by DFs

online. The site users are assumed to be window shoppers and browsers. An effective

e-commerce web site's aim is to convert these browsers into buyers. This is what this

system is designed to achieve.

Page 96: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

96    

The web site will be designed to gently lead the users through the learning and sales

process. Sales text must be grammatically sound and spelled correctly. Poor spelling

loses credibility points straight away.

There will be plenty of well laid out textual content on the site to attract search

engines as well as to inform prospective clients.

Attracting search engines and targeted site traffic is a vital requirement of the system,

so the system must be built using keywords and clear headers to achieve this.

Cross Browser Compatibility

Internet Explorer isn't the only browser on the market. There are currently over 100

different brands of Internet browser currently available. IE's major competitor is

Firefox and what looks good in Internet Explorer may look terrible or even crash

other browsers. The website should be viewable on the most popular browsers such as

Firefox, Google chrome and IE.

Between these three browsers, over 90% of the internet market will be covered. By

paying attention to even simple things like browser compatibility issues, sales

potentials can be increased.

The use of images

All images used should clearly depict the product/service and where possible, pictures

must be optimised for clarity and for rapid download if necessary.

Images are a wonderful medium to assist in the online sale of DFs products/services,

especially useful to those clients with poor literacy levels or who are in a rush.

Site Navigation.

Site navigation will be simple and all the questions a customer may ask will be

answered along the way. Where possible, the "three click rule" will be used- that is, a

visitor should be able to access any information regarding DFs product or service

within 3 clicks of any other area of your web site. Pay close attention to cross-browser

compatibility issues as many complex menu systems play havoc with browsers.

About Us Page.

Page 97: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

97    

The "About Us" page is crucial to boosting consumer confidence. It provides a

summary of DFs business, commitments and direction. Online business is no different

to traditional business in that there needs to be a form reassurance to the site visitors.

Therefore this page will provide other contact details for DFs and other various

registrations, associations and affiliations.

Flow  Chart  Diagrams    

Web site flow chart diagrams will be used to model the divine foods e-commerce

website. This will show the navigational structure of the website. As explained earlier

a 3-Tier design approach will be used in the system development for DFs.

Fig 3.1 This is the navigational flow chart of DFs e-Commerce system.

Web  Story  Board    

A prototype website will be developed using PowerPoint. This method was chosen

instead of the traditional skeletal storyboard approach to ensure the stake holder stay

informed on the overall website appearance.

Page 98: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

98    

Fig 3.2: Showing prototype design

Fig 3.2 was the initail design of the website storyboard. Following meetings with DFs, this design was

changed to the one below.

Fig 3.3: This the colour scheme and web design layout for the Home page so far

agreed with DFs. The overall page layout is not expected to change, but certain

colours on the page may change.

Page 99: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

99    

Page 100: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

100    

The product page

The product page was modelled to show the look and feel of the most imporatant page

of the website according to DFs. Subsequent site pages will look similar and follow

the same trends

Page 101: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

101    

Page 102: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

102    

Chapter  5:  Implementation    

The DFs e-commerce system will be implemented using the selected programs

justified in the design section. The database will be created using the data definition

and the website designed according to the web flowchart and story board.

The entire system will be created on a local server using WAMP/Apache. The final

system will be transferred to the host server by FTP. The web address of the system

on completion will be:

Creating  the  Database    

The database tables were created and populated with data using Navicat 8 Lite; a free

DBMS for MySQL. Entity relationships and foreign keys were defined. This was a

simple procedure as the data to be entered were already defined.

All SQL codes and schema are included in the appendix of this report.

Page 103: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

103    

Website  Design    

Changes to Design

Some of the colours used in the design of the preliminary storyboard generated were

changed due to requests from DFs.

The structure of the home page also had to be changed to facilitate and comply with to

web 2.0 Standards

Web  Design  in  Photoshop    

This stage of implementation is not as straight forward as the database creation. Web

site standards have to be obeyed; the appropriate page sizes must be used to achieve

the best results. Web page sizes depend on the type of system being developed. For

this system, a page size of 1024 X 848 pixels will be used to ensure it can be

displayed by most computer screens.

Due to the professional nature of the system to be developed, the website was

designed using Adobe CS4 Master Collection.

The web design started in Adobe Photoshop CS4, where the website template was

built to be exported for slicing.

Fig 4.1 shows how Photoshop was used to re-create the story board prototype that was

created in the design section.

Page 104: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

104    

Fig 4.1: DFs e-commerce system, Home screen

Page 105: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

105    

Most pages of the website were created this way and then re-used in Dreamweaver to

generate subsequent pages.

Fig 4.2 The Product page

Fig 4.3 Special Offers page

Page 106: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

106    

Slicing  in  Adobe  Fireworks    

The designed web pages were exported to Fireworks for slicing in preparation for

coding in Dreamweaver. This process involves exporting the static (e.g. page

background, side bars) and some dynamic parts (e.g. picture placeholders) of the

website as picture files (JPG, PNG and GIF formats) to the images folder of the DFs

e-commerce web folder.

An advantage of using fireworks is that it automatically generates HTML tags and

CSS style sheets for every component sliced.

Fig 4.4: Showing the sliced home page in Fireworks

This procedure was repeated for the other pages in the website.

Page 107: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

107    

Coding  in  Dreamweaver    

The web pages sliced in fireworks are finally exported into Dreamweaver for coding.

Dreamweaver has all the required programming languages for this system

development such as; PHP, JSP, XML, CSS and AJAX as built-in functions which is

of an advantage as it allows all coding to be done on here.

Fig 4.5 Dreamweaver supported languages.

At this stage of the implementation, the HTML and PHP codes are written, the

website is connected to the database using PHP scripts; Dynamic content is delivered

from information stored on products into the webpage.

Page 108: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

108    

Fig 4.6: Coding in Dreamweaver: showing connection with DivineFoods database.

Other activities carried out during this stage nclude:

i. Updating the page properties to add a title and background color.

ii. Incorporating the placeholder text from the original design into the home page.

iii. Adding formatting styles and applying them to specific HTML tags.

iv. Creating custom classes to add rules that will affect elements that reoccur on

the page.

v. Using the Adobe BrowserLab service to check how different browsers render

the page on the Mac OS X and Windows XP platform.

vi. Converting a static web page to a dynamic PHP-based page.

vii. Breaking down the page into reusable elements such as the header and footer.

viii. Querying data from the MySQL database on the server, and present that data

dynamically on the home page.

Page 109: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

109    

ix. Creating a PHP page that queries and returns data from a MySQL database in

XML format.

x. Creating a PHP page that retrieves and presents the data dynamically using the

Spry framework for Ajax

xi. Creating the product PHP page that uses the form request functionality to

query and display data from a MySQL database on the server.

xii. Configuring a existing PHP pages to use with InContext Editing, a service that

allows addition and maintenance of a web page within a web browser.

xiii. PHP scripts were created to enable User account creation, user login, user

password encryption, admin account management, shopping basket, check out

and more ( see Appendix).

Page 110: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

110    

The  Final  Web  Page  Preview  in  Browser  

Having successfully implemented the system according to the initial design, here final

previews of some of the web pages in a browser.

Fig 4.7: Website Home page preview in browser

Page 111: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

111    

Fig 4.8: Website recipe blog page preview in browser

Page 112: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

112    

Fig 4.9: Website products page preview in browser

Page 113: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

113    

Fig 4.10: Website special offers page preview in browser

Page 114: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

114    

Chapter  6:  Evaluation  and  Testing    

The analysis design and development of this system was deemed successful. This

assessment was made based on the functionality of the final system meeting the

requirements analysis. The system satisfactorily meets the core requirements set out

by DFs. Customers can easily register with the website using their email address as

the username along with secure encrypted passwords. Customers can adequately

manage their accounts online without any help from DFs; the system is robust enough

to handle large numbers of customers without crashing.

Though the initial specification evolved around web 1.0, the system was eventually

developed to web 2.0 standards; with facebook, twitter and Myspace elements

integrated into the site. There is a web blog where customers can interact with each

other, post recipes and comment on existing posts, products can also be reviewed. The

development of this system has resolved majority of the problems faced by DFs:

Processing time of the business and employee s transaction data was reduced. In the

past, employees managed order and delivery documents by writing directly on paper.

Moving the order and delivery system onto the Internet reduced the time needed to

process business/employee s transaction data by automating several processes that

would otherwise be carried out manually.

Product stock levels can be automatically monitored by the system, alerting the

management when products are running out of stock.

The extensive literature research carried out along with the systems analysis and

design methods employed enabled this system to be designed to a high standard an in

compliance with e-Commerce Regulations. Contracts can be started and finalised

online, the site incorporates DFs’ marketing identity, and clearly displays the

company’s Terms and conditions an EC Directive requirement. Data flow diagrams

and UML class, activity and use case diagrams enabled the identification of data

processes and flows leading to the modelling and design of the overall system.

The system employs marketing strategy in form of form of regular newsletters with

promotional offers. The system with facilitate customer acquisition by using clear

page headers, descriptions and keywords to optimize search engine indexing.

Page 115: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

115    

Customer retention is achieved by providing personal user accounts and recipe blogs

to give customers reasons to always re-visit the website.

The overall time taken to develop the system was reduced by carrying-out testing

concurrently with implementation. Several types of testing were carried out as

specified in earlier sections of this report

Page 116: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

116    

Further  Work    

Though the overall system was a success, are certain areas that could be enhance even

further.

The e-Commerce system can be further improved to include band carry out card

transactions. Customers should be able to pay by credit/debit card directly to DFs.

This feature was not included in this system mainly because DFs do not currently

have a merchant account with any banks; this is required to process card transactions.

This system can also be improved further into a B2B application. This will enable

DFs to really take advantage of the benefits of e-Commerce by directly integrating

their e-commerce system to a warehouse distribution system of their suppliers.

Complete autonomy can be achieved by the DFs system this way as it will

automatically order from suppliers when product inventory is low. This element was

not included in this system as it would have been complicated; this is because most

products are manufactured by DFs using raw materials ordered from suppliers and

majority of these suppliers either do not carry out business online or they do not

possess the infrastructure to run e-business systems. Since this is the case, it would

have been impractical to develop a B2B system if it cannot fully integrate with

supplier systems or if these systems are absent.

Page 117: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

117    

Chapter  5:  References  &  Bibliography    

References   1. Kalakota, R. and Whinston, A. (1997) Electronic Commerce: A Manager’s Guide. Reading, MA: Addison-Wesley. 2. Cabinet Office, The (1999) ‘[email protected]’, The Performance and Innovation Unit, UK. 3. Papazoglou, M.P. and A. Tsalgatidou, Business to business electronic commerce issues and solutions. Decision Support Systems, 2000. 29(4): p. 301-304. 4. Tumolo, M., Business-to-business exchanges. Information Systems, 2001. 18(2): p. 54-62. 5. Niko H. Prajogo and Robert B. Johnston Barriers to Just-in-Time Implementation in Small Manufacturing Enterprises [online] available at https://www.dis.unimelb.edu.au/staff/robertj/PAPER1.html [accessed 11th June 2009] 6. Cranfield University, enterprise system implementation [online] available at http://www.cranfield.ac.uk/sas/postgraduatestudy/taughtcourses/enterprisesystemimplementation/index.jsp [accessed 11th June 2009] 7. Bernroider E, Tang N. A preliminary Empirical Study of the Diffusion of ERP Systems in Austrian and British SMEs. Institute of Information Processing and Information Management, Vienna University of Economics and Business Administration, Vienna, Austria, 20 8. katarattanakul, P. & Siau, K, (2003). Creating a virtual store image. Communications of the ACM, I(4), pg 78-87 9 . Anderson, P., “What is Web 2.0? Ideas, Technologies, and Implications for Education,” JISC Technology and Standard Watch, February 2007, 1–63. 10 ASDA Careers. ASDA Graduates Careers: E-Commerce http://www.asda.jobs/graduates/graduate_opportunities/ecommerce.html Last accessed 20/04/2010 11. BBC Business News. Asda boosts online home shopping . May, 2009 http://news.bbc.co.uk/1/hi/business/4591731.stm Last accessed 20/04/2010 12. King, L. Tesco online profits rocket 49%. ComputerWorldUK http://www.computerworlduk.com/management/online/e-business/news/index.cfm?newsid=8542 Last accessed 20/04/2010 13. Guell, N., D. Schwabe, and P. Vilain. Modeling Integrations and Navigation in Web Application. in ER2000 Workshop. 2000: Springer Verlag. LNCS 1921. p.115-127. 14 - OTUTEYE, E. A systematic approach to e-business security. Faculty of Administration, University of New Brunswick, Fredericton, Canada. 2003. http://ausweb.scu.edu.au/aw03/papers/otuteye/paper.html Last accessed 10/10/2009

Page 118: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

118    

15. SUCHÁNEK, P. E-business Development Key Areas. In 5-th International Symposium on Business Administration. Çanakale: Çanakale Onsekiz Mart University, 2008. s. 537-543. ISBN 978-975-8100-78-1. 16. Miniwatts Marketing Group, "World Internet Usage Statistics News and World Population Stats", http://www.internetworldstats.com/stats.htm , Last accessed 20/04/2010 17. Sayer, Peter and Deveaux, Sarah, "Jurisdiction in Cyberspace" IDG News Service Friday, July 28, 2000 see also http://www.pcworld.com 18. McGinty, Jim, http://www.ministers.wa.gov.au 19. Barr, David D. "The Need of a Broad Standard in Global E-Commerce" The Internet Law Journal, Dec. 26, 200020 ICO (Information Commissioner’s office). Privacy and Electronic Communication Guide. http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications_guide.aspx Last accessed 20/04/2010 21. OPSI Data Protection Act 1998. http://www.opsi.gov.uk/acts/acts1998/ukpga_19980029_en_1 Last accessed 20/04/2010 22. UKCSS. UK Copyright law Fact Sheet. http://www.copyrightservice.co.uk/copyright/p01_uk_copyright_law Last accessed 20/04/2010 23. Cantrell, D. C. (n.d.) Alternative paradigms in environmental education research: The interpretive perspective. http://www.edu.uleth.ca/ciccte/naceer.pgs/pubpro.pgs/alternate/pubfiles/08.Cantrell.fin.htm Last accessed 20/04/2010 24. O'Brien, K. (n. d.) Research paradigms. Latrobe University. http://ironbark.bendigo.latrobe.edu.au/~obrien/parad/index.htm Last accessed 10/01/2010 25. Myers, M. (2000). Qualitative research and the generalizability question: Standing firm with Proteus. The Qualitative Report, 4(3/4). http://www.nova.edu/ssss/QR/QR4-3/myers.html. Last accessed 20/04/2010 26. James Neil. Qualitative versus Quantitative Research: Key Points in a Classic Debate .http://wilderdom.com/research/QualitativeVersusQuantitativeResearch.html#Features Last accessed 20/04/2010

27. Gall, M. D., Borg, W. R., Gall, J. P. (2003). Educational research: An introduction. (7th

Edition). White Plains, New York: Longman.

28. Miles & Huberman (1994, p. 40).

29. Qualitative Research Methods: A Data Collector’s Field Guide. Module 1: Qualitative

Research methods overview. Family Health International.

http://www.fhi.org/NR/rdonlyres/etl7vogszehu5s4stpzb3tyqlpp7rojv4waq37elpbyei3tgmc4ty

6dunbccfzxtaj2rvbaubzmz4f/overview1.pdf Last accessed 20/04/2010

Page 119: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

119    

30. Roy, A.B. The SDLC and Six SIGMA: AN Essay on which is which and why? Florida

Gulf Coast University. http://www.iacis.org/iis/2004_iis/PDFfiles/Boggs.pdf 20/04/2010

31. Food Standards Agency. Labelling and Packaging http://www.food.gov.uk/foodlabelling/

Last accessed 21/04/2010

32. Chris Gane, Trish Sarson. Structured Systems Analysis: Tools and Techniques. 1979.

Prentice Hall, pgs 100 - 241 .

33. Pham T. Q, Chartier-Kastler, C. Merise in Practice. 1991. Scholium International, Incorporated. Pgs 30-80

34. M. Abi-Antoun, D. Wang, and P. Torr. Checking Threat Modeling Data Flow Diagrams for Implementation Conformance and Security. Technical Reportm CMU-ISRI-06-124, Carnegie Mellon University, 2006.

35 Jesse James Garrett (2005-02-18). "Ajax: A New Approach to Web Applications".

AdaptivePath.com. http://www.adaptivepath.com/ideas/essays/archives/000385.php. Last

accessed 15/012/2009

36 Ullman, Chris (March 2007). Beginning Ajax. wrox. ISBN 978-0-470-10675-4.

http://www.wrox.com/WileyCDA/Section/id-303217.html. Last accessed 15/12/2009

37. Description of the Database Normalisation basics. Microsoft Corporation. January, 2009.

http://support.microsoft.com/kb/283878 . Last Accessed April 20, 2010

38. Quatrani, T., Visual Modeling with Rational Rose and UML. 2 ed. 1998, Boston: Addison Wesley Longman Inc. 240. Bergner, K., A. Rausch, and M. Sihling. A Critical Look upon UML 1.0. in The Unified Modeling Language -Technical Aspects and Applications. 1998: PhysicaVerlag. p. 79-92. 39. “Net.Data Administration and Programming Guide for OS/400.” IBM Manuals. October

2001. 15 July 2006.

40. UML Revision Task Force. OMG Uni_ed Modeling Language Speci_cation, Version

1.4 (_nal draft). February 2001.

41. Wolf, M., R. Burkhardt, and I. Philippow. Software Engineering Process with the UML.

in UML Workshop. 1997. Mannheim, Germany: Physica Verlag. p. 271-280.

Page 120: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

120    

42. Piechnick, D. Navigation Structures. Web Design Library. .

http://www.webdesign.org/web-design-basics/website-usability/navigation-

structures.8441.html#ixzz0fpznLhzD. Last accessed 15/04/2010

Page 121: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

121    

Bibliography      

Bibliography

SUCHÁNEK, P. E-business Development Key Areas. In 5-th International Symposium on Business

Administration. Çanakale: Çanakale Onsekiz Mart University, 2008. s. 537-543. ISBN 978-975-8100-78-1.

Thomas Gilmore, Jim Krantz and Rafael Ramirez, "Action Based Modes of Inquiry and the Host-

Researcher Relationship," Consultation 5.3 (Fall 1986): 161.

Stobart, S., Vassileiou, M. (2004) ‘PHP and MySQL Manual’ Springer-Verlag London ISBN 1852337478

Connolly,T. Begg,C. Strachan, A. (2005) 'Database Systems, A practical approach to design, Implementation and management.' 4th Edition Addison Wesley 0321210255

Date, C. J. (2003) 'An Introduction to Database Systems' 8th Edition Addison Wesley 0321189566

Scott Barker, F. (2003) 'Database programming with Visual Basic .Net and ADO.Net : tips, tutorials and code' Sams 0672322471

Buyens, J. (2002) 'Web database development step by step [electronic resource]' 0585487278

Welling, L. and Thomson, L. (2004) 'PHP and MySQL Web Development' 3rd Edition Sam’s publishing

McManus J., Harper Wood T. (2002) 'Information Systems Project Management' Prentice Hall 027364990

Elmasri, R. Shamkant, B. and Navathe (2003) 'Fundamentals of database systems' 4th Edition 0321122267

[4] Fertalj K, Milašinovic B. Estimation of feasibility for Business Information Systems. Journal of

Computing and Information Technology - CIT 13, 2005, 4, p. 271-277

Bernard HR. Research Methods in Anthropology, Second Edition. London: Sage Publications, 1995.Denzin NK, Lincoln YS (eds.). Handbook of Qualitative Research. London: Sage Publications, 2000.

Marshall PA. Human subjects protections, institutional review boards, and cultural anthropologicalresearch. Anthropol Q 2003;76(2):269-85.

National Commission for the Protection of Human Subjects of Biomedical and BehavioralResearch. The Belmont Report. Ethical Principles and Guidelines for the Protection of Human Subjects of Research. Washington, DC: National Institutes of Health, 1979. Available: http://ohsr.od.nih.gov/guidelines/belmont.html.

Nkwi P, Nyamongo I, Ryan G. Field Research into Social Issues: Methodological Guidelines.Washington, DC: UNESCO, 2001.

Pelto P, Pelto G. Studying knowledge, culture and behavior in applied medical anthropology.Med Anthropol Q 1997;11(2):147-63.

Pope C, Mays N. Qualitative Research in Health Care. London: BMJ Books, 2000.

Page 122: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

122    

Schensul, J, LeCompte M. Ethnographer’s Toolkit. Walnut Creek, CA: Altamira Press, 1999.

Sarpola Sami and Scott Judy E. Enterprise Resource Planning (ERP) software selection and success of

acquisition process in wholesale companies. HeSE print, Helsinki, Finland, 2003

Useful  Websites    

Database Normalisation Basics http://databases.about.com/od/specificproducts/a/normalization.htm

Description of the Database Normalisation basics. Microsoft Corporation. January, 2009. http://support.microsoft.com/kb/283878 . Last Accessed April 20, 2010

Qualitative versus Quantitative Research: Key Points in a Classic Debate. http://wilderdom.com/research/QualitativeVersusQuantitativeResearch.html#Features Last accessed: 20/04/2010

The Privacy and Electronic Communications (EC Directive) Regulations 2003 . http://www.opsi.gov.uk/si/si2003/20032426.htm. Last accessed 20/04/2010

http://www.fhi.org/NR/rdonlyres/etl7vogszehu5s4stpzb3tyqlpp7rojv4waq37elpbyei3tgmc4ty6dunbccfzxtaj2rvbaubzmz4f/overview1.pdf

http://www.webdesign.org/raster-graphics/fireworks/fireworks-cs4-beta-for-web-

design.16470.html

http://www.layersmagazine.com/photoshop-cs4-a-picture-worth-a-thousand-words.html

Linda J Bruton. What Is the Purpose of ERP Software Linda J Bruton [online] available

at http://ezinearticles.com/?What-Is-The-Purpose-Of-ERP-Software?&id=680420

[accessed 18th June 2009]

William Ulrich. System transformation [online] available at

http://www.systemtransformation.com/holistic_approach.htm [accessed 22nd July 2009]

David S. Linthicum. Portal oriented B2B oriented integration [online] available at

http://www.informit.com/articles/article.aspx?p=19741 [accessed 22nd July 2009]

Thomas Wailgum .ERP definitions and solutions [online] available at

http://www.cio.com/article/40323/ERP_Definition_and_Solutions [accessed 1st September 2009]

Rory O’Brien An overview of methodological approach to action research [online] available at

http://www.web.net/~robrien/papers/arfinal.html#_Toc26184651 [accessed 1 august 2009]

Page 123: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

123    

Lev Virine, Adaptive Project Management [online] available at

http://www.pmforum.org/library/papers/2008/PDFs/Virine-5-08.pdf [accessed 15th august 2009]

http://www.w3.org

http://www.webrichtlijnen.nl/

http://www.webopedia.com

http://info.ssl.com/article.aspx?id=10068

Page 124: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

124    

Chapter  7:  Appendix  

Appendix  A  

SQL  Database  Scripts  /*

MySQL Data Transfer

Source Host: localhost

Source Database: divinefoods

Target Host: localhost

Target Database: divinefoods

*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------

-- Table structure for customers

-- ----------------------------

DROP TABLE IF EXISTS `customers`;

CREATE TABLE `customers` (

`customer_id` int(11) NOT NULL AUTO_INCREMENT,

`title` enum('Other','Chief','Dr','Ms','Miss','Mrs','Mr') NOT NULL,

`first_name` varchar(60) NOT NULL,

`last_name` varchar(60) NOT NULL,

`email_add` varchar(60) NOT NULL,

`login_pword` varchar(10) NOT NULL,

`address_line_1` varchar(40) NOT NULL,

`address_line_2` varchar(30) NOT NULL,

`town_city` varchar(30) NOT NULL,

`post_code` varchar(7) NOT NULL,

`county` varchar(30) NOT NULL,

`country` varchar(40) NOT NULL,

`telephone` varchar(15) NOT NULL,

`org_or_ind` enum('Individual','Organisation') NOT NULL DEFAULT 'Individual',

`organisation_name` varchar(30) DEFAULT NULL,

Page 125: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

125    

`newsletter` enum('No','Yes') NOT NULL DEFAULT 'Yes',

`other_info` varchar(250) DEFAULT NULL,

PRIMARY KEY (`customer_id`),

KEY `customer_id` (`customer_id`,`title`,`first_name`,`last_name`,`email_add`,`telephone`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for delivery

-- ----------------------------

DROP TABLE IF EXISTS `delivery`;

CREATE TABLE `delivery` (

`delivery_ref` int(6) NOT NULL AUTO_INCREMENT,

`order_code` int(6) NOT NULL,

`tracking_no` varchar(30) DEFAULT NULL,

`date_shipped` date DEFAULT NULL,

`ex_delivery_date` date DEFAULT NULL,

`delivery_details` varchar(150) DEFAULT NULL,

PRIMARY KEY (`delivery_ref`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for delivery_items

-- ----------------------------

DROP TABLE IF EXISTS `delivery_items`;

CREATE TABLE `delivery_items` (

`delivery_item_id` int(6) NOT NULL AUTO_INCREMENT,

`delivery_ref` int(6) NOT NULL,

`odrer_item_id` int(6) NOT NULL,

PRIMARY KEY (`delivery_item_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for invoice

-- ----------------------------

Page 126: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

126    

DROP TABLE IF EXISTS `invoice`;

CREATE TABLE `invoice` (

`invoice_number` int(6) NOT NULL AUTO_INCREMENT,

`order_code` int(6) NOT NULL,

`invoice_date` date NOT NULL,

`invoice_details` varchar(150) NOT NULL,

PRIMARY KEY (`invoice_number`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for invoice_line

-- ----------------------------

DROP TABLE IF EXISTS `invoice_line`;

CREATE TABLE `invoice_line` (

`invoice_line_id` int(6) NOT NULL AUTO_INCREMENT,

`order_item_id` int(6) NOT NULL,

`invoice_number` int(6) NOT NULL,

`product_code` varchar(5) NOT NULL,

`derived_cost` decimal(10,0) NOT NULL,

`VAT` decimal(10,0) NOT NULL,

`total_cost` decimal(10,0) NOT NULL,

`other_details` varchar(150) DEFAULT NULL,

PRIMARY KEY (`invoice_line_id`)

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for newsletter_customers

-- ----------------------------

DROP TABLE IF EXISTS `newsletter_customers`;

CREATE TABLE `newsletter_customers` (

`news_customer_id` int(6) NOT NULL,

`customer_id` int(6) NOT NULL,

`more_details` varchar(150) DEFAULT NULL,

PRIMARY KEY (`news_customer_id`)

Page 127: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

127    

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for order_items

-- ----------------------------

DROP TABLE IF EXISTS `order_items`;

CREATE TABLE `order_items` (

`order_item_id` int(6) NOT NULL AUTO_INCREMENT,

`product_code` varchar(5) NOT NULL,

`product_quantity` double NOT NULL DEFAULT '1',

`order_code` int(6) NOT NULL,

`unit_sale_price` decimal(10,0) NOT NULL,

`sub_total` decimal(10,0) NOT NULL,

`more_details` decimal(10,0) DEFAULT NULL,

PRIMARY KEY (`order_item_id`)

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for orders

-- ----------------------------

DROP TABLE IF EXISTS `orders`;

CREATE TABLE `orders` (

`order_code` int(6) NOT NULL AUTO_INCREMENT,

`customer_id` int(6) NOT NULL,

`order_date` date NOT NULL,

`order_details` varchar(150) DEFAULT NULL,

PRIMARY KEY (`order_code`),

KEY `customer_id` (`customer_id`),

CONSTRAINT `customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`customer_id`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for payment

Page 128: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

128    

-- ----------------------------

DROP TABLE IF EXISTS `payment`;

CREATE TABLE `payment` (

`payment_ref` int(6) NOT NULL AUTO_INCREMENT,

`invoice_number` int(6) NOT NULL,

`payment_method_code` varchar(5) NOT NULL,

`payment_date` date NOT NULL,

`amount` decimal(10,0) NOT NULL,

PRIMARY KEY (`payment_ref`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for payment_method

-- ----------------------------

DROP TABLE IF EXISTS `payment_method`;

CREATE TABLE `payment_method` (

`payment_mehod_code` enum('CHEQ','DBTCD','CRDCD','PAYP') NOT NULL DEFAULT 'PAYP',

`p_method_desc` varchar(40) NOT NULL,

`more_info` varchar(100) DEFAULT NULL,

PRIMARY KEY (`payment_mehod_code`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for product_category

-- ----------------------------

DROP TABLE IF EXISTS `product_category`;

CREATE TABLE `product_category` (

`p_cat_code` varchar(5) NOT NULL,

`p_cat_name` varchar(30) NOT NULL,

`p_cat_desc` varchar(100) DEFAULT NULL,

`more_details` varchar(150) DEFAULT NULL,

PRIMARY KEY (`p_cat_code`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Page 129: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

129    

-- ----------------------------

-- Table structure for products

-- ----------------------------

DROP TABLE IF EXISTS `products`;

CREATE TABLE `products` (

`product_code` varchar(5) NOT NULL,

`product_name` varchar(30) NOT NULL,

`product_description` varchar(250) NOT NULL,

`p_cat_code` varchar(5) NOT NULL,

`units_in_stock` int(11) NOT NULL,

`unit_sale_price` decimal(10,0) DEFAULT NULL,

`date_manf` date NOT NULL,

`expiry_date` date NOT NULL,

`serving_sug` varchar(100) DEFAULT NULL,

`p_picture` binary(50) NOT NULL DEFAULT 'Enter product picture name\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',

`nutrional_content` varchar(100) DEFAULT NULL,

PRIMARY KEY (`product_code`),

KEY `product_name` (`product_name`,`unit_sale_price`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------

-- Table structure for recipe

-- ----------------------------

DROP TABLE IF EXISTS `recipe`;

CREATE TABLE `recipe` (

`recipe_ref` int(6) NOT NULL AUTO_INCREMENT,

`product_code` varchar(5) NOT NULL,

`recipe_name` varchar(50) NOT NULL,

`recipe_desc` varchar(2500) NOT NULL,

`recipe_author` varchar(30) DEFAULT NULL,

`date_added` date NOT NULL,

PRIMARY KEY (`recipe_ref`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Page 130: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

130    

-- ----------------------------

-- Records

-- ----------------------------

INSERT INTO `invoice_line` VALUES ('1', '0', '0', '', '3', '1', '0', null);

INSERT INTO `order_items` VALUES ('1', 'dfff', '1', '0', '0', '0', null);

INSERT INTO `products` VALUES ('DFA01', 'Beef Suya', 'Spicy grilled beef. Full african flavour with spicy herbs, chilli', 'DFARI', '18', null, '2010-04-19', '2010-05-28', 'Serve warm, with chilled wine', 'beefsuya.jpg', '5% Fat, 20 % Sugar');

Apendix  B  

PHP  Scripts  

Admin Page

Admin Index PHP Page

<?php

if (!defined('WEB_ROOT')) {

exit;

}

$self = WEB_ROOT . 'admin/index.php';

?>

<html>

<head>

<title><?php echo $pageTitle; ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="<?php echo WEB_ROOT;?>admin/include/admin.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/javascript" src="<?php echo WEB_ROOT;?>library/common.js"></script>

<?php

Page 131: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

131    

$n = count($script);

for ($i = 0; $i < $n; $i++) {

if ($script[$i] != '') {

echo '<script language="JavaScript" type="text/javascript" src="' . WEB_ROOT. 'admin/library/' . $script[$i]. '"></script>';

}

}

?>

</head>

<body>

<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="graybox">

<tr>

<td colspan="2"><img src="<?php echo WEB_ROOT; ?>admin/include/banner-top.gif" width="750" height="75"></td>

</tr>

<tr>

<td width="150" valign="top" class="navArea"><p>&nbsp;</p>

<a href="<?php echo WEB_ROOT; ?>admin/" class="leftnav">Home</a>

<a href="<?php echo WEB_ROOT; ?>admin/category/" class="leftnav">Category</a>

<a href="<?php echo WEB_ROOT; ?>admin/product/" class="leftnav">Product</a>

<a href="<?php echo WEB_ROOT; ?>admin/order/?status=Paid" class="leftnav">Order</a>

<a href="<?php echo WEB_ROOT; ?>admin/config/" class="leftnav">Shop Config</a>

<a href="<?php echo WEB_ROOT; ?>admin/user/" class="leftnav">User</a>

<a href="<?php echo $self; ?>?logout" class="leftnav">Logout</a>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p></td>

<td width="600" valign="top" class="contentArea"><table width="100%" border="0" cellspacing="0" cellpadding="20">

<tr>

<td>

<?php

require_once $content;

?>

</td>

</tr>

Page 132: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

132    

</table></td>

</tr>

</table>

<p>&nbsp;</p>

<p align="center">Copyright &copy; 2010 - <?php echo date('Y'); ?> <a href="www.rhicsgraphics.com"> Chris Nwaigwe</a></p>

</body>

</html

List Current Users

<?php

if (!defined('WEB_ROOT')) {

exit;

}

$sql = "SELECT user_id, user_name, user_regdate, user_last_login

FROM tbl_user

ORDER BY user_name";

$result = dbQuery($sql);

?>

<p>&nbsp;</p>

<form action="processUser.php?action=addUser" method="post" name="frmListUser" id="frmListUser">

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="text">

<tr align="center" id="listTableHeader">

<td>User Name</td>

<td width="120">Register Date</td>

<td width="120">Last login</td>

<td width="120">Change Password</td>

<td width="70">Delete</td>

</tr>

<?php

while($row = dbFetchAssoc($result)) {

Page 133: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

133    

extract($row);

if ($i%2) {

$class = 'row1';

} else {

$class = 'row2';

}

$i += 1;

?>

<tr class="<?php echo $class; ?>">

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

<td width="120" align="center"><?php echo $user_regdate; ?></td>

<td width="120" align="center"><?php echo $user_last_login; ?></td>

<td width="120" align="center"><a href="javascript:changePassword(<?php echo $user_id; ?>);">Change Password</a></td>

<td width="70" align="center"><a href="javascript:deleteUser(<?php echo $user_id; ?>);">Delete</a></td>

</tr>

<?php

} // end while

?>

<tr>

<td colspan="5">&nbsp;</td>

</tr>

<tr>

<td colspan="5" align="right"><input name="btnAddUser" type="button" id="btnAddUser" value="Add User" class="box" onClick="addUser()"></td>

</tr>

</table>

<p>&nbsp;</p>

</form>

Modify Users

Page 134: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

134    

<?php

if (!defined('WEB_ROOT')) {

exit;

}

if (isset($_GET['userId']) && (int)$_GET['userId'] > 0) {

$userId = (int)$_GET['userId'];

} else {

header('Location: index.php');

}

$errorMessage = (isset($_GET['error']) && $_GET['error'] != '') ? $_GET['error'] : '&nbsp;';

$sql = "SELECT user_name

FROM tbl_user

WHERE user_id = $userId";

$result = dbQuery($sql);

extract(dbFetchAssoc($result));

?>

<p class="errorMessage"><?php echo $errorMessage; ?></p>

<form action="processUser.php?action=modify" method="post" enctype="multipart/form-data" name="frmAddUser" id="frmAddUser">

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">

<tr>

<td width="150" class="label">User Name</td>

<td class="content"><input name="txtUserName" type="text" class="box" id="txtUserName" value="<?php echo $user_name; ?>" size="20" maxlength="20">

<input name="hidUserId" type="hidden" id="hidUserId" value="<?php echo $userId; ?>"> </td>

</tr>

<tr>

<td width="150" class="label">Password</td>

<td class="content"> <input name="txtPassword" type="password" class="box" id="txtPassword" size="20" maxlength="20"></td>

Page 135: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

135    

</tr>

</table>

<p align="center">

<input name="btnModifyUser" type="button" id="btnModifyUser" value="Modify User" onClick="checkAddUserForm();" class="box">

&nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="box">

</p>

</form>

Change User Password

<?php

if (!defined('WEB_ROOT')) {

exit;

}

if (isset($_GET['userId']) && (int)$_GET['userId'] > 0) {

$userId = (int)$_GET['userId'];

} else {

header('Location: index.php');

}

$errorMessage = (isset($_GET['error']) && $_GET['error'] != '') ? $_GET['error'] : '&nbsp;';

$sql = "SELECT user_name

FROM tbl_user

WHERE user_id = $userId";

$result = dbQuery($sql);

extract(dbFetchAssoc($result));

?>

<p class="errorMessage"><?php echo $errorMessage; ?></p>

<form action="processUser.php?action=modify" method="post" enctype="multipart/form-data" name="frmAddUser" id="frmAddUser">

Page 136: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

136    

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">

<tr>

<td width="150" class="label">User Name</td>

<td class="content"><input name="txtUserName" type="text" class="box" id="txtUserName" value="<?php echo $user_name; ?>" size="20" maxlength="20">

<input name="hidUserId" type="hidden" id="hidUserId" value="<?php echo $userId; ?>"> </td>

</tr>

<tr>

<td width="150" class="label">Password</td>

<td class="content"> <input name="txtPassword" type="password" class="box" id="txtPassword" size="20" maxlength="20"></td>

</tr>

</table>

<p align="center">

<input name="btnModifyUser" type="button" id="btnModifyUser" value="Modify User" onClick="checkAddUserForm();" class="box">

&nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="box">

</p>

</form>

Add User

<?php

if (!defined('WEB_ROOT')) {

exit;

}

$errorMessage = (isset($_GET['error']) && $_GET['error'] != '') ? $_GET['error'] : '&nbsp;';

?>

<p class="errorMessage"><?php echo $errorMessage; ?></p>

<form action="processUser.php?action=add" method="post" enctype="multipart/form-data" name="frmAddUser" id="frmAddUser">

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">

<tr>

<td width="150" class="label">User Name</td>

<td class="content"> <input name="txtUserName" type="text" class="box" id="txtUserName" size="20" maxlength="20"></td>

Page 137: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

137    

</tr>

<tr>

<td width="150" class="label">Password</td>

<td class="content"> <input name="txtPassword" type="password" class="box" id="txtPassword" value="" size="20" maxlength="20"></td>

</tr>

</table>

<p align="center">

<input name="btnAddUser" type="button" id="btnAddUser" value="Add User" onClick="checkAddUserForm();" class="box">

&nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="box">

</p>

</form>

Javascript User Form Validation

function checkAddUserForm()

{

with (window.document.frmAddUser) {

if (isEmpty(txtUserName, 'Enter user name')) {

return;

} else if (isEmpty(txtPassword, 'Enter password')) {

return;

} else {

submit();

}

}

}

function addUser()

{

window.location.href = 'index.php?view=add';

}

Page 138: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

138    

function changePassword(userId)

{

window.location.href = 'index.php?view=modify&userId=' + userId;

}

function deleteUser(userId)

{

if (confirm('Delete this user?')) {

window.location.href = 'processUser.php?action=delete&userId=' + userId;

}

}

Adding, modifying and viewing Products

// JavaScript Document

function viewProduct()

{

with (window.document.frmListProduct) {

if (cboCategory.selectedIndex == 0) {

window.location.href = 'index.php';

} else {

window.location.href = 'index.php?catId=' + cboCategory.options[cboCategory.selectedIndex].value;

}

}

}

function checkAddProductForm()

{

with (window.document.frmAddProduct) {

if (cboCategory.selectedIndex == 0) {

alert('Choose the product category');

cboCategory.focus();

return;

Page 139: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

139    

} else if (isEmpty(txtName, 'Enter Product name')) {

return;

} else {

submit();

}

}

}

function addProduct(catId)

{

window.location.href = 'index.php?view=add&catId=' + catId;

}

function modifyProduct(productId)

{

window.location.href = 'index.php?view=modify&productCode=' + productCode;

}

function deleteProduct(productId, catId)

{

if (confirm('Delete this product?')) {

window.location.href = 'processProduct.php?action=deleteProduct&productCode=' + productCode + '&catId=' + catId;

}

}

function deleteImage(productId)

{

if (confirm('Delete this image')) {

window.location.href = 'processProduct.php?action=deleteImage&productCode=' + productCode;

}

}

Page 140: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

140    

Order Functions: Viewing Modifying and Deleting Orders:

// JavaScript Document

function viewOrder()

{

statusList = window.document.frmOrderList.cboOrderStatus;

status = statusList.options[statusList.selectedIndex].value;

if (status != '') {

window.location.href = 'index.php?status=' + status;

} else {

window.location.href = 'index.php';

}

}

function modifyOrderStatus(orderId)

{

statusList = window.document.frmOrder.cboOrderStatus;

status = statusList.options[statusList.selectedIndex].value;

window.location.href = 'processOrder.php?action=modify&oid=' + orderId + '&status=' + status;

}

function deleteOrder(orderId)

{

}

Page 141: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

141    

Web Site Functionality PHP Scripts

Customer Registration

<?php // Connects to your Database mysql_connect("localhost", "root") or die(mysql_error()); mysql_select_db("divinefoods") or die(mysql_error()); //This code runs if the form has been submitted if (isset($_POST['submit'])) { //This makes sure they did not leave any fields blank if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) { die('You did not complete all of the required fields'); } // checks if the username is in use if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $usercheck = $_POST['username']; $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); //if the name exists it gives an error if ($check2 != 0) { die('Sorry, the username '.$_POST['username'].' is already in use.'); } // this makes sure both passwords entered match if ($_POST['pass'] != $_POST['pass2']) { die('Your passwords did not match. '); } // here we encrypt the password and add slashes if needed $_POST['pass'] = md5($_POST['pass']); if (!get_magic_quotes_gpc()) { $_POST['pass'] = addslashes($_POST['pass']); $_POST['username'] = addslashes($_POST['username']); } // now we insert it into the database $insert = "INSERT INTO users (username, password) VALUES ('".$_POST['username']."', '".$_POST['pass']."')"; $add_member = mysql_query($insert); ?> <h1>Registered</h1> <p>Thank you, you have registered - you may now login</a>.</p>

Page 142: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

142    

<?php } else { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table border="0"> <tr><td>Username:</td><td> <input type="text" name="username" maxlength="60"> </td></tr> <tr><td>Password:</td><td> <input type="password" name="pass" maxlength="10"> </td></tr> <tr><td>Confirm Password:</td><td> <input type="password" name="pass2" maxlength="10"> </td></tr> <tr><th colspan=2><input type="submit" name="submit" value="Register"></th></tr> </table> </form> <?php } ?>

User Login

//Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: members.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted

Page 143: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

143    

// makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['email'] = addslashes($_POST['email']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That user does not exist in our database. <a href=add.php>Click Here to Register</a>'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.');

}

The Login Page 2 else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); //then redirect them to the members area header("Location: members.php"); } } } else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"> <tr><td colspan=2><h1>Login</h1></td></tr>

Page 144: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

144    

<tr><td>Username:</td><td> <input type="text" name="username" maxlength="40"> </td></tr> <tr><td>Password:</td><td> <input type="password" name="pass" maxlength="50"> </td></tr> <tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Login"> </td></tr> </table> </form> <?php } ?>

Customer Account Area

<?php // Connects to your Database mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); mysql_select_db("Database_Name") or die(mysql_error()); //checks cookies to make sure they are logged in if(isset($_COOKIE['ID_my_site'])) { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { //if the cookie has the wrong password, they are taken to the login page if ($pass != $info['password']) { header("Location: login.php"); } //otherwise they are shown the admin area else { echo "Admin Area<p>"; echo "Your Content<p>"; echo "<a href=logout.php>Logout</a>"; } } } else //if the cookie does not exist, they are taken to the login screen {

Page 145: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

145    

header("Location: login.php"); }

Customer Log Out

<?php $past = time() - 100; //this makes the time in the past to destroy the cookie setcookie(ID_my_site, gone, $past); setcookie(Key_my_site, gone, $past); header("Location: login.php"); ?>

Order Processing

<?php

require_once '../../library/config.php';

require_once '../library/functions.php';

checkUser();

$action = isset($_GET['action']) ? $_GET['action'] : '';

switch ($action) {

case 'modify' :

modifyOrder();

break;

default :

// if action is not defined or unknown

// move to main category page

header('Location: index.php');

}

Page 146: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

146    

function modifyOrder()

{

if (!isset($_GET['oid']) || (int)$_GET['oid'] <= 0

|| !isset($_GET['status']) || $_GET['status'] == '') {

header('Location: index.php');

}

$orderId = (int)$_GET['oid'];

$status = $_GET['status'];

$sql = "UPDATE tbl_order

SET od_status = '$status', od_last_update = NOW()

WHERE od_id = $orderId";

$result = dbQuery($sql);

header("Location: index.php?view=list&status=$status");

}

?>

Page 147: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

147    

Displaying the Product List

<?php

if (!defined('WEB_ROOT')) {

exit;

}

if (isset($_GET['status']) && $_GET['status'] != '') {

$status = $_GET['status'];

$sql2 = " AND od_status = '$status'";

$queryString = "&status=$status";

} else {

$status = '';

$sql2 = '';

$queryString = '';

}

// for paging

// how many rows to show per page

$rowsPerPage = 4;

?>

<p>&nbsp;</p>

<form action="processOrder.php" method="post" name="frmOrderList" id="frmOrderList">

<table width="100%" border="0" cellspacing="0" cellpadding="2" class="text">

<tr align="center">

<td align="right">View</td>

<td width="75"><select name="cboOrderStatus" class="box" id="cboOrderStatus" onChange="viewOrder();">

<option value="" selected>All</option>

<?php echo $orderOption; ?>

</select></td>

</tr>

</table>

Page 148: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

148    

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="text">

<tr align="center" id="listTableHeader">

<td width="60">Order #</td>

<td>Customer Name</td>

<td width="60">Amount</td>

<td width="150">Order Time</td>

<td width="70">Status</td>

</tr>

<?php

$parentId = 0;

if (dbNumRows($result) > 0) {

$i = 0;

while($row = dbFetchAssoc($result)) {

extract($row);

$name = $od_shipping_first_name . ' ' . $od_shipping_last_name;

if ($i%2) {

$class = 'row1';

} else {

$class = 'row2';

}

$i += 1;

?>

<tr class="<?php echo $class; ?>">

<td width="60"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?view=detail&oid=<?php echo $od_id; ?>"><?php echo $od_id; ?></a></td>

<td><?php echo $name ?></td>

<td width="60" align="right"><?php echo displayAmount($od_amount); ?></td>

<td width="150" align="center"><?php echo $od_date; ?></td>

<td width="70" align="center"><?php echo $od_status; ?></td>

</tr>

Page 149: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

149    

<?php

} // end while

?>

<tr>

<td colspan="5" align="center">

<?php

echo $pagingLink;

?></td>

</tr>

<?php

} else {

?>

<tr>

<td colspan="5" align="center">No Orders Found </td>

</tr>

<?php

}

?>

</table>

<p>&nbsp;</p>

</form>

Paypal Payment Script

<?php

// this page only process a POST from paypal website

// so make sure that the one requesting this page comes

// from paypal. we can do this by checking the remote address

// the IP must begin with 66.135.197.

if (strpos($_SERVER['REMOTE_ADDR'], '66.135.197.') === false) {

exit;

}

Page 150: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

150    

require_once './paypal.inc.php';

// repost the variables we get to paypal site

// for validation purpose

$result = fsockPost($paypal['url'], $_POST);

//check the ipn result received back from paypal

if (eregi("VERIFIED", $result)) {

require_once '../../library/config.php';

// check that the invoice has not been previously processed

$sql = "SELECT od_status

FROM tbl_order

WHERE od_id = {$_POST['invoice']}";

$result = dbQuery($sql);

// if no invoice with such number is found, exit

if (dbNumRows($result) == 0) {

exit;

} else {

$row = dbFetchAssoc($result);

// process this order only if the status is still 'New'

if ($row['od_status'] !== 'New') {

exit;

} else {

// check that the buyer sent the right amount of money

$sql = "SELECT SUM(pd_price * od_qty) AS subtotal

FROM tbl_order_item oi, tbl_product p

Page 151: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

151    

WHERE oi.od_id = {$_POST['invoice']} AND oi.pd_id = p.pd_id

GROUP by oi.od_id";

$result = dbQuery($sql);

$row = dbFetchAssoc($result);

$subTotal = $row['subtotal'];

$total = $subTotal + $shopConfig['shippingCost'];

if ($_POST['payment_gross'] != $total) {

exit;

} else {

$invoice = $_POST['invoice'];

$memo = $_POST['memo'];

if (!get_magic_quotes_gpc()) {

$memo = addslashes($memo);

}

// ok, so this order looks perfectly okay

// now we can update the order status to 'Paid'

// update the memo too

$sql = "UPDATE tbl_order

SET od_status = 'Paid', od_memo = '$memo', od_last_update = NOW()

WHERE od_id = $invoice";

$result = dbQuery($sql);

}

}

}

} else {

exit;

}

Page 152: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

152    

?>

Shopping Cart Functions

<?php

require_once 'config.php';

function addToCart()

{

// make sure the product id exist

if (isset($_GET['p']) && (int)$_GET['p'] > 0) {

$productId = (int)$_GET['p'];

} else {

header('Location: index.php');

}

// does the product exist ?

$sql = "SELECT pd_id, pd_qty

FROM tbl_product

WHERE pd_id = $productId";

$result = dbQuery($sql);

if (dbNumRows($result) != 1) {

// the product doesn't exist

header('Location: cart.php');

} else {

// how many of this product we

// have in stock

$row = dbFetchAssoc($result);

$currentStock = $row['pd_qty'];

if ($currentStock == 0) {

// we no longer have this product in stock

// show the error message

setError('The product you requested is no longer in stock');

Page 153: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

153    

header('Location: cart.php');

exit;

}

}

// current session id

$sid = session_id();

// check if the product is already

// in cart table for this session

$sql = "SELECT pd_id

FROM tbl_cart

WHERE pd_id = $productId AND ct_session_id = '$sid'";

$result = dbQuery($sql);

if (dbNumRows($result) == 0) {

// put the product in cart table

$sql = "INSERT INTO tbl_cart (pd_id, ct_qty, ct_session_id, ct_date)

VALUES ($productId, 1, '$sid', NOW())";

$result = dbQuery($sql);

} else {

// update product quantity in cart table

$sql = "UPDATE tbl_cart

SET ct_qty = ct_qty + 1

WHERE ct_session_id = '$sid' AND pd_id = $productId";

$result = dbQuery($sql);

}

// an extra job for us here is to remove abandoned carts.

// right now the best option is to call this function here

deleteAbandonedCart();

Page 154: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

154    

header('Location: ' . $_SESSION['shop_return_url']);

}

/*

Get all item in current session

from shopping cart table

*/

function getCartContent()

{

$cartContent = array();

$sid = session_id();

$sql = "SELECT ct_id, ct.pd_id, ct_qty, pd_name, pd_price, pd_thumbnail, pd.cat_id

FROM tbl_cart ct, tbl_product pd, tbl_category cat

WHERE ct_session_id = '$sid' AND ct.pd_id = pd.pd_id AND cat.cat_id = pd.cat_id";

$result = dbQuery($sql);

while ($row = dbFetchAssoc($result)) {

if ($row['pd_thumbnail']) {

$row['pd_thumbnail'] = WEB_ROOT . 'images/product/' . $row['pd_thumbnail'];

} else {

$row['pd_thumbnail'] = WEB_ROOT . 'images/no-image-small.png';

}

$cartContent[] = $row;

}

return $cartContent;

}

/*

Remove an item from the cart

*/

function deleteFromCart($cartId = 0)

Page 155: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

155    

{

if (!$cartId && isset($_GET['cid']) && (int)$_GET['cid'] > 0) {

$cartId = (int)$_GET['cid'];

}

if ($cartId) {

$sql = "DELETE FROM tbl_cart

WHERE ct_id = $cartId";

$result = dbQuery($sql);

}

header('Location: cart.php');

}

/*

Update item quantity in shopping cart

*/

function updateCart()

{

$cartId = $_POST['hidCartId'];

$productId = $_POST['hidProductId'];

$itemQty = $_POST['txtQty'];

$numItem = count($itemQty);

$numDeleted = 0;

$notice = '';

for ($i = 0; $i < $numItem; $i++) {

$newQty = (int)$itemQty[$i];

if ($newQty < 1) {

// remove this item from shopping cart

deleteFromCart($cartId[$i]);

$numDeleted += 1;

} else {

Page 156: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

156    

// check current stock

$sql = "SELECT pd_name, pd_qty

FROM tbl_product

WHERE pd_id = {$productId[$i]}";

$result = dbQuery($sql);

$row = dbFetchAssoc($result);

if ($newQty > $row['pd_qty']) {

// we only have this much in stock

$newQty = $row['pd_qty'];

// if the customer put more than

// we have in stock, give a notice

if ($row['pd_qty'] > 0) {

setError('The quantity you have requested is more than we currently have in stock. The number available is indicated in the &quot;Quantity&quot; box. ');

} else {

// the product is no longer in stock

setError('Sorry, but the product you want (' . $row['pd_name'] . ') is no longer in stock');

// remove this item from shopping cart

deleteFromCart($cartId[$i]);

$numDeleted += 1;

}

}

// update product quantity

$sql = "UPDATE tbl_cart

SET ct_qty = $newQty

WHERE ct_id = {$cartId[$i]}";

dbQuery($sql);

}

}

Page 157: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

157    

if ($numDeleted == $numItem) {

// if all item deleted return to the last page that

// the customer visited before going to shopping cart

header("Location: $returnUrl" . $_SESSION['shop_return_url']);

} else {

header('Location: cart.php');

}

exit;

}

function isCartEmpty()

{

$isEmpty = false;

$sid = session_id();

$sql = "SELECT ct_id

FROM tbl_cart ct

WHERE ct_session_id = '$sid'";

$result = dbQuery($sql);

if (dbNumRows($result) == 0) {

$isEmpty = true;

}

return $isEmpty;

}

/*

Delete all cart entries older than one day

*/

function deleteAbandonedCart()

Page 158: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

158    

{

$yesterday = date('Y-m-d H:i:s', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));

$sql = "DELETE FROM tbl_cart

WHERE ct_date < '$yesterday'";

dbQuery($sql);

}

?>

Connecting to the database

<?php

require_once 'config.php';

$dbConn = mysql_connect ($localhost, $dbroot,) or die ('MySQL connect failed. ' . mysql_error());

mysql_select_db($divinefoods) or die('Cannot select database. ' . mysql_error());

function dbQuery($sql)

{

$result = mysql_query($sql) or die(mysql_error());

return $result;

}

function dbAffectedRows()

{

global $dbConn;

return mysql_affected_rows($dbConn);

}

function dbFetchArray($result, $resultType = MYSQL_NUM) {

return mysql_fetch_array($result, $resultType);

}

Page 159: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

159    

function dbFetchAssoc($result)

{

return mysql_fetch_assoc($result);

}

function dbFetchRow($result)

{

return mysql_fetch_row($result);

}

function dbFreeResult($result)

{

return mysql_free_result($result);

}

function dbNumRows($result)

{

return mysql_num_rows($result);

}

function dbSelect($dbName)

{

return mysql_select_db($dbName);

}

function dbInsertId()

{

return mysql_insert_id();

}

?>

Divine Foods e-Commerce website CSS style sheet

Page 160: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

160    

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Divine Foods Online | African foods online</title>

<style type="text/css" media="all">

<!--

body {

background-color: #323232;

margin:0px;

padding:0px;

font-size: 100%;

}

.leftbarlinks {

font-size: 90%;

color: #400000;

text-decoration: none;

background-color: #FFC;

text-indent: 50px;

height: 311px;

width: 230px;

margin-top: 6px;

padding-top: 6px;

}

.p {

margin:0px;

padding:0px;

font-size: inherit;

font-family: inherit;

font-weight: inherit;

text-align: inherit;

color: inherit;

Page 161: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

161    

line-height: inherit;

vertical-align: top;

}

p {

padding-top:0px;

margin-top:0px;

}

img {

border:0px;

}

div {

margin:0px;

padding:0px;

font-family:verdana; font-size:12px;

}

.AbsWrap {

width: 100%;

position: relative;

}

.rowWrap {

width: 100%;

}

.clearfloat {

clear:both;

height:0px;

}

a:link, a:visited{

COLOR:inherit;

text-decoration:inherit;

}

#main {

width:1024px;

margin: 0px auto 0px auto;

border: 0px solid #f0f0f0;

Page 162: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

162    

background-image: url(images/bg_home.gif);

}

#home_r1_c1 {

margin-left:0px;

margin-top:0px;

width:1024px;

height:169px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r8_c2 {

margin-left:18px;

margin-top:314px;

width:2px;

height:270px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r5_c3 {

margin-left:0px;

margin-top:310px;

width:234px;

height:275px;

margin-bottom:0px;

float:left;

display:inline;

}

.sidebarlinks {

}

#colwrap1 {

float:left;

Page 163: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

163    

width:577px;

margin-top:0px;

margin-left:0px;

border: 0px solid #f0f0f0;

}

#home_r4_c4 {

margin-left:0px;

margin-top:5px;

width:576px;

height:291px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r7_c4 {

margin-left:0px;

margin-top:0px;

width:576px;

height:194px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r10_c5 {

margin-left:25px;

margin-top:17px;

width:552px;

height:51px;

margin-bottom:0px;

float:left;

display:inline;

Page 164: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

164    

}

#colwrap2 {

float:left;

width:180px;

margin-top:0px;

margin-left:0px;

border: 0px solid #f0f0f0;

}

#home_r3_c7 {

margin-left:0px;

margin-top:4px;

width:131px;

height:38px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r6_c7 {

margin-left:0px;

margin-top:0px;

width:180px;

height:542px;

margin-bottom:0px;

float:left;

display:inline;

}

#home_r12_c1 {

margin-left:0px;

margin-top:0px;

width:1024px;

Page 165: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

165    

height:50px;

margin-bottom:0px;

float:left;

display:inline;

}

#nav {

font-size: 100%;

line-height: 30px;

font-weight: bold;

text-transform: uppercase;

color: #fff;

background-color: #FFF;

text-indent: 70px;

width: 1024px;

padding-bottom: 0px;

border-bottom-width: medium;

border-bottom-style: outset;

border-bottom-color: #004269;

background-image: url(images/nav.jpg);

height: 200px;

}

#nav a {

color: #FFF;

text-decoration: none;

}

.seperator {

color: #323232;

}

-->

</style>

<!--[if IE]>

Page 166: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

166    

<style type="text/css" media="all">.borderitem {border-style:solid;}</style>

<![endif]-->

</head>

<body bgcolor="#E8B57B" text="#240000" link="#0000CC" vlink="#CC0033">

<div id="main">

<img src="images/header2.jpg" alt="" height="167" id="home_r1_c1" />

<div id="nav">HOME <span class="seperator">-- ---</span> ABOUT US <span class="seperator">---- - -</span> PRODUCTS <span class="seperator">- - - -</span> SPECIAL OFFERS <span class="seperator">--- --</span> FREE RECIPES <span class="seperator">--- --</span> MY ACCOUNT <span class="seperator">--- ---</span> MORE SERVICES </div>

<br class="clearfloat" />

<img src="images/home_r8_c2.png" id="home_r8_c2" alt="" />

<img src="images/adspace_home.gif" id="home_r5_c3" alt="" />

<div id="colwrap1"><img src="images/foodsplash_home.png" alt="" name="splashmiddle" id="home_r4_c4" /><img src="images/home_r7_c4.gif" id="home_r7_c4" alt="" /><img src="images/facebook_twitter_box.gif" id="home_r10_c5" alt="" /><img src="images/twitterbtn_home.png" width="60" height="49" /></div>

<div id="colwrap2"><img src="images/home_r3_c7.png" id="home_r3_c7" alt="" /><br class="clearfloat" />

<img src="images/home_r6_c7.jpg" id="home_r6_c7" alt="" />

<br class="clearfloat" />

</div>

<img src="images/home_r12_c1.jpg" id="home_r12_c1" alt="" />

<br class="clearfloat" />

</div>

</body>

</html>

Page 167: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

167    

Appendix  C  

Picture  Formats  Used  

• GIF: This acronym stands for Graphics Interchange Format. GIF files are the best choice for images that contain continuous tones, without a lot of color changes or gradients. Solid colors, text, and vector graphics look good exported as GIF files. GIF files support transparency. You can also export an animation that contains a series of states (frames) as an animated GIF. When exporting files in the GIF format, you can reduce the file size by reducing the number of colors used in an image.

• JPEG: This acronym stands for Joint Photographic Experts Group. The JPEG format is best used for pixel-based image content that is photo realistic, such as photos taken with a digital camera. JPEG files do not support transparency. When you export JPEG files, the degree of compression can be adjusted by selecting the level of quality, which allows you to find a good balance between file size and image quality. Files exported in the JPEG format are compressed and lose some of their original image information, which cannot be restored (and sometimes results in artifacts and lower image quality.) However, when you export files as JPEG, the codec typically achieves 10:1 compression with little perceptible loss in quality.

• PNG: This acronym stands for Portable Network Graphics PNG files are a bit newer than GIF and JPEG formats, so their display is not supported in older browsers. PNG files offer the crisp photo-realism of JPEG files, with the added advantage of supporting transparency. Logos and high-quality photographic images are usually best when exported to the PNG format. Unlike JPEG files, files exported in the PNG format use lossless data compression, which means the exact original data can be reconstructed from previously compressed data. It's important to note that there's a difference between PNG files created in Fireworks (which contain the document's editable data, layers, text, and so on) versus PNG files that are exported from other programs (which contain only the image data and are not editable).

Page 168: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

168    

Appendix  D  

DFs  user  questionnaire/survey  questions    

Q1. Which system of operation do you use currently use?

Q2. How satisfied are you with your current system?

Very

Unsatisfied

Unsatisfied Neutral Satisfied Very Satisfied

❏ ❏ ❏ ❏ ❏

Q3. How well does your system satisfy your needs in terms of: ? (If necessary give details in Q9?)

Excellent Good Average Poor Very poor

Data entry? ❏ ❏ ❏ ❏ ❏

Retrieving data? ❏ ❏ ❏ ❏ ❏

General user friendliness ❏ ❏ ❏ ❏ ❏

Q4. Based on your system, what are your views on the following: (If necessary give details in Q9?)

Excellent Good Average Poor Very Poor

Adequacy of data? ❏ ❏ ❏ ❏ ❏

Relevance of data? ❏ ❏ ❏ ❏ ❏

Links with other databases/system? ❏ ❏ ❏ ❏ ❏

❏ ❏ ❏ ❏ ❏

Q5. How does your system contribute to your productivity in terms of: (If necessary give details in Q9?)

Excellent Good Average Poor Very poor

Accuracy ❏ ❏ ❏ ❏ ❏

Page 169: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

169    

Timeliness ❏ ❏ ❏ ❏ ❏

Q6. On selecting a new system, please rank the importance of the following: (If necessary give details in Q9)

Very important Important Not important

Cost ❏ ❏ ❏

Functionality ❏ ❏ ❏

Usability/User friendliness ❏ ❏ ❏

Q7. Please rank the causes of errors and problems encountered while using your system: (If necessary give details in Q9)

High Low

System complexity ❏ ❏

Links with other systems ❏ ❏

Other users (possibly as a result of lack of set standards) ❏ ❏

Q8. Please highlight any requirements from the e-commerce system that will enhance your business

Q9. If Necessary please elaborate on your answers from Q2 to Q7

Page 170: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

170    

Q10. Do you feel this survey was adequate? If not please highlight other issues not captured by the survey, with possible

solutions

Page 171: E-COMMERCE SYSTEM ANALYSIS, DESIGN AND DEVELOPMENT

171    

Appendix  E  

Log  Book  

Please refer to attached copies of the personal log book