Hi! I'm trying to create a price calculator for custom-made picture frames to post on my website. I want users to be able to type in the length and the width into a table and then it displays the estimated price. There are three different frame thicknesses; 1.5" Narrow Barnwood, 2" Rustic Barnwood, and 3" Thick Barnwood, so a drop-down menu or something that would let users choose the design would be awesome. I came up with an equation that will do the trick.
First we find the square area of the frame by multiplying the perimeter (length+length+width+width) by the thickness of the frame (which will either be 1.5" 2" or 3"). Then we multiply the square area by either 0.27 if its 1.5" Thick, 0.23 if its 2" Thick, or 0.18 if its three inches thick. Then the calculator should add five dollars for a custom made fee.
So it is as follows: [2*(l+w) *Thickness] * 0.27 if its 1" Thick, 0.23 if its 2" and 0.18 if its 3" thick. Then $5 is added to the final price for a custom fee.
2007-01-03
07:52:08
·
4 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design