<%@ Language=VBScript %> <% option explicit Response.Buffer=True Const vDebug = 0 %> <% '@BEGINVERSIONINFO '@APPVERSION: 50.4013.0.6 '@FILENAME: order.asp '@DESCRIPTION: Cart Page '@STARTCOPYRIGHT 'The contents of this file is protected under the United States 'copyright laws and is confidential and proprietary to 'LaGarde, Incorporated. Its use or disclosure in whole or in part without the 'expressed written permission of LaGarde, Incorporated is expressly prohibited. ' '(c) Copyright 2000, 2001 by LaGarde, Incorporated. All rights reserved. '@ENDCOPYRIGHT '@ENDVERSIONINFO 'Modified 12/4/01 'Storefront Ref#'s: 241 djp If Session("SessionID") = "" Then 'SFUPDATE ' redirect to neworder screen Session.Abandon 'Response.Redirect(C_HomePath & "search.asp") Response.Redirect("search.asp") End If Order_InitializeDiscounts If iConverion = 1 Then Response.Write "" Dim CurrencyISO,rstAdmin,bActiveCart set rstadmin = server.CreateObject ("ADODB.Recordset") rstAdmin.Open "Select adminSaveCartActive from sfAdmin",cnn,adOpenStatic ,adLockReadOnly ,adCMDText bActiveCart = rstAdmin("adminSaveCartActive") rstAdmin.Close set rstAdmin = nothing 'Response.Write bactiveCart 'Response.End CurrencyISO = getCurrencyISO(Session.LCID ) %> <%= C_STORENAME %>-SF Shopping Cart Page/Begin Checkout Page

 Go to our Home Page USA and CANADA Call TOLL FREE: 877-465-2883
 
Learn more about our company
Categories Categories
Accessories
Appliances
Barista Tools
Books
Cleaning Supplies
Coffee
Coffee Grinder
Coffee Makers
Coffee Roaster
Cups and Mugs
Espresso Machines
Espresso Maker
Gift Ideas
K-Cup Single Serve
Kitchen Wares
Milk Foaming Devices
Plush Dolls
Spare Parts
Starter Kits
Supplies
Syrup
Tea
Water Treatment
 

Sales & Specials
Newest Products

Bestsellers Bestsellers
Saeco Talea Ring Plus Espresso Machine (Canadian Version)
Saeco Talea Ring Plus Espresso Machine (Canadian Version)

 
Saeco Talea Giro Espresso Machine (US Version)
Saeco Talea Giro Espresso Machine (US Version)

 
Saeco Odea Giro Espresso Machine (Canadian Version)
Saeco Odea Giro Espresso Machine (Canadian Version)

 
Saeco Odea Giro Orange Espresso Machine (Canadian Version)
Saeco Odea Giro Orange Espresso Machine (Canadian Version)

 
Saeco Talea Giro Espresso Machine (Canadian Version)
Saeco Talea Giro Espresso Machine (Canadian Version)

 
Manufacturers Manufacturers
Adamo
Aurora Inc.
Barbera Coffee
Bialetti
Blendtec
Bloomfield
Bodum
Bonjour
Bosch
Capresso
Cristoforo Colombo
Danesco
Duracell
Espresso Planet
Everpure
Fox Run Craftsmen
Francis! Francis!
Gaggia
Ghirardelli
Illy Coffee
ISI
Johnson Rose
Jura
Keurig
Krups
LaSpaziale
Lavazza
Monin
Nespresso
Nestle
Rancilio
Rosca Coffee
Saeco
Schaerer
Solis
Spidem
Sterilight
SupraMatic
Swissmar
Taylor
Thermoplan
Timothy's
Torani
Update International
Vev Vigano
Waring
Urnex
Counters Counters
Espresso TOP 50

<% Order_ShowInventoryMessage 'SFAE %>
<%If C_BNRBKGRND = "" Then%><%= C_STORENAME %><%Else%><%End If%>
Order Summary
Please review your order as shown below. To modify the quantity of any item ordered, input the desired quantity and select the Recalculate Order button below. To delete an item click on DELETE.<%if bactiveCart = 1 then %> To save an item to return and purchase at a later time click on SAVE. If you want to add new items return to the correct page and select additional items to be added to your order. When you have completed your order, select the Check Out button below to connect to our secure directory and complete the order process.

<% end if %>

