The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

Where an E-catalog can provide quick access to information

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by Jean-Luc Palmyre, 2020-05-23 03:12:46

Developing an E-catalog for Autoland’s car dealership business

Where an E-catalog can provide quick access to information

Keywords: E-Catalogue, Web based, car dealership,Environmental friendly

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Product_list.php

<?php include 'view/header.php'; ?> <!-- always display header on top
of page -->

<div id="main">

<div id="sidebar">
<h4>Categories</h4> <!-- list all the different categories as

links -->
<ul class="nav">

?>"> <?php foreach($categories as $category) : ?>
<li>

<a href="?category_id=<?php echo $category->getID();

<?php echo $category->getName(); ?>
</a>
</li>
<?php endforeach; ?>

<h4>About</h4>
<a href="about.php">About</a>

<h4>Search</h4>
<form action="search/results.php" method="post">
<input name="searchterm" type="text">
<input type="submit" value="Search">

</form>

<h4>Admin</h4>
<a href="product_manager/index.php">Admin</a>

</ul>
</div>

<div id="content"> <!-- display available vehicles for selected
category -->

<h4><?php echo $current_category->getName(); ?></h4>
<ul class="nav">

<?php foreach ($products as $product) : ?>
<li>

<a href="?action=view_product&product_id=<?php
echo $product->getID(); ?>">

<img src = "images/images.jpg" width ="30" height="20">
<?php echo $product->getName(); ?>

</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php include 'view/footer.php'; ?> <!-- always display footer at bot-
tom of page -->

PAGE 100

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Product_view.php

<?php include 'view/header.php'; ?> <!-- always display header at top
of page -->

<div id="main"> <!-- list all the different categories as
<div id="sidebar">
<h4>Categories</h4>

links -->
<ul class="nav">

?>"> <?php foreach($categories as $category) : ?>
<li>

<a href="?category_id=<?php echo $category->getID();

<?php echo $category->getName(); ?>
</a>
</li>
<?php endforeach; ?>

<h4>About</h4>
<a href="about.php">About</a>

<h4>Search</h4>
<form action="../search/results.php" method="post">
<input name="searchterm" type="text">
<input type="submit" value="Search">
</form>

<h3>Admin</h3>
<a href="product_manager/index.php">Admin</a>

</ul>
</div>

<div id="content">
<h4><?php echo $product->getName(); ?></h4>
<div id="left_column">
<p>
<!-- display image of vehicle and price -->
<img src="<?php echo $product->getImagePath(); ?>"
alt="<?php echo $product->getImageAltText(); ?>"

width ="550" height ="350" />
</p>

</div>

<div id="right_column">
<p><b>Price:</b> SR<?php echo $product->getPriceFormat-

ted(); ?></p>
</div>

</div>
</div>

<?php include 'view/footer.php'; ?> <!-- always display footer at bot-
tom of page -->

PAGE 101

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Product.php

<?php
class Product {

private $category, $id, $code, $name, $price;

public function __construct($category, $code, $name, $price) {
$this->category = $category;
$this->code = $code;
$this->name = $name;
$this->price = $price;

}

public function getCategory() {
return $this->category;

}

public function setCategory($value) {
$this->category = $value;

}

public function getID() {
return $this->id;

}

public function setID($value) {
$this->id = $value;

}

public function getCode() {
return $this->code;

}

public function setCode($value) {
$this->code = $value;

}

public function getName() {
return $this->name;

}

public function setName($value) {
$this->name = $value;

}

public function getPrice() {
return $this->price;

}

public function setPrice($value) {
$this->price = $value;

}

public function getPriceFormatted() {
$formatted_price = number_format($this->price, 2);

PAGE 102

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

return $formatted_price;
}

}
public function getImageFilename() {

$image_filename = $this->code . '.jpg';
return $image_filename;
}

public function getImagePath() {
$image_path = 'images/' . $this->getImageFilename();
return $image_path;

}

public function getImageAltText() {
$image_alt = 'Image: ' . $this->getImageFilename();
return $image_alt;

}
}
?>

