How to Build a Transactional Website
By Sue Smith
Creating a transactional website may seem an intimidating prospect when you approach it for the first time. However, the task is really not much more complex than creating any other type of website. There are payment services you can use on your site without having to code the secure functions yourself, such as PayPal and Google Checkout. These systems are easy to use, and handle all of the secure processing for you, so are generally advisable.
Step 1
Create a visual design for your transactional website. You can use any graphic design tool you like to do this, and it does not need to be complex. Taking the time to sketch how you want the site to look makes the rest of the development process more streamlined and ultimately less frustrating, so it's worth doing. Make sure you include every element your site is going to need in your design, including menus, images, payment controls and product listings.
Step 2
Build your data source. Typically a transactional website will be built on top of a database, although this will depend on what is being sold. For a business, an e-commerce database needs to be connected to any other databases being used. If you are setting up a database from scratch, most Web hosts provide MySQL for free, and you can often administer it using the phpMyAdmin interface, which allows you to create your data source without using much SQL code.
Step 3
Connect to the database and build HTML using the resulting data. If you have created your own database, you can use PHP or ASP scripts at the server side to connect to it, depending on what your Web host provides. Connect to the database and execute SQL queries in order to create the HTML that makes up your website interface. For example, if your database contains the details of products being sold, your server side script should send these details to the client, and present them within HTML, as in the following example PHP:
mysql_connect("your_host","your_username","your_password");mysql_select_db("your_database");
$your_data=mysql_query("select * from ProductTable");
while($data_row=mysql_fetch_array($your_data))
{ echo "
?>
Step 4
Build payment processing into your website HTML. Choose a payment service provider, and follow their guidelines for adding transactions to your site. You will generally have options, such as shopping carts and buttons. Customers will choose from the products on your pages, then be taken through to the payment service website to enter their payment details. Services such as PayPal also have automated code builders to create HTML, which you simply paste into your own pages. You can choose what data you want captured each time a payment is made, and can have an email address sent a message informing you of transactions. You can optionally also have the payment service send data to a server side script on your site, allowing you to update a database system accordingly.
Step 5
Implement the visual design of your site using CSS code. Refer to your original design documents and write CSS to make the site look the way you want it to. Once your site is complete, test it in as many browsers as possible. As well as checking that the functionality works, this is a necessary step to ensure the visual appearance stays consistent across browsers.
References
Tips
- Some Web hosts provide automated payment processing technologies and content management systems for e-commerce websites, so it may be worth checking out what yours offers.
Warnings
- Don't neglect design in a transactional website, as an effective visual design can make a huge difference to the success of a site.
Writer Bio
Sue Smith started writing in 2000. She has produced tutorials for companies including Apex Computer Training Software and articles on computing topics for various websites. Smith has a Master of Arts in English language and literature, as well as a Master of Science in information technology, both from the University of Glasgow.