<% varMessage = "" if Request.Form("fRegister")="true" Then 'we'll check that the email address hasn't been registered first sEmail = Replace(Request.Form("fEmailAddress"), "'", "''") OpenDatabase objConn sSQL_Login = "SELECT * FROM " & settingTablePrefix & "tblcustomers WHERE email='" & sEmail &"' AND CustomerType='wholesale'" Set objLogin = Server.CreateObject ("ADODB.Recordset") objLogin.CursorLocation = aduseClient objLogin.Open sSQL_Login, objConn, 3, 3 If objLogin.EOF or sEmail = "info@jbaseedpotatoes.co.uk" Then 'convert form elements to variables, stripping out illegal characters sTitle = Replace(Request.Form("fTitle"), "'", "''") sFirstName = Replace(Request.Form("fFirstName"), "'", "''") sLastName = Replace(Request.Form("fLastName"), "'", "''") sPhone = Replace(Request.Form("fDayTel1"), "'", "''") & " " & Replace(Request.Form("fDayTel2"), "'", "''") sFax = Replace(Request.Form("fFax"), "'", "''") sipAddress = Request.Servervariables("REMOTE_HOST") Dim sconfirmCode Randomize sconfirmCode = Round(Rnd * 99999999999)+1 sConfirmed = 1 sInvoiceAddress1 = Replace(Request.Form("fAddress1"), "'", "''") sInvoiceAddress2 = Replace(Request.Form("fAddress2"), "'", "''") sInvoiceAddress3 = Replace(Request.Form("fAddress3"), "'", "''") sInvoiceAddress4 = Replace(Request.Form("fAddress4"), "'", "''") sInvoicePostcode = Replace(Request.Form("fPostcode"), "'", "''") sInvoiceCountry = Replace(Request.Form("fCountry"), "'", "''") sPassword = (Replace(Request.Form("fPassword"), "'", "''")) Dim objMD5 Set objMD5 = New MD5 objMD5.Text = sPassword sPasswordHash = objMD5.HEXMD5 sCompany = Replace(Request.Form("fCompany"), "'", "''") sCompanyType = Replace(Request.Form("fCompanyType"), "'", "''") sCompanyTypeOther = Replace(Request.Form("fCompanyTypeOther"), "'", "''") sAccountType = Replace(Request.Form("fAccountType"), "'", "''") sRef1 = Replace(Request.Form("fRef1"), "'", "''") sRef1Address = Replace(Request.Form("fRef1Address"), "'", "''") sRef1Tel = Replace(Request.Form("fRef1Tel"), "'", "''") sRef2 = Replace(Request.Form("fRef2"), "'", "''") sRef12Address = Replace(Request.Form("fRef2Address"), "'", "''") sRef2Tel = Replace(Request.Form("fRef2Tel"), "'", "''") sCurrentSupplier = Replace(Request.Form("fCurrentSupplier"), "'", "''") sEstimatedOrder = Replace(Request.Form("fEstimatedOrder"), "'", "''") 'add to database sSQL = "SELECT * FROM " & settingTablePrefix & "tblcustomers" Set objData = Server.CreateObject("ADODB.Recordset") objData.CursorLocation = aduseClient objData.Open sSQL, objConn, 3, 3 objData.AddNew objData("email") = sEmail objData("password") = sPasswordHash objData("company") = sCompany objData("title") = sTitle objData("firstName") = sFirstName objData("lastName") = sLastName objData("phone") = sPhone objData("fax") = sFax objData("ipAddress") = sipAddress objData("confirm_code") = sconfirmCode objData("confirmed") = sConfirmed objData("Invoice_Address1") = sInvoiceAddress1 objData("Invoice_Address2") = sInvoiceAddress2 objData("Invoice_Address3") = sInvoiceAddress3 objData("Invoice_Address4") = sInvoiceAddress4 objData("Invoice_Postcode") = sInvoicePostcode objData("Invoice_Country") = sInvoiceCountry objData("CompanyType") = sCompanyType objData("CompanyTypeOther") = sCompanyTypeOther objData("AccountType") = sAccountType objData("Ref1") = sRef1 objData("Ref1Address") = sRef1Address objData("Ref1Tel") = sRef1Tel objData("Ref2") = sRef2 objData("Ref2Address") = sRef2Address objData("Ref2Tel") = sRef2Tel objData("CustomerType") = "wholesale" objData("CurrentSupplier") = sCurrentSupplier objData("EstimatedOrder") = sEstimatedOrder objData.Update sID=objData("customer_id") objData.Close Set objData = Nothing 'send confirmation email sHTML = "You, or someone using your email address, has registered with Jamieson Brothers Wholesale Seed Potato Merchants.

" & vbCrlf sHTML = sHTML & "Your application will be reviewed within the next 48 hours and you will receive an email with details on whether your application has been successful.

