Please use your Shopping Cart Database for this project.
TASK 1 - PREPARATION (5 POINTS)
Application events are specific occurrences during the life cycle of an application. Each time one of these events occurs, ColdFusion runs the corresponding method in your [url removed, login to view] file (also referred to as the application CFC). The [url removed, login to view] file defines application settings and implements methods to handle the application events.
Create a new folder called ShoppingCart.
Read the material from the adobe website here - [url removed, login to view] and create a minimal [url removed, login to view] file for your project and save it inside the ShoppingCart folder.
At minimum you should turn on session proecssing and set your data source to the value you set up earlier.
TASK 2 - PRODUCT LISTING PAGE (10 POINTS)
Create a Product Listing page to show a list of all the products available for sale from your PRODUCTS table. Use a new CF file called [url removed, login to view]
Execute a query called “getlist” to get productID, productName, productQty, productPrice and productDescription from the PRODUCTS table.
<cfquery name = "getlist" datasource="#dsn#">
SELECT [url removed, login to view], [url removed, login to view],
[url removed, login to view], [url removed, login to view],
[url removed, login to view]
Display this information in a neatly formatted grid. For full points you should use bootstrap or some responsive framework.
You should add an image for each product into your grid and upload that to the server and show that on your page beside or above your product name. You should add the column ProductPhoto into the above query once you’ve added your field into the database table as well as your urls for each image.
For each product display an Add to cart button so that users can buy your products. For the add to cart button create a link to add the product to a shopping cart. Here is a sample buy link. Note that I have hard coded quantity 1 when it comes from the product list page. (you will do the same thing). Also note that productID, productname and productprice come from the query result set.
<a href = "[url removed, login to view]">Add to Cart</a>
If quantity available is 0, then don’t show the buy link. Instead display “out of stock!” without any link.
TASK 3 - SHOPPING CART PAGE (15 POINTS)
Here you will build the Shopping cart page. In this simple shopping cart we are going to enable only a single item to be ordered. If each additional item overwrites the first one, that is fine for this task. This is so that we can get through the shopping cart without adding any complexity to the code. The following are the steps that you need to follow:
Create a new cfm file called [url removed, login to view]
Create <cfparam> variables for the productID and qty url variables that come into the shopping cart from the buy link you created in the previous task. This is so that if you can avoid errors if these values are null.
Create a form with a submit button - “Proceed to Checkout”
Set the action of the form to submit to the customer Info page you created earlier.
Based on the url variable productID you can get the other product info from another query to the database so that you can populated it into your shopping cart. Note the url parameters that are sent to this page through the url (buy link).
Display in a neat grid/table the shopping cart.
Now do the following calculations and set the results at the bottom of your shopping cart on this page.
Itemtotal = price * qty
OrderTotal = itemTotal (for now we will do only one item in the shopping cart).
Tax = orderTotal *0 .007
TotalOrderAmount = orderTotal + tax
On clicking the Proceed to checkout button the application would need to take them to the assignment you did earlier (customer info page). Rename that assignment to customerInfo.cfm.
3 freelancers are bidding on average $55 for this job