CSC242, Web Programming

SHOPPING CART PROJECT – Part Two

CART ITEMS

Due: March 24, 2016 at start of class

Kutztown University, Spring 2016

This is part Two of the project. Use HTML, CSS, and PHP to write your scripts. You are strongly advised to work on the project early as late submissions are not accepted.

PROBLEM SPECIFICATION

For this part of the project, you are to design and implement the shopping cart component of your Web site using PHP on the server side. Extend the online catalog of your project to include a simple SHOPPING CART. Name the cart page cart.php. Your cart page must allow a user to verify previously selected items from the online catalogue, view current dollar amount sub-totals for each selected item, and check the total dollar amount of all items. Rename your previous products.html file to products.php and details.html file to details.php in this project.

REQUIREMENTS:

1.  At the item details page the user can add the item to his/her shopping cart. The user must be able to browse (view) the shopping cart at any time. You must show the total item count all the time.

2.  Implement a cart page that shows all items which the user added. At the cart page, the user must be able to update the quantity (number) of each selected item.

3.  At the cart page, the names, prices, and sub-totals (display in 2-decimal places) of each item must be shown to the user. When the quantity for an item is updated, the corresponding sub-total must be updated accordingly. The current total (in 2-decimal places) for all sub-total amounts must be displayed.

4.  At the cart page, implement a delete functionality that allows the user to remove items from the cart.

5.  From the cart page, the user must be able to go back to the catalog page to do more shopping. If more items are selected at this time, they should be added to those items that were previously added.

6.  All required data must be saved in the shopping cart using a PHP session. This allows you to maintain state information from one page to the next.

7.  You must have a category containing at least four items for testing the cart functionality, which allow items to be added to the cart.

8.  Document your code with appropriate comments describing each section of code. You must give credit for all images obtained from the web.

Submission:

Hand in hard-copies of products.php, details.php, and cart.php. Staple your submissions in this order. Upload all relevant files to the CSIT server by the start of class on the due date.

Dr. Tan CSC 242 – Web Programming 3/11/20166