" & vbCrlf sHTML = sHTML & "If this email was sent in error, please notify us at info@jbaseedpotatoes.co.uk.

Thanks from Jamieson Brothers." sText = "You, or someone using your email address, has registered with Jamieson Brothers Wholesale Seed Potato Merchants." & vbCrlf sText = sText & "Your application will be reviewed within the next 48 hours and you will receive an email with details on whether your application has been successful.

" & vbCrlf sText = sText & "If this email was sent in error, please notify us at info@jbaseedpotatoes.co.uk.

Thanks from Jamieson Brothers." sFullname = sFirstName & " " & sLastName Call SendMail(sFullName, sEmail, "JBA Seed Potatoes ", "Jamieson Brothers Seed Potato Merchants - Account Application", sHTML, sText) 'Call SendMail(strNameFirst & " " & strNameLast, strEmailAddress, "eProjectorLamps ", "eProjectorLamps: Password Reset", str_Message_html, str_Message_text) 'send an email to JBA sHTML = "A new customer has signed up to Jamieson Brothers Wholesale site.

"& vbCrlf sHTML = sHTML & "Name:"& sFullname & "
"& vbCrlf sHTML = sHTML & "Company:"& sCompany & "
"& vbCrlf sHTML = sHTML & "Current supplier:"& sCurrentSupplier & "
"& vbCrlf sHTML = sHTML & "Estimated order:"& sEstimatedOrder & "

"& vbCrlf if sCompanyType="Other" Then sHTML = sHTML & "Company type:"& sCompanyTypeOther & "
"& vbCrlf else sHTML = sHTML & "Company type:"& sCompanyType & "

"& vbCrlf End If sHTML = sHTML & "To approve this customer, click here."& vbCrlf Call SendMail("JBA Seed Potatoes", "info@jbaseedpotatoes.co.uk", "JBA Seed Potatoes ", "New Wholesale Customers", sHTML, sHTML) varMessage = "sent" Else varMessage = "taken" End If objLogin.Close Set objLogin = Nothing CloseDatabase objConn End If %> <% If IsObject(Session("cart")) Then Set dictCart = Session("cart") Else Set dictCart = Server.CreateObject("Scripting.Dictionary") End If %> Register To Get Your Wholesale Seed Potatoes At Trade Prices
 
<% if varMessage = "sent" Then %> Thanks for registering.

Your account will have to be approved before we can allow you to order.
You will receive an email from Jamieson Brothers once this process is complete.

You will then be able to log in and order products from Jamieson Brothers.

If you have any queries or need assistance, you can contact Jamieson Brothers at 01461 202567 or at info@seedpotatomerchants.co.uk. <% Else %> Register for a wholesale account

Trade prices for seed potatoes are available to companies and societies who work in the horticultural market. Proof of trading may be required before we can approve your account.

To apply for an account, please fill in the form below. If you have any queries or need assistance, you can contact Jamieson Brothers at 01461 202567 or at info@seedpotatomerchants.co.uk.

If you've already opened an account and it has been approved, you can log in to start ordering.

<% if varMessage = "taken" Then %>

The email address you have registered appears to be taken.

If you think you may have registered this email address but forgotten about it, you can request a password reset here.

<% End If %>
Your Contact Details
Title
First Name * " maxlength="50"<%=sReadOnly%> />
Last Name * " maxlength="50"<%=sReadOnly%> />
Telephone (area code/number) * " maxlength="20"<%=sReadOnly%> /> " maxlength="20"<%=sReadOnly%> />
Fax " maxlength="20"<%=sReadOnly%> />
Company Details
Company name * "<%=sReadOnly%> />
Company type
Please specify: "<%=sReadOnly%> />
Address * " maxlength="50"<%=sReadOnly%> />
  " maxlength="50"<%=sReadOnly%> />
  " maxlength="50"<%=sReadOnly%> />
Town / City * " maxlength="50"<%=sReadOnly%> />
Postcode " maxlength="10"<%=sReadOnly%> /> Leave blank for Ireland.
Country
Current Supplier
(if applicable)
" style="width:100%" <%=sReadOnly%> />
Estimated order amount/frequency " style="width:100%" <%=sReadOnly%> />
Account Details
Account type *
  » Find out more about account types (popup)
To open a credit account, we require two trade references.
Reference 1
Name " maxlength="20"<%=sReadOnly%> />
Address
Telephone " maxlength="20"<%=sReadOnly%> />
Reference 2
Name " maxlength="20"<%=sReadOnly%> />
Reference 2 Address
Reference 2 Telephone " maxlength="20"<%=sReadOnly%> />
Email address* " <%=sReadOnly%> />
Password* " maxlength="20"<%=sReadOnly%> />


* Denotes a required field
<% End if %>
 
Your Order
You do not have anything ordered yet.

Log in or create an account to place an order.


 
Website organically grown by the Callisti partnership: Design | Dev | SEO
All content copyright JBA Seed Potatoes 2010