<% 'response.write(Session("session_username")) 'response.buffer=false 'response.Write("hello " & session("URN")) 'if session("PostClass") = "" then session("PostClass") = 0 cbIsInvoice = request.form("cbIsInvoice") ' check box to see if they want to use same delivery address as invoice address catFilter="" sub GetMemberDetails Dim oRSConn 'The ADODB connection object ' Dim CONN_STRING ' CONN_STRING = "DSN=glen;UID=root;Password=NeCam4556!;" Set oRSConn = Server.CreateObject("ADODB.Connection") oRSConn.Open CONN_STRING Set oRSp = Server.CreateObject("ADODB.recordset") oRSp.CursorLocation = 3 sqlquery = "SELECT DISTINCT customer.postcode, customer.prefix, customer.forenames, customer.surname, customer.address1, customer.address2, customer.address3, customer.address4, customer.address5, customer.postcode, customer.zip, customer.country, customer.email, customer.telephone, customer.sex FROM customer INNER JOIN contactbrand ON ( customer.unique_ref = contactbrand.unique_ref ) WHERE contactbrand.brandid = 'ARDBEG' AND customer.unique_ref = "&session("URN") 'response.Write(sqlquery) oRSp.open sqlquery,oRSConn recCount = oRSp.RecordCount if oRSp.RecordCount > 0 then oRSp.MoveFirst session("cardholder") = oRSp.fields("prefix") & " " & oRSp.fields("forenames") & " " & oRSp.fields("surname") session("add1") = oRSp.fields("address1") session("add2") = oRSp.fields("Address2") session("add3") = oRSp.fields("Address3") session("add4") = oRSp.fields("Address4") session("add5") = oRSp.fields("Address5") session("post") = oRSp.fields("postcode") session("zip") = oRSp.fields("zip") 'sql = "selcect country from life_web_ardbeg_countries where id="&oRSp.fields("country")&" or short= "&oRSp.fields("country")&" or country="&oRSp.fields("country") 'set rs =server.createObject("ADODB.recordset") 'rs.Open sql , activeConnection 'if not rs.eof then ' session("country") ="erwerewrw"' rs(0) ' set rs = nothing 'end if session("email") = oRSp.fields("email") 'if oRSp.fields("telephone")&"" <>"" then session("phone") = oRSp.fields("telephone") session("sex") = oRSp.fields("sex") session("posta") = oRSp.fields("postcode") oRSp.close set oRSp =nothing oRSConn.close set oRSConn =nothing 'response.redirect("shop1.asp?action=checkout") 'no need to redirect here, it will simply display the cart info.. 'no records found so redirect elseif recCount = 0 then ' if customer not found in CUSTOMERS, try ardbeg_customers Set oRSp2 = Server.CreateObject("ADODB.recordset") oRSp2.CursorLocation = 3 sqlquery = "SELECT DISTINCT forenames, surname, email FROM ardbeg_customers WHERE unique_ref = "&session("URN") 'response.Write(sqlquery) oRSp2.open sqlquery,oRSConn 'response.write(sqlquery) oRSp2.MoveFirst session("cardholder") = oRSp2.fields("forenames") & " " & oRSp2.fields("surname") oRSp2.close set oRSp2 =nothing oRSConn.close set oRSConn =nothing else response.redirect("ShopLogin.asp?tech=searchon-brand-urn=0") end if end sub %> Shop Search


 

<% Sub AddItemToCart(iItemID, iItemCount, iItemName, iItemSize) if iItemSize = "" then iItemSize = "n/a" 'response.write( iItemID &"
"& iItemCount &"
"& iItemName &"
"& iItemSize&"
addToCart
") if inStr(1, iItemID,"\") = 0 then iItemID = iItemID &"\"& iItemSize If dictCart.Exists(iItemID) Then dictCart(iItemID) = dictCart(iItemID) + iItemCount Else dictCart.Add iItemID, iItemCount End If Response.Write iItemCount & " '" & iItemName & "' has been added to your cart.""

" & vbCrLf End Sub Sub RemoveItemFromCart(iItemID, iItemCount, iItemName) 'response.write( iItemID &"
"& iItemCount &"
"& iItemName &"
"& iItemSize&"
removeTo") If dictCart.Exists(iItemID) Then If dictCart(iItemID) <= iItemCount Then dictCart.Remove iItemID Else dictCart(iItemID) = dictCart(iItemID) - iItemCount End If Response.Write iItemCount & " '" & iItemName & "' has been removed from your cart.

" & vbCrLf Else Response.Write "Couldn't find any of that item your cart.