<% '@BEGINCODE Dim sSql, rsAllOrders, sProdID, aProduct, aProdAttr, sProdName, sProdPrice, iProdAttrNum, iCounter Dim sAttrUnitPrice, sUnitPrice, iQuantity, iNewQuantity, sProductSubtotal, dProductSubtotal, sTotalPrice, iOrderID, aProdAttrID, sProductPrice Dim iProductCounter, sBgColor, sFontFace, sFontColor, iFontSize Dim bHasProducts, sBtnAction, sSaveCart, sDelete, iSvdCartID,iCustID, sRecalculate, iSaveFind, iDeleteFind Dim sErrorDescription, sSearchPath, sBkGrnd, sReferer Dim dUnitPrice ' Determine action and OrderID For iCounter = 1 to Request.Form("iProductCounter") sSaveCart = Request.Form("SaveToCart" & iCounter & ".x") If sSaveCart <> "" Then iSaveFind = iCounter sBtnAction = "SaveToCart" Exit For End If sDelete = Request.Form("DeleteFromOrder" & iCounter & ".x") If sDelete <> "" Then iDeleteFind = iCounter sBtnAction = "DeleteFromCart" Exit For End If Next ' Check to see if custID exists in customer table iCustID = Request.Cookies("sfCustomer")("custID") If iCustID <> "" Then Dim bCustIdExists bCustIdExists = CheckCustomerExists(iCustID) If bCustIdExists = false Then Response.Cookies("sfCustomer")("custID") = "" Response.Cookies("sfCustomer").Expires = NOW() End If End If ' Determine if it is recalculate action sRecalculate = Request.Form("recalc") If sRecalculate = "1" AND lcase(sBtnAction) <> "savetocart" Then '#530 sBtnAction = "Recalculate" End If ' Get referer sReferer = Session("HttpReferer") ' Recalculate subtotal If sBtnAction = "Recalculate" Then Dim iTmpOrderID, iOldQuantity For iCounter = 1 To Request.Form("iProductCounter") iNewQuantity = Request.Form("FormQuantity" & iCounter) iOldQuantity = Request.Form("iQuantity" & iCounter) iTmpOrderID = Request.Form("iOrderID" & iCounter) if not isnumeric(iNewQuantity) or trim(iNewQuantity) ="" then iNewQuantity = iOldQuantity end if Order_Update_GiftWrapsBackOrder 'SFAE b2 If iNewQuantity <> "" Then If iNewQuantity = 0 Then ' Delete if 0 Call setDeleteOrder("odrdttmp",iTmpOrderID) DeleteTmpOrderDetailsAE iTmpOrderID 'SFAE ElseIf iNewQuantity <> iOldQuantity Then ' Update Quantity For Product Call setReplaceQuantity("odrdttmp",iNewQuantity,iTmpOrderID) End If Else ' Delete if Null Value Call setDeleteOrder("odrdttmp",iTmpOrderID) DeleteTmpOrderDetailsAE iTmpOrderID 'SFAE End If Next Reset_Shipping '# 425 Order_AdjustCart 'SFAE b2 ' Save to Cart ElseIf sBtnAction = "SaveToCart" Then sProdID = Request.Form("sProdID" & iSaveFind) iOrderID = Request.Form("iOrderID" & iSaveFind) iQuantity = Request.Form("iQuantity" & iSaveFind) iProdAttrNum = Request.Form("iProdAttrNum" & iSaveFind) iCustID = Request.Cookies("sfCustomer")("custID") iNewQuantity = Request.Form("FormQuantity" & iSaveFind) ' In the case that one types in a new quantity and hits save If iNewQuantity <> iQuantity And iNewQuantity <> "" And iNewQuantity <> 0 Then iQuantity = iNewQuantity End If If iProdAttrNum > 0 Then Redim aProdAttr(iProdAttrNum) aProdAttr = getProdAttr("odrattrtmp",iOrderID,iProdAttrNum) End If ' Check if cookies are set If Request.Cookies("sfCustomer")("custID") = "" OR Request.Cookies("sfOrder")("SessionID") <> Session("SessionID") Then ' Write to cookie identifying place Call getSavedTable(aProdAttr,sProdID,iNewQuantity,0,sReferer) Response.Cookies("sfThanks")("PreviousAction") = "FromShopCart" Response.Cookies("sfThanks")("DeleteTmpOrderID") = iOrderID Response.Cookies("sfThanks").Expires = Date() + 1 Response.Redirect("login.asp") End If If iProdAttrNum > 0 Then Redim aProdAttr(iProdAttrNum) aProdAttr = getProdAttr("odrattrtmp",iOrderID,iProdAttrNum) End If iSvdCartID = getOrderID("odrdtsvd","odrattrsvd", sProdID,aProdAttr,cInt(iProdAttrNum)) If iSvdCartID <> "" Then ' New Row in SavedCartDetails If iSvdCartID < 0 Then ' Write as new row Call getSavedTable(aProdAttr,sProdID,iQuantity,iCustID,Session("HttpReferer")) ' Existing cart Else ' Update Quantity Call setUpdateQuantity("odrdtsvd",iQuantity,iSvdCartID) ' End iSvdCartID exists If End If Else 'sErrorDescription = "Number of attributes not equal to the product specs or database writing error." 'Response.Redirect("error.asp?strPageName=order.asp&strErrorDescription="&sErrorDescription) ' End iSvdCartID Null If End If ' delete from sfTmpOrderDetails Call setDeleteOrder("odrdttmp",iOrderID) ElseIf sBtnAction = "DeleteFromCart" Then ' Remove from cart iOrderID = Request.Form("iOrderID" & iDeleteFind) Call setDeleteOrder("odrdttmp",iOrderID) DeleteTmpOrderDetailsAE iOrderID 'SFAE Call Reset_Shipping End If ' Product counter initialize iProductCounter = 0 sTotalPrice = 0 '----------------------------------------------------------------- ' Collect all orders associated with Session ::: Begin '----------------------------------------------------------------- ' Get a RecordSet of all orders sSql = "SELECT * FROM sfTmpOrderDetails WHERE odrdttmpSessionID = " & Session("SessionID") If vDebug = 1 Then Response.Write "
" & sSql Set rsAllOrders = cnn.execute(sSql) ' Check for no orders If (rsAllOrders.BOF And rsAllOrders.EOF) Then bHasProducts = False %> <% Else bHasProducts = True Do While NOT rsAllOrders.EOF ' Get the ProdIDs iOrderID = rsAllOrders.Fields("odrdttmpID") sProdID = rsAllOrders.Fields("odrdttmpProductID") iQuantity = rsAllOrders.Fields("odrdttmpQuantity") ' Get an array of 3 values from getProduct() '++ On Error Resume Next ReDim aProduct(3) aProduct = getProduct(sProdID) sProdName = aProduct(0) sProdPrice = aProduct(1) iProdAttrNum = aProduct(2) ' ++ Call CheckForError() 'Order_SetProdPrice 'SFAE ' If not an array, then the product does not exist If NOT IsArray(aProduct) Then Response.Write "
Product Does Not Exist" ' ++ Needs to MoveNext to iterate through the rest of the order Else If NOT IsNumeric(iProdAttrNum)Then iProdAttrNum = 0 End If ' Get Associated Attribute IDs in an array If iProdAttrNum <> "" Then ReDim aProdAttrID(iProdAttrNum) aProdAttrID = getProdAttr("odrattrtmp",iOrderID,iProdAttrNum) End If ' Response Write all Output If vDebug = 1 And IsArray(aProdAttrID) Then Response.Write "

