<%@ Language=VBScript %> <% call ForceSSL() id=Request.Cookies("id") FirstTime = FormatTextHTML(request.Form("FirstTime")) 'qty = FormatTextHTML(request.Form("qty")) DeleteList = Trim(Request.form("RemoveItem")) qtyPassValue = FormatTextHTML(request.Form("qtyPassValue")) qty = FormatTextHTML(request.Form("IngQuantity")) IF subFlag ="" THEN subFlag =0 END IF 'Get the Not Found list from Quick Shop NoList = Trim(Request.form("NoList")) IF NoList <> "" AND NoList <> "&" THEN 'split item into array NotFoundList = split(NoList, "&", -1, 1) 'Not Found message NFMsg="
The following item numbers could not be found in our catalog:
" NoList = right(NoList,(len(NoList)-1)) NoList = Left(NoList,(len(NoList)-1)) NoList = Replace(NoList,"&"," ") NFMsg2="Check the item numbers and return to catalog quick shop or search for the items by title.
" NFMsg= NFMsg & "
" & NoList & "
" & NFMsg2 END IF DList = split(DeleteList, ",", -1, 1) intDeleteTotal = UBound(DList) QtyNUmber = split(qty, ",", -1, 1) intQtyNBTotal = UBound(QtyNUmber) QtyPV = split(qtyPassValue, ",", -1, 1) intQtyPVTotal = UBound(QtyPV) 'response.write "DeleteList" & DeleteList & "
" 'response.write "qty" &qty & "
" 'response.write "qtyPassValue" &qtyPassValue & "
" 'Remove the item that user checked. IF FirstTime="false" THEN 'Add a cookies if user update the page Automation=FormatTextHTML(request.Form("Automation")) Response.Cookies("Automation")= Automation 'Delete Item from the shopping cart IF DeleteList <> "" THEN FOR n = 0 to intDeleteTotal DListValue = split(DList(n), "&", -1, 1) Set RS = Server.CreateObject("ADODB.Recordset") strSQL = "DELETE from ww_shoppingCartOrder where (usrsessid='"& id &"' AND lngFormatTypeID="& trim(DListValue(1)) &" AND strCatalogNumber='" & trim(DListValue(0)) & "')" RS.Open strSQL, "DSN=dotcom",adOpenDynamic,3 set rs = nothing Next END IF 'Update Quantity after user change the number FOR n = 0 to intQtyNBTotal QTYValue = split(QtyPV(n), "&", -1, 1) QTYNUValue = split(QtyNUmber(n), "&", -1, 1) IF IsNumeric(QTYNUValue(0))THEN Set RS = Server.CreateObject("ADODB.Recordset") strSQL = "UPDATE ww_shoppingCartOrder SET IngQuantity = "& trim(QTYNUValue(0)) &" where (usrsessid='"& id &"' AND lngFormatTypeID="& trim(QTYValue(1)) &" AND strCatalogNumber='" & trim(QTYValue(0)) & "')" RS.Open strSQL, "DSN=dotcom",adOpenDynamic,3 set rs = nothing END IF Next ELSE Automation = Request.Cookies("Automation") END IF IF id <> "" THEN 'Load all the Order information Set RS1 = Server.CreateObject("ADODB.Recordset") strSQL = "Select * from ww_shoppingCartOrder where usrsessid='" & id &"' ORDER BY strTitle" RS1.CursorLocation = 3 RS1.Open strSQL, "DSN=dotcom",adOpenDynamic,3 END IF '------------------------------------Warning: Please don't rewrite the following code---------------------- Call ViewTotalOrder() %> Scholastic.com | Weston Woods Online Catalog: View Order <% doMenu %>
Weston Woods
<% IF id <> "" AND TotalOrderItem <> 0 THEN %>
Order
Your order contains <%=ct%> items.
• To remove an item(s) from your cart, check the box next to the item description and click "Update Cart."
• To change the quantity of an item, enter the quantity in the box next to the item price and click "Update Cart."
• If you are ready to purchase these items, click "Place Order."
• If you know the item numbers add want to add multiple items at once, catalog quick shop.
• Select your Automation option. Enter details after you click "Place Order."

<% 'If the no found is not empty and display all no found www catalog Number IF NoList <> "" AND NoList <> "&" THEN Response.write NFMsg END IF %>
<% IF id <> "" THEN ItemTotalPrice = 0 TotalPrice = 0 TotalQua = 0 Do While Not RS1.eof strFormatTypeDesc=RS1("strFormatTypeDesc") 'formatImage2=RS1("formatImage2") strWWCatalogNumber=RS1("strWWCatalogNumber") curPrice=FormatCurrency(RS1("curPrice"),2) strCatalogNumber=RS1("strCatalogNumber") lngFormatTypeID=RS1("lngFormatTypeID") strTitle=RS1("strTitle") strISBN=RS1("strISBN") 'ImagethURL=RS1("ImagethURL") IngQuantity=RS1("IngQuantity") ItemTotalPrice =IngQuantity * curPrice ItemTotalPrice = FormatCurrency(ItemTotalPrice, 2) TotalPrice = TotalPrice + ItemTotalPrice TotalQua = TotalQua + IngQuantity %> <% RS1.MoveNexT loop set RS1 = nothing END IF %>
ITEM REMOVE QTY ITEM PRICE

TOTAL PRICE

<%=strTitle%>
<%=strFormatTypeDesc%>
Item #<%=strWWCatalogNumber%>
ISBN: <%=strISBN%>
<%=curPrice%> <%=ItemTotalPrice%>
  Update Item Total: <%=FormatCurrency(TotalPrice, 2)%>

Not ready to place your order?

Advanced Search
Catalog Quick Shop

<% 'Calculate the Shipping charge. IF TotalPrice <= 66.77 THEN ShipCharge = 6 SubTotalPrice = TotalPrice + ShipCharge ELSEIF TotalPrice > 66.67 AND TotalPrice <= 500 THEN ShipCharge = TotalPrice * 0.09 SubTotalPrice = TotalPrice + ShipCharge ELSEIF TotalPrice > 500 THEN ShipCharge = TotalPrice * 0.07 SubTotalPrice = TotalPrice + ShipCharge END IF %> Shipping & Handling: <%=FormatCurrency(ShipCharge)%>
Automation Options:
checked<%END IF%>>None
checked<%END IF%>> Automation Kit ($2.00/kit)
checked<%END IF%>> MARC Record Diskette Only ($1.00/title)
checked<%END IF%>> Card Kit ($2.00/kit)
Update
<% IF Automation = "AutomationKit" THEN AutoFee = TotalQua * 2 ELSEIF Automation = "MARCRecordDiskette" THEN AutoFee = TotalQua * 1 ELSEIF Automation = "CardKit" THEN AutoFee = TotalQua * 2 ELSE AutoFee = 0 END IF IF AutoFee >0 AND AutoFee <= 15 THEN TotalAutoFee = 15 ELSE TotalAutoFee = AutoFee END IF 'Update suntotalprice SubTotalPrice = SubTotalPrice + TotalAutoFee %> Automation ($15 minimum): <%=FormatCurrency(TotalAutoFee)%>
Subtotal: <%=FormatCurrency(SubTotalPrice)%>
<% ELSEIF NoList <> "" AND NoList <> "&" THEN Response.write NFMsg ELSE Response.write ("There are no items in your order.") END IF %>
 
<% doFooter %>