" & vbCrLf End If End Sub Sub ShowItemsInCart() Dim Key Dim aParameters ' as Variant (Array) Dim sTotal, sShipping %> <% sTotal = 0 For Each Key in dictCart aParameters = GetItemParameters(Key) if aParameters(0)<>-1 then %> <% sTotal = sTotal + (dictCart(Key) * CSng(aParameters(2))) end if Next 'Calculate shipping - you might want to pull this out into a function if your shipping ' calculations are more complicated then ours. ;) If sTotal <> 0 Then sShipping = session("PostClass") Else sShipping = 0 End If sTotal = sTotal 'sTotal = sTotal + sShipping %>
Description Size Quantity Price Totals Remove
<%=aParameters(1) %> <%response.write(parseKey(Key,False))%> <%=dictCart(Key)%> £<%=aParameters(2)%> £<%= FormatNumber(dictCart(Key) * CSng(aParameters(2)),2) %> Remove One  Remove All
Total: £<%= FormatNumber(sTotal,2) %>  
<% End Sub function parseKey(sKey,returnKey) if instr(1,sKey,"\") = 0 and (returnKey=False) then parseKey = "n/a" exit function end if if instr(1,sKey,"\") = 0 and (returnKey=True) then parseKey = sKey exit function end if dim arrVals redim arrVals(1) arrVals = split(sKey&" ","\") if returnKey=True then parseKey = arrVals(0) else parseKey = arrVals(1) end if end function function createSearch() dim arrWords redim arrWords(0) if InStr(1,request("vals")," ") > 0 then arrWords = split(request("vals")," ") else arrWords(0) = request("vals")&"" end if findStr = "" if len(trim(arrWords(0)))> 0 then dim arrFields redim arrFields(1) arrFields(0) ="ModelName" arrFields(1) ="Description" OrAnd = request("OOR") if request("sField") <>"All" then filterField = request("sField") For Each s in arrWords if len(trim(s))> 0 then findStr = findStr &" (`"& filterField & "` like '%"& s & "%')"&OrAnd next else For each f in arrFields For Each s in arrWords if len(trim(s)) > 0 then findStr = findStr &" (`"& f & "` like '%"& s & "%')"&OrAnd next next end if if len(findStr)>len(OrAnd) then findStr = left(findStr,len(findStr) - len(OrAnd)) end if catFilter ="" if request("sCat")<>"0" then catFilter = request("sCat") price="" select case request("PriceRange") case "1" price="(UnitCost Between 0.00 AND 10.00)" case "2" price="(UnitCost Between 10.01 AND 20.00)" case "3" price="(UnitCost Between 20.01 AND 40.00)" case "4" price="(UnitCost Between 40.01 AND 100.00)" case "5" price="(UnitCost >= 100.01)" case else price="" end select if len(price)> 0 And len(findStr)> 0 then findStr = " AND (" & findStr&" ) AND ( "& price & ")" elseif len(price)> 0 then createSearch = "AND(" &price& ")" elseif len(findStr)> 0 then createSearch = "AND(" &findStr& ")" else createSearch="" end if 'createSearch = "AND("&&")" end function Sub ShowFullCatalog() sqlWhere =createSearch Dim oRSConn 'The ADODB connection object ' Dim CONN_STRING ' CONN_STRING = "DSN=glen;UID=root;Password=NeCam4556!;" Set oRSConn2 = Server.CreateObject("ADODB.Connection") oRSConn2.Open CONN_STRING Set oRSp2 = Server.CreateObject("ADODB.recordset") oRSp2.CursorLocation = 3 'MAIN SQL QUERY USED TO FIND THE PRODUCTS>>>>>>>>>>>>>>> sC = "" if catFilter <>"" then cat = catFilter end if if cat&""<>"" then sC = " CategoryID = "& cat &" AND " sqlquery = "SELECT ProductID FROM ardbeg_cmrc_products where "&sC&" DisplayInShop = 1 AND IsArchived = 0 "&sqlWhere&" order by UnitCost asc" oRSp2.open sqlquery,oRSConn2 if oRSp2.RecordCount = 0 then response.write("
There are no products to be displayed, please try again.
")'&sqlquery) end if ' oRSp2.movefirst Dim aParameters ' as Variant (Array) Dim I Dim iItemCount ' Number of items we sell 'fred is taken from the initial database search when page opens. %> <% 'work way through products and add them to the dictionary colour = 1 do while not oRSp2.EOF 'aParameters = GetItemParameters(I) aParameters = GetItemParameters(oRSp2.fields("ProductID")) %> " name="frm<%response.write("id_"&aParameters(4))&"cat_"&aParameters(7)%>" action="shop1.asp?action=add" method = "post"> <% if aParameters(4) = "492" then %> <%If (colour MOD 2 <> 0 ) Then ' odd number%> <% end if %> <% Else ' even number%> <%End If%> <% ELSE 'TEST %> <%If (colour MOD 2 <> 0 ) Then ' odd number%> <% Else ' even number%> <%End If%> <% end if 'test %> <% colour = colour+1 oRSp2.MoveNext loop %>

Ardbeg 1965 - The Envy of Islay

Just 261 bottles in the world. Only 50 available from the Distillery. Our unorthodox ‘Register of Intent’ Draw is now closed.

50 fortunate souls have had their names drawn from a hat and will be afforded the opportunity to purchase a precious bottle of Ardbeg 1965.

Please try to be pleased for them. Remember, envy is a sin…

If we can offer any consolation at all, it is that you are not alone in letting this delectable whisky escape your clutches.

For the full story and movie

'].submit(); return false;"> <% if aParameters(4) <> "492" then %>

<%= aParameters(1) %>

<%= aParameters(3) %>

Price: £<%= aParameters(2) %>

<% Set oRSp3 = Server.CreateObject("ADODB.recordset") oRSp3.CursorLocation = 3 sqlquery3 = "SELECT SizeName FROM ardbeg_cmrc_sizes where ProductID = "& oRSp2.fields("ProductID")&" order by SizeName asc;" oRSp3.open sqlquery3,oRSConn2 fred3 = oRSp3.RecordCount if fred3 > 0 then oRSp3.MoveFirst %> Size: <% end if oRSp3.close set oRSp3 =nothing %>
'].submit(); return false;">

<%= aParameters(1) %>

<%= aParameters(3) %>

Price: £<%= aParameters(2) %>


<% Set oRSp3 = Server.CreateObject("ADODB.recordset") oRSp3.CursorLocation = 3 sqlquery3 = "SELECT SizeName FROM ardbeg_cmrc_sizes where ProductID = "& oRSp2.fields("ProductID")&";" oRSp3.open sqlquery3,oRSConn2 fred3 = oRSp3.RecordCount if fred3 > 0 then oRSp3.MoveFirst %> Size: <% end if oRSp3.close set oRSp3 =nothing %>
'].submit(); return false;" >
<% oRSp2.close set oRSp2 =nothing oRSConn2.close set oRSConn2 =nothing End Sub Sub PlaceOrder() Dim Key Dim aParameters ' as Variant (Array) Dim sTotal, sShipping %> <% sTotal = 0 ' costPostage = 0 weight = 0 For Each Key in dictCart aParameters = GetItemParameters(Key) %> <% 'weight = weight + aParameters(5)*dictCart(Key) 'combined weights 'removed 25/5-06. Can't add weight to items if we have to calculate postage for each item. 'thisweight = aParameters(5)*dictCart(Key) ' each products weight thisweight = aParameters(5) ' each products weight 'multiply with quantity if more than 1 item of same product if dictCart(key) = 1 then TotalPostage = TotalPostage + getShiping(parseKey(session("PostClass"),false), thisweight) else tempPostage = (tempPostage + getShiping(parseKey(session("PostClass"),false), thisweight)) * dictCart(Key) TotalPostage = tempPostage + TotalPostage tempPostage = 0 end if ' sql = "select PostCost from ardbeg_cmrc_postrateslookup where PostalRegionId='"&parseKey(session("PostClass"),true)&"' and " & _ ' "PostServiceType='"&parseKey(session("PostClass"),false)&"'" & _ ' " AND "& weight &" between `LowerWeightLimitGrams` and `UpperWeightLimitGrams`" ' set rs = server.createObject("ADODB.recordset") ' rs.open sql, activeConnection ' curCost = 0 ' if not rs.eof then curCost = rs(0) ' costPostage = costPostage + curCost ' curMn = 0 curMn = aParameters(2) sTotal = sTotal + (dictCart(Key) * curMn) Next 'costPostage = getShiping(parseKey(session("PostClass"),false), weight) 'used with combined weights session("PostageCost") = round(TotalPostage,2) ' so we can use the session in the email out. 'session("PostageCost") = round(costPostage,2) ' session in the email out. Used with combined weights sTotal = sTotal + TotalPostage 'sTotal = sTotal + costPostage 'used with combined weights %>
Description Size Weight(grm) Quantity Price Totals
<%= aParameters(1) %> <%= parseKey(Key,False) %> <%= aParameters(5)%> <%= dictCart(Key) %> £<%= aParameters(2) %> £<%= FormatNumber(dictCart(Key) * CSng(aParameters(2)),2) %>
Postage: £<%=session("PostageCost")%>
Total: £<%response.write(round(sTotal,2)) %>
<% End Sub Function GetItemParameters(iItemID) Dim aParameters ' Will contain values/ details for each product Dim oRSConn 'The ADODB connection object ' Dim CONN_STRING ' CONN_STRING = "DSN=glen;UID=root;Password=NeCam4556!;" Set oRSp = Server.CreateObject("ADODB.recordset") oRSp.CursorLocation = 3 'only find the product we are after to fill the dictionary with sqlquery = "SELECT * FROM ardbeg_cmrc_products where ProductID = '"& parseKey(iItemID, True)&"' and DisplayInShop = '1'" oRSp.open sqlquery,activeConnection fred = oRSp.RecordCount if not oRSp.Eof then oRSp.MoveFirst else aParameters = Array("-1") GetItemParameters = aParameters exit function end if do while not oRSp.EOF aParameters = Array("images/shopimages/"& oRSp.fields("ProductImage"), ""&oRSp.fields("ModelName")&"",""&oRSp.fields("UnitCost")&"",""&oRSp.fields("Description")&"",""&oRSp.fields("ProductID")&"",""&oRSp.fields("WeightGrams")&"",""&parseKey(iItemID, False),""&oRSp.fields("CategoryID")&"" ) oRSp.MoveNext loop oRSp.close set oRSp =nothing set oRSConn =nothing ' Return array containing product info. GetItemParameters = aParameters End Function %> <% ' ***** Begin the infamous runtime script ***** ' Declare our Vars Dim dictCart ' as dictionary Dim sAction ' as string Dim iItemID ' as integer Dim iItemCount ' as integer dim sqlquery ' as string ' Get a reference to the cart if it exists otherwise create it If IsObject(Session("cart")) Then Set dictCart = Session("cart") Else Set dictCart = Server.CreateObject("Scripting.Dictionary") End If ' Get all the parameters passed to the script sAction = Request("action") iItemID = Request("item") iItemCount = CInt(Request("count")) iItemName = Request("name") iItemSize = Request("size") cat = "" cat = request.QueryString("cat") if cat<>"" then select case cat case 14 cat = 14 case 15 cat = 15 case 16 cat = 16 case 17 cat = 17 ' case else ' cat = 15 end select end if %>
<% ' Select action based on user input msg = "" Select Case sAction Case "add" AddItemToCart iItemID, iItemCount, iItemName, iItemSize ShowItemsInCart %>

Continue Looking
Checkout
<% Case "del" RemoveItemFromCart iItemID, iItemCount, iItemName ShowItemsInCart %>

Continue Looking
Checkout
<% Case "viewcart" ShowItemsInCart %>

Continue Looking
Checkout
<% Case "checkout" call checkout Case "carddetails" call carddetails Case "AltDelivery" call AltDelivery Case "Cardnumber" call Cardnumber Case "SendOrder" call SendOrder Case else call eElse End Select function checkout() session("trimRegionFlag") = "off" session("DeliveryRegion")= "" 'PlaceOrder If Session("URN") <> "" then GetMemberDetails() else 'response.write("session: "&Session("URN")&"
") response.Redirect("ShopLogin.asp?tech=no-session(urn)-refpage=shop1.asp") end if %>

Select Shipping Destination

Country: <% 'COUNTRIES ////////////////////////////////////////// sqlC = "select * from life_web_ardbeg_countries" country = session("Country") ' currently no value if country="" then country="United Kingdom" set rsC = server.createObject("ADODB.recordset") rsC.open sqlC, activeConnection %> <% if session("Country") = "United States" or session("Country") = "United States Minor Outlying Islands" or session("Country") = "Canada" then %> <% end if %>
 
Required fields are highlighted.

How long it takes We will normally send your order to you in 28 business days . International orders are generally received in under 28 days.

Over-demand If something you want isn't in stock, we'll place a back order for you. You'll receive an e mail with the option to cancel your order if you don't want to wait.

Something on your mind? If you need to get in touch, please click on 'send mail', or call +44 (0) 1496 302244, fax on +44 (0) 1496 302040, or write to us at Ardbeg Distillery, Port Ellen, Isle of Islay, Argyll, Scotland PA42 7EA.

Private and Confidential Ardbeg do not disclose buyers information to third parties. Cookies are used on this shopping site to keep track of the contents of your shopping cart once you have selected an item, to store delivery addresses if the address book is used and to store your details if you select the 'Remember Me' option.

<% end function function carddetails() RtoS("Country") 'United Kingdom1 or United States3 etc.. this is used to calc postage, United Kingdom is 1, Europe is 2, World is 3 'if the last character of the COUNTRY is numeric, it is the region code and we need to trim it otherwise it won't calculate 'the correct postage. if isNumeric(right(session("country"),1)) = TRUE then session("regionid") = right(session("country"),1) session("country") = mid(session("country"),1,len(session("country"))-1) end if RtoS("DeliveryRegion") ' CA or FL, only for US and Canada, not used to calc postage 'if (session("Country") = "US" or session("Country")="CA") and (session("DeliveryRegion")="") then ' response.redirect("shop1.asp?action=checkout") 'end if '************************************************************************************************************ ' get the weight of each product ordered - add the weight together and get the correct postCost from the database
' then make that the PostClass!! '************************************************************************************************************ PlaceOrder %>
<%if request("msg")<>"" then %> <% end if %> <% country = session("Country") %> <% If InStr(1, country, "United States", 1) Then%> <% ELSE %> <% END If %>
Invoice Address
<%response.write("
"&request("msg")&"
")%>
Name/Cardholder: " maxlength="40" size="20" />
Address Line 1: " maxlength="200" size="20" />
Address Line 2: " maxlength="200" size="20" />
Address Line 3: " maxlength="200" size="20" />
Address Line 4 (town/city): " maxlength="200" size="20" />
Address Line 5 (county/state): " maxlength="200" size="20" />
Zip: " maxlength="200" size="20" />
Postal Code: " maxlength="10" size="20" />
Country: <% if session("Country") = "United States" then %> " readonly="readonly" id="Country" style="width:224px;" size="20" /> <% else %> " readonly="readonly" id="Country" style="width:224px;" size="20" /> <% end if %>
Phone Number: " maxlength="25" size="20" />
Email Address: " maxlength="40" size="20" />

Shipping And Handling

Please select how you would like your purchase to be shipped to you.

Please note that while Special or Signed-For Delivery is more expensive, we strongly recommend choosing it if your order contains whisky, because it will be insured and tracked. Ordinary First Class post is not, and we cannot be held responsible for damage or loss if you choose to have whisky delivered using this method.

Class of Service:
Enter any special delivery instructions " maxlength="255" size="20" />

 

Required fields are highlighted.


How long it takes We will normally send your order to you in 28 business days . International orders are generally received in under 28 days.

Over-demand If something you want isn't in stock, we'll place a back order for you. You'll receive an e mail with the option to cancel your order if you don't want to wait.

Something on your mind? If you need to get in touch, please click on 'send mail', or call +44 (0) 1496 302244, fax on +44 (0) 1496 302040, or write to us at Ardbeg Distillery, Port Ellen, Isle of Islay, Argyll, Scotland PA42 7EA.

Private and Confidential Ardbeg do not disclose buyers information to third parties. Cookies are used on this shopping site to keep track of the contents of your shopping cart once you have selected an item, to store delivery addresses if the address book is used and to store your details if you select the 'Remember Me' option.

<% end function function AltDelivery() 'get form data here if request("Prev")<>"1" then msgD = "" if RtoS("cardholder") = False then msgD = "The field 'Name/Cardholder' can not be empty!
" if RtoS("add1") =False then msgD = msgD & "The field 'Address Line 1' can not be empty!
" if RtoS("add4") =False then msgD = msgD & "The field 'Address Line 4 (town/city)' can not be empty!
" If InStr(1, session("country"), "United States", 1) Then 'if session("country") <> "US" AND session("country") <> "UM" then ' zip need to be entered for USA cities if RtoS("zip") =False then msgD = msgD & "The field 'Zip' can not be empty!
" else ' postal code need to be entered for non-USA cities if RtoS("posta") =False then msgD = msgD & "The field 'Postal Code' can not be empty!
" end if if RtoS("phone") =False then msgD = msgD & "The field 'Phone Number' can not be empty!
" if RtoS("email") =False then msgD = msgD & "The field 'Email Address' can not be empty!
" if RtoS("PostClass") = False then msgD= msgD & "The field 'Class of Service' can not be empty!" RtoS("add2") RtoS("add3") RtoS("add5") RtoS("Country") RtoS("DeliveryInstructions") if msgD<>"" then response.redirect("shop1.asp?action=carddetails&msg="&msgD) end if PlaceOrder %>
<%if request("msg")<>"" then %> <% end if %> <% country = session("Country") %> <% If InStr(1, country, "United States", 1) Then%> <% ELSE %> <% END IF %>

Alternative Delivery Address

<%response.write("
"&request("msg")&"
")%>
Name/Cardholder: " maxlength="40" size="20" />
Address Line 1: " maxlength="200" size="20" />
Address Line 2: " maxlength="200" size="20" />
Address Line 3: " maxlength="200" size="20" />
Address Line 4 (town/city): " maxlength="200" size="20" />
Address Line 5 (county/state): " maxlength="200" size="20" />
Zip: " maxlength="10" size="20" />
Postal Code: " maxlength="10" size="20" />
Country: " size="20" />
 

Required fields are highlighted.

Shipping And Handling Sadly, due to customs laws, we are unable to deliver Ardbeg whisky to the USA or Canada.
Should you have any queries regarding the cost of delivery to a particular country, please contact us directly at oldkiln@ardbeg.com.
A range of postal services are used within the UK and to international destinations. We have given you the option as to which service you use.
In the UK:- Special Delivery (for whisky) - guaranteed next day delivery; up to £250 compensation for lost/damaged goods; goods are signed for. First Class (for gifts) - 1 to 2 day delivery.
In Europe & the Rest of the World:- International Registered (for whisky) - express delivery; up to £500 compensation; goods are signed for. Small Packet (for gifts) - Airmail 2 to 5 day delivery.
In USA & Canada:- Small Packet (for gifts) - Airmail 5 to 7 day delivery.
You are responsible for paying any import or duties levied upon the export or import of the goods you order.
The receipt and credit card slip will be sent to the ordering address.
<% end function function Cardnumber() 'get form data here if request("Prev")<>"1" then smsg="" 'if the delivery address is the same as the invoice address, set delAdd to invAdd and redirect appropriately if cbIsInvoice <> "" then session("DelName") = session("cardholder") session("DelAdd1") = session("add1") session("DelAdd2") = session("add2") session("DelAdd3") = session("add3") session("DelAdd4") = session("add4") session("DelAdd5") = session("add5") session("DelZip") = session("zip") session("DelPCode") = session("posta") session("Country") = session("Country") response.redirect("shop1.asp?action=AltDelivery&msg="&smsg &"&Prev=1") end if if RtoS("DelName")=False then smsg = "The field 'Delivery Name/Cardholder' can not be empty!
" 'if (RtoS("DelAdd1") =False) OR (Trim(Session("DelAdd1"))=Trim(session("add1"))) then smsg = smsg & "The field 'Address Line 1' can not be empty and doesn`t equal invoice address!
" 'if (RtoS("DelAdd4") =False) OR (Trim(Session("DelAdd4"))=Trim(session("add4"))) then smsg = smsg & "The field 'Address Line 4' can not be empty and doesn`t equal invoice address!
" if (RtoS("DelAdd1") =False) then smsg = smsg & "The field 'Address Line 1' can not be empty!
" if (RtoS("DelAdd4") =False) then smsg = smsg & "The field 'Address Line 4' can not be empty!
" If InStr(1, session("country"), "United States", 1) Then 'if session("country") <> "US" AND session("country") <> "UM" then ' zip need to be entered for USA cities if RtoS("DelZip") =False then smsg = smsg & "The field 'Zip' can not be empty!
" else ' postal code need to be entered for non-USA cities if RtoS("DelPCode") =False then smsg = smsg & "The field 'Postal Code' can not be empty!
" end if RtoS("DelAdd2") RtoS("DelAdd3") RtoS("DelAdd5") RtoS("DelCountry") if smsg<>"" then response.redirect("shop1.asp?action=AltDelivery&msg="&smsg &"&Prev=1" ) end if PlaceOrder %>
<%if request("msg")<>"" then %> <% end if %>
<%response.write("
"&request("msg"))%>
Credit Card Type
Credit Card Number " maxlength="19" size="20">
Card Expiry Date (mm/yyyy)
Security Code (last 3 digits of the number on the
reverse of your card, 4 digits for AMEX cards)
ATM PIN Code (4 digits number used for ATM
transactions)
 

How long it takes We will normally send your order to you in 28 business days . International orders are generally received in under 28 days.

Over-demand If something you want isn't in stock, we'll place a back order for you. You'll receive an e mail with the option to cancel your order if you don't want to wait.

Something on your mind? If you need to get in touch, please click on 'send mail', or call +44 (0) 1496 302244, fax on +44 (0) 1496 302040, or write to us at Ardbeg Distillery, Port Ellen, Isle of Islay, Argyll, Scotland PA42 7EA.

Private and Confidential Ardbeg do not disclose buyers information to third parties. Cookies are used on this shopping site to keep track of the contents of your shopping cart once you have selected an item, to store delivery addresses if the address book is used and to store your details if you select the 'Remember Me' option.

<% end function function SendOrder() ' ALTERED 9/5/06 SINCE ARDBEG WANT TO ENABLE OFF-LINE ORDERS FOR PARANOID CUSTOMERS ' If the field is not empty and isn't numeric. And not char 'OFFLINE' if RtoS("CCNumber")= FALSE OR (RtoS("CCNumber") = TRUE AND IsNumeric(TRIM(UCASE(session("CCNumber")))) = FALSE AND TRIM(UCASE(session("CCNumber"))) <> "OFFLINE" ) then msg = "You have not entered a Credit Card Number.
For off-line transactions, please type 'OFFLINE' in the 'Credit Card Number' field.

" response.redirect("shop1.asp?action=Cardnumber&msg="&msg&"&Prev=1") end if 'email oldkiln and customer with this order. RtoS("CCType") RtoS("CCExpMonth") RtoS("CCExpYear") ' ALTERED 9/5/06 SINCE ARDBEG WANT TO ENABLE OFF-LINE ORDERS FOR PARANOID CUSTOMERS IF IsNumeric(TRIM(UCASE(session("CCNumber")))) = TRUE then if RtoS("securityCode")= FALSE then msg = "You have entered a Credit Card Number without a Security Code.
Please enter a Security Code.

" response.redirect("shop1.asp?action=Cardnumber&msg="&msg&"&Prev=1") end if if RtoS("securityCode1")= FALSE then msg = "You have entered a Credit Card Number without an ATM PIN Code.
Please enter an ATM PIN Code.

" response.redirect("shop1.asp?action=Cardnumber&msg="&msg&"&Prev=1") end if end if PlaceOrder sTotal = 0 OrderID = saveOrderToDB() For Each Key in dictCart aParameters = GetItemParameters(Key) saveToDb aParameters ,dictCart(Key),OrderID ordersbodytext = ordersbodytext & dictCart(Key) & " x "& "(size: "& parseKey(Key,False) &")"& aParameters(1) & " @ £" &aParameters(2) & " each = £" & FormatNumber(dictCart(Key) * CSng(aParameters(2)),2) & vbcrlf & VBCRLF sTotal = sTotal + (dictCart(Key) * CSng(aParameters(2))) 'sTotal = sShipping + sTotal + (dictCart(Key) * CSng(aParameters(2))) 'ordersbodytext = ordersbodytext & "Total £" & sTotal & VBCRLF & VBCRLF Next For Each Key in dictCart dictCart.Remove Key Next mailbodytext = mailbodytext & "Your order is listed below." & VBCRLF & VBCRLF mailbodytext = mailbodytext & "Order number : " & OrderID & VBCRLF mailbodytext = mailbodytext & "Name : " & session("cardholder") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("add1") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("add2") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("add3") & VBCRLF mailbodytext = mailbodytext & "Town/City : " & session("add4") & VBCRLF mailbodytext = mailbodytext & "County/State : " & session("add5") & VBCRLF mailbodytext = mailbodytext & "Country : " & session("Country") & VBCRLF mailbodytext = mailbodytext & "Region : " & session("DeliveryRegion") & VBCRLF mailbodytext = mailbodytext & "Postcode : " & session("post") & VBCRLF mailbodytext = mailbodytext & "Zip : " & session("zip") & VBCRLF mailbodytext = mailbodytext & "Telephone : " & session("phone") & VBCRLF mailbodytext = mailbodytext & "Email : " & session("email") & VBCRLF mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & "Delivery Details" & VBCRLF mailbodytext = mailbodytext & "Name : " & session("DelName") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("DelAdd1") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("DelAdd2") & VBCRLF mailbodytext = mailbodytext & "Address : " & session("DelAdd3") & VBCRLF mailbodytext = mailbodytext & "Town/City : " & session("DelAdd4") & VBCRLF mailbodytext = mailbodytext & "County/State : " & session("DelAdd5") & VBCRLF mailbodytext = mailbodytext & "Country : " & session("Country") & VBCRLF mailbodytext = mailbodytext & "Region : " & session("DeliveryRegion") & VBCRLF mailbodytext = mailbodytext & "Postcode : " & session("DelPCode") & VBCRLF mailbodytext = mailbodytext & "Zip : " & session("DelZip") & VBCRLF mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & "Card Details" & VBCRLF mailbodytext = mailbodytext & "Type : " & session("CCType") & VBCRLF if session("CCType") <> "Switch" then mailbodytext = mailbodytext & "Number : " & "xxxx xxxx xxxx " & Right(session("CCNumber"),4) & VBCRLF else mailbodytext = mailbodytext & "Number : " & "xxxx xxxx xxxxxx " & Right(session("CCNumber"),6) & VBCRLF end if mailbodytext = mailbodytext & "Expiry : " & session("CCExpMonth") & "/"& session("CCExpYear") & VBCRLF mailbodytext = mailbodytext & "Security Code: " & session("securityCode") & VBCRLF mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & "Shipping / Postage" & VBCRLF mailbodytext = mailbodytext & "Class of Service : " & parseKey(session("PostClass"),false) & VBCRLF & VBCRLF if session("DeliveryInstructions") <> "" then mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & "Special Instructions" & VBCRLF mailbodytext = mailbodytext & session("DeliveryInstructions") & VBCRLF & VBCRLF end if mailbodytext = mailbodytext & "Order details" & VBCRLF mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & ordersbodytext & VBCRLF 'format the currency to two decimal places 'postageCost = FormatCurrency (session("PostageCost"), 1, -2, -2, -2)) mailbodytext = mailbodytext & "Shipping Cost: £" & session("PostageCost") & VBCRLF mailbodytext = mailbodytext & "Total Cost: £" &sTotal + session("PostageCost")& VBCRLF mailbodytext = mailbodytext & "" & VBCRLF mailbodytext = mailbodytext & "Thank you for your order." & VBCRLF mailbodytext = mailbodytext & "" & VBCRLF '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' mailContinue = false if checkcomp("Persits.MailSender") then Set Mail = Server.CreateObject("Persits.MailSender") mailContinue = true 'Mail.AddAddress ShopAddAddress customerEmail = session("email") Mail.AddAddress customerEmail Mail.AddCC ShopAddAddress Mail.Host = SMTPserver ' Specify a valid SMTP server Mail.FromName = "Ardbeg Shop" 'test for dupes Mail.AddReplyTo ShopReplyTo Mail.IsHTML = False Mail.Body = mailbodytext Mail.Subject = ShopMailSubject Mail.From = ShopEmailFromName elseif checkcomp("CDO.Message") then Set Mail = Server.CreateObject("CDO.Message") mailContinue = true 'Mail.To = ShopAddAddress Mail.To = customerEmail Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPserver Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=Port Mail.Configuration.Fields.Update Mail.TextBody = mailbodytext Mail.Subject = ShopMailSubject Mail.From = ShopEmailFromName end if 'Mail.Timestamp = CDate(datestamp) 'sets the date and time of when to queue the message until On Error Resume Next if mailContinue = true then Mail.Send Mail.reset 'clears addresses else response.write("
Mail system component required! Mail send failed!") end if %>

Thank you. Your order number is: <%=OrderID%>.
Please print a copy of this page and retain it for your records.
If you would like to speak to us please telephone +44 (0) 1496 302244

 
<% end function function eElse() ' Shop ShowFullCatalog %>
View Cart Contents <% end function ' Return cart to Session for storage Set Session("cart") = dictCart function saveOrderToDB() sql = "select max(OrderID) from ardbeg_cmrc_orders " set rs = server.createObject("ADODB.recordset") rs.Open sql ,activeConnection id = 1 if not rs.Eof then id = CInt(rs(0)) + 1 CardId = session("CCNumber") user_id = session("URN") if trim(user_id)="" then response.redirect("ShopLogin.asp") if trim(CardId)="" then msg = "The Card number cant`t be empty! Access Denied!" response.redirect("shop1.asp?action=Cardnumber&msg="&msg) exit function end if fieldsArray = array("cardholder","add1","add2","add3","add4","add5","post","zip","Country", _ "phone", "email","CCType","DeliveryInstructions", "DelName", _ "DelAdd1","DelAdd2", "DelAdd3", "DelAdd5", "DelPCode", "DelZip", "Country","DelAdd4", "securityCode", "securityCode1") fieldsStr = "" & _ "OrderID, UserID, OrderDate, CCNumber, CharCCNumber, CCExpMonth, CCExpYear, PostServiceType, postageCost," & _ "InvoiceName, InvoiceAdd1, InvoiceAdd2, InvoiceAdd3, " & _ "invoiceAdd4, InvoiceAdd5, InvoicePCode, InvoiceZip, InvoiceCountry, InvoicePhone, InvoiceEmail, " & _ "CCType, " & _ "DeliveryInstruction, " & _ "DeliveryName, DeliveryAdd1, DeliveryAdd2, DeliveryAdd3, DeliveryAdd5, DeliveryPCode, DeliveryZip, DeliveryCountry, DeliveryAdd4, SecurityCode, SecurityCode1" sql ="insert into ardbeg_cmrc_orders ("&fieldsStr&") values (" & _ id&", "&user_id&", CURDATE(), 'xxxx xxxx xxxx " & Right(session("CCNumber"),4) & "'," & _ "'" & Right(session("CCNumber"),19) & "'," & _ session("CCExpMonth") & "," &session("CCExpYear") & ", '" & parseKey(session("PostClass"),false) & "', " & _ session("PostageCost") & "" for J=0 to UBound(fieldsArray) sql = sql&",'" & session(fieldsArray(J)) & "'" Next sql = sql&")" 'response.write(sql) ' response.end activeConnection.execute sql saveOrderToDB = id end function function getShiping(PostClass, weight) if PostClass <> "" then shipingCost = 0 sql = "select PostCost from ardbeg_cmrc_postrateslookup where " & _ "PostServiceType='"&PostClass&"' " & _ " AND "& weight &" between `LowerWeightLimitGrams` and `UpperWeightLimitGrams`" set rs2 = server.createObject("ADODB.recordset") rs2.open sql, activeConnection if not rs2.eof then shipingCost = shipingCost+rs2(0) else rs2.close sql = "select PostCost from ardbeg_cmrc_postrateslookup " & _ "where PostServiceType='"&PostClass&"' " & _ "order by UpperWeightLimitGrams Desc limit 1" rs2.open sql, activeConnection if not rs2.eof then shipingCost=shipingCost+rs2(0) end if rs2.close set rs2 =nothing getShiping = shipingCost end if end function function saveToDb(aParameters, Quantity, OrderID) sql ="select max(RecordID) from ardbeg_cmrc_shoppingcart " set rs = server.createObject("ADODB.recordset") rs.Open sql ,activeConnection id = 1 if not rs.Eof then id = CInt(rs(0)) + 1 CardId = session("CCNumber") user_id = session("URN") if trim(user_id)="" then response.redirect("ShopLogin.asp") if trim(CardId)="" then msg = "The card number cant`t be empty! Access Denied!" response.redirect("shop1.asp?action=Cardnumber&msg="&msg) exit function end if fieldsStr = "" & _ "(RecordID, CartID, Quantity, ProductID, ProductSize, ProductColour, ProductPrice, DateCreated, user_id)" sql ="INSERT INTO ardbeg_cmrc_shoppingcart "&fieldsStr&" values (" & vbcrlf & _ id&",'"&CardId&"','"&Quantity&"', '"&aParameters(4)&"', '" &aParameters(6)&"','"&parseKey(Key,False)&"', '" &aParameters(2)&"', CURDATE(), '"& user_id&"')" 'response.write(sql) 'response.end activeConnection.execute sql 'response.write("Unable to save information to the database! Try again later!") sql= " SELECT LAST_INSERT_ID() " Set rs = server.createObject("ADODB.recordset") rs.open sql, activeConnection id = rs(0) set rs= nothing fieldsStr = "OrderID, ProductID, Quantity, ProductSize, ProductColour, UnitCost" sql ="insert into ardbeg_cmrc_orderdetails ("&fieldsStr&") values (" & vbcrlf & _ OrderID&",'"&aParameters(4)&"','"&Quantity&"', '" &aParameters(6)&"','"&parseKey(Key,False)&"', '" &aParameters(2)&"')" 'response.write(sql) 'response.end Set rs = server.createObject("ADODB.recordset") rs.open sql, activeConnection set rs= nothing end function function RtoS(sName) if replace(request(sName)," ","")<>"" then session(sName) = replace(request(sName),"'","''") 'session(sName) = request(sName) RtoS=True exit function else if replace(session(sName)&""," ","")="" then RtoS=False exit function end if end if end function function checkcomp(str) on error resume next checkcomp = false Err = 0 dim checkobject set checkobject = Server.CreateObject(str) if 0 = Err then checkcomp = true end if set checkobject = nothing Err = 0 end function %>