Shop.py |
- This is the login entry point to the application.
- Allows you to login or to register.
- The script also allows you to log out. (This can also be done via a call from the other pages).
- If logging in, the script retrieves the customer information from the shop_cust DB table.
- A row must exist in the customer table, and the password must match what is entered.
- If login is successful, the cust_id (from the shop_cust table) is saved as a temporary cookie,
and the script redirects to the shopBrowse.py page.
- The temporary cust_id cookie is used in all subsequent pages to ensure that customer has properly logged in.
- The script allows the customer to save his/her userid. If so, cust_user cookie is saved for 7 days.
Next time the customer logs in, he/she only needs to enter the password.
- If register, the script redirects to the shopProf.py page.
- If logging out, the temporary cust_id cookie is deleted.
ShopProf.py |
- This script allows you to either register a new user, or update profile for an existing user.
- The script checks the temporary cust_id cookie.
- If the cust_id cookie does not exist, this means a new registration.
- If the cust_id cookie exists, this means it is an update to the customer previous profile information.
- If new registration, the script allows you to enter a new userid, password, name, and other information.
- The entered userid is checked against the database to ensure that it is unique, and does not already exist.
- If OK, the data is inserted in the shop_cust DB table, with a newly generated cust_id value.
- The cust_id is saved as temporary cookie to facilitate further processing.
- If update to profile, the script allows you to update your registration profile within the shop_cust DB table.
- The script does not allow you to change your userid, all other data can be changed.
- The script also allow you to delete your customer profile. (This feature has been deactivated).
ShopBrowse.py |
- This script allows you to browse the product catalogue, and to add items to your shopping cart.
- The script checks to see if cust_id cookie exists. If not exist, the script redirects you to the login shop.py page
- The customer can scroll and search through the various available products.
- The page allows the customer to add one or more products to a shopping cart.
- The user adds items and quantities to the shopping cart
- The script inserts or updates items into the customer's shop_cart DB table.
- If the item quantity is reduced down to 0, the item is deleted from the shopping cart.
- The user has the ability to view the cart. If so, the script redirects to the shopCart.py page.
- The user also has the ability to checkout. If so, the script redirects to the shopCheckout.py page.
ShopCart.py |
- This script allows you to view and/or update the content of your shopping cart.
- The script checks to see if cust_id cookie exists. If not exist, the script redirects you to the login shop.py page
- The customer has the ability to change the quantity of a shopping cart item.
- The customer can also delete an item or reduce its quantity to 0, which will also delete the item
- The customer can either return to more shopping, in which case, the script redirects to the shopBrowse.py page.
- Or, the customer can choose to checkout. In this case, the script redirects to the shopCheckout.py page.
ShopCheckout.py |
- This script allows you to checkout (add a new order) to the database.
- The script checks to see if cust_id cookie exists. If not exist, the script redirects you to the login shop.py page
- The script retrieves data from the shop_cust DB table and the shop_cart DB table.
- Data is displayed on the screen.
- The customer has the ability to change information (including name/address).
- The customer can also return back to the shopping cart to change its content. If so, the script redirects to the shopCart.py page
- Customer is asked to provide credit card information.
- When customer clicks on "Place Order" button, the script inserts data into the cust_order and cust_order_detail DB tables.
- The script also deletes all rows for the customer's shopping cart from the shop_cart DB table
ShopQuery.py |
- This script displays a list of all processed orders.
- The script checks to see if cust_id cookie exists. If not exist, the script redirects you to the login shop.py page
- The script retrieved all rows from the cust_order DB table and the cust_order_detail DB table, and displays those on the screen.
- The client has the ability to sort (ascending & descending) by name, address, product ordered items, etc.
ShopSearch.py |
- This script displays all or some processed orders, and allows you to search/filter through the orders.
- The script checks to see if cust_id cookie exists. If not exist, the script redirects you to the login shop.py page
- The script retrieved all rows from the cust_order DB table and the cust_order_detail DB table, and displays those on the screen.
- The script has the ability to search/filter for particular name, address, product ordered items, etc.
- The client has the ability to sort (ascending & descending) by name, address, product ordered items, etc.
| | | | | | |