Quote Form using an Array - Help
Hi,
I am trying to create a instant online quote form to no avail. I have a look up table that in in a multidimensional array to find the cost of printing based on how many items are ordered and how many colors are going to be used. Everything seems to work, except the amount in the array (unitPrice) is not being pulled from the table (in fact nothing is being pulled from the table). Any help would be great. I have pasted the code below.
<% Response.buffer = true %>
<%
dim total
Dim colorPriceTable
colorPriceTable =Array(_
Array(1, 6, 12, 24, 48, 72, 144, 288, 500, 1000, 2001),_
Array(4, 2.5, 1.6, 1.15, 1.1, .9, .75, .65, .6, .55, .5),_
Array(7, 3.1, 2.45, 1.9, 1.5, 1.35, 1, .85, .8, .7, .65),_
Array(8.5, 4, 3, 2.85, 1.95, 1.65, 1.45, 1.3, 1, .85, .8),_
Array(10, 4.7, 3.6, 3.45, 2.3, 1.9, 1.7, 1.6, 1.3, 1, .85, .8),_
Array(12, 5.4, 4.25, 4.05, 2.75, 2.2, 1.95, 1.9, 1.5, 1.15, 1),_
Array(13, 6.3, 5.05, 4.75, 3.35, 2.7, 2.35, 2.2, 1.7, 1.3, 1.1)_
)
numC = request("numberOfColors")
qty = request("quantityOrdered")
qtyRow = colorPriceTable(0)
priceRow = colorPriceTable(numC)
style = request("style")
For col = 0 To UBound(qtyRow)
If qty < qtyRow(col) Then
unitPrice = priceRow(col)
Exit For
End If
Next
total = (((unitPrice * qty) + (style * qty) + (.25 * qty) + (numC * 22))* 1.54)
if style = 1.98 then
styletemp = "Beefy-T"
elseif style = 1.99 then
styletemp = "T-Shirt 1"
end if
%>
Thanks for You Help :)
|