Product = " & sProdID & "
ProdName = " & sProdName & "
ProdPrice = " & sProdPrice & "
ProdAttrNum = " & iProdAttrNum For iCounter = 0 To iProdAttrNum -1 Response.Write "
Attribute :" & aProdAttrID(iCounter) Next End If iProductCounter = iProductCounter + 1 dim fontclass ' Do alternating colors and fonts If (iProductCounter mod 2) = 1 Then fontclass="tdAltFont1" Else fontclass="tdAltFont2" End If %>

<%OVC_ShowGiftWrapValue 1 'SFAE%> <%OVC_ShowBackOrderMessage 1'SFAE %> <% ' End IsArray If End If sTotalPrice = cdbl(sTotalPrice) + cDbl(dProductSubtotal) 'SFUPDATE ' Move to next RecordSet rsAllOrders.MoveNext ' loop through recordset Loop '@ENDCODE '----------------------------------------------------------- ' END PRODUCT DETAIL OUTPUT -------------------------------- '----------------------------------------------------------- 'Order_FixTable 'SFAE b2 %>
product unit price qty price action

No Items in Order
Please press continue to begin searching for items.
<%= sProdName %>
<% sAttrUnitPrice = 0 ' Iterate Through Attributes If iProdAttrNum > 0 And IsArray(aProdAttrID) Then Dim sAttrSubtotal, aAttrDetails, sAttrName, sAttrPrice, iAttrType For iCounter = 0 To iProdAttrNum - 1 aAttrDetails = getAttrDetails(aProdAttrID(iCounter)) sAttrName = aAttrDetails(0) sAttrPrice = aAttrDetails(1) iAttrType = aAttrDetails(2) ' Calculate Subtotal sAttrUnitPrice = getAttrUnitPrice(sAttrUnitPrice,sAttrPrice,iAttrType) %>   <%=sAttrName%>
<% ' ProdAttr Loop Next Elseif iProdAttrNum > 0 And NOT IsArray(aProdAttrID) Then Response.Write "
Error: No Attributes found for " & iOrderID Response.Write "
Deleting from Saved Orders. Sorry for the inconvenience." Call setDeleteOrder("odrdttmp",iOrderID) DeleteTmpOrderDetailsAE iOrderID 'SFAE If vDebug = 1 Then Response.Write "

