You are on page 1of 125

MY BOOK CART

1

Abstract
Its a thing of massive gratification for us to present this Second Year Project Report on the
project MY BOOK CART.
Information Technology adoption is on the rise and recent technological innovation have
dramatically enhanced the capability of the organization performance leveraging the power
of these technologies , various business sectors are working together to offer a wide array
of services internal as well as external to the organization.
My Book Cart is a web based e-commerce application to support Environment
sustainability by selling used books. MY Book Cart is based on idea to understand what
customers want: Fair price quotes, fast payment, good communication, excellent customer
service, and an easy to use website. By buying and selling used books My Book card will
help to prevent waste and to protect our environment.
My Book cart provides the Customers with better and more efficient means of managing
land utilization and keeping a record of books. Technologies such as PHP: Hypertext
Preprocessor(a server-side scripting language designed for Web development but also used
as a general-purpose programming language) and HTML(HyperText Markup Language),
CSS(Cascading Style sheet), Java Script and WampServer have been used in building
this application.
My Book cart has several advantages and it could be of immense help customers as it can
provide Effective Performance and Greater Economic Efficiency, improved and Secured
Business Transaction, Customers can check for order history, Wish list and Newsletters.
Also, Users can create their account for shopping as well as for making their own online
library and check for book publishers and read & write review comments.
Like any other application My Book Cart has a great scope of evolving in the future. The
application will also have a desktop widget which will show the current status of the book
on the desktop to prevent frequent login. Also a mobile version of the application is
proposed which would run on Windows Mobile platform which would enhance the
portability as well as flexibility.






Acknowledgement
MY BOOK CART
2

Presenting a Second Year project of this type is an arduous task, demanding a lot of time.
I cannot in full measure reciprocate the kindness shown and contribution made by various
persons in this endeavour. I will remember all of them with gratitude.
My sincere thanks towards Ms. for giving me a chance to take this project and for her
valuable guidance, which helped me on all those points, which I needed to include in, with
full intensity, for her significant support extended for the successful completion of the
project.
I am extremely gratified to Mr., who was extremely helpful in offering his professional
expertise and bestowing me practical knowledge in all the field which are required and
related to this project.
I am always beholden to my God, for always being with me and showing me the right ways,
my family members, for always doing favours to me and my friends and colleagues
consistently helped with encouragement and criticism throughout the project work, for
always lifting my sights to higher vision, raising my personality beyond normal limitation
and for realizing me my strengths and potential, especially my brother, as I did not always
welcome his exhortation, try again; you can do better. But this project owes a great deal to
it and so do I.

















Table of Contents
MY BOOK CART
3

CHAPTERS Page
No.
Remarks
CHAPTER 1: INTRODUCTION 10
1.1 Background 10
1.2 Objectives 10
1.3 Purpose, scope and Applicability 10
1.3.1 Purpose 10
1.3.2 Scope 11
1.3.3 Applicability 11
1.4 Achievements 11
1.5 Organization of Report

CHAPTER 2: SURVEY OF TECHNOLOGIES 12

CHAPTER 3: REQUIREMENTS AND ANALYSIS 13
3.1 Problem Definition 13
3.2 Requirement Specification 13
3.3 Planning and Scheduling 14
3.4 Software and Hardware Requirements 15
3.5 Preliminary Product Description 15
3.6 Conceptual Models 17

CHAPTER 4: SYSTEM DESIGN 28
4.1 Basic Modules 28
4.2 Data Design 29
4.2.1 Schema Design 29
4.2.2 Data Integrity and Constraints 31
4.3 Procedural Design 32
4.3.1 Login Diagrams 32
4.3.2 Data Structures 33
4.3.3 Algorithm Design 33
4.4 User interface design 34
4.5 Security Issues 39
4.6 Test case Design 41

CHAPTER 5: IMPLEMENTATION AND TESTING 46
5.1 Implementation Approaches 46
5.2 Coding Details and Code Efficiency 47
5.2.1 Code Efficiency 101
5.3 Testing Approach 103
5.3.1 Unit Testing 103
5.3.2 Integration Testing 115
5.4 Modification and Improvements 121
CHAPTERS Page
No.
Remarks
MY BOOK CART
4

CHAPTER 6: RESULT AND DISCUSSION 122
6.1 Test Reports 122
6.2 User Documentation 123

CHAPTER 7: CONCLUSION 124
7.1 Conclusion 125
7.2 Limitation of the System 125
7.3 Future Scope of the Project 125

References 126

Glossary 127

Appendix A 128

Appendix B 130

























Table of Figures
MY BOOK CART
5


CHAPTERS Page
No
Remarks
CHAPTER 3: REQUIREMENTS AND ANALYSIS 14
1. Gantt Chart 15
2. DFD (0 Level) 18
3. DFD (1 Level) 19
4. DFD (2 Level) 20
5. Class Diagram 21
6. Use Case Diagram 22
7. ER Diagram 24
8. Collaboration Diagram 25
9. Activity Diagram 27

CHAPTER 4: SYSTEM DESIGN 28
10. Schema Design 31
11. Procedural Design 33
12. Home Page 34
13. Login /Create Account Page 35
14. Check out Page 36
15. Register Account Page 37
16. . Admin Login Page 38

CHAPTER 5: IMPLEMENTATION AND TESTING 46
17. Waterfall Model 46










CHAPTER 1: INTRODUCTION
MY BOOK CART
6

1.1 Background
Information Technology adoption is on the rise and recent technological innovation have
dramatically enhanced the capability of the organization performance leveraging the power
of these technologies , various business sectors are working together to offer a wide array
of services internal as well as external to the organization.
In this growing world, everyone wants to the access of knowledge and books play an
important role. However, books are help for us but making of books cost negative effects on
environment. Hence, My Book cart application is ac challenge for us because the idea
behind scene is to help not only human being but also environment.
1.2 Objectives

My Book Cart is a web based e-commerce application to support Environment sustainability
by selling used books. MY Book Cart is based on idea to understand what customers want:
Fair price qotes, fast payment, good communication, excellent customer service, and an easy
to use website. By buying and selling used books My Book card will help to prevent waste
and to protect our environment.
1.3 Purpose, scope and Applicability
1.3.1 Purpose
Our proposed solution to the problem is to provide the Book readers or sellers with better
and more efficient means of managing, marketing and keeping a record of books online.
MyBookcart is based on e-commerce where customer can sell any kind of books in more
economic and efficient way. Moreover, It will help customers and users to do improved and
secured business transactions.
1.3.2 Scope
Like any other application My Book Cart has a great scope of evolving in the future. The
application will also have a desktop widget which will show the current status of the book
on the desktop to prevent frequent login. Also a mobile version of the application is
proposed which would run on Windows Mobile platform which would enhance the
portability as well as flexibility.


1.3.3 Applicability
My Book cart is a web application followed by e-commerce principal. We have to
PHP,Html, Javascript and CSS to design user friendly web pages. Our application uses
Sqlite to store databases. Currently, there is no url for our website so we are using Apache to
MY BOOK CART
7

run application on server. There is admin page which maintain and track all the activities
like uploading and deleting details of upcoming or old books and tracking the product,
customer details, sales details and review comment by customer. If users or customers want
to purchase any book then it is necessary to have an account in MY Book Cart. If users or
customers wont have any account on MY Book Cart then they get information about books
but cannot by it. This feature is implemented from the security prospects.
1.4 Achievements
My Book cart provides the Customers with better and more efficient means of managing
land utilization and keeping a record of books. Technologies such as PHP: Hypertext
Preprocessor(a server-side scripting language designed for Web development but also used
as a general-purpose programming language) and HTML(HyperText Markup Language),
CSS(Cascading Style sheet), Java Script and WampServer have been used in building
this application. I got know about how data is fetched form Server and how server based
application works. Moreover, I was working on a completely new platform to implement
new idea. Successfully completing my idea is a biggest achievement for me.
1.4 Organization of Report

This is project report contains information regarding My Book Cart Application. Report has
covered all the points as how do we getidea of implementing My Book Cart application.
Hardware and software requirement for implement and running web application followed by
use case diagrams, class diagrams, E-R diagram, Activity diagram and Collaboration
diagram. Moreover, project report has also covered unit and integration test cases which are
run during testing of application to ensure the quality. At the end of report, appendix and
reference books & site are added which were used during coding and implementation of
application.








CHAPTER 2: SURVEY OF TECHNOLGIES

My Book cart is based on MVC (Model- View- Controller) architecture.The information is
presented through a rich user interface experience, using
PHP (at least 5.2)
MY BOOK CART
8

HTML
Java sript
CSS

PHP :
PHP stands for PHP: Hypertext Preprocessor
PHP is a widely-used, open source scripting language
PHP scripts are executed on the server
PHP is free to download and use
HTML:
HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is a markup language
A markup language is a set of markup tags
The tags describe document content
HTML documents contain HTML tags and plain text
HTML documents are also called web pages
JAVA SCRIPT :
A scripting language is a lightweight programming language.
JavaScript is programming code that can be inserted into HTML pages.
JavaScript inserted into HTML pages, can be executed by all modern web browsers.
CSS:
CSS stands for Cascading Style Sheets
Styles define how to display HTML elements
Styles were added to HTML 4.0 to solve a problem
External Style Sheets can save a lot of work
External Style Sheets are stored in CSS files

CHAPTER 3: REQUIREMENTS AND ANALYSIS

3.1 Problem Definition

The theme that we have opted for is Web based centralized system. The main objective of
making MyBookcart is to provide a platform to customers where they can experience a
MY BOOK CART
9

effective performance of selling books to anyone followed by improved business
transactions.

3.2 Requirement Specification

My Book cart provides the Customers with better and more efficient means of online book
shopping and wide range of books from all over the world. Technologies such as PHP:
Hypertext Preprocessor(a server-side scripting language designed for Web development
but also used as a general-purpose programming language) and HTML(HyperText
Markup Language), CSS(Cascading Style sheet), Java Script and WampServer have
been used in building this application. Main requirements involve :
1. Design of Admin apge
2. Design of Home page
Admin page will cover all the aspect like managing, maintenances as well as flow of selling
of books. While Home page will involve interaction with user in user friendly manner and
home page will cover all the aspects such as My Account, Information, Extras and Customer
Services.














3.3 Planning and Scheduling

GANTT CHARTS


No. Of Days
0 10 20
30 40 50
MY BOOK CART
10


Fig 1. Gantt Chart



3.4 Software and Hardware Requirements
Hardware Used
1. Intel Core 2 Quad Q9550,E0 revision
2. 4 GB PC2-6400 800Mhz RAM
3. 500 GB Hard disk drive
Task
MY BOOK CART
11

Software Requirements
1. Windows 7 Ultimate
2. IE8/Firefox/Safari
3. Web Server (preferably Apache)
4. PHP (at least 5.2)
5. MySQL
6. Curl

3.5 Preliminary Product Description

We indulged ourselves into a lot of research before we started the actual work on the My
Book Cart Application. We Studied about the different kinds of web designing tools and
scripting languages as PHP, HTML, CSS, and Javascript, that were needed to build our
application.
My Book Cart is a web based e-commerce application to support Environment
sustainability by selling used books. My Book Cart is based on idea to understand what
customers want: Fair price quotes, fast payment, good communication, excellent customer
service, and an easy to use website. By buying and selling used books My Book card will
help to prevent waste and to protect our environment.

Common Tasks:-

Major functions and operations of My Book Cart are as follows:-
1. AdminLogin Page.
2. Basic home screen
3. Information page
4. My Account
5. Shopping list
6. Extras and /customer list
7. Mobile Version
8. Desktop Widget
Our study showed us that it would be really difficult for us to develop a My Book cart with
all features due to the time constraint as well as provide facility of e-commerce because for
e-commerce, admin requires internet certifications,. The functionality that we were going to
implement in our My Book cart Application are home screen and admin page, mobile
simulator for using application on mobile and desktop widget.




MY BOOK CART
12

3.6 Conceptual Models

DATA FLOW DIAGRAM

1. Data Flow

An arrow represents data flow; it represents the path over which data travels in the system?
A data flow can move between processes, flow into or out of data stores, to and from
external entities.


2. Bubbles (Process)

A circle or bubble represents that transforms data from once form to another by performing
some tasks with the data.


3. Data store

A data store is a place where data is held temporarily from one transaction to the next or is
stored permanently.


4. Entity

External Entity symbol represents sources of data to the system or destinations of data from
the system














MY BOOK CART
13

Context Level Diagram ( 0 Level DFD)






















Fig 2. DFD (0 Level)
















Customer/Guest
user

MY
BOOK
CART

Admin
Select Books and add to
wish list
Add selected books to
cart and checkout
Fetch user information
and manage database
Update and Add new
books information such
as prices list etc.
MY BOOK CART
14

Level 1 DFD





































Fig 3. DFD (1 Level)

Book
Information
Select and Buy
books
Customer/Guest
user

Go to
Home
Page
Select and
buy books
from list
Login/
create an
account
Logs in website Select books
Direct Login
Search
Books/
Informatio
n
Search text
My
Account
Login
Save Login
Information
See own account
My account
Information
Admin
Book cart database
See own account
See own account
Edit
Account
Information

Logout
Edit password, view order
history, your transactions etc.
Exit
Select search result
MY BOOK CART
15

Level 2 DFD






































Fig 4. DFD (2 Level)
Book
Information
Admin
See own account
Edit
Account
Information
Edit password, view order
history, your transactions etc.
Exit
Select search result
Select books
Registered User

