Shipping Calculation Project
Calculate Your Order
Please Select a Product
Shipping State (Tax Purposes):
Standard UPS - 3 Days
US Mail - 5 Days
Overnight - 1 Day
Your Total is:
Create a function called getShipping that is called when you click the "Calculate My Order Now" button.
When a product is selected the function should get the price for the selected product and store it in a local variable.
Take the quantity entered on the form and store it in a local variable.
Calculate a salesTotal using price * quantity.
When the taxing state is selected, determine the tax rate based upon the selected state.
Calculate the tax amount on the sales total as taxRate * salesTotal. Store the tax amount in a local variable.
When the Delivery Method is selected the function should get the delivery fee from the selected delivery method.
Determine the shipping cost based upon the selected shipping method.
Determine the total bill by adding the sales total, tax amount and shipping cost. Place the combined amount in the total field
Format the total amount by using a dollar format function.