<% ' Comersus 6.0x Sophisticated Cart ' Developed by Rodrigo S. Alhadeff for Comersus Open Technologies ' United States ' Open Source License can be found at License.txt ' http://www.comersus.com ' Details: if cart is not empty get orderform screen for first buy %> <% on error resume next dim mySQL, connTemp, rsTemp ' get settings pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode") pCurrencySign = getSettingKey("pCurrencySign") pDecimalSign = getSettingKey("pDecimalSign") pCompany = getSettingKey("pCompany") pCompanyLogo = getSettingKey("pCompanyLogo") pAuctions = getSettingKey("pAuctions") pListBestSellers = getSettingKey("pListBestSellers") pNewsLetter = getSettingKey("pNewsLetter") pPriceList = getSettingKey("pPriceList") pStoreNews = getSettingKey("pStoreNews") pOneStepCheckout = getSettingKey("pOneStepCheckout") pUseShippingAddress = getSettingKey("pUseShippingAddress") pRandomPassword = getSettingKey("pRandomPassword") pUseVatNumber = getSettingKey("pUseVatNumber") pEncryptionMethod = getSettingKey("pEncryptionMethod") pBonusPointsPerPrice = getSettingKey("pBonusPointsPerPrice") pDisableState = getSettingKey("pDisableState") pByPassShipping = getSettingKey("pByPassShipping") pUseShippingAddress = getSettingKey("pUseShippingAddress") pTeleSignCustomerId = getSettingKey("pTeleSignCustomerId") pAllowNewCustomer = getSettingKey("pAllowNewCustomer") pHeaderKeywords = getSettingKey("pHeaderKeywords") ' custom field names pCustomerFieldName1 = getSettingKey("customerFieldName1") pCustomerFieldName2 = getSettingKey("customerFieldName2") pCustomerFieldName3 = getSettingKey("customerFieldName3") ' session pWishListIdCustomer = getSessionVariable("wishListIdCustomer",0) pIdDbSessionCart = getSessionVariable("idDbSessionCart",0) pIdDbSession = checkSessionData() pIdDbSessionCart = checkDbSessionCartOpen() session("idCustomer") = Cint(0) if countCartRows(pIdDbSessionCart)=0 then response.redirect "comersus_message.asp?message="&Server.Urlencode(getMsg(616,"It seems that your session was lost. Please try again from store home and make sure that you have Cookies enabled.")) end if if pIdDbSessionCart=0 then response.redirect "comersus_supportError.asp?error="&Server.Urlencode(getMsg(617,"Database session cart lost, please try again from store home.")) end if if pAllowNewCustomer="0" or (pTeleSignCustomerId<>"0" and pTeleSignCustomerId<>"") then response.redirect "comersus_message.asp?message="&Server.Urlencode("Feature disabled in this store") end if %>
<%=getMsg(618,"personal info")%>
<%if pRandomPassword="0" then%> <%end if%> <%if pCustomerFieldName1<>"" then%> <%end if%> <%if pCustomerFieldName2<>"" then%> <%end if%> <%if pCustomerFieldName3<>"" then%> <%end if%> <%if pDisableState<>"-1" then%> <%end if%> <%if pByPassShipping="0" and pUseShippingAddress="-1" then%> <% if pWishListIdCustomer<>0 then ' get address of the owner of the wish list mySQL="SELECT address, zip, state, stateCode, city, countryCode, shippingAddress, shippingZip, shippingStateCode, shippingState, shippingCity, shippingCountryCode FROM customers WHERE idCustomer="&pWishListIdCustomer call getFromDatabase(mySQL, rstemp, "checkOutCustomerForm") if not rstemp.eof then pAddress = rstemp("address") pZip = rstemp("zip") pStateCode = rstemp("stateCode") pState = rstemp("state") pCity = rstemp("city") pCountryCode = rstemp("countryCode") pShippingAddress = rstemp("shippingAddress") pShippingZip = rstemp("shippingZip") pShippingStateCode = rstemp("shippingStateCode") pShippingState = rstemp("shippingState") pShippingCity = rstemp("shippingCity") pShippingCountryCode = rstemp("shippingCountryCode") ' customer doesnt have shipping address, use billing if pShippingAddress="" then pShippingAddress = pAddress pShippingZip = pZip pShippingStateCode = pStateCode pShippingState = pShippingState pShippingCity = pShippingCity pShippingCountryCode = pShippingCountryCode end if end if end if %> <%if pDisableState<>"-1" then%> <%if pWishListIdCustomer=0 then%> <%end if%> <%end if%> <%end if ' use shipping address%>
<%=getMsg(619,"customer")%>
<%=getMsg(173,"name")%>
<%=getMsg(174,"lName")%>
<%=getMsg(175,"company")%>
<%=getMsg(176,"")%>
<%=getMsg(177,"email")%>
<%=getMsg(178,"")%> (A-Z 0-9)
<%=getMsg(621,"retype")%>
<%=pCustomerFieldName1%>
<%=pCustomerFieldName2%>
<%=pCustomerFieldName3%>

<%=getMsg(622,"billing")%>
<%=getMsg(179,"addr")%>
<%=getMsg(183,"city")%>
<%=getMsg(181,"state")%> <% ' get stateCodes mySQL="SELECT stateCode, stateName FROM stateCodes ORDER BY stateName" call getFromDatabase(mySQL, rstemp, "orderForm") %>
<%=getMsg(182,"non listed")%>
<%=getMsg(180,"zip")%>
<%=getMsg(184,"ctry")%> <% ' get CountryCodes mySQL="SELECT countryCode, countryName FROM countryCodes ORDER BY countryName" call getFromDatabase(mySQL, rstemp, "orderForm") %>

<%=getMsg(471,"ship addr")%>
<%=getMsg(179,"addr")%> <%if pWishListIdCustomer=0 then%> <%else%> <%=pShippingAddress%> <%end if%>
<%=getMsg(183,"city")%> <%if pWishListIdCustomer=0 then%> <%else%> <%=pShippingCity%> <%end if%>
<%=getMsg(181,"state")%> <%if pWishListIdCustomer=0 then%> <% ' get stateCodes mySQL="SELECT stateCode, stateName FROM stateCodes ORDER BY stateName" call getFromDatabase(mySQL, rstemp, "checkShippingAddress") %> <%else%> <%=pShippingStateCode%><%=pShippingState%> <%end if%>
<%=getMsg(182,"non listed")%>
<%=getMsg(180,"zip")%> <%if pWishListIdCustomer=0 then%> <%else%> <%=pShippingZip%> <%end if%>
<%=getMsg(184,"country")%> <%if pWishListIdCustomer=0 then%> <% ' get CountryCodes mySQL="SELECT countryCode, countryName FROM countryCodes ORDER BY countryName" call getFromDatabase(mySQL, rstemp, "checkShippingAddress") %> <%else%> <%=pShippingCountryCode%> <%end if%>
   
">
   

<%call closeDb()%>