Go to
Home
Page
Create
account


Login
Logs in website Register
Direct Login
Search
Books/
Informatio
n
Search text
My
Account
Login
Save sales
information
See own account
My account
Information
Check
out
See own account
Add
Book to
wish list
Buy books
Make
Payment
Payment gateway
Exit
Buy books from cart
Add/Update
Book
Information
Edit
Update internally
Sales
/Order
Account
Maintains
Exit
Logout
Book cart database
Guest User

Register
Logs in website

MY BOOK CART
16

CLASS DIAGRAM

A class diagram is used to support functional requirement of system. The class diagram used
to model the vocabulary of the system.







Fig 5. Class Diagram







MY BOOK CART
17

USE CASE DIAGRAM

A use case shows a set of use cases, actors and their relationship. The use case diagram
make system and classes approachable by presenting an outside view of how the elements
may be used in context.


































Fig 6. Use Case Diagram




Admin
General User
Registered User
Home Screen
Shopping cart
My Account
Information
Shopping cart
Wish List
Review/Comment
Order History
Customer Service
Extras
<<include >>
<<include >>
MY BOOK CART
18


E-R DIAGRAM

1. Entity


Entity has a set of attribute whose value is uniquely, identify the entity or distinguish
the entityfrom the other thingor entity in the world.


2. Attribute

Are used to difinean entity that is the propertythat discribe an entity.
That is the properly that describean entity.


3. Relationship


Is asscoiation among different/several,entites. It connect to one or more entittes.

4. Derived Attribute


Any attribute which is derived from the relationship is called derived attribute.

5. Cardinality

Cardinality refers to the multiplicity of the entities. How many entity are actually engaged in
the relationship

Types of cardinality:-
1. Many to 1
2. 1 to 1
3. 1 to Many
4. Many to Many








MY BOOK CART
19







































Fig 7. ER Diagram

Shopping
Cart

Order History
Wish List
Check
out
Books
Book Name
Price
Maintains
Information
Admin
Registered
User

Account
Logins
Search
Customers
Maintains
Statistics
Username
Password
FName
Email
LName
Sales Info
Order Info
Account
Info
Add and
update
Catalogs
Books
Categories
Attributes
Choose
from
Username
Information
Book ID
1
M
M
N
1
M




1
M
1
N
M
N
1
M
MY BOOK CART
20

COLLABORATION DIAGRAM

A collaboration diagram describes interactions among objects in terms of sequenced
messages.




































Fig 8. Collaboration Diagram
Application
ADMIN Login
Statistics
Home page
Information
Extras
My Account
Customer service
Wish list
Order history
Shopping cart
Review/comment




Admin
General User
Registered User
MY BOOK CART
21


ACTIVITY CLASS DIAGRAM

Activity diagrams are graphical representations of workflows of stepwise activities and
actions with support for choice, iteration and concurrency.






















Enter User name
(U)and Password(P)
Login
Page
Invalid user
name and
Password
If U=PS3 &
P=auupnoida
If Registered
Useer
My Account Information Extras Customer
Service
Shopping cart
Wish List
Add to cart
Review
Comment
If U=PS3 &
P=auupnoida
N
N
Y
MY BOOK CART
22






































Fig 9. Activity Diagram

My Account Information Extras Customer
Service
Login page
for
unregistered
user
About us,
Delivery
informatio
n for
unregistere
d user
Home
screen
If information
is selected
If Extras is
selected
If My account
is selected
Delivery
infor and
policy for
registered
user
Options will
be displayed
Wish list,
Oder
History,My
account
details will
be
displayed
N N
N
Y
Y
Y
Y
Y
Y
STOP
MY BOOK CART
23

CHAPTER 4: SYSTEM DESIGN

4.1 Basic Modules

5. About My Book Cart.
My Book Cart is a web based e-commerce application to support Environment
sustainability by selling used books. MY Book Cart is based on idea to understand what
customers want: Fair price quotes, fast payment, good communication, excellent customer
service, and an easy to use website. By buying and selling used books
6. Login of Administrator.
Administrator module is responsible for managing sales, orders, transactions done by
customers. By means of this admin can evaluate total sales and eventually profit drawn from
the website which makes the website economical and profitable.
7. Login of Registered User.
A registered user can search books, add books to wish list, select books from wish list and
add to shopping cart, checkout books from cart and make order and payment of books
through Book Cart
8. Register of new account.
New User can save own information by means of database of website so that users identity
is kept protected for secure browsing and buying.
9. My account information.
My account information alloes user to edit own information and shop in the website using a
secure ID for ensuring privacy and avoiding theft activities.
10. Search of book list by keyword.
By searching user can shortlist the useful books and select from the search result.
11. Management of wish list by registered user.
Wish list comprises of one more round of shortlisting of books from various modules
available in the website


MY BOOK CART
24

12. Management of wish list by guest user.
Wish list comprises of one more round of shortlisting of books from various modules
available in the website. The best thing is that you need not be registered to select books and
add to wish list.
13. Management of shopping cart by registered user.
Shopping cart lists the books selected to buy by the user.
14. Management of shopping cart by guest user.
Shopping cart lists the books selected to buy by the user. One needs to register to buy a
book.
15. Check out of books from shopping cart.
Check out functionality is to buy selected books from the cart after successful regsiteration.
16. Logout of registered user.
For a secure connection and browsing, exit functionality is implemented.

4.2 Data Design
Designing data is about discovering and completely defining your application's data
characteristics and processes.

4.2.1 Schema Design

OC_Affiliate
Firstname varchar(32)
Lastname varchar(32)
Email varchar(96)
Telephone varchar(32)
Fax varchar(32)
Password varchar(40)
Salt varchar(9)
Company varchar(32)
Website varchar(255)
address_1 varchar(128)
address_2 varchar(128)
MY BOOK CART
25

City varchar(128)
Postcode varchar(10)
country_id int(11)
zone_id int(11)
Code varchar(64)
Commission decimal(4,2)
Tax varchar(64)
Payment varchar(6)
Cheque varchar(100)
Paypal varchar(64)
bank_name varchar(64)
bank_branch_number varchar(64)
bank_swift_code varchar(64)
bank_account_name varchar(64)
bank_account_number varchar(64)
Ip varchar(40)
Status tinyint(1)
Approved tinyint(1)
date_added datetime

OC_Order
order_id int(11)
invoice_no int(11)
invoice_prefix varchar(26)
store_id int(11)
store_name varchar(64)
store_url varchar(255)
customer_id int(11)
customer_group_id int(11)
firstname varchar(32)
lastname varchar(32)
email varchar(96)
telephone varchar(32)
fax varchar(32)
payment_firstname varchar(32)
payment_lastname varchar(32)
OC_address
address_id int(11)
customer_id int(11)
firstname varchar(32)
lastname varchar(32)
company varchar(32)
company_id varchar(32)
tax_id varchar(32)
address_1 varchar(128)
address_2 varchar(128)
city varchar(128)
postcode varchar(10)
country_id int(11)
zone_id int(11)

OC_Product_Description
product_id int(11)
language_id int(11)
name varchar(255)
description text

MY BOOK CART
26

payment_company varchar(32)
payment_company_id varchar(32)
payment_tax_id varchar(32)
payment_address_1 varchar(128)
payment_address_2 varchar(128)
payment_city varchar(128)
payment_postcode varchar(10)
payment_country varchar(128)
payment_country_id int(11)
payment_zone varchar(128)
payment_zone_id int(11)
payment_address_format text

Fig 10. Schema Design

4.2.2 Data Integrity and Constraints

MyBookcart has been entrusted with sensitive, personal data to accomplish its goals. The
success of MyBookcart depends on the availability, integrity and confidentially of data.
One of the mechanisms to protect data is to implement data integrity and validation controls.
Data integrity controls are used to protect data from accidental or malicious alteration or
destruction and to provide assurance to the user that the information meets the expectations
about its quality and that it has not been altered. Validation controls refer to tests and
evaluations used to determine compliance with security specifications and requirements. To
maintain data integrity, I have used following validations in my code.

1) Reporting errors so that users can contact the account holder and correct, prior to
submission. This saves on unnecessary bank charges for failed transactions.
2) Map a MyBookcart account holder with a personal ID number or company registration
number
3) Rest assured that the correct legal entity is being debited or credited
4) Check that the information as provided by your client is correct, current and valid
5) Document-type declaration (DTD) must be declared for MyBookcart.
6) HTML and CSS validations are used so that correct HTML page should be displayed.
7) Only authorized uses can buy books from MyBookcart.
8) Each user has customer ID created in Database. This id is a email id of user
9) Guest users have separate entry in data bases so that proper record can be maintain.
10) User has to accept privacy policy before performing any transactions.
MY BOOK CART
27

11) In Registration account, all mandatory fields should be filled before submitting account.


4.3 Procedural Design





















Administrator
Enter User name
(U)and Password(P)
Y
General User
Invalid user
name and
Password
If U=admin &
Password=adm
in
N
I
C
M
E
Registered User

Stop
Admin
can make
changes in
website
Enter admin url Enter URL [www.mybookcart.com]
S
L
CA
SC
CO
Start
MY BOOK CART
28





















Fig 11. Procedural Design







I
C
M
E
S
L
CA
SC
CO
Information Pages: About us , Delivery Information, Privacy Policy and Terms
& Conditions
Customer Service Pages: Contact us, Returns, Site map
Extras Pages: Brands, Gift Vouchers, Affiliates
My Account Pages: My Account, Order History, Wish List, Newsletter
Search filed
Login page
Create account page
Checkout page
Shopping cart page
MY BOOK CART
29


4.4 User interface design











Fig 12. Home Page

MY BOOK CART
30












Fig 13. Login /Create Account Page

MY BOOK CART
31












Fig 14. Check out Page

MY BOOK CART
32













Fig 15. Register Account Page

MY BOOK CART
33















Fig 16. Admin Login Page








MY BOOK CART
34

4.5 Security Issues
1. Hackers can install malware that gets MyBookcart site banned from Google and your
customer details exposed to cybercriminals
2. Problems with passwords
Most systems use passwords to restrict access. It is possible to obtain a password in several
ways:
guessing
If you choose a particularly simple password (your mother's maiden name, your pet's
name, your favourite sports team) then people may be able to guess the password
brute-force search
There are programs which can try many passwords, for example by going through every
word in a dictionary
social engineering
It is often possible to trick people into revealing passwords, for example by phoning up
and pretending to be the Internet service provider or a member of the company
obtaining stored passwords
Sometimes people store passwords on their computer, on post-it notes, in their diary, etc.
In this case, the password can easily be obtained by somebody with physical access
obtaining shared passwords
When the same password is used for several systems, anybody who obtains the
password for one system already has it for all others
installing trojans
There are 'trojan horse' software programs which install invisibly on your computer,
monitoring keystrokes. These are often associated with computer viruses
interception
If passwords are sent across an unencrypted connection, it may be possible to intercept
the password as it is transmitted (this is usually a relatively low risk)
Handling Security issues:
1. Using passwords securely
User can avoid these problems by:
using a good password
Choose a password that is reasonably long (at least 8 characters) and is not made up of
simple words. Use punctuation and numbers if possible
ensure systems limit password attempts
If possible, make sure that the system allows only a certain number of password
attempts before locking out the account
not storing passwords
Do not store important passwords on your computer, or write them down
MY BOOK CART
35

not sharing passwords
Use different passwords for all important systems
never giving out passwords
Do not give out your password to anybody
maintaining general levels of computer security
Use a virus checker and ensure that your email program is configured securely and kept
up to date
using secure connections for passwords
Make sure that passwords are sent across secure connections so that they cannot be
intercepted in transit

2. Detects malware present on MyBookcart website.
3. Audits MyBookcart website for security issues.
4. Daily website backups.
5. Avoid getting blacklisted by Google.
6. Keep your website content and customer data safe.
7. Get alerted to suspicious hacker activity.
8. Securing information in transit
9. Reducing consequences of failure
10. Hiding Credit card details by not saving it in database.

4.6 Test case Design

S.N
o
Test
Case
ID
Descriptio
n
Pre-
condition
Steps
Expected
Result
Actual
Result
Status
1.
TC_1 Verify
functionali
ty of
Home
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Home
button
Home
page
should be
displayed.
Same as
Expected
Pass
2.
TC_2 Verify
functionali
ty of wish
list button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
1. Start
browser.
2. Enter
url
3. Tap on
Wish
List
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
36

displayed
3.
TC_3 Verify
functionali
ty of My
Account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
My
Account
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
4.
TC_4 Verify
functionali
ty of
Shopping
cart
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
button
Shopping
cart
page
should be
dplayed.
Same as
Expected
Pass
5.
TC_5 Verify
functionali
ty of
Checkout
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Checkou
t button
Checkou
t page
should be
displayed
Same as
Expected
Pass
6.
TC_6 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
Register
Account
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
37

7.
TC_7 Verify
functionali
ty of
Login
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Login
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
8.
TC_8 Verify
functionali
ty of
Currency
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
currency
Dollar/P
ound
Euro.
Currency
should be
changed
to
dollor/po
und/euro
Same as
Expected
Pass
9.
TC_9 Verify
functionali
ty of
Shopping
cart drop
down list
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
drop
down list
if item is
added
then Item
should be
displayed
in drop
down list
others
wise
Your
shopping
cart is
empty
message
should be
displayed
Same as
Expected
Pass
10.
TC_10 Verify
functionali
ty of
Featured
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Add to
Cart
button
correspon
ding to
particular
book item
Feature
item
should be
added in
shopping
cart list
when tap
on Add to
cart
Same as
Expected
Pass
MY BOOK CART
38

