File: D:/web/castironradiatorcentre/inc-template-messages.asp
<%
' --- START OF MESSAGE TEMPLATES --- '
' (SS,26/08/14) modified for Bootstrap
' (SS,02/10/14) added text function GetCheckoutMessage
' (SS,09/10/14) updated Sub ShowBasketInfo to show delivery info
' (SS,25/11/15) added CustomShowHolidayNotice to Sub ShowBasketInfo
' (SS,20/04/16) added Function GetMessage
' (SS,05/04/17) added "BankTransferExtra" to GetMessage
' (SS,05/12/19) added Sub ShowPageBreadcrumb and new parameters added to Sub ShowPageTitle, also added Function ProperPageName(APageName)
' (SS,03/04/20) added coronavirus to Function ProperPageName
' (SS,24/05/22) added brexit to Function ProperPageName
' (SS,06/07/22) change to Sub ShowBasketInfo to highlight delivery info
' (SS,11/11/22) added "Pay in 3" message to Sub ShowBasketInfo
' (SS,10/03/23) ending <b> tag correction to Sub ShowMessage
' (SS,28/06/23) added customerphotos, news and blog to Function ProperPageName, also change to Sub ShowPageTitle to not show title for the blog page
' (SS,28/07/23) change to Function GetMessage modified Voucher text to return the discount info
' (SS,01/03/24) change to Sub ShowBasketInfo to remove PayPal pay in 3 banner
' (SS,20/03/24) Bootstrap 5 changes
' (SS,5/12/19) added breadcrumb to be used at start of every page, relative to home page, also added HTMLEncode
' (SS,20/3/24) modified for Bootstrap 5, ul replaced with nav and ol
Sub ShowPageBreadcrumb(APageName)
%>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page"><%=HTMLEncode(ProperPageName(APageName))%></li>
</ol>
</nav>
<%
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
' (SS,29/6/23) allow a blank for certain pages when title is blank i.e. "blog" page for now
Sub ShowPageTitle(APageName, ATitle, AOptions)
Dim LTitle
LTitle = ATitle
If LTitle = "" Then
' (SS,29/6/23) added "if" not not show title for given page names
If APageName <> "blog" Then
LTitle = ProperPageName(APageName)
End If
End If
ShowPageBreadcrumb APageName
If LTitle <> "" Then ' (SS,29/6/23)
%>
<h1><%=HTMLEncode(LTitle)%></h1>
<%
End If
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
' (SS,3/4/20) added importantnotice
' (SS,24/5/22) added brexit
' (SS,28/6/23) added customerphotos, news, blog
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 "fittingguidelines"
LResult = "Fitting Guidelines"
Case "calculatingpipecentres"
LResult = "Calculating Pipe Centres"
Case "handlingcastironradiators"
LResult = "Handling Cast Iron Radiators"
Case "coronavirus"
LResult = "Coronavirus"
Case "brexit"
LResult = "Brexit"
Case "customerphotos"
LResult = "Customer Photos"
Case "news"
LResult = "News"
Case "blog"
LResult = "Blog"
Case Else
LResult = APageName
End Select
ProperPageName = LResult
End Function
' (SS,17/2/05)
' (SS,10/3/23) corrected ending <b> tag to </b> was <b>
Sub ShowMessage(AMessage)
%>
<b><%=AMessage%></b><br>
<%
End Sub
' (SS,19/6/24) new version for Bootstrap 5
Sub ShowSearchNotFound
%>
<div class="alert alert-primary">
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" class="alert-link">contact us</font></a> and we will try and find it for you.
</div>
<%
End Sub
Function GetOrderConfirmationExtraMessage
GetOrderConfirmationExtraMessage = ""
End Function
Function EmailOrderConfirmationFooter
Dim NL
NL = Chr(13) + Chr(10)
EmailOrderConfirmationFooter = ""
End Function
' (SS,17/7/07) message shown next to country combo to ensure user selects correct country
Function GetImportantCountryMessage
GetImportantCountryMessage = ""
End Function
Function GetPaymentExtraMessage
GetPaymentExtraMessage = ""
End Function
' (SS,11/12/07) used to add extra note before or after existing note
' (SS,16/3/12) removed
'Function GetBasketNote(AExistingNote)
' Dim LNewNote
' LNewNote = ""
' GetBasketNote = AExistingNote + LNewNote
'End Function
' (SS,16/3/12) this replaces above GetBasketNote, total weight is passed here from ShowBasketFooter (inc-template-messages.asp)
' (SS,9/9/14) removed <p>We hope you enjoy your visit to ..=GetStoreName..'s website.</p>
' (SS,9/10/14) added delivery info, also added space between total weight and units
' (SS,10/10/14) removed "<p>If you have any comments or suggestions we would be happy to hear from you.</p>"
' (SS,6/7/22) added strong highlight for GetDeliveryInfo using style also replaced p with h4 tag (previously it was <p><b>) h3 was too big for mobile devices
' (SS,11/11/22) added "Pay in 3" message to Sub ShowBasketInfo
' (SS,1/3/24) removed PayPal pay in 3 banner
' (SS,20/5/24) replaced <h4 style="background-color: #dc3545!important; padding: 1rem!important; color: #fff!important;"><.=GetDeliveryInfo.></h4> with new version for Bootstrap 5
Sub ShowBasketInfo(ATotalWeight)
' (SS,12/6/24) replace spaces in " full working days" with to break nicer on smaller devices, ‑ is non-breaking hyphen
Dim LDeliveryInfo
LDeliveryInfo = GetDeliveryInfo
LDeliveryInfo = ReplaceStr(LDeliveryInfo, " full working days", " full working days")
LDeliveryInfo = ReplaceStr(LDeliveryInfo, " - ", " ‑ ")
' <p>Total weight of this order: <b>.%=ATotalWeight & " " & GetWeightUnits%.</b></p>
' (SS,12/6/24) replaced above with nicer alert with icon
' (SS,13/6/24) replaced fa-duotone fa-weight-scale with fa-duotone fa-scale-balanced, later changed to solid and fa-dumbbell if > 100kg, and fa-gauge-simple-max when > 1000kg
Dim LWeightIcon
If ATotalWeight >= 2000 Then
LWeightIcon = "fa-duotone fa-face-tongue-sweat"
ElseIf ATotalWeight >= 1000 Then
LWeightIcon = "fa-duotone fa-gauge-simple-max"
ElseIf ATotalWeight >= 100 then
LWeightIcon = "fa-solid fa-dumbbell"
ElseIf ATotalWeight >= 50 then
LWeightIcon = "fa-duotone fa-scale-unbalanced-flip"
ElseIf ATotalWeight >= 10 then
LWeightIcon = "fa-duotone fa-scale-balanced"
Else
LWeightIcon = "fa-duotone fa-scale-unbalanced"
End If
%>
<div class="alert alert-secondary p-2 ps-3 mt-3" role="alert">
<div class="d-flex align-items-center">
<div>
<i class="<%=LWeightIcon%> fa-2x"></i>
</div>
<div class="ms-3">
<span class="fs-6">Total weight of your order is <b><%=ATotalWeight & " " & GetWeightUnits%></b></span>
</div>
</div>
</div>
<div class="alert alert-primary p-2 ps-3 mt-3" role="alert">
<div class="d-flex align-items-center">
<div>
<i class="fa-duotone fa-truck-fast fa-2x"></i>
</div>
<div class="ms-3">
<span class="fs-6"><%=LDeliveryInfo%></span>
</div>
</div>
</div>
<%
CustomShowRecommendation ' (SS,10/10/14)
' (SS,11/10/22) added following Pay in 3 additional more prominent banner
' (SS,1/3/24) removed
' <div style="margin-top:-5px" data-pp-message data-pp-style-layout="flex" data-pp-style-ratio="8x1" data-pp-style-color="blue" data-pp-amount="0"></div>
' (SS,25/11/15) show the holiday message for the basket
CustomShowHolidayNotice "B", 0
End Sub
' (SS,11/12/07) for checkout just before making payment
' (SS,2/10/14) modified message from blank to following
Function GetCheckoutMessage
GetCheckoutMessage = GetStoreName + " is a division of Mossmead Limited. Your payment will be made to 'MOSSMEAD LIMITED' which will show on your statement."
End Function
' (SS,20/4/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) modified Voucher text to return the discount info
Function GetMessage(AName)
Dim Result
If AName = "Voucher" Then
' Result = "No active vouchers available"
' (SS,28/7/23) replaced above with following
If GetDiscountInfo <> "" Then
Result = "Discount applied: " & GetDiscountInfo
ElseIf GetVoucherCode <> "" Then
Result = "No discount applied"
' (SS,19/6/24)
ElseIf GetVoucherCodeErrorMessage <> "" Then
Result = "<span class=""text-danger"">" & GetVoucherCodeErrorMessage & "</span>"
Else
Result = ""
End If
' (SS,5/4/17) bold version to override the usual one
ElseIf AName = "BankTransferExtra" Then
Result = "<b>Failure to pay immediately will result in your order being delayed.</b>"
' (SS,2/10/20) moved this message here from inc-template-other.asp
ElseIf AName = "OrderingSuspended" Then
Result = "<strong><span style=""color:red"">Temporary Covid-19 notice:</span> Our daily radiator order quota has been reached for today due to current Covid-19 safe staff working restrictions. We cannot take orders over the phone either. It will renew again from midnight tonight to allow more orders, so please try again tomorrow. We are very sorry for any inconvenience.</strong>"
Else
Result = ""
End If
GetMessage = Result
End Function
' --- END OF MESSAGE TEMPLATES --- '
%>