Deleted: " & iOrderID & "" ' End Product Attribute If End If dUnitPrice = cdbl(cDbl(sAttrUnitPrice) + cDbl(sProdPrice)) Order_SetProdPrice 'SFAE ' Set Unit Price for Product If iConverion = 1 Then sUnitPrice = "" Else sUnitPrice = FormatCurrency(dUnitPrice) End If dProductSubtotal = iQuantity * (dUnitPrice) If iConverion = 1 Then sProductSubtotal = "" Else sProductSubtotal = FormatCurrency(dProductSubtotal) End If 'sTotalPrice = sTotalPrice + cDbl(dProductSubtotal) 'SFUPDATE %>

<%= sUnitPrice %> <%= sProductSubtotal %>
<% if bActiveCart = 1 then %> <% end if %>
<%= getShippingSaleText(0) %>

<%= getGlobalSaleText %>

Recalculate Order

<%Order_ShowCouponLink'SFAE%> <%OVC_SaveSubTotalWOD 'SFAE%> <%If Application("AppName") = "StoreFront" Then 'SFUPDATE sTotalPrice = getGlobalSalePrice(cdbl(sTotalPrice)) End If If Application("AppName") = "StoreFrontAE" Then 'SFAE sTotalPrice = ApplyALLDiscounts(cdbl(sTotalPrice),"Total") '.3008 End If '----------------------------------------------------------- ' SUBTOTAL OUTPUT '----------------------------------------------------------- %> <%OVC_ShowOrderDiscounts'SFAE%> <% ' End rsAllOrders If End If %>
Sub Total: <% If iConverion = 1 Then dim stemp stemp = "" dblTotal = FormatCurrency(sTotalPrice) Response.Write stemp Else If sTotalPrice < 0 Then Response.Write "Error: Your SubTotal Was a Negative Amount" Response.End Else dim dblTotal dblTotal = FormatCurrency(sTotalPrice) Response.write FormatCurrency(sTotalPrice) End If End If %>   

"> "> "> "> "> "> <%If bHasProducts Then %>
<% ' See if there is any path to return to If Request.Cookies("sfSearch")("SearchPath") <> "" Then sSearchPath = Request.Cookies("sfSearch")("SearchPath") If InStr(LCase(sSearchPath), "login.asp") <> 0 Then sSearchPath = "advancedsearch.asp" End If Else sSearchPath = "advancedsearch.asp" End If %>

Please Note: CONTINUE CHECKOUT will go to our secure server to finish your transaction. <% Else %> Continue Search <% End If %>
Your cart Your cart
View cart
Authentication Authentication



Remember Me
Log in 
Register 
Recover password
 
Quick Picks Quick Picks
On Sale
About Us
Site Map
Refer a Friend

Quick Picks Research Center
Coffee Brewing Tips
Barista Tips
How to use...
Buying Guides
Reviews
Recipes
Pictures and Videos
Quick Picks Services
Catering
Office Coffee Beak
Repair
Barista Training
Shopping at our Store
Security Security
Click for company profile
Air Miles Rewards Air Miles Rewards
Earn Triple
Air Miles
Reward Miles
 
[Terms] [ Privacy ] [ About Us] [ Contact Us ] [ Site Map ] [ Home ]
 
Copyright © (1996) 1999-2008 Espresso Planet
All Rights Reserved. Certain names, logos, designs, titles, words or phrases constitute trademarks, service marks or trade names of Espresso Planet Inc., SupraMatic Inc., M. Schaerer Ltd., Thermoplan Ltd., Jura, Solis, Saeco, Krups, Capresso, Gaggia, Rancillio, Bosch, Nespresso, Keurig, Illy

 
Sales and service of espresso machines and coffee makers in Canada, the USA, Toronto, Mississauga, Ontario
<% closeObj(rsAllOrders) closeObj(cnn) %>