PAGE 103

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Category.php

<?php
class Category {

private $id;
private $name;

public function __construct($id, $name) {
$this->id = $id;
$this->name = $name;

}

public function getID() {
return $this->id;

}

public function setID($value) {
$this->id = $value;

}

public function getName() {
return $this->name;

}

public function setName($value) {
$this->name = $value;

}
}
?>

PAGE 104

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Results.php

<?php include 'header.php'; ?> <!-- always display header at top of
page -->

<p>

<?php

$searchterm=$_POST['searchterm'];

$searchterm= trim($searchterm); //trim the input to remove spaces and
not make it case sensitive

if (!get_magic_quotes_gpc())
{

$searchterm = addslashes($searchterm);
}

@ $db = new mysqli('localhost:3307', 'root', '', 'autoland'); //con-
nects to database

if (mysqli_connect_errno()) Please try again
{

echo 'Error: Could not connect to database.
later.';

exit;
}

$query = "select * from products where productName like '%".$search-
term."%'"; //selects match from database

$result = $db->query($query);

$num_results = $result->num_rows;

echo '<h1>Number of vehicles found: '.$num_results.'</h1>'; //return
results of search

for ($i=0; $i <$num_results; $i++)
{

$row = $result->fetch_assoc();
echo '<p><strong>'.($i+1).'. Name: ';
echo htmlspecialchars(stripslashes($row['productName']));
echo '<br />Price: SR';
echo stripslashes($row['listPrice']);
echo '</p>';

}
?>

<div id="main">

<div id="sidebar">

<h4>Home</h4>
<a href="../index.php">Home</a>

PAGE 105

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

<p>

<h4>Search</h4>
<form action="../search/results.php" method="post">
<input name="searchterm" type="text">
<input type="submit" value="Search">
</form>
<p>
</div>
</div>

<?php include 'footer.php'; ?> <!-- always display footer at bottom of
page -->

PAGE 106

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Database.php

<?php
class Database {

private static $dsn = 'mysql:host=localhost:3307;dbname=autoland';
private static $username = 'root';
private static $password = '';
private static $db;

private function __construct() {}

public static function getDB () {
if (!isset(self::$db)) {
try {
self::$db = new PDO(self::$dsn,
self::$username,
self::$password);
} catch (PDOException $e) {
$error_message = $e->getMessage();
echo" Unable to connect!";
exit();
}
}
return self::$db;

}
}
?>

PAGE 107

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Product_add.php

<?php include 'header.php'; ?>

<div id="main">

<?php include '../view/mini_sidebar.php'; ?>
<div id ="content">

<h1>Add Product</h1>
<form action="home.php" method="post" id="add_product_form">

<input type="hidden" name="action" value="list_products" />

<label>Category:</label>
<select name="category_id">
<?php foreach ($categories as $category) : ?>

<option value="<?php echo $category->getID(); ?>">
<?php echo $category->getName(); ?>

</option>
<?php endforeach; ?>
</select>
<br />

<label>Code:</label>
<input type="input" name="code" />
<br />

<label>Name:</label>
<input type="input" name="name" />
<br />

<label>Price:</label>
<input type="input" name="price" />
<br />

<label>&nbsp;</label>
<input type="submit" value="Add Product" />
<br />
</form>
<p><a href="home.php?action=list_products">View Product
List</a></p>
</div>
</div>
<?php include 'footer.php'; ?>

PAGE 108

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Uploadform.php

<?php include 'header.php'; ?>
<!DOCTYPE html>
<html>

<div id="main">
<div id="content">
<?php include '../view/mini_sidebar.php'; ?>
<h1>Upload Image</h1> <!-- calls the upload.php file to

browse for the image on PC -->
<form id="upload_form"
action="upload.php" method="POST"
enctype="multipart/form-data">
<input type="hidden" name="action" value="upload"/>
<input type="file" name="file1"/>
<input id="upload_button" type="submit" value="Up-

