<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "14, 18, 32, 33, 55, 56, 60, 63, 119, 139, 140, 141, 142, 206, 209, 243, 244, 261, 262, 263, 264, 300, 301, 302, 303, 304, 305, 306, 307, 702, 703, 825, 836, 1087, 1109, 1110, 1111, 1112, 1113, 1130, 1131, 1132, 1185" strMenuDisabled = "DISABLED" 'disables dropdowns for currency and language selection, these won't work properly here %> <% '----------------------------------------------- 'SET PAGETITLE TAG '----------------------------------------------- strPageTitleHTML = GetString("PageTitle_MakeEnquiry") & " | " & GetString("Config_Webshopname") %> <% '=============================================== ' 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. '=============================================== '----------------------------------------------- 'IS THE BASKET EMPTY? 'If so, we best redirect to avoid problems 'later '----------------------------------------------- If numItemCount = 0 then response.redirect("default.asp") strThisPage = "basket" aryCart2 = aryCart '----------------------------------------------- 'COLLECT VALUES '----------------------------------------------- strAgain = request.form("strAgain") CD_EmailAddress = request.form("CD_EmailAddress") CD_Password = request.form("CD_Password") CD_CardholderCountry = request.form("CD_CardholderCountry") CD_ShippingPostcode = request.form("CD_ShippingPostcode") CD_ShippingCountry = request.form("CD_ShippingCountry") CD_CardholderEUVatNum = Request.Form("CD_CardholderEUVatNum") CP_CouponCode = request.form("CP_CouponCode") numShipMethod = request.form("numShipMethod") %><% '----------------------------------------------- 'CHECK COUNTRY WAS SELECTED '----------------------------------------------- If (CD_ShippingCountry = "0" or not isnumeric(CD_ShippingCountry)) and request.form("strAgain") = "yes" then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "shipto.asp?strProblem=country") End If '----------------------------------------------- 'SHIPMETHOD IS ELECTRONIC? 'Make sure this is allowed - and if it is not 'then redirect '----------------------------------------------- If not blnAllDownload then strQuery = "SELECT SM_ID, SM_Name" & CStr(numLanguageID) & " FROM tblCactuShopShippingMethods WHERE SM_AutoMethod = 'y'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) if numShipMethod = objRecordSet("SM_ID") then 'they've cheated, and tried to pass it off as all electronic! What a cheek! objRecordSet.close response.direct("default.asp") end if objRecordSet.close end if If len(CD_EmailAddress) = 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=noemail&strCallMode=enquiry") If len(ErrorcheckEmail(strErrorText, numErrorNo, CD_EmailAddress)) > 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=emailinvalid&strCallMode=enquiry") '----------------------------------------------- 'IF EMAIL/PASSWORD GIVEN, LOOK UP DETAILS '----------------------------------------------- If CD_Password <> "" then strQuery = "SELECT * FROM tblCactuShopCardholderDetails WHERE CD_EmailAddress='" & sqlsafe(CD_EmailAddress) & "' AND CD_Password='" & sqlsafe(CD_Password) & "' ORDER BY CD_ID DESC" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) '----------------------------------------------- 'DETAILS FOUND OK '----------------------------------------------- If objRecordSet.recordcount>0 then If objRecordSet("CD_Password") = CD_Password Then CD_ID = objRecordSet("CD_ID") CD_CardholderName = SafeHTMLencode(objRecordSet("CD_CardholderName")) CD_CardholderCompany = SafeHTMLencode(objRecordSet("CD_CardholderCompany")) CD_CardholderStreetAddress = SafeHTMLencode(objRecordSet("CD_CardholderStreetAddress")) CD_CardholderTownCity = SafeHTMLencode(objRecordSet("CD_CardholderTownCity")) CD_CardholderCounty = SafeHTMLencode(objRecordSet("CD_CardholderCounty")) CD_CardholderPostCode = SafeHTMLencode(objRecordSet("CD_CardholderPostCode")) CD_CustomerDiscount = objRecordSet("CD_CustomerDiscount") CD_Telephone = SafeHTMLencode(objRecordSet("CD_Telephone")) CD_ShippingName = SafeHTMLencode(objRecordSet("CD_ShippingName")) CD_ShippingStreetAddress = SafeHTMLencode(objRecordSet("CD_ShippingStreetAddress")) CD_ShippingTownCity = SafeHTMLencode(objRecordSet("CD_ShippingTownCity")) CD_ShippingCounty = SafeHTMLencode(objRecordSet("CD_ShippingCounty")) CD_Password = SafeHTMLencode(objRecordSet("CD_Password")) CD_Approved = SafeHTMLencode(objRecordSet("CD_Approved")) 'If the old affiliate ID is 0 (i.e. when they signed up before they didn't 'do so through an affiliate), then use the new affiliate ID. Otherwise keep 'the one in the database (so affiliates can't 'steal' customers from each 'other oldCD_AffiliateID = objRecordSet("CD_AffiliateID") if not (oldCD_AffiliateID = "" or oldCD_AffiliateID = "0") then CD_AffiliateID = oldCD_AffiliateID end if If CD_Approved = "" Or IsNull(CD_Approved) then CD_Approved = "n" Else '----------------------------------------------- 'DETAILS COULD NOT BE FOUND '----------------------------------------------- response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=email&strCallMode=enquiry") End if else '----------------------------------------------- 'DETAILS COULD NOT BE FOUND '----------------------------------------------- response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=email&strCallMode=enquiry") end if objRecordSet.close end if '----------------------------------------------- 'SET CARDHOLDER COUNTRY 'If this is a new customer, default the country 'to that which they are shipping to (most orders 'are shipped to the country where the cardholder 'is). '----------------------------------------------- If CD_CardholderCountry = "" or CD_CardholderCountry = "0" or not isnumeric(CD_CardHolderCountry) then CD_CardholderCountry = CD_ShippingCountry '----------------------------------------------- 'USER HAS ENTERED EMAIL ADDRESS AND NO CUSTOMER 'NUMBER. CHECK TO SEE IF THEY'VE ORDERED BEFORE 'AND ARE ALREADY ON THE DATABASE - IN THAT CASE 'WE CAN SEND THEM BACK TO REQUEST THEIR CUSTOMER 'NUMBER RATHER THAN CREATE A NEW ACCOUNT WITH 'THE SAME NUMBER. '----------------------------------------------- If CD_Password = "" then strQuery = "SELECT CD_EmailAddress FROM tblCactuShopCardholderDetails WHERE CD_EmailAddress='" & SqlSafe(CD_EmailAddress) & "'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If objRecordSet.recordcount <> 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=exists&strCallMode=enquiry") End if objRecordSet.close End if %> <% '----------------------------------------------- 'READ PAGE TEMPLATE FROM FILE '----------------------------------------------- Call ReadFromTemplate(strTemplateLocation, aryPageTemplate, strBasketHTML, strCategoryListHTML) '----------------------------------------------- 'WRITE FIRST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(0)) 'Check EU Vat number validity %> <% strErrorText = strErrorText & strErrorTextEUVat If Not strErrorText = "" Then %>
<% WriteString("PageTitle_Problems") %>
<% WriteString("ContentText_Errors") %>
<% =strErrorText %>
<< <% WriteString("ContentText_GoBack") %>
<% Else %>
">
<% WriteString("PageTitle_MakeEnquiry") %> - <% WriteString("PageTitle_Step") %> 4
<% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- %> <% End if %> <% Set objRecordSet3 = Server.CreateObject("ADODB.Recordset") %> <% 'We need to reset total weight - this was set in buildpage but we want to 'recalculate in price_calc_basic. numTotalWeight = 0 for numCounter = 1 to numItemCount '----------------------------------------------- 'SUCK THE CONTENTS OF AN ARRAY RECORD FROM DB '----------------------------------------------- strQuery = "SELECT * FROM (((tblCactuShopTaxRates INNER JOIN tblCactuShopVersions ON tblCactuShopVersions.V_Tax = tblCactuShopTaxRates.T_ID) INNER JOIN tblCactuShopProducts ON tblCactuShopVersions.V_Product = tblCactuShopProducts.P_ID) INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProductProdTypeLink.PPT_ProductID = tblCactuShopProducts.P_ID) INNER JOIN tblCactuShopProdtype ON tblCactuShopProdtype.PT_ID = tblCactuShopProductProdTypeLink.PPT_ProdTypeID WHERE V_ID=" & aryCart2(numCounter - 1, 1) Call ExecuteSQL(strQuery, numCursorType, objRecordSet) numItemQuantity = aryCart(numCounter - 1, 2) %> <% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- %> <% End if %> <% objRecordSet.Close next %> <% '----------------------------------------------- 'SHOW COUPON DISCOUNT ENTRY '----------------------------------------------- If numCouponDiscountIncTax<>0 then %> <% If Application(LICENSENUMBER & "pricesinctax") = "y" then %> <% if Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% else %> <% end if %> <% else %> <% end if %> <% End if '----------------------------------------------- 'SHOW CUSTOMER DISCOUNT ENTRY '----------------------------------------------- If numCustomerDiscountIncTax <> 0 then %> <% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- %> <% End if %> <% End if '----------------------------------------------- 'SHIPPING '----------------------------------------------- %> <% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- %> <% End if %> <% '----------------------------------------------- 'ORDER HANDLING CHARGE '----------------------------------------------- If numOrderHandlingPriceIncTax > 0 then %> <% '----------------------------------------- 'PRICES INCLUDING TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then If Application(LICENSENUMBER & "showtaxdisplay") = "y" then %> <% Else %> <% End if Else '----------------------------------------- 'PRICES EXCLUDING TAX '----------------------------------------- %> <% End if %> <% end if %>
<% WriteString("ContentText_ExTax") %>  <% WriteString("ContentText_IncTax") %> <% WriteString("ContentText_Price") %> <% WriteString("ContentText_Price") %>  <% WriteString("ContentText_Tax") %> <% WriteString("ContentText_Qty") %> <% WriteString("ContentText_Total") %>
<% response.write(objRecordSet("P_Name" & CStr(numLanguageID))) %>
<% =objRecordSet("V_Name" & CStr(numLanguageID)) %> <% =objRecordSet("V_CodeNumber") %><% =aryCurrencies(1) & " " & CurrencyDisplay(numItemPriceExTax, 1, aryCurrencies(4)) %>  <% =aryCurrencies(1) & " " & CurrencyDisplay(numItemPriceIncTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numItemPriceIncTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numItemPriceExTax, 1, aryCurrencies(4)) %>  <% =numItemTaxRate * 100 %>% <% =numItemQuantity %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numRowPriceIncTax, 1, aryCurrencies(4)) %>
 
