|
<% Session.Timeout = 60 %>
<%
If Request("NoCustomerID") = "True" then
Response.Write " "
Response.Write "Session has Expired. Please place order again. "
Response.Write " "
End If
If Request("InvalidQtys") = "True" then
Response.Write ""
Response.Write "You must enter a quantity for at least one item to submit an order. "
Response.Write " "
End If
%>
|
Welcome to the Information Exchange ordering page!
|
| For a complete description of all
items and to select an item for purchase, click any
of the links under "Educational Resources"
on the left.
|
 |
|
Previews and
Guarantee
Previews
are handled as any other purchase and all purchases
come with our 30 day guarantee. If you are not
completely satisfied with any item for any reason, you
may return it within 30 days for a full refund,
exchange or credit.
|
 |
|
To
continue ordering online, use the form below.
|
|
To
place your order by Mail, Fax or Phone click
here.
|
|
To
check out our new Group Discount Purchasing "electronic
buyers co-op" click here.
|
 |
|
<%
Dim rsCustomerID, rsBasket, rsItems, strItemID, strTotalWeight, intQty, strItemExists, rcdcnt
strTotalWeight = 0
rcdcnt = 0
If Session("CustomerID") = Null or Session("CustomerID") = "" Then ' Get a Customer ID to Save Items in the Basket
'''''''''''''''''''''''''''''Begin CustomerID Table''''''''''''''''''''''''''''''''''''''''
set rsCustomerID = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM CustomerIDTbl ;"
rsCustomerID.Open strSQL, objConn, adOpenForwardOnly, adLockOptimistic, adCmdText
Session("CustomerID") = rsCustomerID("CustomerID") + 1
rsCustomerID("CustomerID") = Session("CustomerID")
rsCustomerID.Update
rsCustomerID.Close
Set rsCustomerID = Nothing
End If
'''''''''''''''''''''''''''''Check to see if new item is already in the Basket Table''''''''''''''''''''''''''''''''''''''''
If Request("ItemID") = Null or Request("ItemID") = "" Then
strItemID = 0
strItemExists = True
Else
strItemID = TRIM(Request("ItemID"))
set rsBasket = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM BasketTbl " & _
" WHERE CustomerID = " & Session("CustomerID") & _
" AND ItemID = " & strItemID & ";"
rsBasket.Open strSQL, objConn
If rsBasket.EOF Then ' Item doesn't Exist in Basket
strItemExists = False
Else ' Item already Exists in Basket
strItemExists = True
End If
rsBasket.Close
set rsBasket = nothing
End If
'''''''''''''''''''''''''''''Begin Basket Table''''''''''''''''''''''''''''''''''''''''
set rsBasket = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM BasketTbl " & _
" WHERE CustomerID = " & Session("CustomerID") & _
" ORDER BY ItemID;"
rsBasket.Open strSQL, objConn
If rsBasket.EOF Then ' Basket is Empty
rsBasket.Close
set rsBasket = nothing
If Request("ItemID") = Null or Request("ItemID") = "" Then ' No New Item to Add to Basket
Response.Write "| "
Response.Write " "
Response.Write "Your Basket is Empty. "
Response.Write " "
Response.Write " | "
Else
If strItemExists = False Then ' New Item to Add to Basket
'''''''''''''''''''''''''''''Begin Item Table''''''''''''''''''''''''''''''''''''''''
set rsItems = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM ItemTbl " & _
" WHERE ItemID = " & strItemID & ";"
rsItems.Open strSQL, objConn
If Not rsItems.EOF Then
intQty = 1
intDiscount = 0
'''''''''''''''''''''''''''''Begin Item Discount Table''''''''''''''''''''''''''''''''''''''''
Dim rsItemDiscTbl, intMinDisc, intItemDisc,intTotalPrice
Set rsItemDiscTbl= Server.CreateObject ("ADODB.Recordset")
strSQL = "SELECT * FROM ItemDiscTbl" & _
" WHERE (ItemID = " & strItemID & ")" & _
" ORDER BY MinQty;"
rsItemDiscTbl.Open strSQL, objConn
If Not rsItemDiscTbl.EOF Then
rsItemDiscTbl.MoveFirst
intMinDisc = rsItemDiscTbl("Discount")
End If
Do While Not rsItemDiscTbl.EOF
If (intQty <= rsItemDiscTbl("MaxQty")) And (intQty >= rsItemDiscTbl("MinQty")) Then
intDiscount = (rsItemDiscTbl("Discount")) ' Determine the % of Discount
End If
rsItemDiscTbl.MoveNext
Loop
' Close Recordset
rsItemDiscTbl.close
set rsItemDiscTbl= nothing
If intDiscount = 0 Then
intItemDisc = 0
Else
intItemDisc = intDiscount
End If
'''''''''''''''''''''''''''''''End Discount Table'''''''''''''''''''''''''''''''''''''''''''
intDiscountPrice = rsItems("ItemPrice") - (rsItems("ItemPrice") * (intItemDisc / "100")) ' Determine the Discount price
intTotalPrice = intQty * intDiscountPrice
strTotalWeight = rsItems("ItemWeight") ' Calculate Shipping Costs
set rsShipRate = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM ShipRateTbl " & _
"WHERE LowWeight <= " & strTotalWeight & " AND HighWeight >= " & strTotalWeight & ";"
rsShipRate.Open strSQL, objConn
If rsShipRate.EOF Then
intShippingCost = 0
Else
rsShipRate.MoveFirst
intShippingCost = FormatCurrency(rsShipRate("ShipRate"))
End If
If Not rsShipRate.EOF Then
rsShipRate.MoveFirst
intShippingCost = FormatCurrency(rsShipRate("ShipRate"))
End If
rsShipRate.Close
set rsShipRate = nothing
Dim rsNewBasket ' Add New Item to Basket
set rsNewBasket= Server.CreateObject("ADODB.Recordset")
rsNewBasket.Open "BasketTbl", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsNewBasket.AddNew
rsNewBasket("CustomerID") = Session("CustomerID")
rsNewBasket("ItemID") = TRIM(Request("ItemID"))
rsNewBasket("Qty") = "1"
rsNewBasket.Update
rsNewBasket.Close
Set rsNewBasket= Nothing
rcdcnt = rcdcnt + 1
%>
|
Below are the items that you have selected to order:
|
|
Your totals will be displayed after you submit your order.
If Shipping Total is $0.00, call the Information
Exchange for shipping Cost.
|
|
Click here to see Shipping Rates.
|
<%
End If
rsItems.Close
set rsItems= nothing
End If
End If
Else ' Basket has Items to Display
%>
|
Below are the items that you have selected to order:
|
|
<%
End If
'''''''''''''''''''''''''''''''End Basket Table'''''''''''''''''''''''''''''''''''''''''''
%>
|