Cost Calculator PHP Application
Takes 3 inputs and sorts them highest value first. Then does a bit of simple math on it and multiplies by a profit margin then displays the final price, which the customer can then purchase said item. This should be a clean, well written PHP application.
## Deliverables
Cost Calculator PHP Application
Takes 3 inputs (X,Y,Z) in mm or inches (6 possible inputs - 3 for inch and 3 for mm)
Asks user for shipping country (pull down menu, USA is default)
Error Check #1 If data is entered into inch boxes then clear the incomplete mm boxes (and the other way around) and display error message about only entering data into one set or the other (Unless the inch and mm data is exactly the same number). Still run the numbers below though and display the result for the 3 complete boxes (inch or mm)
Reorient Bounding Box (The Biggest # of the 3 entered = X, 2nd Biggest = Y, 3rd Biggest = Z)
Error Check #2 Only Positive Numbers (and only numbers) Allowed in box
Error Check #3 If Size Is Too Big (resulting X must be <13 inch Y must be <13 inch and Z must be <7.8 inch)
Divide Y into 2.3 in then Round Up
Multiply Z by Rounded Y Result
Divide Result by .5 To Get Hours
Multiply In^3 By Model Cost Per In3 (I set that value)
Multiply Cost / Hour By Hourly Cost (I set that value)
Add Cost / In3 Of Resin Plus Cost / Hour
Multiply By Profit Margin (I set that value)
Add Shipping Costs (based on user's country - I set shipping costs)
Display Final Quote To Customer (in inches and mm)
Allows customer to click a box to add this item to their cart (which takes PHP data and makes it a URL, such as [login to view URL]$34.20&country=USA (I should be able to edit this in the php file)
Reorient Example: X = 1 Y = 3 Z = 8.2
Outputs X = 8.2 Y = 3 Z = 1
Reorient Example: X = 3 Y = 3 Z = 8.2
Outputs X = 8.2 Y = 3 Z = 3
The output needs to display the following:
Input (X, Y, Z) as entered by the user (not the resulting XYZ) and inches or mm
Total Cost (Broken down by model cost + shipping)
Add to Cart Button