In this tutorial, you will create a web application which will allow the creation and management of orders. Users will have the possibility to register to your website, and then choose from the list of available products the ones to add to their order. In the products list, a link allows adding a product to the cart, and also specify the number of similar items to add.
Besides adding items to a cart, users have two options: to clear the order (cart) or to complete it. By clearing the order, all details regarding it are lost. It is erased from the temporary session variables, as well as from the database. By clicking on the complete link, the order status will change in the database from initiated to pending, thus becoming visible to the site administrators.
An order can have five different states:
initiated - the ordering process has started, but has yet to complete. An order will remain in this state until the user will decide to complete it.
after the user clicks the complete order link, there are two possibilities, each imposing a different state for the order: if there are enough products on stock to satisfy the entire order (all ordered products exist in the desired quantity), the order goes into pending. It can be viewed by site administrators, and forwarded to the Shipping department.
If there are not enough stocks to fulfill the order entirely, an e-mail is sent to the user, offering two options: either to cancel the order or to wait for a new transport of the desired goods. While the user reply is awaited, the order state is Waiting for acknowledgment.
If the user chooses to cancel the order, it will be deleted from the database, together with all the associated products. If the user decides to wait, then the order state is changed to acknowledged, and becomes visible for site administrators.
The last state an order can have is processing, which means that the order has been forwarded to the Shipping department.
Regarding the stock calculations, the ordered quantity is subtracted from the available quantity only if all ordered products can be delivered. In this case, the order goes into pending, and the stock is diminished by the amount ordered.
In this tutorial you will construct both sides of this application:
the front-end that allows users complete their orders, receive e-mails and make decisions.
the administrative section, allowing site administrators monitor and manage orders.
User and product management is not covered in this tutorial, as it is done in a similar manner.
If you have the MX Kollection 3 bundle installed, then you have all the needed tools. Otherwise, the following separate products should be installed on your computer in order to complete the Tutorial: Orders Management Intranet tutorial:
ImpAKT - for all of the basic database operations.
MX Send E-mail - to be able to send e-mail messages from the site.
MX User Login - to implement the user authentication.
MX Includes - to display content from different pages in the same file.
MX Query Builder
MX Breadcrumbs - to create a navigation trail on top of your pages.
MX Tree Menu - to create the category listing as a tree menu.
The estimated completion time for this tutorial is about 200 minutes. It depends on your authoring knowledge with Macromedia Dreamweaver and MX Kollection 3.
It's recommended that you follow this tutorial in the intended order to avoid potential problems.