11.
TC_11 Verify
functionali
ty of
publisher
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
any
publisher
Correspo
nding
book
publisher
page
should be
displayed.
Same as
Expected
Pass
12.
TC_12 Verify
functionali
ty of
About us
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
About
us
button at
bottom of
page
About
us page
should be
displayed.
Same as
Expected
Pass
13.
TC_13 Verify
functionali
ty of
Delivery
informatio
n button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Delivery
Informati
on
button at
bottom of
page
Delivery
informati
on page
should
be
displayed.
Same as
Expected
Pass
14.
TC_14 Verify
functionali
ty of
Privacy
Policy
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Privacy
Policy
button at
bottom of
page
Privacy
Policy
page
should be
displayed.
Same as
Expected
Pass
15.
TC_15 Verify
functionali
ty of
Terms
and
condition
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
1. Start
browser.
2. Enter
url
3. Tap on
Terms
and
Condition
Term &
Condition
cage
should be
displayed
Same as
Expected
Pass
MY BOOK CART
39

displayed button
at bottom
of page
16.
TC_16 Verify
functionali
ty of
Contact
us button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Contact
us
button at
bottom of
page
contact
us page
should be
displayed.
Same as
Expected
Pass
17.
TC_17 Verify
functionali
ty of
Returns
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Returns
button at
bottom of
page
Product
Returns
page
should be
displayed.
Same as
Expected
Pass
18.
TC_18 Verify
functionali
ty of Site
map
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Site
map
button at
bottom of
page
site
map
page
should be
displayed.
Same as
Expected
Pass
19.
TC_19 Verify
functionali
ty of
Brands
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Brands
button at
bottom of
page
Find
your
favorite
brand
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
40

20.
TC_20 Verify
functionali
ty of Gift
Vouchers
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Gift
Vouchers
button
at bottom
of page
purchase
a gift
voucher
page
should be
displayed.
Same as
Expected
Pass
























MY BOOK CART
41

CHAPTER 5: IMPLEMENTATION AND TESTING

5.1 Implementation Approaches

MyBookcart application is a web based application which requires to review and test a
code every time so that quality and expected result can be obtained from efficient code
implementation. Hence, We used waterfall model for the implementation of this project so
that proper project can be implemented under guidance.


















Fig 17. Waterfall Model

The waterfall model is a sequential design process, often used in software development
processes, in which progress is seen as flowing steadily downwards (like a waterfall)
through the phases of Conception, Initiation, Analysis, Design, Construction, Testing,
Production/Implementation, and Maintenance.The waterfall development model originates
in the manufacturing and construction industries; highly structured physical environments in
which after-the-fact changes are prohibitively costly, if not impossible. Since no formal
software development methodologies existed at the time, this hardware-oriented model was
simply adapted for software development
Requirements
Design
Implementation
Verification
Maintenance
MY BOOK CART
42

5.2 Coding Details and Code Efficiency

5.2.1 Coding Details

Registration Screen:

registration.php

<?php
class ControllerAccountRegister extends Controller {
private $error = array();

public function index() {
if ($this->customer->isLogged()) {
$this->redirect($this->url->link('account/account', '', 'SSL'));
}

$this->language->load('account/register');

$this->document->setTitle($this->language->get('heading_title'));
$this->document-
>addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');
$this->document-
>addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');

$this->load->model('account/customer');

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this-
>validate()) {
$this->model_account_customer->addCustomer($this->request-
>post);

$this->customer->login($this->request->post['email'], $this->request-
>post['password']);

unset($this->session->data['guest']);

// Default Shipping Address
if ($this->config->get('config_tax_customer') == 'shipping') {
MY BOOK CART
43

$this->session->data['shipping_country_id'] = $this->request-
>post['country_id'];
$this->session->data['shipping_zone_id'] = $this->request-
>post['zone_id'];
$this->session->data['shipping_postcode'] = $this->request-
>post['postcode'];
}

// Default Payment Address
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_country_id'] = $this->request-
>post['country_id'];
$this->session->data['payment_zone_id'] = $this->request-
>post['zone_id'];
}

$this->redirect($this->url->link('account/success'));
}

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_register'),
'href' => $this->url->link('account/register', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');
MY BOOK CART
44


$this->data['text_account_already'] = sprintf($this->language-
>get('text_account_already'), $this->url->link('account/login', '', 'SSL'));
$this->data['text_your_details'] = $this->language->get('text_your_details');
$this->data['text_your_address'] = $this->language->get('text_your_address');
$this->data['text_your_password'] = $this->language->get('text_your_password');
$this->data['text_newsletter'] = $this->language->get('text_newsletter');
$this->data['text_yes'] = $this->language->get('text_yes');
$this->data['text_no'] = $this->language->get('text_no');
$this->data['text_select'] = $this->language->get('text_select');
$this->data['text_none'] = $this->language->get('text_none');

$this->data['entry_firstname'] = $this->language->get('entry_firstname');
$this->data['entry_lastname'] = $this->language->get('entry_lastname');
$this->data['entry_email'] = $this->language->get('entry_email');
$this->data['entry_telephone'] = $this->language->get('entry_telephone');
$this->data['entry_fax'] = $this->language->get('entry_fax');
$this->data['entry_company'] = $this->language->get('entry_company');
$this->data['entry_customer_group'] = $this->language-
>get('entry_customer_group');
$this->data['entry_company_id'] = $this->language-
>get('entry_company_id');
$this->data['entry_tax_id'] = $this->language->get('entry_tax_id');
$this->data['entry_address_1'] = $this->language->get('entry_address_1');
$this->data['entry_address_2'] = $this->language->get('entry_address_2');
$this->data['entry_postcode'] = $this->language->get('entry_postcode');
$this->data['entry_city'] = $this->language->get('entry_city');
$this->data['entry_country'] = $this->language->get('entry_country');
$this->data['entry_zone'] = $this->language->get('entry_zone');
$this->data['entry_newsletter'] = $this->language->get('entry_newsletter');
$this->data['entry_password'] = $this->language->get('entry_password');
$this->data['entry_confirm'] = $this->language->get('entry_confirm');

$this->data['button_continue'] = $this->language->get('button_continue');

if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
MY BOOK CART
45


if (isset($this->error['firstname'])) {
$this->data['error_firstname'] = $this->error['firstname'];
} else {
$this->data['error_firstname'] = '';
}

if (isset($this->error['lastname'])) {
$this->data['error_lastname'] = $this->error['lastname'];
} else {
$this->data['error_lastname'] = '';
}

if (isset($this->error['email'])) {
$this->data['error_email'] = $this->error['email'];
} else {
$this->data['error_email'] = '';
}

if (isset($this->error['telephone'])) {
$this->data['error_telephone'] = $this->error['telephone'];
} else {
$this->data['error_telephone'] = '';
}

if (isset($this->error['password'])) {
$this->data['error_password'] = $this->error['password'];
} else {
$this->data['error_password'] = '';
}

if (isset($this->error['confirm'])) {
$this->data['error_confirm'] = $this->error['confirm'];
} else {
$this->data['error_confirm'] = '';
}

if (isset($this->error['company_id'])) {
$this->data['error_company_id'] = $this->error['company_id'];
} else {
MY BOOK CART
46

$this->data['error_company_id'] = '';
}

if (isset($this->error['tax_id'])) {
$this->data['error_tax_id'] = $this->error['tax_id'];
} else {
$this->data['error_tax_id'] = '';
}

if (isset($this->error['address_1'])) {
$this->data['error_address_1'] = $this->error['address_1'];
} else {
$this->data['error_address_1'] = '';
}

if (isset($this->error['city'])) {
$this->data['error_city'] = $this->error['city'];
} else {
$this->data['error_city'] = '';
}

if (isset($this->error['postcode'])) {
$this->data['error_postcode'] = $this->error['postcode'];
} else {
$this->data['error_postcode'] = '';
}

if (isset($this->error['country'])) {
$this->data['error_country'] = $this->error['country'];
} else {
$this->data['error_country'] = '';
}

if (isset($this->error['zone'])) {
$this->data['error_zone'] = $this->error['zone'];
} else {
$this->data['error_zone'] = '';
}

$this->data['action'] = $this->url->link('account/register', '', 'SSL');
MY BOOK CART
47


if (isset($this->request->post['firstname'])) {
$this->data['firstname'] = $this->request->post['firstname'];
} else {
$this->data['firstname'] = '';
}

if (isset($this->request->post['lastname'])) {
$this->data['lastname'] = $this->request->post['lastname'];
} else {
$this->data['lastname'] = '';
}

if (isset($this->request->post['email'])) {
$this->data['email'] = $this->request->post['email'];
} else {
$this->data['email'] = '';
}

if (isset($this->request->post['telephone'])) {
$this->data['telephone'] = $this->request->post['telephone'];
} else {
$this->data['telephone'] = '';
}

if (isset($this->request->post['fax'])) {
$this->data['fax'] = $this->request->post['fax'];
} else {
$this->data['fax'] = '';
}

if (isset($this->request->post['company'])) {
$this->data['company'] = $this->request->post['company'];
} else {
$this->data['company'] = '';
}

$this->load->model('account/customer_group');

$this->data['customer_groups'] = array();
MY BOOK CART
48


if (is_array($this->config->get('config_customer_group_display'))) {
$customer_groups = $this->model_account_customer_group-
>getCustomerGroups();

foreach ($customer_groups as $customer_group) {
if (in_array($customer_group['customer_group_id'], $this-
>config->get('config_customer_group_display'))) {
$this->data['customer_groups'][] = $customer_group;
}
}
}

if (isset($this->request->post['customer_group_id'])) {
$this->data['customer_group_id'] = $this->request-
>post['customer_group_id'];
} else {
$this->data['customer_group_id'] = $this->config-
>get('config_customer_group_id');
}

// Company ID
if (isset($this->request->post['company_id'])) {
$this->data['company_id'] = $this->request->post['company_id'];
} else {
$this->data['company_id'] = '';
}

// Tax ID
if (isset($this->request->post['tax_id'])) {
$this->data['tax_id'] = $this->request->post['tax_id'];
} else {
$this->data['tax_id'] = '';
}

if (isset($this->request->post['address_1'])) {
$this->data['address_1'] = $this->request->post['address_1'];
} else {
$this->data['address_1'] = '';
}
MY BOOK CART
49


if (isset($this->request->post['address_2'])) {
$this->data['address_2'] = $this->request->post['address_2'];
} else {
$this->data['address_2'] = '';
}

if (isset($this->request->post['postcode'])) {
$this->data['postcode'] = $this->request->post['postcode'];
} elseif (isset($this->session->data['shipping_postcode'])) {
$this->data['postcode'] = $this->session->data['shipping_postcode'];

} else {
$this->data['postcode'] = '';
}

if (isset($this->request->post['city'])) {
$this->data['city'] = $this->request->post['city'];
} else {
$this->data['city'] = '';
}

if (isset($this->request->post['country_id'])) {
$this->data['country_id'] = $this->request->post['country_id'];
} elseif (isset($this->session->data['shipping_country_id'])) {
$this->data['country_id'] = $this->session-
>data['shipping_country_id'];
} else {
$this->data['country_id'] = $this->config->get('config_country_id');
}

if (isset($this->request->post['zone_id'])) {
$this->data['zone_id'] = $this->request->post['zone_id'];
} elseif (isset($this->session->data['shipping_zone_id'])) {
$this->data['zone_id'] = $this->session->data['shipping_zone_id'];

} else {
$this->data['zone_id'] = '';
}

MY BOOK CART
50

$this->load->model('localisation/country');

$this->data['countries'] = $this->model_localisation_country->getCountries();

if (isset($this->request->post['password'])) {
$this->data['password'] = $this->request->post['password'];
} else {
$this->data['password'] = '';
}

if (isset($this->request->post['confirm'])) {
$this->data['confirm'] = $this->request->post['confirm'];
} else {
$this->data['confirm'] = '';
}

if (isset($this->request->post['newsletter'])) {
$this->data['newsletter'] = $this->request->post['newsletter'];
} else {
$this->data['newsletter'] = '';
}

if ($this->config->get('config_account_id')) {
$this->load->model('catalog/information');

$information_info = $this->model_catalog_information-
>getInformation($this->config->get('config_account_id'));

if ($information_info) {
$this->data['text_agree'] = sprintf($this->language-
>get('text_agree'), $this->url->link('information/information/info', 'information_id=' . $this-
>config->get('config_account_id'), 'SSL'), $information_info['title'],
$information_info['title']);
} else {
$this->data['text_agree'] = '';
}
} else {
$this->data['text_agree'] = '';
}

MY BOOK CART
51

if (isset($this->request->post['agree'])) {
$this->data['agree'] = $this->request->post['agree'];
} else {
$this->data['agree'] = false;
}

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/account/register.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/register.tpl';
} else {
$this->template = 'default/template/account/register.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}

protected function validate() {
if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request-
>post['firstname']) > 32)) {
$this->error['firstname'] = $this->language->get('error_firstname');
}

if ((utf8_strlen($this->request->post['lastname']) < 1) || (utf8_strlen($this->request-
>post['lastname']) > 32)) {
$this->error['lastname'] = $this->language->get('error_lastname');
}

if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-
z]{2,6}$/i', $this->request->post['email'])) {
$this->error['email'] = $this->language->get('error_email');
MY BOOK CART
52

}

