File: D:/web/castironradiatorcentre/inc-template-account.asp
<%
' === COMMON TEMPLATE (SAME FOR ALL SHOPPING SITES) ===
' (SS,13/02/08) removed bold from Postcode, no longer a required field
' (SS,12/11/08) added bold for Postcode back in
' (SS,03/03/09)? Jeets adds lots of bgcolor="#FFFFFF" for white background on petfood site
' (SS,17/04/09) added Mobile if enabled
' (SS,28/05/09) removed Retype Email
' (SS,11/06/09) reduced occurrences of bgcolor="#FFFFFF" by only placing them where required i.e. <table>'s rather than <td>'s where possible, reduced from 20 to 13 occurrences
' (SS,15/06/09) replaced bgcolor="#FFFFFF" with class="account_bkd"
' (SS,23/06/09) added GetVATNumberHelpMessage to VATNumber
' (SS,18/03/10) added language translation using calls to tr function
' (SS,07/05/10) replaced buttons with calls to GetButton..
' (SS,25/02/11) minor correction to add space after thank you and before company name
' (SS,20/06/11) removed all class="form" from form controls
' (SS,16/02/12) replaced 4 references to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,18/06/12) text change to Sub ShowForgotPasswordThankYou, added reset password routines including Sub ShowResetPasswordForm,
' (SS,13/07/12) change to ShowAccountLogoutSuccess, My Account button becomes Your Account
' (SS,13/09/12) changed GetButtonMyAccount to GetButtonYourAccount
' (SS,08/03/13) added APackedBy, ADateDespatched, ACourier, ATrackingNo, ATrackingURL to ShowAccountPreviousOrdersDetail
' (SS,13/11/13) change to ShowAccountPreviousOrdersHeader and ShowAccountPreviousOrdersDetail to only show despatch details if new parameter AShowDespatchDetails is True
' (SS,20/12/13) added class="form-hint" to VAT help hint and changed size of field from 30 to 20
' (SS,09/09/14) changes to work with Bootstrap 3 framework
' (SS,01/03/14) replaced all & in URLs with & to pass W3C validation
' (SS,04/04/17) added jquery code to hide/show VAT Number field depending on whether country is UK or not
' (SS,24/08/17) change to ShowResetPasswordForm added Server.HTMLEncode to both Request.QueryString variables to prevent xss
' (SS,23/05/18) added Sub ShowSubscribeHeader and Sub ShowSubscribeFooter
' (SS,05/12/19) modified Sub ShowAccountHeader to add additional parameters to ShowPageTitle
' (SS,13/12/18) added action column to Sub ShowAccountPreviousOrdersDetail to show cancel URL where applicable
' (SS,28/09/20) replaced card and panel class with calls to GetPanelCardClass for compatibility between Bootstrap 3 and 4
' also made use of new functions Bootstrap3Only, Bootstrap4Only
' (SS,03/10/20) added 2 new parameters to call to ShowPageTitle (missed from last version, previously only in CIRC)
' (SS,22/02/21) Moved jQuery/JavaScript code to separate (subs) section to ensure it will run when jquery.js appear further down the page
' It will be called just before end body tag in inc-template-main.asp
' (SS,19/05/22) Change to Sub ShowCreateAccountForm show postcode before company name if AddressLookupEnabled
' (SS,29/07/22) Change to Sub ShowCreateAccountForm to show different county label and placeholder for UK and RW (added for HF)
' (SS,21/11/23) Change to Sub ShowAccountLoginMain - Create account feature now removed due to a bot randomly create accounts and doing a forgot password (VDK & CIRC), just being a nuisance
' Code moved to separate ShowCreateNewAccount and commented out. Also added "/Reset" after "Forgot"
' (SS,22/05/24) Removed Sub ScriptShowCreateAccountForm, replaced by ScriptFormValidation in inc-template-checkout
' --- START OF ACCOUNT LOGIN TEMPLATES --- '
' (SS,13/6/11) added following to show header and the container div, page title passed here from other header routines
Sub ShowAccountHeader(APageTitle)
' (SS,5/12/19) added "" as 2nd and 3rd parameters
ShowPageTitle tr(APageTitle), "", ""
%>
<div id="account">
<%
End Sub
' (SS,13/6/11)
Sub ShowAccountFooter
%>
</div> <!-- end #account -->
<%
End Sub
' (SS,13/6/11) replaced "ShowPageTitle(tr(" with ShowAccountHeader
Sub ShowAccountLoginHeader(AAlreadyLoggedIn)
If AAlreadyLoggedIn Then
ShowAccountHeader("Your Account") ' (SS,30/5/07) changed from "Account Details"
Else
ShowAccountHeader("Log in") ' (SS,30/5/07) changed from "Account Holder Login", also changed "Login" to "Log in"
End If
End Sub
' (SS,15/6/11)
Sub ShowAccountLogoutHeader
ShowAccountHeader("Log out")
End Sub
' (SS,16/2/12) replaced 2 references to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,21/11/23) Create account feature now removed due to a bot randomly create accounts and doing a forgot password (VDK & CIRC), just being a nuisance
' (SS,21/11/23) Changed "Forgot Password" to "Forgot/Reset password", requested by NS due to some confused HF customers
Sub ShowAccountLoginMain(AErrorMessage)
%>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<form name="frmAccountLoginMain" role="form" method="post" action="<%=GetPageLink("account")%>">
<div class="<%=GetPanelCardClass("")%>">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("Existing Customers")%></div>
<div class="<%=GetPanelCardClass("B")%>">
<%
SetFormControlsLabelWidth 0 ' default to 0 for following controls, i.e. not horizontal
ShowFormControl "email", "Email", "Email address", Request.Form("Email"), "Enter email address", "100", True, "", ""
ShowFormControl "password", "Password", "Password", "", "Enter password", "20", True, "", "onKeyPress=""itp_submit_login(event)"""
If AErrorMessage <> "" Then
ShowAlertMesssage "danger", AErrorMessage
End If
%>
<div class="form-group">
<%=GetButtonLogin%>
<a href="<%=GetPageLink("account")%>&cmd=forgotpassword"><%=tr("Forgot/Reset Password")%>?</a>
</div>
</div>
</div>
</form>
</div><!--col-->
<%
' (SS,21/11/23) code moved to separate ShowCreateNewAccount and commented out
' ShowCreateNewAccount
%>
</div><!--row-->
<%
End Sub
' Create account feature now removed due to a bot randomly create accounts and doing a forgot passwords, just being a nuisance
' moved here from above ShowAccountLoginMain, to allow easier remove while retaining the old code, to add back in just uncomment call to ShowCreateNewAccount in ShowAccountLoginMain
Sub ShowCreateNewAccount
%>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="<%=GetPanelCardClass("")%>">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("New Customers")%></div>
<div class="<%=GetPanelCardClass("B")%>"><p><%=tr("Welcome to")%> <%=GetStoreName%></p>
<p><%=tr("Creating an account is simple and only takes a few minutes. You will be able to store you delivery details for quick orders in the future.")%><p>
<%=GetButtonCreateAccount%>
</div>
</div>
</div><!--col-->
<%
End Sub
' (SS,12/3/13) updated the text
Sub ShowAccountDetails(AAlreadyLoggedIn) ' (SS,14/8/05) was called ShowAccountLoginSuccess
If Not AAlreadyLoggedIn Then
%>
<p><%=tr("Welcome")%> <strong><%=Session("AccountName")%></strong>. <%=tr("You have successfully logged in")%>.</p>
<p><%=tr("For order info - see the order history table and the <b>Order Status</b> and despatch fields")%>.<br />
<%=tr("For order details - click on the <b>Order Ref</b> link to view and print the order")%>.<br />
<%=tr("For reordering - click on the Order Ref link to view the order and click the <b>Buy</b> button against the products to be reordered")%>.<br />
<%=tr("To update account info - click on the <b>Edit account</b> details button")%>.</p>
<%
End If
End Sub
' (SS,15/6/11) tidied including removing two tables and class="account_bkd", and <br>'s
' (SS,13/9/12) changed GetButtonMyAccount to GetButtonYourAccount
Sub ShowAccountLogoutSuccess
%>
<p><%=tr("Goodbye")%> <b><%=Session("AccountName")%></b>.</p>
<p><%=tr("You have successfully logged out")%>.</p>
<p><%=tr("Thank you for your visit")%>.</p>
<%=GetButtonYourAccount%></a>
<%
End Sub
' (SS,13/6/11) now calls ShowAccountFooter
Sub ShowAccountLoginFooter
ShowAccountFooter
End Sub
' (SS,15/6/11)
Sub ShowAccountLogoutFooter
ShowAccountFooter
End Sub
' --- START OF FORGOT PASSWORD TEMPLATES --- '
Sub ShowForgotPasswordHeader
ShowAccountHeader(tr("Forgot Password"))
End Sub
' (SS,15/6/11) tidied, removed tables, class="account_bkd", etc.
' (SS,16/2/12) replaced reference to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,19/6/12) added text "in the box below" after "Please enter your email address"
' Added new text "We will send you an email containing a link you can follow to reset your password"
Sub ShowForgotPasswordForm(AErrorMessage)
If AErrorMessage <> "" Then
%>
<p class="errormessage"><%=AErrorMessage%></p>
<%
End If
%>
<p><%=tr("Please enter your email address in the box below")%>.</p>
<p><%=tr("This should be the email address you used to create your account")%>.</p>
<p><%=tr("We will send you an email containing a link you can follow to reset your password")%>.</p>
<form name="frmForgotPassword" method="post" action="<%=GetPageLink("account")%>&cmd=forgotpassword" class="nospace">
<%=tr("Email Address")%>:
<input type="text" name="Email" value="<%=HTMLEncode(Request.Form("Email"))%>" size="30" maxlength="100">
<%=GetButtonSubmitForgotPassword%>
<input type="hidden" name="postform" value="yes">
</form>
<%
End Sub
' (SS,15/6/11) tidied, removed table, etc.
' (SS,18/6/12) replaced tr("Your password has been emailed to you") with ("Password reset details have been emailed to you")
Sub ShowForgotPasswordThankYou
%>
<p><%=tr("Thank you for your request")%>.</p>
<p><%=tr("Password reset details have been emailed to you")%>.</p>
<%
End Sub
Sub ShowForgotPasswordFooter
ShowAccountFooter
End Sub
' --- END OF FORGOT PASSWORDS TEMPLATES --- '
' --- START OF RESET PASSWORD TEMPLATES --- '
' (SS,18/6/12)
Sub ShowResetPasswordHeader
ShowAccountHeader(tr("Reset Password"))
End Sub
' (SS,18/6/12)
' (SS,24/8/17) added Server.HTMLEncode to both Request.QueryString variables to prevent xss
Sub ShowResetPasswordForm(AErrorMessage, AMessage, AShowForm)
If AErrorMessage <> "" Then
%>
<p class="errormessage"><%=AErrorMessage%></p>
<%
End If
If AMessage <> "" Then
%>
<p><%=AMessage%></p>
<%
End If
If AShowForm Then
%>
<p><%=tr("Please enter your new password")%>.</p>
<form name="frmResetPassword" method="post" action="<%=GetPageLink("account")%>&cmd=rp&id=<%=Server.HTMLEncode(Request.QueryString("id"))%>&key=<%=Server.HTMLEncode(Request.QueryString("key"))%>" class="nospace">
<table class="create-account">
<tr>
<td><b><%=tr("Password")%>:</b></td>
<td><input name="Password" type="password" size="30">
<span class="form-hint"><%=tr("5 characters or more")%></span></td>
</tr>
<tr>
<td><b><%=tr("Retype Password")%>:</b></td>
<td><input name="Password2" type="password" size="30"></td>
</tr>
</table>
<p></p>
<%=GetButtonSubmitResetPassword%>
<input type="hidden" name="postform" value="yes">
</form>
<%
End If
End Sub
Sub ShowResetPasswordFooter
ShowAccountFooter
End Sub
' --- END OF RESET PASSWORD TEMPLATES --- '
' --- START OF CREATE ACCOUNT TEMPLATES --- '
' (SS,14/6/11) added ANew parameter
Sub ShowCreateAccountHeader(ANew)
' ShowPageTitle(tr("Create an account"))
' (SS,14/6/11) replaced above with following
If ANew Then
ShowAccountHeader("Create an account")
Else
ShowAccountHeader("Edit account details")
End If
End Sub
' (SS,5/6/07) added ANew parameter
' (SS,5/5/10) modified to use text instead of Gifs
' (SS,15/6/11) tidied, including removing table used by header
' removed bgcolor="#F0F0F0" from main table
' (SS,16/2/12) replaced reference to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,19/6/12) password fields now only shown if creating a new account, not when editing existing account
' (SS,9/9/14) modified for RWD/Bootstrap, removed heading shown here, not necessary Response.Write tr("Create an account") & " / " & tr("New customers") / Response.Write tr("Edit account details")
' (SS,11/10/19) modified for Bootstrap 4, panels replaced with card, title removed
' replaced "col-lg-8 col-md-8 col-sm-10 col-xs-12" with "col-lg-8"
' changed class="form-horizontal" to "needs-validation" added novalidate, added script to validate, added "required" to required fields
' "pull-right" changed to "float-right" for "Create account" button
' (SS,28/9/20) made compatible between Bootstrap 3 and Bootstrap 4 using new functions GetPanelCardClass and Bootstrap3Only and Bootstrap4Only
' (SS,18/5/21) made HearAboutUs optional, added Other text field to it, also added Mobile with AlternativePhone if enabled
' (SS,19/5/22) modified to show postcode before company name if AddressLookupEnabled
' (SS,29/7/22) change to show different county label and placeholder for UK and RW (added for HF)
Sub ShowCreateAccountForm(ANew, AErrorMessage)
%>
<div class="row">
<div class="col-lg-8<%=Bootstrap3Only(" col-md-8 col-sm-10 col-xs-12")%>">
<form name="frmCreateAccount" class="<%=Bootstrap3Only("form-horizontal")%><%=Bootstrap4Only("needs-validation")%> role="form" method="post" action="<%=GetPageLink("account")%>&cmd=<%=IIf(ANew,"create", "update")%>"<%=Bootstrap4Only(" novalidate")%>>
<%
If AErrorMessage <> "" Then
ShowAlertMesssage "danger", AErrorMessage
End If
%>
<div class="<%=GetPanelCardClass("")%><%=Bootstrap4Only(" mb-3")%>">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("Personal Information")%></div>
<div class="<%=GetPanelCardClass("B")%>">
<%
SetFormControlsLabelWidth 4 ' default to 3 for following controls
' (SS,11/10/19) title removed
' ShowFormControl "select", "Title", "", "", "", "", True, "", ""
ShowFormControl "text", "FirstName", "First Name", Session("FirstName"), "Enter first name", "50", True, "", Bootstrap4Only("required")
ShowFormControl "text", "Surname", "Surname", Session("Surname"), "Enter surname name", "50", True, "", Bootstrap4Only("required")
' (SS,19/5/22) added postcode before CompanyName "If AddressLookupEnabled "to allow postcode to appear first when address lookup is enabled
If AddressLookupEnabled Then ShowFormControl "text", "Postcode", "Postcode / ZIP", Session("Postcode"), "Enter postcode or ZIP", "20", True, "", Bootstrap4Only("required")
ShowFormControl "text", "CompanyName", "Company Name", Session("CompanyName"), "Enter company name (optional)", "50", True, "", ""
ShowFormControl "text", "Address1", "Address Line 1", Session("Address1"), "Enter first line of address", "50", True, "", Bootstrap4Only("required")
ShowFormControl "text", "Address2", "Address Line 2", Session("Address2"), "Enter second line of address", "50", True, "", ""
ShowFormControl "text", "Town", "Town / City", Session("Town"), "Enter town or city", "50", True, "", Bootstrap4Only("required")
ShowFormControl "text", "County", "County / State", Session("County"), "Enter county, state or region", "50", True, "", ""
' (SS,19/5/22) added If Not AddressLookupEnabled to allow postcode to appear first when address lookup is enabled
If Not AddressLookupEnabled Then ShowFormControl "text", "Postcode", "Postcode / ZIP", Session("Postcode"), "Enter postcode or ZIP", "20", True, "", Bootstrap4Only("required")
ShowFormControl "select", "Country", "", "", "", "", True, GetImportantCountryMessage, Bootstrap4Only("required")
' (SS,8/2/21) removed following due to Brexit
'If IsVATZeroForIntraCommunity Then
' ShowFormControl "text", "VATNumber", "VAT Number", Session("VATNumber"), "Enter VAT Number (optional)", "50", True, GetVATNumberHelpMessage, ""
' AddVATNumberValidationHTML
'End If
ShowFormControl "text", "EORINumber", "EORI Number", Session("EORINumber"), "Enter EORI Number (companies only)", "50", True, "", ""
ShowFormControl "text", "XIEORINumber", "XI EORI Number", Session("XIEORINumber"), "Enter XI EORI Number (Northern Ireland only)", "50", True, "", ""
' (SS,3/4/17) change label to "Mobile"
ShowFormControl "text", "Telephone", "Mobile", Session("Telephone"), "Enter mobile number", "50", True, "", Bootstrap4Only("required")
'If MobileEnabled Then
' ShowFormControl "text", "Mobile", "Mobile", Session("Mobile"), "Enter mobile number", "50", True, "to receive delivery details via SMS", ""
'End If
' (SS,18/5/21) replaced above with following (for CIRC), text to say "(required)" but we're not forcing entry
If AlternativePhoneEnabled Then
ShowFormControl "text", "AlternativePhone", "Alternative Phone", Session("AlternativePhone"), "Enter alternative phone number (required)", "50", True, "", ""
End If
' (SS,18/5/21) made HearAboutUs optional and added custom label, also shows other text box if other chosen
' (SS,19/5/21) moved to ShowHearAboutUsFormControls in inc-template-checkout.asp to avoid repetition
ShowHearAboutUsFormControls True ' True means always enabled and visible
ShowFormControl "checkbox", "Subscribe", "Please subscribe me to your newsletter and offers", Session("Subscribe"), "", "", True, "", ""
%>
</div><!--panel/card-body-->
</div><!--panel/card-->
<%
If AllowDifferentDeliveryAddress Then
%>
<div class="<%=GetPanelCardClass("")%><%=Bootstrap4Only(" mb-3")%>">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("Delivery Information")%></div>
<div class="<%=GetPanelCardClass("B")%>">
<%
ShowFormControl "checkbox", "DeliveryAddressSameAsInvoice", "Delivery address is the same as the billing address", Session("DeliveryAddressSameAsInvoice"), "", "", True, "", ""
ShowFormControl "text", "DeliveryName", "Delivery Name", Session("DeliveryName"), "Enter full name (first name, surname)", "50", True, "", ""
' (SS,19/5/22) added postcode before DeliveryCompanyName "If AddressLookupEnabled "to allow postcode to appear first when address lookup is enabled
If AddressLookupEnabled Then ShowFormControl "text", "DeliveryPostcode", "Delivery Postcode / ZIP", Session("DeliveryPostcode"), "Enter postcode or ZIP", "20", True, "", ""
ShowFormControl "text", "DeliveryCompanyName", "Delivery Company", Session("DeliveryCompanyName"), "Enter company name (optional)", "50", True, "", ""
ShowFormControl "text", "DeliveryAddress1", "Delivery Address Line 1", Session("DeliveryAddress1"), "Enter first line of address", "50", True, "", ""
ShowFormControl "text", "DeliveryAddress2", "Delivery Address Line 2", Session("DeliveryAddress2"), "Enter second line of address", "50", True, "", ""
ShowFormControl "text", "DeliveryTown", "Delivery Town / City", Session("DeliveryTown"), "Enter town or city", "50", True, "", ""
ShowFormControl "text", "DeliveryCounty", "Delivery County / State", Session("DeliveryCounty"), "Enter county, state or region", "50", True, "", ""
' (SS,19/5/22) added If Not AddressLookupEnabled to allow postcode to appear first when address lookup is enabled
If Not AddressLookupEnabled Then ShowFormControl "text", "DeliveryPostcode", "Delivery Postcode / ZIP", Session("DeliveryPostcode"), "Enter postcode or ZIP", "20", True, "", ""
ShowFormControl "select", "DeliveryCountry", "Delivery Country", "", "", "", True, GetImportantCountryMessage, ""
%>
<%
End If
%>
</div><!--panel/card-body-->
</div><!--panel/card-->
<div class="<%=GetPanelCardClass("")%><%=Bootstrap4Only(" mb-3")%>">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("Login Information")%></div>
<div class="<%=GetPanelCardClass("B")%>">
<%
ShowFormControl "email", "Email", "Email", Session("Email"), "Enter email address", "100", True, "", Bootstrap4Only("required")
If ANew Then
ShowFormControl "password", "Password", "Password", Session("Password"), "Enter password (5 characters or more)", "20", True, "", ""
ShowFormControl "password", "Password2", "Retype Password", Session("Password2"), "Retype password", "20", True, "", ""
End If
%>
</div><!--panel/card-body-->
</div><!--panel/card-->
<div class="<%=Bootstrap3Only("pull-right")%><%=Bootstrap4Only("float-right")%>">
<%=GetButtonSubmitCreateAccount%>
</div>
<input type="hidden" name="postform" value="yes">
</form>
</div><!--column-->
</div><!--row-->
<%
' (SS,22/2/21) moved scripts to later section to allow later inclusion of jQuery
' (SS,19/2/21) shows the common scripts used for EORI fields in this template and checkout template
AddScript("ScriptEORINo") ' see inc-template-checkout.asp
' (SS,22/2/21)
' (SS,22/5/24) replaced ScriptShowCreateAccountForm with ScriptFormValidation
AddScript("ScriptFormValidation")
' (SS,29/7/22) to show a different label in county field if not UK (for HF)
AddScript("ScriptCountyLabel")
End Sub
' (SS,20/6/11) removed table
Sub ShowCreateAccountThankYou
%>
<p><strong><%=tr("Thank you for creating an account with us")%>.</strong></p>
<%
End Sub
' (SS,20/6/11) removed table
Sub ShowUpdateAccountThankYou
%>
<p><strong><%=tr("Your account has been updated")%>.</strong></p>
<%
End Sub
Sub ShowCreateAccountFooter
ShowAccountFooter
End Sub
' --- END OF CREATE ACCOUNT TEMPLATES --- '
' (SS,5/6/07) added AOrdersExist parameter
' (SS,15/6/11) added class="ac-details" and <col class="ac-details-col1"></col>
' font-weight cannot be used in a <col>
' (SS,8/3/13) added Packed By, Date Despatched, Courier, Tracking No to ordre history table header
' (SS,13/11/13) added parameter AShowDespatchDetails and added "if" to ensure Packed By, Date Despatched, Courier and Tracking No are only shown when AShowDespatchDetails is True
' (SS,9/9/14) improved for RWD/Bootstrap
' (SS,19/6/24) for Bootstrap 5, removed <form> tag and class="form-inline" and replaced class="form-group" with "d-inline-block m-1", removed , might not work well in Bootstrap 3
Sub ShowAccountPreviousOrdersHeader(AOrdersExist, AAccountID, AAccountName, AEmailAddress, AShowDespatchDetails)
%>
<table class="table table-responsive">
<tr>
<th nowrap width="0%"><%=tr("Account ID")%> </th>
<td width="100%"><%=AAccountID%></td>
</tr>
<tr>
<th><%=tr("Name")%> </th>
<td><%=AAccountName%></td>
</tr>
<tr>
<th nowrap><%=tr("Email Address")%> </th>
<td><%=AEmailAddress%></td>
</tr>
</table>
<div class="d-inline-block m-1">
<%=GetButtonLogOut%>
</div>
<div class="d-inline-block m-1">
<%=GetButtonEditAccount%>
</div>
<div class="d-inline-block m-1">
<%=GetButtonContinueShopping%>
</div>
<%If Not IsBasketEmpty Then%>
<div class="d-inline-block m-1">
<%=GetButtonProceedToCheckout%>
</div>
<%End If%>
<%If AOrdersExist Then%>
<div class="<%=GetPanelCardClass("")%>" style="margin-top: 10px">
<div class="<%=GetPanelCardClass("H")%>"><%=tr("Order History")%></div>
<div class="<%=GetPanelCardClass("B")%>">
<table class="table table-responsive">
<tr>
<th><%=tr("Order Ref")%></th>
<th><%=tr("Date of Order")%></th>
<th style="text-align:right"><%=tr("Total")%> </th>
<th><%=tr("Order Status")%></th>
<%If AShowDespatchDetails Then%>
<th><%=tr("Packed By")%></th>
<th><%=tr("Date Despatched")%></th>
<th><%=tr("Courier")%></th>
<th><%=tr("Tracking No")%></th>
<th><%=tr("Action")%></th>
<%End If%>
</tr>
<%End If%>
<%
End Sub
' (SS,8/3/13) added APackedBy, ADateDespatched, ACourier, ATrackingNo, ATrackingURL
' (SS,13/11/13) added parameter AShowDespatchDetails and added "if" to ensure Packed By, Date Despatched, Courier and Tracking No are only shown when AShowDespatchDetails is True
' (SS,13/12/18) added Action column to the end to show link to cancel order
Sub ShowAccountPreviousOrdersDetail(AOrderNo, ADateOfOrder, ATotal, AStatus, AHRef, AShowDespatchDetails, APackedBy, ADateDespatched, ACourier, ATrackingNo, ATrackingURL)
Dim LTrackingHTML, LActionURL
If ATrackingURL = "" Then
LTrackingHTML = ATrackingNo
Else
LTrackingHTML = "<a href=""" & ATrackingURL & """>" & ATrackingNo & "</a>"
End If
' (SS,13/12/18) action to allow order to be cancelled if applicable
If CancelOrderAllowed(AOrderNo) Then
LActionURL = "<a href=""" & GetCancelOrderURL(AOrderNo) & """>cancel order</a>"
Else
LActionURL = ""
End If
%>
<tr>
<td><a href="<%=AHRef%>"><%=AOrderNo%></a></td>
<td><%=ADateOfOrder%></td>
<td style="text-align:right"><%=ATotal%> </td>
<td><%=tr(AStatus)%></td>
<%If AShowDespatchDetails Then%>
<td><%=APackedBy%></td>
<td><%=ADateDespatched%></td>
<td><%=ACourier%></td>
<td><%=LTrackingHTML%></td>
<td><%=LActionURL%></td>
<%End If%>
</tr>
<%
End Sub
' (SS,5/6/07) added AOrdersExist parameter
Sub ShowAccountPreviousOrdersFooter(AOrdersExist)
%>
<%If AOrdersExist Then%>
</table>
</div><!--panel/card-body-->
</div><!--panel/card-->
<%End If%>
<%
End Sub
' --- END OF ACCOUNT LOGIN TEMPLATES --- '
' (SS,23/5/18) added following here because accounts page is used for this
Sub ShowSubscribeHeader
ShowAccountHeader(tr("Subscription"))
End Sub
' (SS,23/5/18) added following here because accounts page is used for this
Sub ShowSubscribeFooter
ShowAccountFooter
End Sub
%>