http://www.3b-it.co.uk/products.php
After a complete website redesign we have finally completed our products system. By focusing on ease of navigation, user friendliness and consistency we created a products navigation system that harnesses powerful new CSS techniques and advanced navigation menus whilst still being compatible for old browsers and inexperienced web users.
In order to create this product system a lot of work went into building an easy to follow hierarchy. Starting with drawing up drafts and then moving on to using database tools within Access we managed to come up with this system as you can see below.
As you can see from the above illustration, all of the products within the cables category link to one product page. This idea was brought to my attention when I first began to use php within the 3B-IT website. In order to grasp the concept behind this you must first understand the basics behind MYSQL databases and PHP.
Firstly, all of the cabling and racking products are stored into a MYSQL database and are listed within columns such as 'product_name' and 'price' and all other information regarding that product. They also have a unique identifier column that distinguishes each product from the rest. (This is what we use in order to create a unique page for each product.)
So with that in mind the next step is to create the template page for each product by including the headers, footers and default CSS sheets that are used already throughout the website.
Now, this is where the PHP comes in. In order to populate this page full of information about a product we must first ensure that the page obtains the unique identifier from the product. We do this by storing the unique identifier within a link, so when this link is clicked on, the product page obtains the unique identifier and knows which product we want to display. This is where all we need to do is echo out the details that we want to be displayed and then the only thing that's left for us to do is to style the page.
Here you can see a few examples of this:
http://www.3b-it.co.uk/cable.php?product=LC-to-LC-Multi-mode-OM3-50-125-Fiber-Optic-Cable-1.8mm-CAB8383-M
http://www.3b-it.co.uk/cable.php?product=Active-QSFP-QSFP-Active-40GB-QDR-DDR-SDR-CAB8686-M-A
http://www.3b-it.co.uk/cable.php?product=QSFP-SFP-x-4-30-AWG-Fanout-Cable-CAB8688X4-M
The unique identifier is placed within the HTTP URL making it easy for the product page to find the product using PHP such as this:
<?php if(isset($_GET['product'])){$product_name=($_GET['product']);?>
Richard Doyle
Website Designer & Developer