if ($this->model_account_customer->getTotalCustomersByEmail($this->request-
>post['email'])) {
$this->error['warning'] = $this->language->get('error_exists');
}

if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request-
>post['telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}

// Customer Group
$this->load->model('account/customer_group');

if (isset($this->request->post['customer_group_id']) && is_array($this-
>config->get('config_customer_group_display')) && in_array($this->request-
>post['customer_group_id'], $this->config->get('config_customer_group_display'))) {
$customer_group_id = $this->request->post['customer_group_id'];
} else {
$customer_group_id = $this->config-
>get('config_customer_group_id');
}

$customer_group = $this->model_account_customer_group-
>getCustomerGroup($customer_group_id);

if ($customer_group) {
// Company ID
if ($customer_group['company_id_display'] &&
$customer_group['company_id_required'] && empty($this->request->post['company_id']))
{
$this->error['company_id'] = $this->language-
>get('error_company_id');
}

// Tax ID
if ($customer_group['tax_id_display'] &&
$customer_group['tax_id_required'] && empty($this->request->post['tax_id'])) {
$this->error['tax_id'] = $this->language->get('error_tax_id');
MY BOOK CART
53

}
}

if ((utf8_strlen($this->request->post['address_1']) < 3) || (utf8_strlen($this->request-
>post['address_1']) > 128)) {
$this->error['address_1'] = $this->language->get('error_address_1');
}

if ((utf8_strlen($this->request->post['city']) < 2) || (utf8_strlen($this->request-
>post['city']) > 128)) {
$this->error['city'] = $this->language->get('error_city');
}

$this->load->model('localisation/country');

$country_info = $this->model_localisation_country->getCountry($this-
>request->post['country_id']);

if ($country_info) {
if ($country_info['postcode_required'] && (utf8_strlen($this-
>request->post['postcode']) < 2) || (utf8_strlen($this->request->post['postcode']) > 10)) {
$this->error['postcode'] = $this->language-
>get('error_postcode');
}

// VAT Validation
$this->load->helper('vat');

if ($this->config->get('config_vat') && $this->request->post['tax_id']
&& (vat_validation($country_info['iso_code_2'], $this->request->post['tax_id']) ==
'invalid')) {
$this->error['tax_id'] = $this->language->get('error_vat');
}
}

if ($this->request->post['country_id'] == '') {
$this->error['country'] = $this->language->get('error_country');
}

if (!isset($this->request->post['zone_id']) || $this->request->post['zone_id'] == '') {
MY BOOK CART
54

$this->error['zone'] = $this->language->get('error_zone');
}

if ((utf8_strlen($this->request->post['password']) < 4) || (utf8_strlen($this->request-
>post['password']) > 20)) {
$this->error['password'] = $this->language->get('error_password');
}

if ($this->request->post['confirm'] != $this->request->post['password']) {
$this->error['confirm'] = $this->language->get('error_confirm');
}

if ($this->config->get('config_account_id')) {
$this->load->model('catalog/information');

$information_info = $this->model_catalog_information-
>getInformation($this->config->get('config_account_id'));

if ($information_info && !isset($this->request->post['agree'])) {
$this->error['warning'] = sprintf($this->language->get('error_agree'),
$information_info['title']);
}
}

if (!$this->error) {
return true;
} else {
return false;
}
}

public function country() {
$json = array();

$this->load->model('localisation/country');

$country_info = $this->model_localisation_country->getCountry($this->request-
>get['country_id']);

if ($country_info) {
MY BOOK CART
55

$this->load->model('localisation/zone');

$json = array(
'country_id' => $country_info['country_id'],
'name' => $country_info['name'],
'iso_code_2' => $country_info['iso_code_2'],
'iso_code_3' => $country_info['iso_code_3'],
'address_format' => $country_info['address_format'],
'postcode_required' => $country_info['postcode_required'],
'zone' => $this->model_localisation_zone-
>getZonesByCountryId($this->request->get['country_id']),
'status' => $country_info['status']
);
}

$this->response->setOutput(json_encode($json));
}
}
?>


Account Login:


Login.php

<?php
class ControllerAccountLogin extends Controller {
private $error = array();

public function index() {
$this->load->model('account/customer');

// Login override for admin users
if (!empty($this->request->get['token'])) {
$this->customer->logout();
$this->cart->clear();

unset($this->session->data['wishlist']);
unset($this->session->data['shipping_address_id']);
MY BOOK CART
56

unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['payment_address_id']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
unset($this->session->data['payment_method']);
unset($this->session->data['payment_methods']);
unset($this->session->data['comment']);
unset($this->session->data['order_id']);
unset($this->session->data['coupon']);
unset($this->session->data['reward']);
unset($this->session->data['voucher']);
unset($this->session->data['vouchers']);

$customer_info = $this->model_account_customer-
>getCustomerByToken($this->request->get['token']);

if ($customer_info && $this->customer-
>login($customer_info['email'], '', true)) {
// Default Addresses
$this->load->model('account/address');

$address_info = $this->model_account_address-
>getAddress($this->customer->getAddressId());

if ($address_info) {
if ($this->config->get('config_tax_customer') ==
'shipping') {
$this->session->data['shipping_country_id'] =
$address_info['country_id'];
$this->session->data['shipping_zone_id'] =
$address_info['zone_id'];
$this->session->data['shipping_postcode'] =
$address_info['postcode'];
}

MY BOOK CART
57

if ($this->config->get('config_tax_customer') ==
'payment') {
$this->session->data['payment_country_id'] =
$address_info['country_id'];
$this->session->data['payment_zone_id'] =
$address_info['zone_id'];
}
} else {
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
}

$this->redirect($this->url->link('account/account', '', 'SSL'));
}
}

if ($this->customer->isLogged()) {
$this->redirect($this->url->link('account/account', '', 'SSL'));
}

$this->language->load('account/login');

$this->document->setTitle($this->language->get('heading_title'));

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this-
>validate()) {
unset($this->session->data['guest']);

// Default Shipping Address
$this->load->model('account/address');

$address_info = $this->model_account_address->getAddress($this-
>customer->getAddressId());

if ($address_info) {
if ($this->config->get('config_tax_customer') == 'shipping') {
MY BOOK CART
58

$this->session->data['shipping_country_id'] =
$address_info['country_id'];
$this->session->data['shipping_zone_id'] =
$address_info['zone_id'];
$this->session->data['shipping_postcode'] =
$address_info['postcode'];
}

if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_country_id'] =
$address_info['country_id'];
$this->session->data['payment_zone_id'] =
$address_info['zone_id'];
}
} else {
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
}

// Added strpos check to pass McAfee PCI compliance test
(http://forum.opencart.com/viewtopic.php?f=10&t=12043&p=151494#p151295)
if (isset($this->request->post['redirect']) && (strpos($this->request-
>post['redirect'], $this->config->get('config_url')) !== false || strpos($this->request-
>post['redirect'], $this->config->get('config_ssl')) !== false)) {
$this->redirect(str_replace('&amp;', '&', $this->request-
>post['redirect']));
} else {
$this->redirect($this->url->link('account/account', '', 'SSL'));
}
}

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
MY BOOK CART
59

);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_login'),
'href' => $this->url->link('account/login', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['text_new_customer'] = $this->language->get('text_new_customer');
$this->data['text_register'] = $this->language->get('text_register');
$this->data['text_register_account'] = $this->language->get('text_register_account');
$this->data['text_returning_customer'] = $this->language-
>get('text_returning_customer');
$this->data['text_i_am_returning_customer'] = $this->language-
>get('text_i_am_returning_customer');
$this->data['text_forgotten'] = $this->language->get('text_forgotten');

$this->data['entry_email'] = $this->language->get('entry_email');
$this->data['entry_password'] = $this->language->get('entry_password');

$this->data['button_continue'] = $this->language->get('button_continue');
$this->data['button_login'] = $this->language->get('button_login');

if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}

$this->data['action'] = $this->url->link('account/login', '', 'SSL');
$this->data['register'] = $this->url->link('account/register', '', 'SSL');
$this->data['forgotten'] = $this->url->link('account/forgotten', '', 'SSL');
MY BOOK CART
60


// Added strpos check to pass McAfee PCI compliance test
(http://forum.opencart.com/viewtopic.php?f=10&t=12043&p=151494#p151295)
if (isset($this->request->post['redirect']) && (strpos($this->request-
>post['redirect'], $this->config->get('config_url')) !== false || strpos($this->request-
>post['redirect'], $this->config->get('config_ssl')) !== false)) {
$this->data['redirect'] = $this->request->post['redirect'];
} elseif (isset($this->session->data['redirect'])) {
$this->data['redirect'] = $this->session->data['redirect'];

unset($this->session->data['redirect']);
} else {
$this->data['redirect'] = '';
}

if (isset($this->session->data['success'])) {
$this->data['success'] = $this->session->data['success'];

unset($this->session->data['success']);
} else {
$this->data['success'] = '';
}

if (isset($this->request->post['email'])) {
$this->data['email'] = $this->request->post['email'];
} else {
$this->data['email'] = '';
}

if (isset($this->request->post['password'])) {
$this->data['password'] = $this->request->post['password'];
} else {
$this->data['password'] = '';
}

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/account/login.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/login.tpl';
} else {
MY BOOK CART
61

$this->template = 'default/template/account/login.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}

protected function validate() {
if (!$this->customer->login($this->request->post['email'], $this->request-
>post['password'])) {
$this->error['warning'] = $this->language->get('error_login');
}

$customer_info = $this->model_account_customer-
>getCustomerByEmail($this->request->post['email']);

if ($customer_info && !$customer_info['approved']) {
$this->error['warning'] = $this->language->get('error_approved');
}

if (!$this->error) {
return true;
} else {
return false;
}
}}?>

account.php
<?php
class ControllerAccountAccount extends Controller {
public function index() {
if (!$this->customer->isLogged()) {
MY BOOK CART
62

$this->session->data['redirect'] = $this->url->link('account/account',
'', 'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}

$this->language->load('account/account');

$this->document->setTitle($this->language->get('heading_title'));

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

if (isset($this->session->data['success'])) {
$this->data['success'] = $this->session->data['success'];

unset($this->session->data['success']);
} else {
$this->data['success'] = '';
}

$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['text_my_account'] = $this->language->get('text_my_account');
$this->data['text_my_orders'] = $this->language->get('text_my_orders');
$this->data['text_my_newsletter'] = $this->language-
>get('text_my_newsletter');
$this->data['text_edit'] = $this->language->get('text_edit');
$this->data['text_password'] = $this->language->get('text_password');
MY BOOK CART
63

$this->data['text_address'] = $this->language->get('text_address');
$this->data['text_wishlist'] = $this->language->get('text_wishlist');
$this->data['text_order'] = $this->language->get('text_order');
$this->data['text_download'] = $this->language->get('text_download');
$this->data['text_reward'] = $this->language->get('text_reward');
$this->data['text_return'] = $this->language->get('text_return');
$this->data['text_transaction'] = $this->language->get('text_transaction');
$this->data['text_newsletter'] = $this->language->get('text_newsletter');

$this->data['edit'] = $this->url->link('account/edit', '', 'SSL');
$this->data['password'] = $this->url->link('account/password', '', 'SSL');
$this->data['address'] = $this->url->link('account/address', '', 'SSL');
$this->data['wishlist'] = $this->url->link('account/wishlist');
$this->data['order'] = $this->url->link('account/order', '', 'SSL');
$this->data['download'] = $this->url->link('account/download', '', 'SSL');
$this->data['return'] = $this->url->link('account/return', '', 'SSL');
$this->data['transaction'] = $this->url->link('account/transaction', '', 'SSL');
$this->data['newsletter'] = $this->url->link('account/newsletter', '', 'SSL');

if ($this->config->get('reward_status')) {
$this->data['reward'] = $this->url->link('account/reward', '', 'SSL');
} else {
$this->data['reward'] = '';
}

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/account/account.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/account.tpl';
} else {
$this->template = 'default/template/account/account.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
MY BOOK CART
64

);

$this->response->setOutput($this->render());
}
}
?>

download.php
<?php
class ControllerAccountDownload extends Controller {
public function index() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/download',
'', 'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}

$this->language->load('account/download');

$this->document->setTitle($this->language->get('heading_title'));

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_downloads'),
'href' => $this->url->link('account/download', '', 'SSL'),
'separator' => $this->language->get('text_separator')
MY BOOK CART
65

);

$this->load->model('account/download');

$download_total = $this->model_account_download->getTotalDownloads();

if ($download_total) {
$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['text_order'] = $this->language->get('text_order');
$this->data['text_date_added'] = $this->language-
>get('text_date_added');
$this->data['text_name'] = $this->language->get('text_name');
$this->data['text_remaining'] = $this->language-
>get('text_remaining');
$this->data['text_size'] = $this->language->get('text_size');

$this->data['button_download'] = $this->language-
>get('button_download');
$this->data['button_continue'] = $this->language-
>get('button_continue');

if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}

$this->data['downloads'] = array();

$results = $this->model_account_download->getDownloads(($page -
1) * $this->config->get('config_catalog_limit'), $this->config->get('config_catalog_limit'));

foreach ($results as $result) {
if (file_exists(DIR_DOWNLOAD . $result['filename'])) {
$size = filesize(DIR_DOWNLOAD .
$result['filename']);

$i = 0;

MY BOOK CART
66

$suffix = array(
'B',
'KB',
'MB',
'GB',
'TB',
'PB',
'EB',
'ZB',
'YB'
);

while (($size / 1024) > 1) {
$size = $size / 1024;
$i++;
}

$this->data['downloads'][] = array(
'order_id' => $result['order_id'],
'date_added' => date($this->language-
>get('date_format_short'), strtotime($result['date_added'])),
'name' => $result['name'],
'remaining' => $result['remaining'],
'size' => round(substr($size, 0, strpos($size,
'.') + 4), 2) . $suffix[$i],
'href' => $this->url-
>link('account/download/download', 'order_download_id=' . $result['order_download_id'],
'SSL')
);
}
}

$pagination = new Pagination();
$pagination->total = $download_total;
$pagination->page = $page;
$pagination->limit = $this->config->get('config_catalog_limit');
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('account/download',
'page={page}', 'SSL');

MY BOOK CART
67

$this->data['pagination'] = $pagination->render();

$this->data['continue'] = $this->url->link('account/account', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config-
>get('config_template') . '/template/account/download.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/download.tpl';
} else {
$this->template = 'default/template/account/download.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());

} else {
$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['text_error'] = $this->language->get('text_empty');

$this->data['button_continue'] = $this->language-
>get('button_continue');

$this->data['continue'] = $this->url->link('account/account', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config-
>get('config_template') . '/template/error/not_found.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/error/not_found.tpl';
} else {
$this->template = 'default/template/error/not_found.tpl';
}
MY BOOK CART
68


$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}
}

