<%Option Explicit%> <% dim action,upsrs dim xMerchantCity, xMerchantCountry, xMerchantState, xMerchantPostcode, xzeroweightError, xAutoSeparatepackages, xAutoseparateWeight, UPS_Residentialind, xIndividualPackages, xcheckIndividualProduct, testmode, xTrace, xTraceXML, PackagingType, Pickuptype, xUseSupplierZip, UPS_UnitofMeasurement, UPS_WeightUnits, UPS_Dimensions, xml, xsuppliershipfield, xcheckIndividualProductField, xdimensionfield', gatewaylocation_register, gatewaylocation_license, gatewaylocation_payment, gatewaylocation_paymenttesting ShopCheckAdmin "" '************************************************************* ' Version 6.50 ' view UPS Realtime configuration screen ' Sept 20 2005 '*************************************************************** AdminPageHeader ShopOpenDatabase myconn GenerateDisplayHeader "UPS Real-Time Configuration" GenerateDisplayBodyHeader if request("action")<>"" Then ProcessUserAction shopwriteheader "Configuration Saved" end if GetData DisplayForm GenerateDisplayBodyFooter ShopCloseDatabase myconn AdminPageTrailer Sub GetData sql="select * from ups_config" set upsrs=myconn.execute(sql) if Not upsrs.eof then xMerchantCity = upsrs("xMerchantCity") xMerchantCountry = upsrs("xMerchantCountry") xMerchantState = upsrs("xMerchantState") xMerchantPostcode = upsrs("xMerchantPostcode") if xMerchantPostcode = "" then xMerchantPostcode = getconfig("xmerchantshipzip") xzeroweightError = upsrs("xzeroweightError") xAutoSeparatepackages = upsrs("xAutoSeparatepackages") xAutoseparateWeight = upsrs("xAutoseparateWeight") UPS_Residentialind = upsrs("UPS_Residentialind") xIndividualPackages = upsrs("xIndividualPackages") xcheckIndividualProduct = upsrs("xcheckIndividualProduct") testmode = upsrs("testmode") xTrace = upsrs("testmode") xTraceXML = upsrs("testmode") PackagingType = upsrs("PackagingType") Pickuptype = upsrs("Pickuptype") xUseSupplierZip = upsrs("xUseSupplierZip") UPS_UnitofMeasurement = upsrs("UPS_UnitofMeasurement") UPS_WeightUnits = upsrs("UPS_WeightUnits") UPS_Dimensions = upsrs("UPS_Dimensions") ' gatewaylocation_register = upsrs("gatewaylocation_register") ' gatewaylocation_license = upsrs("gatewaylocation_license") ' gatewaylocation_payment = upsrs("gatewaylocation_payment") ' gatewaylocation_paymenttesting = upsrs("gatewaylocation_paymenttesting") xml = upsrs("xml") xsuppliershipfield = upsrs("xsuppliershipfield") xcheckIndividualProductField = upsrs("xcheckIndividualProductField") xdimensionfield = upsrs("xdimensionfield") end if closerecordset upsrs End Sub SUB ProcessUserAction sql="select * from ups_config" Set upsrs= Server.CreateObject("ADODB.Recordset") upsrs.open sql, myconn, adOpenKeyset, adLockOptimistic, adcmdText if Not upsrs.eof then sql = "UPDATE ups_config SET " sql = sql & "xMerchantCity = '" & request("xMerchantCity") & "', " sql = sql & "xMerchantCountry = '" & request("xMerchantCountry") & "', " sql = sql & "xMerchantState = '" & request("xMerchantState") & "', " sql = sql & "xMerchantPostcode = '" & request("xMerchantPostcode") & "', " sql = sql & "xzeroweightError = '" & request("xzeroweightError") & "', " sql = sql & "xAutoSeparatepackages = '" & request("xAutoSeparatepackages") & "', " sql = sql & "xAutoseparateWeight = '" & request("xAutoseparateWeight") & "', " sql = sql & "UPS_Residentialind = '" & request("UPS_Residentialind") & "', " sql = sql & "xIndividualPackages = '" & request("xIndividualPackages") & "', " sql = sql & "xcheckIndividualProduct = '" & request("xcheckIndividualProduct") & "', " sql = sql & "testmode = '" & request("testmode") & "', " sql = sql & "xTrace = '" & request("testmode") & "', " sql = sql & "xTraceXML = '" & request("testmode") & "', " sql = sql & "PackagingType = '" & request("PackagingType") & "', " sql = sql & "Pickuptype = '" & request("Pickuptype") & "', " sql = sql & "xUseSupplierZip = '" & request("xUseSupplierZip") & "', " sql = sql & "UPS_WeightUnits = '" & request("UPS_WeightUnits") & "', " if request("UPS_WeightUnits") = "LBS" then sql = sql & "UPS_UnitofMeasurement = 'IN', " else sql = sql & "UPS_UnitofMeasurement = 'CM', " end if sql = sql & "UPS_Dimensions = '" & request("UPS_Dimensions") & "', " 'upsrs("gatewaylocation_register") = request("gatewaylocation_register") 'upsrs("gatewaylocation_license") = request("gatewaylocation_license") 'upsrs("gatewaylocation_payment") = request("gatewaylocation_payment") 'upsrs("gatewaylocation_paymenttesting") = request("gatewaylocation_paymenttesting") sql = sql & "xml = '" & request("xml") & "', " sql = sql & "xsuppliershipfield = '" & request("xsuppliershipfield") & "', " sql = sql & "xcheckIndividualProductField = '" & request("xcheckIndividualProductField") & "', " sql = sql & "xdimensionfield = '" & request("xdimensionfield") & "'" myconn.execute(sql) end if closerecordset upsrs end sub Sub DisplayForm %>
Merchant Details
City
State
Zipcode
Country <%ShopOriginCountries "xmerchantcountry", xmerchantcountry%>
   
Options
Zero-weight error > Yes "Yes" then response.write " checked"%>> No
Auto-separate packages > Yes "Yes" then response.write " checked"%>> No
Auto-separate weight
Delivery address is residential? > Yes "Yes" then response.write " checked"%>> No
Allow certain products to be shipped separately? > Yes "Yes" then response.write " checked"%>> No
Ship all products separately? > Yes "Yes" then response.write " checked"%>> No
Test mode > Yes "Yes" then response.write " checked"%>> No
Packaging type
Pick-up type
Use supplier zip? > Yes "Yes" then response.write " checked"%>> No
Weight units
   
Advanced
XML Version
Supplier Ship Field
Check Individual Product Field
Dimension Product Field
 

UPS, UPS brandmark, and the Color Brown are trademarks of United Parcel Service of America, Inc. All Rights Reserved.

<% End Sub %>