Portfolio: Mallard Goods
Introduction
- URL:
- http://www.mallardgoods.co.uk/
- Description:
- Mallard Goods is a shopping website selling dolls house furniture, miniature railway, dressing-up clothes, magic tricks, practical jokes and bar equipment. It features a custom-built shopping cart which interfaces with Paypal for credit card or Paypal account payments, and a password-protected back-end for adding, editing and removing products and categories.
- Technologies used:
- MySQL, php, XSLT, XHTML, Javascript, and the Paypal Shopping Cart. (See below for more information.)
Features & Screenshots
- Browsing of products by category
- Individual product pages formatted to be familiar to eBay users
- Custom-built shopping cart, which interfaces with Paypal for payments from credit cards and Paypal accounts

- Each product can have a maximum quantity that can be bought at any one time, which would be useful for limited-stock products
- A password-protected control panel. This makes the task of managing the site easier, especially for people who do not have experience managing a database

Viewing these screenshots requires CSS and Javascript. If you can see this message then you have CSS disabled or your browser down not support it. To view the screenshots, either disable Javascript or click the following button to disable screenshot effects for this page:
Technologies Used
I used to following languages and technologies in the website:
- MySQL
- All the information about the products for sale is stored in a MySQL database.
- php
php is the programming language used to create the pages. It takes information from the database and puts it in an xml document to serve to the browser.
All information that is posted to the server is checked for validity before being used, and is properly escaped before being used with the database, for security.
- XSLT
- All the xml documents are linked to the same site-wide XSLT stylesheet, which transforms the documents into web pages. This way the data from the database and the php code that handles it are kept separate form the XHTML layout code.
- XHTML
- XHTML is embedded in the stylesheet so the data can be inserted into it, and each part can be repeated as often as needed. (For example, the XHTML for each product in a category list.)
- Javascript
- Javascript is used to validate any forms that the user fills in. This tries to ensure that the data they have entered is valid before it is submitted to the server. For example, where a quantity is required it checks that the number entered is only numerical characters, and that it is not greater than the number of that product available.
- Paypal Shopping Cart
If the user wishes to pay by credit/debit card or Paypal account then the Mallard Goods shopping cart interacts with Paypal's Shoping Cart service. This means that neither the Mallard Goods website, nor its owner, has to deal with the card details.
When the user clicks the 'checkout' button they are given the choice of three ways of paying: Paypal account, credit/debit card, or cheque/postal order. If they select either of the former two then they are sent to the Paypal shopping cart, with the details of what they are buying included in the request as POST data. They then enter either their account or card details to complete the payment. After that they are returned to the Mallard Goods website where their order is confirmed. To ensure that the order is placed, both the Paypal shopping cart and the Mallard Goods website email the contents of the order to the website's owner.