load"/>
</form>
<br />
<h2>Images in the directory</h2> <!-- displays images

currently saved in the directory -->
<?php if (count($files) == 0) : ?>
<p>No images uploaded.</p>
<?php else: ?>
<ul>
<?php foreach($files as $filename) : //allows de-

letion of images
$file_url = $image_dir . '/' .
$filename;
$delete_url = '?action=delete&filename=' .
urlencode($filename);

?>
<li>
<a href="<?php echo $delete_url;?>">
<img src="delete.png" alt="De-

lete"/></a>
<a href="<?php echo $file_url; ?>">
<?php echo $filename; ?></a>

</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div><
</div><
</body>
</html>
<?php include 'footer.php'; ?>

PAGE 109

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Product_list.php (Admin)

<?php include 'header.php'; ?>

<div id="main">

<?php include '../view/mini_sidebar.php'; ?>
<div id ="content">

<h1>Add Product</h1>
<form action="home.php" method="post" id="add_product_form">

<input type="hidden" name="action" value="list_products" />

<label>Category:</label>
<select name="category_id">
<?php foreach ($categories as $category) : ?>

<option value="<?php echo $category->getID(); ?>">
<?php echo $category->getName(); ?>

</option>
<?php endforeach; ?>
</select>
<br />

<label>Code:</label>
<input type="input" name="code" />
<br />

<label>Name:</label>
<input type="input" name="name" />
<br />

<label>Price:</label>
<input type="input" name="price" />
<br />

<label>&nbsp;</label>
<input type="submit" value="Add Product" />
<br />
</form>
<p><a href="home.php?action=list_products">View Product
List</a></p>
</div>
</div>
<?php include 'footer.php'; ?>

PAGE 110

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

About.php

<?php include 'view/header.php'; ?>

<div id="Main">

<?php include 'view/mini_sidebar.php'; ?>

<div id="About" style="vertical-align:middle; text-align:center">
<p>Tel: +248 4324589</p>
<p>Opening hours; Mon - Fri 09:00am to 05:00pm and Sat 09:00am

to 01:00pm</p>
<p>E-mail address: [email protected]</p>
<p>Showroom location: Providence, Autoland</p>

<img src="Capture.jpg" width="500" height="300">
</div>
</div>

<?php include 'view/footer.php'; ?>

PAGE 111

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Sidebar.php

<div id="sidebar">
<h4>Categories</h4>
<ul class="nav">

?>"> <?php foreach($categories as $category) : ?>
<li>

<a href="?category_id=<?php echo $category->getID();

<?php echo $category->getName(); ?>
</a>
</li>
<?php endforeach; ?>

<h4>Home</h4>
<a href="../index.php">Home</a>

</ul>
</div>

Mini_Sidebar.php

<div id="sidebar">
<ul class="nav">

<h3>Home</h3>
<a href="../index.php">Home</a>

<h4>Search</h4>
<form action="../search/results.php" method="post">
<input name="searchterm" type="text">
<input type="submit" value="Search">
</form>

</ul>
</div>

PAGE 112

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Style.css

body {
color: #fff;
font: 87.5%/1.5em 'Open Sans', sans-serif;
background:url(black.jpg)no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;}

.form-wrapper {
width:300px;
height:370px;

position: absolute;
top: 50%;
left: 48%;
margin: -184px 0px 0px -155px;
background: rgba(0,0,0,0.27);
padding: 15px 25px;
border-radius: 5px;
box-shadow: 0px 1px 0px rgba(0,0,0,0.6),inset 0px 1px 0px
rgba(255,255,255,0.04);
}
.form-item {
width:100%;
}

h3{
font-size: 30px;
font-weight: 640;
text-align: center;
margin-bottom: 10px;
color: white;
padding:6px;
font-family:'Lucida Handwriting';

}

.form-item input{
border: none;
background:transparent;
color: #fff;
margin-top:11px;
font-family: 'Open Sans', sans-serif;
font-size: 1.2em;
height: 49px;
padding: 0 16px;
width: 100%;
padding-left: 55px;

}
input[type='password']{

background: transparent;
background-position: 10px 50%;
}