public function download() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/download',
'', 'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}

$this->load->model('account/download');

if (isset($this->request->get['order_download_id'])) {
$order_download_id = $this->request->get['order_download_id'];
} else {
$order_download_id = 0;
}

$download_info = $this->model_account_download-
>getDownload($order_download_id);

if ($download_info) {
$file = DIR_DOWNLOAD . $download_info['filename'];
$mask = basename($download_info['mask']);

if (!headers_sent()) {
if (file_exists($file)) {
header('Content-Type: application/octet-stream');
MY BOOK CART
69

header('Content-Disposition: attachment; filename="' .
($mask ? $mask : basename($file)) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0,
pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));

if (ob_get_level()) ob_end_clean();

readfile($file, 'rb');

$this->model_account_download-
>updateRemaining($this->request->get['order_download_id']);

exit;
} else {
exit('Error: Could not find file ' . $file . '!');
}
} else {
exit('Error: Headers already sent out!');
}
} else {
$this->redirect($this->url->link('account/download', '', 'SSL'));
}
}
}
?>
edit.php
<?php
class ControllerAccountEdit extends Controller {
private $error = array();

public function index() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/edit', '',
'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}
MY BOOK CART
70


$this->language->load('account/edit');

$this->document->setTitle($this->language->get('heading_title'));

$this->load->model('account/customer');

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this-
>validate()) {
$this->model_account_customer->editCustomer($this->request-
>post);

$this->session->data['success'] = $this->language-
>get('text_success');

$this->redirect($this->url->link('account/account', '', 'SSL'));
}

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_edit'),
'href' => $this->url->link('account/edit', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');

MY BOOK CART
71

$this->data['text_your_details'] = $this->language->get('text_your_details');

$this->data['entry_firstname'] = $this->language->get('entry_firstname');
$this->data['entry_lastname'] = $this->language->get('entry_lastname');
$this->data['entry_email'] = $this->language->get('entry_email');
$this->data['entry_telephone'] = $this->language->get('entry_telephone');
$this->data['entry_fax'] = $this->language->get('entry_fax');

$this->data['button_continue'] = $this->language->get('button_continue');
$this->data['button_back'] = $this->language->get('button_back');

if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}

if (isset($this->error['firstname'])) {
$this->data['error_firstname'] = $this->error['firstname'];
} else {
$this->data['error_firstname'] = '';
}

if (isset($this->error['lastname'])) {
$this->data['error_lastname'] = $this->error['lastname'];
} else {
$this->data['error_lastname'] = '';
}

if (isset($this->error['email'])) {
$this->data['error_email'] = $this->error['email'];
} else {
$this->data['error_email'] = '';
}

if (isset($this->error['telephone'])) {
$this->data['error_telephone'] = $this->error['telephone'];
} else {
$this->data['error_telephone'] = '';
}
MY BOOK CART
72


$this->data['action'] = $this->url->link('account/edit', '', 'SSL');

if ($this->request->server['REQUEST_METHOD'] != 'POST') {
$customer_info = $this->model_account_customer-
>getCustomer($this->customer->getId());
}

if (isset($this->request->post['firstname'])) {
$this->data['firstname'] = $this->request->post['firstname'];
} elseif (isset($customer_info)) {
$this->data['firstname'] = $customer_info['firstname'];
} else {
$this->data['firstname'] = '';
}

if (isset($this->request->post['lastname'])) {
$this->data['lastname'] = $this->request->post['lastname'];
} elseif (isset($customer_info)) {
$this->data['lastname'] = $customer_info['lastname'];
} else {
$this->data['lastname'] = '';
}

if (isset($this->request->post['email'])) {
$this->data['email'] = $this->request->post['email'];
} elseif (isset($customer_info)) {
$this->data['email'] = $customer_info['email'];
} else {
$this->data['email'] = '';
}

if (isset($this->request->post['telephone'])) {
$this->data['telephone'] = $this->request->post['telephone'];
} elseif (isset($customer_info)) {
$this->data['telephone'] = $customer_info['telephone'];
} else {
$this->data['telephone'] = '';
}

MY BOOK CART
73

if (isset($this->request->post['fax'])) {
$this->data['fax'] = $this->request->post['fax'];
} elseif (isset($customer_info)) {
$this->data['fax'] = $customer_info['fax'];
} else {
$this->data['fax'] = '';
}

$this->data['back'] = $this->url->link('account/account', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/account/edit.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/edit.tpl';
} else {
$this->template = 'default/template/account/edit.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}

protected function validate() {
if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this-
>request->post['firstname']) > 32)) {
$this->error['firstname'] = $this->language->get('error_firstname');
}

if ((utf8_strlen($this->request->post['lastname']) < 1) || (utf8_strlen($this-
>request->post['lastname']) > 32)) {
$this->error['lastname'] = $this->language->get('error_lastname');
}
MY BOOK CART
74


if ((utf8_strlen($this->request->post['email']) > 96) ||
!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
$this->error['email'] = $this->language->get('error_email');
}

if (($this->customer->getEmail() != $this->request->post['email']) && $this-
>model_account_customer->getTotalCustomersByEmail($this->request->post['email'])) {
$this->error['warning'] = $this->language->get('error_exists');
}

if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this-
>request->post['telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}

if (!$this->error) {
return true;
} else {
return false;
}
}
}
?>

logout.php
<?php
class ControllerAccountLogout extends Controller {
public function index() {
if ($this->customer->isLogged()) {
$this->customer->logout();
$this->cart->clear();

unset($this->session->data['wishlist']);
unset($this->session->data['shipping_address_id']);
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
MY BOOK CART
75

unset($this->session->data['payment_address_id']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
unset($this->session->data['payment_method']);
unset($this->session->data['payment_methods']);
unset($this->session->data['comment']);
unset($this->session->data['order_id']);
unset($this->session->data['coupon']);
unset($this->session->data['reward']);
unset($this->session->data['voucher']);
unset($this->session->data['vouchers']);

$this->redirect($this->url->link('account/logout', '', 'SSL'));
}

$this->language->load('account/logout');

$this->document->setTitle($this->language->get('heading_title'));

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_logout'),
'href' => $this->url->link('account/logout', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');
MY BOOK CART
76


$this->data['text_message'] = $this->language->get('text_message');

$this->data['button_continue'] = $this->language->get('button_continue');

$this->data['continue'] = $this->url->link('common/home');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/common/success.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/common/success.tpl';
} else {
$this->template = 'default/template/common/success.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}
}
?>
order.php
<?php
class ControllerAccountOrder extends Controller {
private $error = array();

public function index() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/order', '', 'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}

MY BOOK CART
77

$this->language->load('account/order');

$this->load->model('account/order');

if (isset($this->request->get['order_id'])) {
$order_info = $this->model_account_order->getOrder($this-
>request->get['order_id']);

if ($order_info) {
$order_products = $this->model_account_order-
>getOrderProducts($this->request->get['order_id']);

foreach ($order_products as $order_product) {
$option_data = array();

$order_options = $this->model_account_order-
>getOrderOptions($this->request->get['order_id'], $order_product['order_product_id']);

foreach ($order_options as $order_option) {
if ($order_option['type'] == 'select' ||
$order_option['type'] == 'radio') {

$option_data[$order_option['product_option_id']] =
$order_option['product_option_value_id'];
} elseif ($order_option['type'] == 'checkbox') {

$option_data[$order_option['product_option_id']][] =
$order_option['product_option_value_id'];
} elseif ($order_option['type'] == 'text' ||
$order_option['type'] == 'textarea' || $order_option['type'] == 'date' || $order_option['type']
== 'datetime' || $order_option['type'] == 'time') {

$option_data[$order_option['product_option_id']] = $order_option['value'];
} elseif ($order_option['type'] == 'file') {

$option_data[$order_option['product_option_id']] = $this->encryption-
>encrypt($order_option['value']);
}
}

MY BOOK CART
78

$this->session->data['success'] = sprintf($this-
>language->get('text_success'), $this->request->get['order_id']);

$this->cart->add($order_product['product_id'],
$order_product['quantity'], $option_data);
}

$this->redirect($this->url->link('checkout/cart'));
}
}

$this->document->setTitle($this->language->get('heading_title'));

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$url = '';

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('account/order', $url, 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');
MY BOOK CART
79


$this->data['text_order_id'] = $this->language->get('text_order_id');
$this->data['text_status'] = $this->language->get('text_status');
$this->data['text_date_added'] = $this->language->get('text_date_added');
$this->data['text_customer'] = $this->language->get('text_customer');
$this->data['text_products'] = $this->language->get('text_products');
$this->data['text_total'] = $this->language->get('text_total');
$this->data['text_empty'] = $this->language->get('text_empty');

$this->data['button_view'] = $this->language->get('button_view');
$this->data['button_reorder'] = $this->language->get('button_reorder');
$this->data['button_continue'] = $this->language->get('button_continue');

if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}

$this->data['orders'] = array();

$order_total = $this->model_account_order->getTotalOrders();

$results = $this->model_account_order->getOrders(($page - 1) * 10, 10);

foreach ($results as $result) {
$product_total = $this->model_account_order-
>getTotalOrderProductsByOrderId($result['order_id']);
$voucher_total = $this->model_account_order-
>getTotalOrderVouchersByOrderId($result['order_id']);

$this->data['orders'][] = array(
'order_id' => $result['order_id'],
'name' => $result['firstname'] . ' ' . $result['lastname'],
'status' => $result['status'],
'date_added' => date($this->language-
>get('date_format_short'), strtotime($result['date_added'])),
'products' => ($product_total + $voucher_total),
'total' => $this->currency->format($result['total'],
$result['currency_code'], $result['currency_value']),
MY BOOK CART
80

'href' => $this->url->link('account/order/info', 'order_id=' .
$result['order_id'], 'SSL'),
'reorder' => $this->url->link('account/order', 'order_id=' .
$result['order_id'], 'SSL')
);
}

$pagination = new Pagination();
$pagination->total = $order_total;
$pagination->page = $page;
$pagination->limit = 10;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('account/order', 'page={page}', 'SSL');

$this->data['pagination'] = $pagination->render();

$this->data['continue'] = $this->url->link('account/account', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/account/order_list.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/order_list.tpl';
} else {
$this->template = 'default/template/account/order_list.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}

public function info() {
$this->language->load('account/order');
MY BOOK CART
81


if (isset($this->request->get['order_id'])) {
$order_id = $this->request->get['order_id'];
} else {
$order_id = 0;
}

if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url-
>link('account/order/info', 'order_id=' . $order_id, 'SSL');

$this->redirect($this->url->link('account/login', '', 'SSL'));
}

$this->load->model('account/order');

$order_info = $this->model_account_order->getOrder($order_id);

if ($order_info) {
$this->document->setTitle($this->language->get('text_order'));

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),

'separator' => $this->language->get('text_separator')
);

$url = '';

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
MY BOOK CART
82

}

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('account/order', $url, 'SSL'),

'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_order'),
'href' => $this->url->link('account/order/info', 'order_id=' .
$this->request->get['order_id'] . $url, 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('text_order');

$this->data['text_order_detail'] = $this->language-
>get('text_order_detail');
$this->data['text_invoice_no'] = $this->language-
>get('text_invoice_no');
$this->data['text_order_id'] = $this->language->get('text_order_id');
$this->data['text_date_added'] = $this->language-
>get('text_date_added');
$this->data['text_shipping_method'] = $this->language-
>get('text_shipping_method');
$this->data['text_shipping_address'] = $this->language-
>get('text_shipping_address');
$this->data['text_payment_method'] = $this->language-
>get('text_payment_method');
$this->data['text_payment_address'] = $this->language-
>get('text_payment_address');
$this->data['text_history'] = $this->language->get('text_history');
$this->data['text_comment'] = $this->language->get('text_comment');

$this->data['column_name'] = $this->language->get('column_name');
$this->data['column_model'] = $this->language->get('column_model');
$this->data['column_quantity'] = $this->language->get('column_quantity');
$this->data['column_price'] = $this->language->get('column_price');
MY BOOK CART
83

$this->data['column_total'] = $this->language->get('column_total');
$this->data['column_action'] = $this->language-
>get('column_action');
$this->data['column_date_added'] = $this->language-
>get('column_date_added');
$this->data['column_status'] = $this->language->get('column_status');
$this->data['column_comment'] = $this->language->get('column_comment');

$this->data['button_return'] = $this->language->get('button_return');
$this->data['button_continue'] = $this->language->get('button_continue');

if ($order_info['invoice_no']) {
$this->data['invoice_no'] = $order_info['invoice_prefix'] .
$order_info['invoice_no'];
} else {
$this->data['invoice_no'] = '';
}

$this->data['order_id'] = $this->request->get['order_id'];
$this->data['date_added'] = date($this->language-
>get('date_format_short'), strtotime($order_info['date_added']));

if ($order_info['payment_address_format']) {
$format = $order_info['payment_address_format'];
} else {
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" .
'{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" .
'{country}';
}

$find = array(
'{firstname}',
'{lastname}',
'{company}',
'{address_1}',
'{address_2}',
'{city}',
'{postcode}',
'{zone}',
'{zone_code}',
MY BOOK CART
84

'{country}'
);

$replace = array(
'firstname' => $order_info['payment_firstname'],
'lastname' => $order_info['payment_lastname'],
'company' => $order_info['payment_company'],
'address_1' => $order_info['payment_address_1'],
'address_2' => $order_info['payment_address_2'],
'city' => $order_info['payment_city'],
'postcode' => $order_info['payment_postcode'],
'zone' => $order_info['payment_zone'],
'zone_code' => $order_info['payment_zone_code'],
'country' => $order_info['payment_country']
);

$this->data['payment_address'] = str_replace(array("\r\n", "\r", "\n"),
'<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find,
$replace, $format))));

