All processes on the site will be designed and coded in modules, which will enable ease of maintenance and reduce ripple effects on other modules. Each module containing the processes will be included as “server side includes” in the required area and the process will be called “using call statement”.
The main processes and its sub processes are explained below in the form of structured English, which would give a brief idea of the processes LOGIN, ADD TO CART, AND CHECKOUT.
Login
Begin Login Window
ENTER UserID;
ENTER Password;
Process
CHECK UserID AND Password;
IF UserID = “ ” OR Password = “ ” OR;
IF UserID = “Correct” AND Password = “Incorrect” OR;
IF UserID = “Incorrect” AND Password = “Correct” OR;
DISPLAY “Error Message”;
ELSE [IF UserID AND Password “Correct”];
1. CREATE Security Code for the Current Session;
2. SAVE UserID in Session;
3. REDIRECT to Home Page with User Details;
End Process
Purchasing
Begin Shopping Cart
DISPLAY Add to Cart Window;
Process One
VERIFY that User has been Logged In;
ELSE REDIRECT to Login Page;
ELSE
CREATE Unique TransactionID for the Current Session;
CHECK the Cart with current UserID, SecurityID, and PhoneID;
CHECK
IF Quantity GREATER THAN 50 OR GREATER THAN stock OR “Text Variable” the in the quantity field;
DISPLAY “Notification Error Message”;
ELSE
IF selected Item Available in cart AMEND Current Item with Existing Item;
ELSE
ADD New Item to the Cart;
CALCULATE Sub Total;
CALL Process View Cart;
End of Process One
Process Two Checkout
VERIFY Current UserID, TransactionID, SecurityID; and payment details
IF “Above Verification is Correct”;
CREATE Unique OrderID;
SAVE Order Details AND SAVE Item Details;
DEDUCT Current Item quantity from the Stock;
IF Selected Item NOT AVAILABLE in Current Stock;
DISPLAY “Notification Error Message”;
CHECK Main Stock Table for Reorder Level;
NOTIFY User AND Administrator;
ELSE
REDERECT to Login Menu;
CALL next process;
End of Process Two