Modify your existing project web site with new features including a product detail page, a login feature, an administrator page, and support for transactions.
-
Start with the setup for lab 7 for either Java, PHP, or Node.js. If you have an existing Docker container for lab 7, you do not need to download and setup lab 7 again.
-
Download starter code for Java, PHP, or Node.js. These code files should be ADDED to your existing lab 7 project. There is a new main page (
index.jsp/php
), an administrator page (admin.jsp/php
), and images in theimg
folder. The four new code files to change:validateLogin.jsp/php
,product.jsp/php
,admin.jsp/php
, andship.jsp/php
. -
Your output does not have to look exactly like the sample (feel free to make it look better!).
The product page will show details on the product including images. An image can be retrieved from a local folder using a URL or stored as a binary object in the database.
- +1 mark - for modifying product listing page to go to product detail page when click on product name
- +3 marks - for using PreparedStatement to retrieve and display product information by id
- +2 marks - for displaying an image using an HTML
img
tag based onproductImageURL
field - +3 marks - for displaying an image from the binary field
productImage
by providing animg
tag and modifying thedisplayImage.jsp/php
file. - +1 mark - for adding link to "add to cart" and to "continue shopping"
- +1 mark - for checking user is logged in before accessing page
- +2 marks - for displaying a report that list the total sales for each day. Hint: May need to use date functions like
year
,month
,day
. - +1 mark - for displaying current user on main page (
index.jsp/php
) - +2 marks - for modifying
validateLogin
to check correct user id and password
- +1 mark - for displaying error message if attempt to access page and not logged in
- +4 marks - for retrieving customer information by id and displaying it
- +3 mark -for using transactions to either process the shipment and ship all items (up to 3) or generate an error
- +2 marks - for checking that there is enough of each item to ship from the warehouse. Rollback transaction if any item does not have enough inventory.
- Test by entering URL like: http://localhost/shop/ship.jsp?orderId=1
If you do not demonstrate live to the TA in virtual office hours, please upload your code and a video clip demonstrating your working pages with the new features on Canvas. Bonus marks available for early completion.