<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "18, 203, 204, 205, 206, 207, 208, 289, 290, 304, 889, 890, 891, 980, 981, 1010" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== '----------------------------------------------- 'SET PAGETITLE TAG '----------------------------------------------- strPageTitleHTML = GetString("PageTitle_ShippingRates") & " | " & GetString("Config_Webshopname") '----------------------------------------------- 'SHIPPING PRICES DISPLAY 'This is switchable between using weight or 'order cost as the basis for calculating 'shipping prices. To change the labels for each 'shipping zone, see 'aryZone' at the bottom of 'the config.asp file. '----------------------------------------------- '----------------------------------------------- 'CREATE ARRAY OF SHIPPING ZONE NAMES '----------------------------------------------- Dim aryZone(5) aryZone(1) = GetString("Config_Zone1") aryZone(2) = GetString("Config_Zone2") aryZone(3) = GetString("Config_Zone3") aryZone(4) = GetString("Config_Zone4") aryZone(5) = GetString("Config_Zone5") '----------------------------------------------- 'LOOKUP SHIPPING TAX RATE '----------------------------------------------- strQuery = "SELECT * FROM tblCactuShopTaxRates WHERE T_ID=" & Application(LICENSENUMBER & "shiptaxband") Call ExecuteSQL(strQuery, numCursorType, objRecordSet) numTaxRate = objRecordSet("T_Taxrate") objRecordSet.close '----------------------------------------------- 'READ PAGE TEMPLATE FROM FILE '----------------------------------------------- Call ReadFromTemplate(strTemplateLocation, aryPageTemplate, strBasketHTML, strCategoryListHTML) '----------------------------------------------- 'WRITE FIRST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(0)) %> <% If Application(LICENSENUMBER & "shippingsystem") = "u" then %> <% else %> <% end if %>
<% WriteString("PageTitle_ShippingRates") %>
<% WriteString("ContentText_UPSExplanation") %>
(<% if Application(LICENSENUMBER & "calcshipcostbyweight") = "y" then WriteString("ContentText_CalculatedByOrderWeight") else WriteString("ContentText_CalculatedByOrderValue") end if%>)
<% strQuery = "SELECT * FROM tblCactuShopShippingRates INNER JOIN tblCactuShopShippingMethods ON tblCactuShopShippingRates.S_ShippingMethod = tblCactuShopShippingMethods.SM_ID ORDER BY S_ShippingMethod, S_Zone,S_Boundary" Call ExecuteSQL(strQuery,numCursorType,objRecordSet2) do while not objRecordSet2.EOF numBackgroundCounter = numBackgroundCounter + 1 If numBackgroundCounter mod 2 = 0 then strBackgroundClass = " class='mainpagetableline2'" else strBackgroundClass = " class='mainpagetableline'" end if 'If it's a different shipping method, write out the title If objRecordSet2("SM_ID") <> SM_ID then %> <% If objRecordSet2("SM_AutoMethod") = "n" then %> <% If Application(LICENSENUMBER & "calcshipcostbyweight") = "y" then strCurrencyDisplay = "" strWeightDisplay = " " & Application(LICENSENUMBER & "weightunit") strColumnHeading = GetString("ContentText_OrderWeight") Else strCurrencyDisplay = aryCurrencies(1) & " " strWeightDisplay = "" strColumnHeading = GetString("ContentText_OrderValue") End if %> <% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if End if response.write "" & vbcrlf end if end if SM_ID = objRecordSet2("SM_ID") If objRecordSet2("SM_AutoMethod") = "n" then %> > " & vbcrlf numShipping = objRecordSet2("S_ShippingRate") '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if End if %> <% end if objRecordSet2.moveNext loop objRecordSet2.close %>

<% response.write(objRecordSet2("SM_Name" & CStr(numLanguageID))) %>
<% response.write(objRecordSet2("SM_Description" & CStr(numLanguageID))) %>
<% =strColumnHeading %><% WriteString("ContentText_Shipping") %> <% WriteString("ContentText_ExTax") %>  <% WriteString("ContentText_Shipping") %> <% WriteString("ContentText_IncTax") %> <% WriteString("ContentText_Shipping") %>   <% WriteString("ContentText_Shipping") %> <% WriteString("ContentText_ExTax") %>  <% WriteString("ContentText_Tax") %> <% WriteString("ContentText_Shipping") %>   
<% If objRecordSet2("S_Zone") <> numZoneLast then numZoneNumber = objRecordSet2("S_Zone") response.write(aryZone(numZoneNumber)) else response.write(" ") end if numZoneLast = objRecordSet2("S_Zone") %> <% If objRecordSet2("S_Live") = "y" then if objRecordSet2("S_Boundary") <> 999999 then if Application(LICENSENUMBER & "calcshipcostbyweight") = "y" then response.write(objRecordSet2("S_Boundary") & strWeightDisplay) else response.write(strCurrencyDisplay & CurrencyDisplay(objRecordSet2("S_Boundary"), aryCurrencies(3), aryCurrencies(4))) end if else WriteString("ContentText_AllHigherOrders") end if else response.write("-") end if response.write "<% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(aryCurrencies(1) & " " & CurrencyDisplay(Round(numShipping * (1/(1 + (numTaxrate/100))),2), aryCurrencies(3), aryCurrencies(4))) End If else response.write("-") end if %> <% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(aryCurrencies(1) & " " & CurrencyDisplay(numShipping, aryCurrencies(3), aryCurrencies(4))) End If else response.write("-") end if %><% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(aryCurrencies(1) & " " & CurrencyDisplay(numShipping, aryCurrencies(3), aryCurrencies(4))) End If else response.write("-") end if %>  <% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(aryCurrencies(1) & " " & CurrencyDisplay(numShipping, aryCurrencies(3), aryCurrencies(4))) End If else response.write("-") end if %> <% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(numTaxrate & "%") End If else response.write("-") end if %><% If objRecordSet2("S_Live") = "y" then If numShipping = 0 Then WriteString("ContentText_Free") Else Response.Write(aryCurrencies(1) & " " & CurrencyDisplay(numShipping, aryCurrencies(3), aryCurrencies(4))) End If else response.write("-") end if %>  
 
<% '----------------------------------------------- 'WRITE LAST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(1)) '----------------------------------------------- 'CLOSE DATA CONNECTIONS '----------------------------------------------- objDataConn.Close set objDataConn = nothing %>