PAGE 113

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

input[type='text']{
background: transparent;
background-position: 10px 50%;

}

.form-item input:focus {
outline: none;
border:1.4px solid #cfecf0;

}

.button-panel {
margin-bottom: 20px;
padding-top: 10px;
width: 100%;

}

.button-panel .button {
background: #00b6df;
border: none;
color: #fff;
cursor: pointer;
height: 50px;
font-family: 'helvetica','Open Sans', sans-serif;
font-size: 1.2em;
text-align: center;
text-transform: uppercase;
transition: background 0.6s linear;
width: 100%;
margin-top:10px;

}

.button:hover {
background: #6eb7cb;

}

.form-item input, .button-panel .button {
border-radius: 2px

}

.reminder {
text-align: center;

}

.reminder a {
color: #fff;
text-decoration: none;
transition: color 0.3s;

}

.reminder a:hover {
color: #cab6bf;

}

PAGE 114

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

Main.css

/* HTML stylesheet for the design */
body {

margin-top: 0;
background:url(black.jpg)no-repeat center center fixed;
font-family: Arial, Helvetica, sans-serif;
}
h1 {
font-size: 200%;
font-weight: bold;
padding: .5em 0 .25em;
text-align: center;
}
h2 {
font-size: 120%;
margin: 0;
padding: .25em 0 .5em;
text-align: center;
}
h1, h3, h4, h2 {
color:#660000;
}

h3 {
font-size: 150%;
margin: 0;
padding: .5em 0 .25em;

}
h4{

font-size: 150%;
margin: 0;
padding: .5em 0 .25em;
text-align: left;
}

ul {
margin: 0 0 1em 0;
padding: 0 0 0 2.5em;

}
li {

margin: 0;
padding: 0;
}

ul.nav {
list-style-type: none;
margin-left: 0;
padding-left: 0;

}

ul.nav li {
padding-bottom: 0.5em;

}

PAGE 115

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

a{
color:#003333;

}
a:hover {

color: blue;
}

table {
border: 2px solid black;
border-collapse: collapse;

}
td, th {

border: 1px solid black;
padding: .2em .5em .2em .5em;
vertical-align: top;
text-align: left;
}
form {
margin: 0;
}
br {
clear: left;
}
#images_hz {
width: 960px;
height: auto;
overflow: hidden;
}
#images_hz img {
display: inline;
margin: 100px;}

p{
margin: 0;
padding: .5em 0 .25em;
text-align: center;

}

PAGE 116

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

9.0 References

Dawson, C. (2009). Projects in computing and information systems. Harlow, England:
Addison-Wesley.

Schmitz, V. and Leukel, J. (2005). Findings and Recommendations from a Pan-European
Research Project: Comparative Analysis of E-Catalog Standards. International Journal of
IT Standards and Standardization Research, (ITJ2897), pp.51-65.

Hmoud Alshibly, D. and Kamal Qteishat, D. (2015). The role of e-marketing front end
applications on customer retention Evidence from Jordan. Journal of Theoretical and
Applied Information Technology, 78(1), pp.25-50.

Hossain, M., Prybutok, V. and Abdullah, A. (2009). The impact of learning style on web
shopper electronic catalog feature preference. Journal of Electronic Commerce
Research, 10(1), pp.1-15.

Terada, E. (2012). 5 Reasons Why We Use WordPress - Fresh Consulting. [online] Fresh
Consulting. Available at: https://www.freshconsulting.com/5-reasons-why-we-use-
wordpress/ [Accessed 12 Nov. 2016].

Nbs.gov.sc. (2016). National Bureau of Statistics. [online] Available at:
http://www.nbs.gov.sc/statistics/merchandise-trade/ [Accessed 23 Dec. 2016].

Muryjas, P. and Muryjas, M. (2013). Usage of IT tools in e-marketing campaign design
and management in small and medium-sized enterprises. Studies and Proceedings Polish
Association for Knowledge Management, 67, pp.70-83.