<% WriteString("ContentText_CouponDiscount") %>
<% response.write(strCouponName) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numCouponDiscountExTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numCouponDiscountIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numCouponDiscountIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numCouponDiscountExTax, 1, aryCurrencies(4)) %> <% =numTaxPercent %>%1 <% =CurrencyDisplay(numCouponDiscountIncTax, 1, aryCurrencies(4)) %>
 
<% WriteString("ContentText_Discount") %>
<% =CD_CustomerDiscount %>%<% =aryCurrencies(1) & " " & CurrencyDisplay(numCustomerDiscountExTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numCustomerDiscountIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numCustomerDiscountIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numCustomerDiscountExTax, 1, aryCurrencies(4)) %> <% =numTaxPercent %>%1 <% =CurrencyDisplay(numCustomerDiscountIncTax, 1, aryCurrencies(4)) %>
 
<% response.write(GetString("ContentText_Shipping") & ": " & strShippingName) %>
<% response.write(strShippingDescription) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numShippingPriceExTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numShippingPriceIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numShippingPriceExTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numShippingPriceExTax, 1, aryCurrencies(4)) %> <% =numShippingTaxRate * 100 %>%1 <% =aryCurrencies(1) & " " & CurrencyDisplay(numShippingPriceIncTax, 1, aryCurrencies(4)) %>
 