$this->data['payment_method'] = $order_info['payment_method'];

if ($order_info['shipping_address_format']) {
$format = $order_info['shipping_address_format'];
} else {
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" .
'{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" .
'{country}';
}

$find = array(
'{firstname}',
'{lastname}',
'{company}',
'{address_1}',
'{address_2}',
'{city}',
'{postcode}',
'{zone}',
'{zone_code}',
MY BOOK CART
85

'{country}'
);

$replace = array(
'firstname' => $order_info['shipping_firstname'],
'lastname' => $order_info['shipping_lastname'],
'company' => $order_info['shipping_company'],
'address_1' => $order_info['shipping_address_1'],
'address_2' => $order_info['shipping_address_2'],
'city' => $order_info['shipping_city'],
'postcode' => $order_info['shipping_postcode'],
'zone' => $order_info['shipping_zone'],
'zone_code' => $order_info['shipping_zone_code'],
'country' => $order_info['shipping_country']
);

$this->data['shipping_address'] = str_replace(array("\r\n", "\r", "\n"),
'<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find,
$replace, $format))));

$this->data['shipping_method'] = $order_info['shipping_method'];

$this->data['products'] = array();

$products = $this->model_account_order->getOrderProducts($this-
>request->get['order_id']);

foreach ($products as $product) {
$option_data = array();

$options = $this->model_account_order-
>getOrderOptions($this->request->get['order_id'], $product['order_product_id']);

foreach ($options as $option) {
if ($option['type'] != 'file') {
$value = $option['value'];
} else {
$value = utf8_substr($option['value'], 0,
utf8_strrpos($option['value'], '.'));
}
MY BOOK CART
86


$option_data[] = array(
'name' => $option['name'],
'value' => (utf8_strlen($value) > 20 ?
utf8_substr($value, 0, 20) . '..' : $value)
);
}

$this->data['products'][] = array(
'name' => $product['name'],
'model' => $product['model'],
'option' => $option_data,
'quantity' => $product['quantity'],
'price' => $this->currency->format($product['price'] + ($this-
>config->get('config_tax') ? $product['tax'] : 0), $order_info['currency_code'],
$order_info['currency_value']),
'total' => $this->currency->format($product['total'] +
($this->config->get('config_tax') ? ($product['tax'] * $product['quantity']) : 0),
$order_info['currency_code'], $order_info['currency_value']),
'return' => $this->url->link('account/return/insert',
'order_id=' . $order_info['order_id'] . '&product_id=' . $product['product_id'], 'SSL')
);
}

// Voucher
$this->data['vouchers'] = array();

$vouchers = $this->model_account_order->getOrderVouchers($this-
>request->get['order_id']);

foreach ($vouchers as $voucher) {
$this->data['vouchers'][] = array(
'description' => $voucher['description'],
'amount' => $this->currency-
>format($voucher['amount'], $order_info['currency_code'], $order_info['currency_value'])
);
}

$this->data['totals'] = $this->model_account_order->getOrderTotals($this-
>request->get['order_id']);
MY BOOK CART
87


$this->data['comment'] = nl2br($order_info['comment']);

$this->data['histories'] = array();

$results = $this->model_account_order->getOrderHistories($this-
>request->get['order_id']);

foreach ($results as $result) {
$this->data['histories'][] = array(
'date_added' => date($this->language->get('date_format_short'),
strtotime($result['date_added'])),
'status' => $result['status'],
'comment' => nl2br($result['comment'])
);
}

