File: D:/web/hyperflight/! bs3/inc-template-messages.asp
<%
' --- START OF MESSAGE TEMPLATES --- '
' (SS,24/10/14) Change to Function GetOrderConfirmationExtraMessage
' (SS,05/02/15) removed "or Google Checkout" text from Sub ShowBasketInfo and Function GetCheckoutMessage
' (SS,05/04/17) Added Function GetMessage to make compatible with latest AppUtils
' (SS,31/12/17) Minor change to Sub ShowBasketInfo
' (SS,03/10/20) for compatibility with latest common templates - new version of Sub ShowPageTitle with 3 parameters and added Sub ShowPageBreadcrumb, Function ProperPageName
' (SS,28/06/21) functions Function GetCheckoutMessage & GetCheckoutMessage: removed erroneous <br /> after PayPal's
' (SS,07/07/22) Change to Sub ShowBasketInfo, moved GetWebText from top to bottom to experiment with different bootstrap alert classes, then more substantial improvements to Sub ShowBasketInfo
' (SS,28/07/23) Change to Function GetMessage to show discount info for "Voucher"
' (SS,5/12/19) added breadcrumb to be used at start of every page, relative to home page, also added HTMLEncode
Sub ShowPageBreadcrumb(APageName)
%>
<ul class="breadcrumb">
<li><a href="/">Home</a></li>
<li><%=HTMLEncode(ProperPageName(APageName))%></li>
</ul>
<%
End Sub
' (SS,09/06/11) changed to use new div version
' (SS,5/12/19) new version which shows a breadcrumb, previously this was a top of a panel which wasn't ideal
' also added an extra (APageName) parameter to allow page name to be different, i.e. calls ShowPageBreadcrumb above
' had to change all calls to ShowPageTitle to added the extra parameter, added a 3rd parameter for additional options, not used currently
' if APageName is blank then it assume same value as ATitle
Sub ShowPageTitle(APageName, ATitle, AOptions)
Dim LTitle
LTitle = ATitle
If LTitle = "" Then LTitle = ProperPageName(APageName)
ShowPageBreadcrumb APageName
%>
<h1><%=HTMLEncode(LTitle)%></h1>
<%
End Sub
' (SS,5/12/19) converts the lowercase page name to proper one, perhaps in future have a separate field in settings for this
Function ProperPageName(APageName)
Dim LResult
Select Case APageName
Case "about"
LResult = "About Us"
Case "deliveryinfo"
LResult = "Delivery Info"
Case "howtoorder"
LResult = "How to Order"
Case "customerinfo"
LResult = "Customer Info"
Case "privacy"
LResult = "Privacy"
Case "links"
LResult = "Links"
Case "faq"
LResult = "FAQ"
Case "coronavirus"
LResult = "Coronavirus"
Case Else
LResult = APageName
End Select
ProperPageName = LResult
End Function
' (SS,17/2/05) '
Sub ShowMessage(AMessage)
%>
<b><%=AMessage%></b>
<%
End Sub
Sub ShowSearchNotFound
%>
<p>
If there is an item in particular you are looking for, but can’t find it on this site, please <a href="products.asp?page=contact"><b>contact us</b></a> and we will try and find it for you.
</p>
<%
End Sub
Function GetOrderConfirmationExtraMessage
' GetOrderConfirmationExtraMessage = "" ' If paying by cheque please make them payable to." '
' (SS,24/10/14) added facebook "like" from facebooklike page
Dim LHeading, LText
LText = GetPageContent("facebooklike", LHeading)
GetOrderConfirmationExtraMessage = LText
End Function
Function EmailOrderConfirmationFooter
Dim NL
NL = Chr(13) + Chr(10)
EmailOrderConfirmationFooter = ""
If GetOrderConfirmationExtraMessage <> "" Then
EmailOrderConfirmationFooter = GetOrderConfirmationExtraMessage & NL & NL
End If
End Function
' (SS,17/7/07) message shown next to country combo to ensure user selects correct country
Function GetImportantCountryMessage
GetImportantCountryMessage = ""
End Function
' (SS,11/12/07) used to add extra note before or after existing note
' (SS,22/7/11) removed
'Function GetBasketNote(AExistingNote)
'GetBasketNote = AExistingNote
'End Function
' (SS,22/7/11) this replaces above GetBasketNote, total weight is passed here from ShowBasketFooter (inc-template-messages.asp)
' (SS,17/2/12) added PayPal/Google Euros/USD may vary slightly.. message for multi-currency, also to GetCheckoutMessage below
' (SS,5/2/15) removed "or Google Checkout" and other text changes. Last line only shown if customer choose currency other than GBP
' (SS,31/10/17) modified "plus packaging." to "including packaging"
' (SS,28/6/21) removed erroneous <br /> after PayPal's
' (SS,7/7/22) moved GetWebText from top to bottom to experiment with different bootstrap alert classes
' (SS,7/7/22) old version, can be removed, renamed to ShowBasketInfoOld from ShowBasketInfo
Sub ShowBasketInfoOld(ATotalWeight)
%>
<br>
<div class="alert alert-success">
Total weight of this order: <b><%=ATotalWeight & GetWeightUnits%></b> including packaging
</div>
<%
If Not IsCurrencyGBP Then
%>
<div class="alert alert-warning">
If paying using PayPal the amount charged in your currency may vary slightly, due to PayPal's poor exchange rate.
If paying by bank transfer the figure is accurate.
</div>
<%
End If
%>
<%=GetWebText("BasketMessage")%>
<%
End Sub
' (SS,22/7/11) this replaces above GetBasketNote, total weight is passed here from ShowBasketFooter (inc-template-messages.asp)
' (SS,17/2/12) added PayPal/Google Euros/USD may vary slightly.. message for multi-currency, also to GetCheckoutMessage below
' (SS,5/2/15) removed "or Google Checkout" and other text changes. Last line only shown if customer choose currency other than GBP
' (SS,31/10/17) modified "plus packaging." to "including packaging"
' (SS,28/6/21) removed erroneous <br /> after PayPal's
' (SS,7/7/22) moved GetWebText from top to bottom to experiment with different bootstrap alert classes
' (SS,7/7/22) improved to move PayPal message to new token Other/BasketMessageNonGBP, total weight line moved to token via [TOTAL_WEIGHT]
Sub ShowBasketInfo(ATotalWeight)
Dim LBasketMessage
LBasketMessage = GetWebText("BasketMessage")
' replaces [TOTAL_WEIGHT] with ATotalWeight & GetWeightUnits, NB. use of square and not curly brackets because curly brackets are for normal tokens
' this replaces: Total weight of this order: <b>%=ATotalWeight & GetWeightUnits%</b> including packaging
LBasketMessage = ReplaceStr(LBasketMessage, "[TOTAL_WEIGHT]", ATotalWeight & GetWeightUnits)
Response.Write BR & LBasketMessage ' <br> prevents touching the buttons
If Not IsCurrencyGBP Then
Response.Write GetWebText("BasketMessageNonGBP")
End If
End Sub
' (SS,11/12/07) for checkout just before making payment
' (SS,17/2/12) added added PayPal/Google Euros/USD may vary slightly.. message for multi-currency, also to ShowBasketInfo above
' (SS,23/5/12) corrected exhange to exchange
' (SS,5/2/15) removed "or Google Checkout"
' (SS,5/2/15) added If to only show message applicable to non-GBP
' (SS,28/6/21) removed erroneous <br /> after PayPal's
' (SS,7/7/22) changed to use GetWebText("CheckoutMessageNonGBP") instead
Function GetCheckoutMessage
If IsCurrencyGBP Then
GetCheckoutMessage = ""
Else
' GetCheckoutMessage = "If paying using PayPal the amount charged in your currency may vary slightly, due to PayPal's poor exchange rate. If paying by bank transfer the figure is accurate."
' (SS,7/7/22) replaced above with following, this use a token call {PayPalMsg} to prevent duplicate text i.e. allow it be be changed in one place
GetCheckoutMessage = GetWebText("CheckoutMessageNonGBP")
End If
End Function
' (SS,3/11/16) add following multipurpose message return routine, overcomes having to create a new function for each new message and having to add it to each site for full compatibility
' (SS,28/7/23) added message for "Voucher" to show discount info
Function GetMessage(AName)
Dim Result
Result = ""
' (SS,28/7/23) added message for "Voucher" to show discount info
If AName = "Voucher" Then
If GetDiscountInfo <> "" Then
Result = "Discount applied: " & GetDiscountInfo
ElseIf GetVoucherCode <> "" Then
Result = "No discount applied"
End If
End If
GetMessage = Result
End Function
' --- END OF MESSAGE TEMPLATES --- '
%>