<% WriteString("ContentText_OrderHandlingCharge") %>
 <% =aryCurrencies(1) & " " & CurrencyDisplay(numOrderHandlingPriceExTax, 1, aryCurrencies(4)) %> <% =aryCurrencies(1) & " " & CurrencyDisplay(numOrderHandlingPriceIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numOrderHandlingPriceIncTax, 1, aryCurrencies(4)) %><% =aryCurrencies(1) & " " & CurrencyDisplay(numOrderHandlingPriceExTax, 1, aryCurrencies(4)) %> <% =numOrderHandlingTaxRate * 100 %>%1 <% =aryCurrencies(1) & " " & CurrencyDisplay(numOrderHandlingPriceIncTax, 1, aryCurrencies(4)) %>
<% '----------------------------------------------- 'WRITE TOTALS '----------------------------------------------- '----------------------------------------- 'EU VAT NUMBER 'If we've got this far we don't need to 'check that the vat number is valid or 'the country allows it etc. We'll recheck 'on the next page anyway. '----------------------------------------- If CD_CardholderEUVatNum <> "" then response.Write(GetString("FormLabel_CardholderEUVatNum") & " = " & CD_CardholderEUVatNum & "
") end if '----------------------------------------- 'TAX '----------------------------------------- If Application(LICENSENUMBER & "pricesinctax") = "y" then 'Prices included tax If Application(LICENSENUMBER & "showtaxdisplay") = "y" then response.write(strOrderValueExTax & "
") response.write(strOrderValueTax & "
") End if Else 'Prices excluding tax response.write(strOrderValueExTax & "
") response.write(strOrderValueTax & "
") End if '----------------------------------------- 'FINAL TOTAL '----------------------------------------- If numDestinationTaxOnOff = 1 then 'If tax is on, show inc tax response.write("" & strOrderValueTotal & "
") numFinalTotalPriceDue = numFinalTotalPriceIncTax Else 'else, the final total is ex tax response.write("" & strOrderValueTotal & "
") numFinalTotalPriceDue = numFinalTotalPriceExTax End if %>
<% WriteString("ContentText_EnquiryInfo") %>
<% WriteString("FormLabel_EmailAddress") %> <% =CD_EmailAddress %>
<% WriteString("ContentText_YourQuery") %>

">
<% End If '----------------------------------------------- 'WRITE LAST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(1)) '----------------------------------------------- 'CLOSE DATA CONNECTIONS '----------------------------------------------- objDataConn.Close set objDataConn = nothing %>