$this->data['continue'] = $this->url->link('account/order', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config-
>get('config_template') . '/template/account/order_info.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/account/order_info.tpl';
} else {
$this->template = 'default/template/account/order_info.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
} else {
$this->document->setTitle($this->language->get('text_order'));

MY BOOK CART
88

$this->data['heading_title'] = $this->language->get('text_order');

$this->data['text_error'] = $this->language->get('text_error');

$this->data['button_continue'] = $this->language->get('button_continue');

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('account/order', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_order'),
'href' => $this->url->link('account/order/info', 'order_id=' .
$order_id, 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['continue'] = $this->url->link('account/order', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config-
>get('config_template') . '/template/error/not_found.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/error/not_found.tpl';
} else {
MY BOOK CART
89

$this->template = 'default/template/error/not_found.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());

}
}
}
?>

Checkout:

Checkout.php

<?php
class ControllerCheckoutCheckout extends Controller {
public function index() {
// Validate cart has products and has stock.
if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers']))
|| (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
$this->redirect($this->url->link('checkout/cart'));
}

// Validate minimum quantity requirments.
$products = $this->cart->getProducts();

foreach ($products as $product) {
$product_total = 0;

foreach ($products as $product_2) {
if ($product_2['product_id'] == $product['product_id']) {
MY BOOK CART
90

$product_total += $product_2['quantity'];
}
}

if ($product['minimum'] > $product_total) {
$this->redirect($this->url->link('checkout/cart'));
}
}

$this->language->load('checkout/checkout');

$this->document->setTitle($this->language->get('heading_title'));
$this->document-
>addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');
$this->document-
>addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_cart'),
'href' => $this->url->link('checkout/cart'),
'separator' => $this->language->get('text_separator')
);

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('checkout/checkout', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('heading_title');

MY BOOK CART
91

$this->data['text_checkout_option'] = $this->language-
>get('text_checkout_option');
$this->data['text_checkout_account'] = $this->language-
>get('text_checkout_account');
$this->data['text_checkout_payment_address'] = $this->language-
>get('text_checkout_payment_address');
$this->data['text_checkout_shipping_address'] = $this->language-
>get('text_checkout_shipping_address');
$this->data['text_checkout_shipping_method'] = $this->language-
>get('text_checkout_shipping_method');
$this->data['text_checkout_payment_method'] = $this->language-
>get('text_checkout_payment_method');
$this->data['text_checkout_confirm'] = $this->language-
>get('text_checkout_confirm');
$this->data['text_modify'] = $this->language->get('text_modify');

$this->data['logged'] = $this->customer->isLogged();
$this->data['shipping_required'] = $this->cart->hasShipping();

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') .
'/template/checkout/checkout.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/checkout/checkout.tpl';
} else {
$this->template = 'default/template/checkout/checkout.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
}

public function country() {
MY BOOK CART
92

$json = array();

$this->load->model('localisation/country');

$country_info = $this->model_localisation_country->getCountry($this->request-
>get['country_id']);

if ($country_info) {
$this->load->model('localisation/zone');

$json = array(
'country_id' => $country_info['country_id'],
'name' => $country_info['name'],
'iso_code_2' => $country_info['iso_code_2'],
'iso_code_3' => $country_info['iso_code_3'],
'address_format' => $country_info['address_format'],
'postcode_required' => $country_info['postcode_required'],
'zone' => $this->model_localisation_zone-
>getZonesByCountryId($this->request->get['country_id']),
'status' => $country_info['status']
);
}

$this->response->setOutput(json_encode($json));
}
}
?>


5.2.2 Code Efficiency

MyBookcart application is based on MVC architecture. Modelviewcontroller (MVC) is a
software architecture pattern which separates the representation of information from the
user's interaction with it. There is usually a kind of hierarchy in the MVC pattern. The
Model knows only about itself. That is, the source code of the Model has no references to
either the View or Controller.
The View however, knows about the Model. It will poll the Model about the state, to know
what to display. That way, the View can display something that is based on what the Model
has done. But the View knows nothing about the Controller.
MY BOOK CART
93

The Controller knows about both the Model and the View. To take an example from a
game: If you click on the "fire" button on the mouse, the Controller knows what fire
function in the Model to call. If you press the button for switching between first and third
person, the Controller knows what function in the View to call to request the display
change.
The reason to keep it this way is to minimize dependencies. No matter how the View class is
modified, the Model will still work. Even if the system is moved from a desktop operating
system to a smart phone, the Model can be moved with no changes. But the View probably
needs to be updated, as will the Controller.
- Substitutable user interface :
Different views and controllers can be substituted to provide alternate user interfaces for the
same model.

- User interface components:
Because MVC demands that the user interface of an application be structured into a
hierarchy of objects and defines a standard relationship between these objects, generic
versions of these objects are possible. They are usually called user interface components and
no modern GUI environment is without a full complement of them usually combining view
and controller into a single object.

- Multiple simultaneous views of the same model :
Multiple different views can be active at the same time. Each view simultaneously and
independently presents the same information from the model.

- Synchronized views :
The change propagation mechanism insures that all views simultaneously reflect the current
state of the model.

- Easier user interface changes :
Changes affecting just the user interface of the application logic become easier to make.
- Easier testing :
With MVC it can be easier to test the core of the application, as encapsulated by the model.









MY BOOK CART
94

5.3 Testing Approach
5.3.1 Unit Testing

S.N
o
Test
Case
ID
Descriptio
n
Pre-
condition
Steps
Expected
Result
Actual
Result
Status
1.
TC_1 Verify
functionali
ty of
Login
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Login
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
2.
TC_2 Verify
functionali
ty of
Login
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Login
button.
4. Enter
valid user
id and
password
5. Tap on
login
Login
should be
done
successful
ly
Same as
Expected
Pass
3.
TC_3 Verify
functionali
ty of
Login
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Login
button.
4. Enter
invalid
user id
and
password.
5. Tap on
Login
button
Warning
message
No match
for E-Mail
Address
and/or
Password.
Should
be
displayed
and login
should be
unsuccess
ful.
Same as
Expected
Pass
MY BOOK CART
95

4.
TC_4 Verify
functionali
ty of
Home
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Home
button
Home
page
should be
displayed.
Same as
Expected
Pass

5.
TC_5 Verify
functionali
ty of wish
list button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Wish
List
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
6
TC_6 Verify
functionali
ty of My
Account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
My
Account
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
7.
TC_7 Verify
functionali
ty of
Shopping
cart
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
button
Shopping
cart
page
should be
dplayed.
Same as
Expected
Pass
8.
TC_8 Verify
functionali
ty of
Checkout
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Checkou
t button
Checkou
t page
should be
displayed
Same as
Expected
Pass
MY BOOK CART
96

9.
TC_9 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
Register
Account
page
should be
displayed.
Same as
Expected
Pass
10.
TC_10 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
First
name
It should
take only
alphabet
and it
should
not be
empty
Same as
Expected
Pass
11.
TC_11 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Last name
It should
take only
alphabet
and it
should
not be
empty.
Same as
Expected
Pass
12.
TC_12 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Email
It should
not be
empty.
Same as
Expected
Pass
13.
TC_13 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
1. Start
browser.
2. Enter
url
3. Create
an
account
button
It should
not be
empty
and only
numeric
entry
should be
allow.
Same as
Expected
Pass
MY BOOK CART
97

displayed 4. Enter
phone
umber
14.
TC_14 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Fax
It can be
empty
but value
should be
numeric.
Same as
Expected
Pass
15.
TC_15 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Company
name
It can be
empty
but value
can be
numeric
or
alphabet
Same as
Expected
Pass
16.
TC_16 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
company
id
It should
not be
empty.
Same as
Expected
Pass
17.
TC_17 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
1. Start
browser.
2. Enter
url
3. Create
an
account
button
Address1
should
not be
empty.
Same as
Expected
Pass
MY BOOK CART
98

displayed 4. Enter
Address 1
and
Address 2
18.
TC_18 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
City
City field
should
not be
empty.
Same as
Expected
Pass
19.
TC_19 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Post code
Post code
should
not be
empty
Same as
Expected
Pass
20.
TC_20 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Country
Country
field
should
not be
empty.
Same as
Expected
Pass
21.
TC_21 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Region/St
Region
field
should
not be
empty.
Same as
Expected
Pass
MY BOOK CART
99

ate
22.
TC_22 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Password
User can
able to
set
password.
Same as
Expected
Pass
23.
TC_23 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Confirm
Password
Entry in
Password
confirmat
ion
should be
same as
Password
field.
Otherwis
e error
message
should be
displayed.
Same as
Expected
Pass
24.
TC_24 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Select
yes or no
for
subscripti
on
At a time
only one
option
should be
selectable
.
Same as
Expected
Pass
MY BOOK CART
100

25.
TC_25 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Check
I have
read and
agree to
the
private
policy
check box
Check box
should be
checked
and if
check box
is not
checked
then on
tapping
continue
button,
you
should
accept
privacy
policy
message
should be
displayed.
Same as
Expected
Pass
26.
TC_26 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
4. Enter
Countinu
e
When all
mandator
y fileds
are filled
then
move to
confirmat
ion page.
Same as
Expected
Pass
27.
TC_27 Verify
functionali
ty of
Currency
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
currency
Dollar/P
ound
Euro.
Currency
should be
changed
to
dollor/po
und/euro
Same as
Expected
Pass
28.
TC_28 Verify
functionali
ty of
Shopping
cart drop
down list
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
drop
down list
if item is
added
then Item
should be
displayed
in drop
down list
others
wise
Same as
Expected
Pass
MY BOOK CART
101

Your
shopping
cart is
empty
message
should be
displayed
29.
TC_29 Verify
functionali
ty of X
button in
drop down
list
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed.
3. Book
should be
added in the
cart
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
drop
down list
4. Tap on
X button
in front
item
Item
should be
deleted
from the
list
Same as
Expected
Pass
30.
TC_30 Verify
functionali
ty of
Featured
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Add to
Cart
button
correspon
ding to
particular
book item
Feature
item
should be
added in
shopping
cart list
when tap
on Add to
cart
Same as
Expected
Pass
31.
TC_31 Verify
functionali
ty of
publisher
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
any
publisher
Correspo
nding
book
publisher
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
102

32.
TC_32 Verify
functionali
ty of
About us
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
About
us
button at
bottom of
page
About
us page
should be
displayed.
Same as
Expected
Pass
33.
TC_33 Verify
functionali
ty of
Delivery
informatio
n button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Delivery
Informati
on
button at
bottom of
page
Delivery
informati
on page
should
be
displayed.
Same as
Expected
Pass
34.
TC_34 Verify
functionali
ty of
Privacy
Policy
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Privacy
Policy
button at
bottom of
page
Privacy
Policy
page
should be
displayed.
Same as
Expected
Pass
35.
TC_35 Verify
functionali
ty of
Terms
and
condition
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Terms
and
Condition
button
at bottom
of page
Term &
Condition
cage
should be
displayed
Same as
Expected
Pass
MY BOOK CART
103

36.
TC_36 Verify
functionali
ty of
Contact
us button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Contact
us
button at
bottom of
page
contact
us page
should be
displayed.
Same as
Expected
Pass
37.
TC_37 Verify
functionali
ty of
Returns
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Returns
button at
bottom of
page
Product
Returns
page
should be
displayed.
Same as
Expected
Pass
38.
TC_38 Verify
functionali
ty of Site
map
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Site
map
button at
bottom of
page
site
map
page
should be
displayed.
Same as
Expected
Pass
39.
TC_39 Verify
functionali
ty of
Brands
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Brands
button at
bottom of
page
Find
your
favorite
brand
page
should be
displayed.
Same as
Expected
Pass
40.
TC_40 Verify
functionali
ty of Gift
Vouchers
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Gift
Vouchers
button
at bottom
of page
purchase
a gift
voucher
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
104

41.
TC_41 Verify
functionali
ty of
Affiliates
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Affiliates
button
at bottom
of page
Affiliate
Program
page
should be
displayed

Same as
Expected
Pass
42.
TC_42 Verify
functionali
ty of
Specials
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Specials
button at
bottom of
page
Special
Offers
page
should be
displayed.

Same as
Expected
Pass
43.
TC_43 Verify
functionali
ty of My
Account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
My
Account
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
44.
TC_44 Verify
functionali
ty of
Order
History
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Order
History
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
45.
TC_45 Verify
functionali
ty of Wish
List
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Wish
List
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
MY BOOK CART
105

46.
TC_46 Verify
functionali
ty of
Newslette
r button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
News
Letter
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass



























MY BOOK CART
106

5.3.2 Integration Testing

S.N
o
Test
Case
ID
Descriptio
n
Pre-
condition
Steps
Expected
Result
Actual
Result
Status
1.
TC_1 Verify
functionali
ty of
Home
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Home
button
Home
page
should be
displayed.
Same as
Expected
Pass
2.
TC_2 Verify
functionali
ty of wish
list button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Wish
List
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
3.
TC_3 Verify
functionali
ty of My
Account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
My
Account
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
4.
TC_4 Verify
functionali
ty of
Shopping
cart
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
button
Shopping
cart
page
should be
dplayed.
Same as
Expected
Pass
MY BOOK CART
107

5.
TC_5 Verify
functionali
ty of
Checkout
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Checkou
t button
Checkou
t page
should be
displayed
Same as
Expected
Pass
6.
TC_6 Verify
functionali
ty of
Create an
account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Create
an
account
button
Register
Account
page
should be
displayed.
Same as
Expected
Pass
7.
TC_7 Verify
functionali
ty of
Login
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Login
button
Account
Login
page
should be
displayed.
Same as
Expected
Pass
8.
TC_8 Verify
functionali
ty of
Currency
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
currency
Dollar/P
ound
Euro.
Currency
should be
changed
to
dollor/po
und/euro
Same as
Expected
Pass
9.
TC_9 Verify
functionali
ty of
Shopping
cart drop
down list
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Shoppin
g cart
drop
down list
if item is
added
then Item
should be
displayed
in drop
down list
others
wise
Your
shopping
cart is
Same as
Expected
Pass
MY BOOK CART
108

empty
message
should be
displayed
10.
TC_10 Verify
functionali
ty of
Featured
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Add to
Cart
button
correspon
ding to
particular
book item
Feature
item
should be
added in
shopping
cart list
when tap
on Add to
cart
Same as
Expected
Pass
11.
TC_11 Verify
functionali
ty of
publisher
items
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
any
publisher
Correspo
nding
book
publisher
page
should be
displayed.
Same as
Expected
Pass
12.
TC_12 Verify
functionali
ty of
About us
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
About
us
button at
bottom of
page
About
us page
should be
displayed.
Same as
Expected
Pass
13.
TC_13 Verify
functionali
ty of
Delivery
informatio
n button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Delivery
Informati
on
button at
Delivery
informati
on page
should
be
displayed.
Same as
Expected
Pass
MY BOOK CART
109

bottom of
page
14.
TC_14 Verify
functionali
ty of
Privacy
Policy
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Privacy
Policy
button at
bottom of
page
Privacy
Policy
page
should be
displayed.
Same as
Expected
Pass
15.
TC_15 Verify
functionali
ty of
Terms
and
condition
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Terms
and
Condition
button
at bottom
of page
Term &
Condition
cage
should be
displayed
Same as
Expected
Pass
16.
TC_16 Verify
functionali
ty of
Contact
us button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Contact
us
button at
bottom of
page
contact
us page
should be
displayed.
Same as
Expected
Pass
17.
TC_17 Verify
functionali
ty of
Returns
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Returns
button at
bottom of
page
Product
Returns
page
should be
displayed.
Same as
Expected
Pass
MY BOOK CART
110

18.
TC_18 Verify
functionali
ty of Site
map
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Site
map
button at
bottom of
page
site
map
page
should be
displayed.
Same as
Expected
Pass
19.
TC_19 Verify
functionali
ty of
Brands
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Brands
button at
bottom of
page
Find
your
favorite
brand
page
should be
displayed.
Same as
Expected
Pass
20.
TC_20 Verify
functionali
ty of Gift
Vouchers
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Gift
Vouchers
button
at bottom
of page
purchase
a gift
voucher
page
should be
displayed.
Same as
Expected
Pass
21.
TC_21 Verify
functionali
ty of
Affiliates
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Affiliates
button
at bottom
of page
Affiliate
Program
page
should be
displayed

Same as
Expected
Pass
22.
TC_22 Verify
functionali
ty of
Specials
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Specials
button at
bottom of
page
Special
Offers
page
should be
displayed.

Same as
Expected
Pass
MY BOOK CART
111

23.
TC_23 Verify
functionali
ty of My
Account
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
My
Account
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
24.
TC_24 Verify
functionali
ty of
Order
History
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Order
History
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
25.
TC_25 Verify
functionali
ty of Wish
List
button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
Wish
List
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass
26.
TC_26 Verify
functionali
ty of
Newslette
r button
1.Application
should be
added in
Wamp server
folder.
2. Home
screen
should be
displayed
1. Start
browser.
2. Enter
url
3. Tap on
News
Letter
button at
bottom of
page
Account
Login
page
should be
displayed
Same as
Expected
Pass





MY BOOK CART
112

5.4 Modification and Improvements

Like any other application My Book Cart has a great scope of evolving in the future. The
application will also have a desktop widget which will show the current status of the book
on the desktop to prevent frequent login. Also a mobile version of the application is
proposed which would run on Windows Mobile platform which would enhance the
portability as well as flexibility.

There are following things are still need to modify or improved.
(1) Application supports e-commerce and e- payment system but it requires
payment gateway to start application as it should work.
(2) Implementation of mobile version for the MyBookcart.
(3) Implementation of MyBookcart widget.
(4) Improvement in UI to make website more user friendly.




















MY BOOK CART
113

CHAPTER 6: RESULT AND DISCUSSION

6.1 Test Reports
On the basis of test case, the application is working properly. I am getting
same output as input given by me. Still there are some limitations due to
which bank transaction and book cannot be bought.

6.2 User Documentation


Diagram above is the home screen of MyBookcart Application. It has following parts:
1. Search
2. Currency
3. Create an account and login
4. My Account
MY BOOK CART
114

5. Wish list
6. Shopping cart
7. Checkout
8. Featured
9. Publisher
10. Information
11. Customer Service
12. Extras
13. My account

1. Search : User can search for any book by entering text in search field and
corresponding search result will be displayed.

2. Currency : There are three different types of currency converter are displayed.
(a) Euro
(b) Pound
(c) Dollor
By default, all prices will be displayed in dollor. By clicking any of the
above currency, user can see desired currency format.

3. Create an account and login : If users are not registered then to do shopping , they
need to register themselves. When user click on create an account then Registration page
will open and all information will be stored in database. If users are already registered
then they need to click on login where they can enter username and password for
shopping.

4. My Account: By clicking on My account, users can do login and see their purchase
history .

5. Wish List: It could be possible that users cannot get books for which they looking for.
By clicking on wish list, users can add their desired books and MyBookcart admin will
inform him through mail that book can be arranged or not.

6. Shopping cart: When users click on shopping cart then it will indirect to a page where
users can see shopped items and by clicking continue button, users can complete
shopping process.

7. Checkout: When users will click on checkout button then it will indirect to checkout
page from where they can continue shopping.

MY BOOK CART
115

8. Featured: Featured will display favorite or in demand books.

9. Publisher: It will display list publishers whom books are available on MyBookcart. By
clicking on any publisher, it will display corresponding publishers page and books.

10. Information: Information page contains following links:

About us: About us page will contain information about MyBookcart.
Delivery information : Delivery information page will contain information about
delivery reports.
Privacy policy: Privacy policy page will contain policies that MyBookcart follow
to maintain integrity and confidentiality of data.
Terms & Conditions: This page will include terms and conditions that users have to
follow.

11. Customer Service: Customer service page contains following links:

Contact us: If users want to contact with MyBookcart admin then they can click on
Contact us to get contact details.
Returns: If users want to return book then they need to fill their details in Returns
page.
Site map: Site map will display the locations where MyBookcart office is available.

12. Extras: Extras page contains following links:

Brands: By clicking on brands link, users can get info about brands which support
MyBookcart site.
Gift Vouchers: By clicking on Gift voucher link, users can get info about Gift
vouchers available for shopping.
Affiliates: By clicking on affiliates link, users will redirect to affiliated .
a. Specials: This page will info about special books and events.

13. My account: My Account page contains following links:

My Account: By clicking on My account, users can do login and see their purchase
history .
Order History : Users can get to know about their order history by clicking on
order history.
MY BOOK CART
116

Wish list: It could be possible that users cannot get books for which they looking
for. By clicking on wish list, users can add their desired books and MyBookcart
admin will inform him through mail that book can be arranged or not.
Newsletter: This page will include news related to books and users can subscribe for
news by filling their detail.





























CHAPTER 7: CONCLUSION

7.1 Conclusion
MY BOOK CART
117

MyBookcart has been entrusted with sensitive, personal data to accomplish its goals. The
success of MyBookcart depends on the availability, integrity and confidentially of data.
One of the mechanisms to protect data is to implement data integrity and validation controls.
Data integrity controls are used to protect data from accidental or malicious alteration or
destruction and to provide assurance to the user that the information meets the expectations
about its quality and that it has not been altered

7.2 Limitation of the System
Our study showed us that it would be really difficult for us to develop a My Book cart with
all features due to the time constraint as well as provide facility of e-commerce because for
e-commerce, admin requires internet certifications.

7.3 Future Scope of the Project
The functionality that we were going to implement in our My Book cart Application are
home screen and admin page, mobile simulator for using application on mobile and desktop
widget.















REFERENCES

Bibliography:
MY BOOK CART
118

1. Html Black Book by Steven Holzner
2. CSS: The Definitive GuidE by Ryan Moore and Darren Lutz
3. Visual Studio Tools for Office 2007 by Eric Carter, Eric Lippert
4. Beginning Silverlight 3 by Robert Lair
5. SQLite by Matthew MacDonald
6. Microsoft SQL Server 2008 For Dummies by Mike Chapple
Websites :
1. http://en.wikipedia.org/wiki/PHP
2. http://in.php.net/
3. http://www.w3schools.com/php/default.asp
4. http://www.sqlite.org/
5. http://en.wikipedia.org/wiki/SQLite
6. http://www.functionx.com/sqlserver/
7. http://www.quackit.com/sql_server/tutorial/
8. http://www.tutorialized.com/tutorials/MsSQL/1











GLOSSARY

Annotated diagram Labelled drawing.
Appearance The way that something looks.
MY BOOK CART
119

Artefact Any product that has been made
Bar chart Type of graph with horizontal or vertical bars
representing the values.
Fow chart Diagram showing a sequence of operations,
that is, the order in which they are carried out.
Pie chart Type of graph which show the proportion of
parts to the whole.
Customer survey A way of finding out what people think of a
product or idea, often by a questionnaire.
Design To create a plan or scheme either from new
ideas or by presenting existing materials in a
new way.
Design brief A statement of what needs to be designed
and/or made.
Design process Process of designing from identifying a need,
generating a design, planning and making it
and evaluating its performance.
Design proposal A possible solution in response to a design
brief disassembly Breaking down a product
into its component










Appendix A
1. PHP :- PHP stands for PHP: Hypertext Preprocessor. PHP is a widely-used, open
source scripting language. PHP scripts are executed on the server. PHP is free to
download and use. PHP files can contain text, HTML, JavaScript code, and PHP
code. PHP code are executed on the server, and the result is returned to the browser
as plain HTML. PHP files have a default file extension of ".php". PHP can generate
dynamic page content. PHP can create, open, read, write, and close files on the
MY BOOK CART
120

server. PHP can collect form data. PHP can send and receive cookies. PHP can add,
delete, modify data in your database. PHP can restrict users to access some pages on
your website. PHP can encrypt data

2. HTML:- HTML is a language for describing web pages.HTML stands for Hyper
Text Markup Language. HTML is a markup language. A markup language is a set
of markup tags. The tags describe document content . HTML documents contain
HTML tags and plain text. HTML documents are also called web pages.

3. Java script:- A scripting language is a lightweight programming language.
JavaScript is programming code that can be inserted into HTML pages. JavaScript
inserted into HTML pages, can be executed by all modern web browsers. JavaScript
is easy to learn.
4. CSS:- CSS stands for Cascading Style Sheets. Styles define how to display HTML
elements. Styles were added to HTML 4.0 to solve a problem. External Style
Sheets can save a lot of work. External Style Sheets are stored in CSS files.

5. SQLite:- SQLite is an in-process library that implements a self-contained,
serverless, zero-configuration, transactional SQL database engine. The code for
SQLite is in the public domain and is thus free for use for any purpose, commercial
or private. SQLite is currently found in more applications than we can count,
including several high-profile projects. SQLite is an embedded SQL database
engine. Unlike most other SQL databases, SQLite does not have a separate server
process. SQLite reads and writes directly to ordinary disk files. A complete SQL
database with multiple tables, indices, triggers, and views, is contained in a single
disk file. The database file format is cross-platform - you can freely copy a database
between 32-bit and 64-bit systems or between big-endian and little-endian
architectures. These features make SQLite a popular choice as an Application File
Format. Think of SQLite not as a replacement for Oracle but as a replacement for
fopen()

6. Wamp server:- WampServer is a Windows web development environment. It
allows you to create web applications with Apache2, PHP and a MySQL database.
Alongside, PhpMyAdmin allows you to manage easily your databases.
WampServers functionalities are very complete and easy to use so we wont explain
here how to use them. With a left click on WampServers icon, you will be able to:
manage your Apache and MySQL services
switch online/offline (give access to everyone or only localhost)
install and switch Apache, MySQL and PHP releases
manage your servers settings
access your logs
MY BOOK CART
121

access your settings files
create alias
With a right click :
change WampServers menu language
access this page

MVC Architecture :- Modelviewcontroller (MVC) is a software architecture pattern
which separates the representation of information from the user's interaction with it.
A controller can send commands to its associated view to change the view's
presentation of the model (e.g., by scrolling through a document). It can also
send commands to the model to update the model's state (e.g., editing a
document).
A model notifies its associated views and controllers when there has been a
change in its state. This notification allows the views to produce updated output,
and the controllers to change the available set of commands. A passive
implementation of MVC omits these notifications, because the application does
not require them or the software platform does not support them.
A view requests from the model the information that it needs to generate an
output representation.





