%
' Comersus Shopping Cart
' Comersus Open Technologies
' United States
' Software License can be found at License.txt
' http://www.comersus.com
' Details: get off line shipping quotes from cart view
%>
<%
on error resume next
dim mySQL, connTemp, rstemp5
' get settings
pStoreFrontDemoMode = getSettingKey("pStoreFrontDemoMode")
pCurrencySign = getSettingKey("pCurrencySign")
pDecimalSign = getSettingKey("pDecimalSign")
pCompany = getSettingKey("pCompany")
pCompanyLogo = getSettingKey("pCompanyLogo")
pHeaderKeywords = getSettingKey("pHeaderKeywords")
pAuctions = getSettingKey("pAuctions")
pAllowNewCustomer = getSettingKey("pAllowNewCustomer")
pNewsLetter = getSettingKey("pNewsLetter")
pStoreNews = getSettingKey("pStoreNews")
pSuppliersList = getSettingKey("pSuppliersList")
pDisableState = getSettingKey("pDisableState")
pIdDbSessionCart = getSessionVariable("idDbSessionCart",0)
pIdCustomer = getSessionVariable("idCustomer",0)
if pIdDbSessionCart=0 then
response.redirect "comersus_message.asp?message="&Server.Urlencode(getMsg(424,"It seems that your session is lost. please try again from store home."))
end if
' if the customer is logged-in retrieve shipping address
if pIdCustomer<>0 then
mySQL="SELECT state, stateCode, zip, countryCode, shippingState, shippingStateCode, shippingZip, shippingCountryCode FROM customers WHERE idCustomer=" &pIdCustomer
call getFromDatabase(mySQL, rsTemp5, "checkShippingAddress")
if not rsTemp5.eof then
if rsTemp5("shippingZip")<>"" then
' load shipping
pZip = rsTemp5("shippingZip")
pState = rsTemp5("shippingState")
pStateCode = rsTemp5("shippingStateCode")
pCountryCode = rsTemp5("shippingCountryCode")
else
' load billing
pZip = rsTemp5("zip")
pState = rsTemp5("state")
pStateCode = rsTemp5("stateCode")
pCountryCode = rsTemp5("countryCode")
end if
end if
end if ' customer logged in
%>