The World Counts. (2016). Paper Waste Facts. [online] Available at:
http://www.theworldcounts.com/stories/Paper-Waste-Facts [Accessed 29 Dec. 2016].

Free source code, tutorials and articles. (2015). Terms and Conditions. [online] Available
at: http://www.sourcecodester.com/terms-and-conditions.html [Accessed 19 Dec.
2016].

Vannier, R., Ponzo, C. and Uranie, S. (2016). A step further to protect the environment:
Seychelles announces ambitious renewable energy plans. [online]
Seychellesnewsagency.com. Available at:
http://www.seychellesnewsagency.com/articles/3404/A+step+further+to+protect+the+

PAGE 117

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

environment+Seychelles+announces+ambitious+renewable+energy+plans [Accessed 29
Dec. 2016].

Creately.com. (2017). Creately - Online Diagram Editor - Try it Free. [online] Available at:
https://creately.com/app/?tempID=h165rwt81&login_type=demo# [Accessed 10 Mar.
2017].

Automotive News. (2015). Honda dealer takes all ads online. [online] Available at:
http://www.autonews.com/article/20121217/RETAIL03/312179987/honda-dealer-
takes-all-ads-online [Accessed 21 Nov. 2016].

Barkholz, D. (2012). Honda dealer takes all ads online. [online] Automotive News. Availa-
ble at: http://www.autonews.com/article/20121217/RETAIL03/312179987/honda-
dealer-takes-all-ads-online [Accessed 8 Nov. 2016].

Catalogues4business.co.uk. (2015). The importance of catalogues as a sales and market-
ing tool - Catalogues 4 Business. [online] Available at: http://www.catalogues4busi-
ness.co.uk/blog/post/the-importance-of-catalogues-as-a-sales-and-marketing-tool/ [Ac-
cessed 21 Mar. 2017].

App.moqups.com. (2017). Online Mockup, Wireframe & UI Prototyping Tool · Moqups.
[online] Available at: https://app.moqups.com/ [Accessed 20 Feb. 2017].

PAGE 118

Jean-Luc Palmyre SRN:120299364 CO3320 Final Report

10.0 Evaluation

The final year project has taught me many things of which would be useful when
moving to the world of work later on. Since it is the first time I have undertaken
a software development, time management has been a challenge and
experience has been earned when it comes to dealing with time and stress.
Discipline was key in order to complete the project in time parallel to doing
assignments and studying for exams.

I managed to achieve all the objectives set for the E-catalogue though I needed
re-scoping along the way in order to be able to meet the deadline by changing a
few steps in my project plan. The analysis phase was an interesting one which I
enjoyed for it was the first time I undertook an interview as an interviewer. This
has made me more confident when interacting with people in a business
environment. Though for this phase I would have looked at more examples and
designs of E-catalogues if I was going to do it differently and also I was
disappointed in terms of the amount of relevant information I gathered towards
the design of the website itself, I would have come up with better questionnaires
and survey in order to get the best information out of these people if I was to
redo it. The main challenge after this was the design phase in which I had to
carefully design the interface as to not have many difficulties later on to code
and implement it. The implementation phase went quite smooth, since for
server side scripting I reused codes from other sources this made my life much
easier and saved me loads of time. This also helped me to better understand
PHP and maybe now if I would redo this project would be able to code this part
on my own now without reusing codes. It was very fulfilling experience to
receive such great feedbacks from the test users after they tested the system,
though the prototype needs further improvement to bring it to the level it needs
to be in order to be a success later on for the Autoland.

The aim of “providing an online solution to showcase Autoland’s information
and its available fleet” was achieved through the prototype of an E-catalogue
and I think that by making the first step towards promoting the use of E-
catalogues to a car dealer in Seychelles, we would later see other car dealers
doing the same if the prototype later goes on to be a success. This would limit
paper waste and comply to the country’s main characteristic of keeping our
islands green and pollution free.

PAGE 119


Click to View FlipBook Version