Appendix B
Important Terms

1) LINQ:- LINQ defines a set of method names (called standard query operators, or standard
sequence operators), along with translation rules from so-called query expressions to
expressions using these method names, lambda expressions and anonymous types. These can,
for example, be used to project and filter data in arrays, enumerable classes, XML (XLINQ),
relational database, and third party data sources.
LINQ to XML is a built-in LINQ data provider that provides a clean programming
model to read, construct and write XML data. We can use LINQ to XML to perform
LINQ queries over XML. It provides much richer querying support than the low-
level XmlReader/XmlWriter API in .NET. It uses less memory and more efficient
than the XmlDocument, which is built on Document Object Model(DOM)
MY BOOK CART
122


2) BLOBs (binary large objects):- A blob is a data type that can store binary data. This is
different than most other data types used in databases, such as integers, floating point numbers,
characters, and strings, which store letters and numbers. Since blobs can store binary data, they
can be used to store images or other multimedia files. For example, a photo album could be
stored in a database using a blob data type for the images, and a string data type for the captions.
Because blobs are used to store objects such as images, audio files, and video clips, they often
require significantly more space than other data types. The amount of data a blob can store
varies depending on the database type, but some databases allow blob sizes of several gigabytes.

3) XAML:- Extensible Application Markup Language (XAML) which is pronounced as
Zamel is Microsoft's new markup language to define dynamic or static user interfaces
for .NET applications. XAML will be used in Windows Vista to design user interfaces,
but can be applied to Windows XP or Windows 2003 as well.XAML comes to separate
the UI code from application logic code and is very similar to MVC. XAML is tied to
Windows Presentation foundation (codenamed Avalon) to build a whole user interface
in .NET 3.0 and Windows Vista. XAML is an XML child indeed. Every XAML code
must be a well-formed XML file and XAML inherits all XML definitions and rules. We
can consider it as the last part of a chain that contains HTML, XHTML and other
markup languages for UI.What makes XAML different from other XML children is
what it represents. Every XAML element represents a .NET CLR class. This lets you to
extend and work on XAML easily. The model that XAML in conjunction with Windows
Presentation Foundation provides to let developers design a rich user interface is similar
to code behind and code inline model in ASP.NET. This means you can put your
application logic in a separate file or embed it inline in XAML file itself. XAML files
will be compiled to BAML files. The advantage of BAML is it is smaller than XAML
and is easier to read so it is faster to load.

4) SketchFlow Prototype:- SketchFlow, new in Expression 3, enables you to quickly
create prototypes that demonstrate UI flow, screen layout and application state
transitions which can then be effectively presented to your client for immediate
feedback.

5) WPF:- The Windows Presentation Foundation (or WPF) is a graphical subsystem for
rendering user interfaces in Windows-based applications. WPF, previously known as
"Avalon", was initially released as part of .NET Framework 3.0. Designed to remove
dependencies on the aging GDI subsystem, WPF is built on DirectX, which provides
hardware acceleration and enables modern UI features like transparency, gradients, and
transforms. WPF provides a consistent programming model for building applications
and provides a clear separation between the user interface and the business logic.

MY BOOK CART
123

6) WCF Rich Internet application (RIA) Services:- WCF RIA Services simplifies the
development of n-tier solutions for Rich Internet Applications (RIA), such as Silverlight
applications. A common problem when developing an n-tier RIA solution is
coordinating application logic between the middle tier and the presentation tier. To
create the best user experience, you want your RIA client to be aware of the application
logic that resides on the server, but you do not want to develop and maintain the
application logic on both the presentation tier and the middle tier. RIA Services solves
this problem by providing framework components, tools, and services that make the
application logic on the server available to the RIA client without requiring you to
manually duplicate that programming logic. You can create a RIA client that is aware of
business rules and know that the client is automatically updated with latest middle tier
logic every time that the solution is re-compiled.

7) Component Object Model (COM):- WCF RIA Services simplifies the development of
n-tier solutions for Rich Internet Applications (RIA), such as Silverlight applications. A
common problem when developing an n-tier RIA solution is coordinating application
logic between the middle tier and the presentation tier. To create the best user
experience, you want your RIA client to be aware of the application logic that resides on
the server, but you do not want to develop and maintain the application logic on both the
presentation tier and the middle tier. RIA Services solves this problem by providing
framework components, tools, and services that make the application logic on the server
available to the RIA client without requiring you to manually duplicate that
programming logic. You can create a RIA client that is aware of business rules and
know that the client is automatically updated with latest middle tier logic every time that
the solution is re-compiled.

8) CLI languages:- CLI Languages are computer programming languages that are used
to produce libraries and programs that conform to the Common Language Infrastructure
specifications. With some notable exceptions, most CLI languages compile entirely to
the Common Intermediate Language (CIL), an intermediate language that can be
executed using an implementation of CLI such as the Common Language Runtime
(CLR), a part of the Microsoft .NET Framework, Mono, or Portable.NET.

9) Hot-Add CPUs and Hot-Add Memory:- Hot add CPU is the ability to dynamically
add CPUs to a running system. Adding CPUs can occur physically by adding new
hardware, logically by online hardware partitioning, or virtually through a virtualization
layer. Starting with SQL Server 2008, SQL Server supports hot add CPU. Hot Add
Memory requires SQL Server Enterprise and is only available for 64-bit SQL Server,
and for 32-bit SQL Server when AWE is enabled. Hot Add Memory is not available for
32-bit SQL Server when AWE is not enabled. Hot Add Memory is only available for
MY BOOK CART
124

Windows Server 2003, Enterprise and Datacenter editions. It also requires special
hardware supported by the hardware vendor.

10) FQDN(Fully qualified Domain Name):- A fully qualified domain name (FQDN),
sometimes referred to as an absolute domain name, is a domain name that specifies its
exact location in the tree hierarchy of the Domain Name System (DNS). It specifies all
domain levels, including the top-level domain, relative to the root domain. A fully
qualified domain name is distinguished by its unambiguity; it can only be interpreted
one way. For example, given a device with a local hostname myhost and a parent
domain name example.com, the fully qualified domain name is myhost.example.com.
The FQDN therefore uniquely identifies the device while there may be many hosts in
the world called myhost, there can only be one myhost.example.com.

11) Dynamic Host Configuration Protocol(DHCP):- Dynamic Host Configuration
Protocol (DHCP) is a network application protocol used by devices (DHCP clients) to
obtain configuration information for operation in an Internet Protocol network. This
protocol reduces system administration workload, allowing devices to be added to the
network with little or no manual intervention.

12) Redundant Array Of Inexpensive Disks(RAID):-RAID is an acronym first defined by
David A. Patterson, Garth A. Gibson and Randy Katz at the University of California,
Berkeley in 1987 to describe a Redundant Array of Inexpensive Disks,
[1]
a technology
that allowed computer users to achieve high levels of storage reliability from low-cost
and less reliable PC-class disk-drive components, via the technique of arranging the
devices into arrays for redundancy. A number of standard schemes have evolved which
are referred to as levels. There were five RAID levels originally conceived, but many
more variations have evolved, notably several nested levels and many non-standard
levels (mostly proprietary).

13) Simple Mail Transfer Protocol(SMTP):It is an Internet standard for electronic mail
(e-mail) transmission across Internet Protocol (IP) networks. SMTP was first defined in
RFC 821 (STD 10), and last updated by RFC 5321 (2008) which includes the extended
SMTP (ESMTP) additions, and is the protocol in widespread use today.
14) Post Office Protocol(POP3):It is an application-layer Internet standard protocol used
by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection.
POP and IMAP (Internet Message Access Protocol) are the two most prevalent Internet
standard protocols for e-mail retrieval. Virtually all modern e-mail clients and servers
support both. The POP protocol has been developed through several versions, with
version 3 (POP3) being the current standard.

MY BOOK CART
125

15) Internet Message Access Protocol(IMAP):It is one of the two most prevalent Internet
standard protocols for e-mail retrieval, the other being the Post Office Protocol.
[1]

Virtually all modern e-mail clients and mail servers support both protocols as a means of
transferring e-mail messages from a server, such as those used by Gmail,
[2]
to a client,
such as Mozilla Thunderbird, KMail, Apple Mail and Microsoft Outlook.

16) File Replication System(FRS):It is a Microsoft Windows Server service for
distributing folders stored in the SYSVOL shared folder on domain controllers and
Distributed File System (DFS) shared folders. It is also known as NTFRS after the name
of the executable file that runs the service. This service is part of Microsoft's Active
Directory.

17) Site Replication System(SRS):The SRS is an exchange 200 service that allows
integration with Exchange Server 5.5 , DS to other Exchange Server 5.5 services . We
can use the SRS only if we are running exchange 2000 in mixed mode. A mixed mode
Exchange Server 2000 organization includes Exchange Server 5.5, Exchange Server 5.5
and Exchange Server 4.0 legacy Server.

You might also like