File: D:/web/hyperflight/2026-07-30/prev/inc-template-basket.asp
<%
' === COMMON TEMPLATE (SAME FOR ALL SHOPPING SITES) ===
' (SS,22/06/09) Added AVoucherCode, ADiscount, ATotalWeight to Sub ShowBasketFooter
' (SS,05/07/11) Added AItemID and AOptionsList to ShowBasketItem
' (SS,22/07/11) Modified to use divs and better stylesheets, tidied and ShowBasketInfo
' which is in inc-template-messages.asp and now holds the complete basket info
' (SS,16/02/12) Replaced products.asp with GetScriptName to allow products-dev.asp to be used for development purposes
' Also officially called it a COMMON TEMPLATE by adding this note to heading
' (SS,13/09/12) Added <p> tag to ShowEmptyBasket
' (SS,26/08/14) Added "table" class to table tag for Bootstrap
' Replaced + and - images with glyphicons for Bootstrap in Sub ShowBasketItem
' (SS,20/02/15) Added Email basket button and modal
' (SS,26/02/15) Added tooltip (title attribute) to ShowBasketFooter, Email basket button
' (SS,19/05/17) Added Name and Address to ShowBasketEmailModal, for Proforma quote
' (SS,29/06/17) removed continue shopping button from ShowBasketFooter
' (SS,20/07/17) Change to Sub ShowBasketFooter to not show VAT deducted line (originally added (SS,15/04/16) to old framework)
' (SS,20/07/17) Change to ShowBasketHeader to show out of stock message (originally added (SS,19/04/16) to old framework)
' (SS,23/04/18) Change to Sub ShowBasketFooter, added GetPayPalExpressShowOnBasketPage to only show the PayPal Express button if enabled
' (SS,28/06/18) Change to Sub ShowBasketFooter to added optional TrackedDeliverySelected checkbox
' (SS,29/06/18) Change to Sub ShowBasketFooter to use radio instead of checkbox for optional TrackedDeliverySelected (DeliveryMethod)
' (SS,19/09/19) Changes for Bootstrap 4, replaced "glyphicon glyphicon-minus" and "glyphicon glyphicon-plus" with "fa fa-minus" and "fa fa-plus"
' Change to Sub ShowBasketItem removed <p> tag from product name, code and option was using two much vertical space used <br> instead
' Also removed style classes bsk-prod-name, bsk-options-list, bsk-prod-code
' (SS,20/09/19) Further changes including removed classes basket-total, basket-info, sorted email basket modal.
' (SS,29/09/20) Changes to work for both Bootstrap 3 and 4
' (SS,02/10/20) Minor change to ShowBasketFooter for voucher code help text in Bootstrap 3
' (SS,12/02/21) Added DeliveryWillCollect / Click & Collect (requested by Express Music) (to Sub ShowBasketFooter)
' (SS,22/04/21) Change to Sub ShowBasketFooter (delivery label for expedited (used by HF))
' (SS,17/09/21) Change to Sub ShowBasketFooter to delivery label to override the default if GetDeliveryOption is set, for CIRC to add "Kerbside Pallet Delivery" for radiators
' (SS,03/08/22) Change to Sub ShowBasketFooter to add PayPal Pay Later message
' (SS,21/02/24) Various improvements for mobile first. Changes also made to apputils.asp to call approprate subs here with changes to passed parameters.
' Old routines (suffixed with "Old") need to be removed in a future release
' (SS,21/05/25) added extra space before "delete" link, requested by Neil because it's too easy to press accidentally when meaning to press the + button
' (SS,21/05/25) Various changes to Sub ShowBasketDeliveryTotals for HF:
' Renamed "Untracked" caption to "Standard"
' changed "Untracked" value to "Standard", also renamed GetUntrackedDeliverySelected to GetStandardDeliverySelected
' added input hidden name="DeliveryMethodOriginal"
' renamed GetUntrackedDeliverySelectionAllowed to GetStandardDeliverySelectionAllowed
' removed " (FedEx)" from end of "Expedited (FedEx)"
' replaced standard, tracked, expedited with Standard, Tracked, Expedited
' (SS,21/05/25) added "Collect" to [If TrackedDeliveryOptionEnabled Then] when will collect chosen in checkout
' (SS,11/05/26) For bundle feature added AIsBundleContainer and AIsBundleProduct to Sub ShowBasketItem
' (SS,13/05/26) Added AIsBundleContainer and AIsBundleProduct to Sub ShowBasketItemAlternateColor
' (SS,04/06/26) For HF BS5, merged in CIRC's BS5 and bundle version
' (SS,17/07/26) Added place holder for delivery debug details
' (SS,22/10/24) used to start and end an item shown, used to handle bundle info
Class ShowBasketClass
Private FItemStarted
Private FItemCount
Private Sub Class_Initialize()
FItemStarted = False
FItemCount = 0
End Sub
Private Sub Class_Terminate()
End Sub
Public Property Get ItemStarted
ItemStarted = FItemStarted
End Property
Public Sub StartItem
FItemCount = FItemCount + 1
FItemStarted = True
End Sub
Public Sub EndItem
FItemStarted = False
End Sub
Public Property Get ItemCount
ItemCount = FItemCount
End Property
End Class
Dim oShowBasket ' (SS,22/10/24)
' --- START OF BASKET TEMPLATES --- '
Sub ShowEmptyBasket
%>
<p style="padding: 5px 0px 0px 5px"><%=tr("Your basket is empty")%>.</p>
<%
End Sub
' (SS,16/2/12) replaced products.asp with GetScriptName to allow products-dev.asp to be used for development purposes
' (SS,26/8/14) added "table" class to table tag for Bootstrap
' (SS,20/7/17) added display of out of stock message (originally added to old framework version on (SS,19/4/16))
' (SS,20/2/24) new version, removed Quantity and Total columns, removed the Picture and Product Name labels, corrected ending /td to /th for both
' added <div class="row">, separated basket item header to ShowBasketItemHeader
' (SS,20/5/24)
' (SS,5/6/26) further Bootstrap 5 changes (for HF) replaced <div class="row-no"> with <div class="row g-4 align-items-start basket-layout">
Sub ShowBasketHeader
' (SS,22/10/24)
Set oShowBasket = New ShowBasketClass
' (SS,20/7/17) show out of stock message if applicable (originally added (SS,19/4/16) to old framework site)
Dim LOutOfStockMessage
LOutOfStockMessage = GetBasketOutOfStockMessage
If LOutOfStockMessage <> "" Then
%>
<div id="basket-out-of-stock-info">
<b>Sorry, following out of stock, please adjust your basket below:</b><br>
<%=LOutOfStockMessage%>
</div>
<%
End If
%>
<div id="basket">
<form name="frmBasket" method="post" action="<%=GetScriptName%>?cmd=recalculate" class="nospace">
<div class="row gx-4 gy-2 align-items-start basket-layout">
<%
End Sub
' (SS,20/2/24) new version added /div for col and row
' separate delivery and total to ShowBasketDeliveryTotals and moved up
' removed pull-left, removed bootstrap 4 code, parameters are now redundant
' (SS,22/10/24) moved from below to just below Sub ShowBasketHeader for readability
Sub ShowBasketFooter
' ShowBasketDeliveryTotals APostalArea, ASubtotal, AVoucherCode, ADiscount, ADelivery, AVATTotal, AIsVATDeducted, AGrandTotal, ATotalWeight, AHRefContinue, AHRefCheckout
%>
</div> <!-- row -->
</form>
</div>
<%
' (SS,22/10/24) destroy the object created in ShowBasketHeader
Set oShowBasket = Nothing
' (SS,20/2/15)
ShowBasketEmailModal
' (SS,17/7/26) for delivery debug info (local PC, not customer's PC and for HF)
If IsHyperFlight Then
AddScript("ScriptBasketDeliveryDebug")
End If
End Sub
' (SS,21/2/24) new with code from ShowBasketHeader
' <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 pull-right">
' (SS,3/6/24) BS5 replaced col-xs-12 with col-12, col-sm-8 with col-sm-12
' (SS,10/6/24) separated into separate versions for BS3/4 and 5
Sub ShowBasketItemHeader
' (SS,5/6/24) variation for Bootstrap 5 compared to 3 and 4
Dim LBootstrapClass
If IsBootstrap5 Then
ShowBasketItemHeaderBS5
Else
ShowBasketItemHeaderBS3and4
End If
End Sub
' (SS,10/6/24) separated Bootstrap 3/4 version from 5
Sub ShowBasketItemHeaderBS3and4
' bootstrap 4 might require float-right but we're dropping support for BS4
%>
<div class="col-xs-12 col-sm-8 col-md-9 col-lg-9 pull-left">
<table class="basket table">
<tr>
<th></th>
<th></th>
<th style="text-align:right">Total</th>
</tr>
<%
End Sub
' (SS,10/6/24) added separate Bootstrap 5 version
Sub ShowBasketItemHeaderBS5_prev
%>
<div class="col-12 col-sm-12 col-md-8 col-lg-9 float-start">
<div class="text-end fw-bold mb-2">Total</div>
<div class="container">
<%
End Sub
' (SS,10/6/24) added separate Bootstrap 5 version
' (SS,5/6/26) replaced col-12 col-sm-12 col-md-8 col-lg-9 float-start with col-12 col-md-8 col-lg-9 order-1 order-md-1
Sub ShowBasketItemHeaderBS5
%>
<div class="col-12 col-md-8 col-lg-9 order-1 order-md-1">
<div class="container-fluid px-0">
<%
End Sub
' (SS,20/2/24) separated from ShowBasketFooter, just ATotalWeight parameter
' <div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
' (SS,22/2/24) change Email basket button from btn-success (green) to btn-default (white)
' (SS,20/5/24) modified for Bootstrap5
' (SS,5/6/24) for Recalculate button to work with Bootstrap 5, added data-bs-toggle="modal" (following not required data-bs-target="#modal-content-btucalc")
' (SS,10/6/24) separated into separate versions for Bootstrap 3/4 and 5
Sub ShowBasketItemFooter(ATotalWeight)
If IsBootstrap5 Then
ShowBasketItemFooterBS5 ATotalWeight
Else
ShowBasketItemFooterBS3and4 ATotalWeight
End If
End Sub
' (SS,10/6/24) version for Bootstrap 3/4 separated from ShowBasketItemFooter above
Sub ShowBasketItemFooterBS3and4(ATotalWeight)
%>
</table>
<div>
<div class="col-lg-12">
<%=GetButtonBasketRecalculate%>
<%If SaveBasketEnabled Then%>
<a href="#modal-content-email-basket" role="button" class="btn btn-default" data-toggle="modal" data-bs-toggle="modal" title="Click this button to email yourself or a friend a copy of the basket">Email basket</a>
<%End If%>
<div <%=Bootstrap3Only("id=""basket-info""")%><%=Bootstrap4Only("class=""mt-3""")%>>
<%ShowBasketInfo(ATotalWeight)%>
</div>
</div>
</div>
</div> <!-- col -->
<%
End Sub
' (SS,10/6/24) separate version for Bootstrap 5 called from ShowBasketItemFooter above
' (SS,23/6/26) added <div class="d-none d-md-block"> to show the alerts at the bottom for mobile size
' (SS,17/7/26) added id=delivery-debug-placeholder for delivery debug info (internal use only i.e. local IP)
Sub ShowBasketItemFooterBS5(ATotalWeight)
' (SS,22/10/24)
If oShowBasket.ItemStarted Then ShowBasketItemEnd
' (SS,22/10/24)
ShowDebug "ShowBasketItemFooterBS5: oShowBasket.ItemCount = " & oShowBasket.ItemCount
%>
</div> <!-- container-fluid -->
<div class="mt-3">
<div class="col-lg-12">
<%=GetButtonBasketRecalculate%>
<%If SaveBasketEnabled Then%>
<a href="#modal-content-email-basket" role="button" class="btn btn-outline-secondary text-decoration-none" data-toggle="modal" data-bs-toggle="modal" title="Click this button to email yourself or a friend a copy of the basket"><i class="fa-regular fa-at"></i> Email basket</a>
<%End If%>
<div id="delivery-debug-placeholder" class="delivery-debug-placeholder"></div>
<div class="d-none d-md-block">
<%ShowBasketInfo(ATotalWeight)%>
</div>
</div>
</div>
</div> <!-- col -->
<%
End Sub
' (SS,20/2/24) new version
' Removed APrice column, move Qty to below product code, removed product code
' input type changed from "text" to "number", revert back was too wide and spinner came on PC browser, used inputmode="numeric" instead
' removed Bootstrap4Only from text-center for input qty, works in Bootstrap 3
' (SS,21/5/25) added extra space before "delete" link, requested by Neil because it's too easy to press accidentally when meaning to press the + button
' (SS,10/6/24) separated into separate BS 3&4 and 5 versions
' (SS,16/10/24) added AInBundle
' (SS,21/10/24) added AIsBundleContainer (renamed AInBundle to AIsBundleProduct)
Sub ShowBasketItem(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct)
If IsBootstrap5 Then
ShowBasketItemBS5 AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct
Else
ShowBasketItemBS3and4 AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice
End If
End Sub
Sub ShowBasketItemBS3and4(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice)
%>
<tr>
<td width="80"><a href="<%=GetProductLink(AProductCode)%>"><%=GetProductImgSrc(AProductCode, "", AProductCode, "bsk-thumbnail", "", "")%></a></td>
<td>
<p class="bsk-prod-name"><a href="<%=GetProductLink(AProductCode)%>"><%=AProductName%></a></p>
<p class="bsk-options-list"><%=AOptionsList%></p>
Qty
<a href="javascript:itp_changeqty('QTY_<%=AItemID%>','-1', true)" class="changeqty"><i class="<%=Bootstrap3Only("glyphicon glyphicon-minus")%><%=Bootstrap4Only("fa fa-minus")%>"></i></a>
<input type="text" inputmode="numeric" class="basketqty text-center" name="QTY_<%=AItemID%>" value="<%=AQty%>" size="2" maxlength="4">
<a href="javascript:itp_changeqty('QTY_<%=AItemID%>','1', true)" class="changeqty"><i class="<%=Bootstrap3Only("glyphicon glyphicon-plus")%><%=Bootstrap4Only("fa fa-plus")%>"></i></a>
<a href="<%=GetScriptName%>?cmd=remove&itemid=<%=AItemID%>"> delete</a>
</td>
<td style="text-align:right"><%=ATotalPrice%></td>
</tr>
<%
End Sub
' (SS,22/10/24) modified to show bundle content in same section
Sub ShowBasketItemBS5(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct)
If AIsBundleContainer Or Not AIsBundleProduct Then
' if item already start then end it i.e. it's the previous one
If oShowBasket.ItemStarted Then ShowBasketItemEnd
ShowBasketItemStart AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct
ElseIf AIsBundleProduct Then
ShowBasketBundleItem AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice
End If
' ShowBasketItemEnd
End Sub
' (SS,22/10/24)
' (SS,17/6/26) compact Bootstrap 5 basket item
Sub ShowBasketItemStart(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct)
oShowBasket.StartItem
Dim LImageSrc
LImageSrc = GetProductImgSrc(AProductCode, "", AProductCode, "img-fluid basket-item-image", "", "")
If FunctionExists("CustomGetBasketImage") Then
LImageSrc = CustomGetBasketImage(AItemID, AProductID, AProductCode, AProductName, AOptionsList, LImageSrc)
End If
%>
<div class="row g-0 p-2 my-2 rounded-3 shadow-sm basket-item-card position-relative">
<div class="col-auto basket-item-image-col">
<a href="<%=GetProductLink(AProductCode)%>"
class="d-flex align-items-center justify-content-center h-100">
<%=LImageSrc%>
</a>
</div>
<div class="col basket-item-details">
<%If Not AIsBundleProduct Then%>
<a href="<%=GetScriptName%>?cmd=remove&itemid=<%=AItemID%>"
class="basket-item-remove text-black"
aria-label="Remove item from basket"
title="Remove item">
<i class="fa-regular fa-xmark" aria-hidden="true"></i>
</a>
<%End If%>
<p class="basket-item-name lh-sm mb-1">
<a href="<%=GetProductLink(AProductCode)%>"
class="basket-item-name-link fw-bold">
<%=AProductName%>
</a>
</p>
<%If AOptionsList <> "" Then%>
<div class="basket-item-options small lh-sm mb-2">
<%=AOptionsList%>
</div>
<%End If%>
<div class="d-flex align-items-center justify-content-between gap-2 basket-item-controls">
<div>
<%If Not AIsBundleProduct Then%>
<div class="input-group basket-item-qty">
<span class="input-group-text">
<a href="javascript:itp_changeqty('QTY_<%=AItemID%>','-1', true)"
class="text-black"
aria-label="Decrease quantity">
<i class="fa fa-minus" aria-hidden="true"></i>
</a>
</span>
<input type="text"
id="QTY_<%=AItemID%>"
inputmode="numeric"
class="form-control text-center fw-bold"
name="QTY_<%=AItemID%>"
value="<%=AQty%>"
size="2"
maxlength="4">
<span class="input-group-text">
<a href="javascript:itp_changeqty('QTY_<%=AItemID%>','1', true)"
class="text-black"
aria-label="Increase quantity">
<i class="fa fa-plus" aria-hidden="true"></i>
</a>
</span>
</div>
<%Else%>
<span>Qty in bundle: <strong><%=AQty%></strong></span>
<%End If%>
</div>
<div class="basket-item-price text-end ms-auto">
<div class="basket-item-total fw-bold"><%=ATotalPrice%></div>
<%If AQty > 1 Then%>
<div class="basket-item-each text-secondary small">
<%=APrice%> each
</div>
<%End If%>
</div>
</div>
<%If AIsBundleContainer Then%>
<p class="lh-sm mt-2 mb-0">Bundle contents:</p>
<%End If%>
</div>
<%
End Sub
' (SS,22/10/24)
Sub ShowBasketItemEnd
%>
</div>
<%
oShowBasket.EndItem ' (SS,22/10/24)
End Sub
' (SS,22/10/24)
Sub ShowBasketBundleItem(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice)
oShowBasket.StartItem ' (SS,22/10/24)
' (SS,13/6/24) added custom image feature, to allow default image to be overridden
Dim LImageSrc
LImageSrc = GetProductImgSrc(AProductCode, "", AProductCode, "img-fluid", "", "")
If FunctionExists("CustomGetBasketImage") Then
LImageSrc = CustomGetBasketImage(AItemID, AProductID, AProductCode, AProductName, AOptionsList, LImageSrc)
End If
%>
<div class="row">
<div class="col-1 col-sm-1 p-2 my-auto text-center">
</div>
<div class="col-2 col-sm-2 p-2 my-auto text-center">
<div class="row">
<div class="col-4 col-sm-4">
</div>
<div class="col-8 col-sm-8">
<a href="<%=GetProductLink(AProductCode)%>"><%=LImageSrc%></a>
</div>
</div>
</div>
<div class="col-8 col-sm-8 px-0 border-top border-bottom py-1">
<div class="row">
<div class="pe-2">
<p class="lh-sm my-0 small"><a href="<%=GetProductLink(AProductCode)%>" class="basket-item-name-link fw-bold"><%=AProductName%></a></p>
<%If AOptionsList <> "" Then%>
<p class="small lh-1 mb-1"><small><%=AOptionsList%></small></p>
<%End If%>
<p class="lh-sm my-1 small">Qty: <strong><%=AQty%></strong> @ <%=APrice%> each</p>
</div>
</div>
</div>
</div>
<%
End Sub
' (SS,4/7/11) added AItemID and AOptionsList
' (SS,6/7/11) removed AProductDashAsUnderscore and AProductCodeURLEncoded added AProductID
' (SS,16/10/24) added AIsBundleProduct
' (SS,21/10/24) added AIsBundleContainer (renamed AInBundleProduct to AIsBundleProduct)
Sub ShowBasketItemAlternateColor(AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct)
ShowBasketItem AItemID, AProductID, AProductCode, AProductName, AOptionsList, AQty, APrice, ATotalPrice, AIsBundleContainer, AIsBundleProduct
End Sub
' (SS,20/2/24) separated from ShowBasketFooter
' removed pull-right and bootstrap 4 code, added AItems
' added <br> after LVoucherMessage to prevent button appearing on the left in mobile size and looking untidy
' (SS,7/4/25) renamed "Untracked" caption to "Standard"
' (SS,8/4/25) changed "Untracked" value to "Standard", also renamed GetUntrackedDeliverySelected to GetStandardDeliverySelected
' added input hidden name="DeliveryMethodOriginal"
' renamed GetUntrackedDeliverySelectionAllowed to GetStandardDeliverySelectionAllowed
' removed " (FedEx)" from end of "Expedited (FedEx)"
' (SS,14/4/25) replaced standard, tracked, expedited with Standard, Tracked, Expedited
' (SS,21/5/25) added "Collect" to [If TrackedDeliveryOptionEnabled Then] when will collect chosen in checkout
' (SS,5/6/26) removed float-end from Bootstrap4Only("float-end my-2") for button at the bottom due to becoming too close to the bottom
' (SS,23/6/26) for Bootstrap 5 and mobile added <div class="d-md-none mt-4"> with ShowBasketInfo to show at the bottom of mobile, also added basket-summary-label for slightly bold labels
Sub ShowBasketDeliveryTotals(APostalArea, ASubtotal, AItems, AVoucherCode, ADiscount, ADelivery, AVATTotal, AIsVATDeducted, AGrandTotal, ATotalWeight, AHRefContinue, AHRefCheckout)
' (SS,20/4/16) to show voucher message if set
Dim LVoucherMessage
LVoucherMessage = GetMessage("Voucher")
' (SS,29/6/18) replaced delivery label with following to show "Tracked" or "Untracked" prefix for HF
Dim LDeliveryLabel
'LDeliveryLabel = "Delivery (" & APostalArea & ")"
' (SS,20/7/26) replaced above with following, i.e. removed the postal area suffix
LDeliveryLabel = "Delivery"
If TrackedDeliveryOptionEnabled Then
' LDeliveryLabel = Iif(GetTrackedDeliverySelected, "Tracked", "Untracked") & " " & LDeliveryLabel
' (SS,22/4/21) modified for expedited, replaced above with following
Dim LLabelPrefix
If GetTrackedDeliverySelected Then
LLabelPrefix = "Tracked"
ElseIf GetExpeditedDeliverySelected Then
LLabelPrefix = "Expedited"
' (SS,21/5/25) for HF, collection/free delivery
ElseIf GetCollectDeliverySelected Then
LLabelPrefix = "Free"
LDeliveryLabel = ReplaceStr(LDeliveryLabel, "Delivery", "Collection")
Else
' (SS,8/4/25) replaced "Untracked" with "Standard"
LLabelPrefix = "Standard"
End If
LDeliveryLabel = LLabelPrefix + " " + LDeliveryLabel
Else
' (SS,17/9/21) following (for CIRC) to allow "Kerbside Pallet Delivery" to show which is set using "Kerbside Delivery", else as before
If GetDeliveryOption <> "" Then
LDeliveryLabel = GetDeliveryOption + " Delivery"
End If
End If
' (SS,21/2/24)
Dim LItemsCaption
LItemsCaption = "(" + PluralString(AItems, "item", "items") + ")"
' (SS,22/5/24) variation for Bootstrap 5 compared to 3 and 4
Dim LBootstrapClass
If IsBootstrap5 Then
' LBootstrapClass = "col-lg-3 col-md-4 col-sm-12 col-12 float-end ps-3"
' (SS,5/6/26) replaced above with following
LBootstrapClass = "col-12 col-md-4 col-lg-3 order-2 order-md-2 ps-md-3 mt-3 mt-md-2"
Else ' bootstrap 4 might required float-right but we're dropping support for BS4
LBootstrapClass = "col-lg-3 col-md-3 col-sm-4 col-xs-12 pull-right"
End If
' (SS,22/5/24) added class="form-label" for bs5, kept discontinued "form-group" for bs3 but added "mb-3" to it for bs5
' (SS,3/6/24) removed btn-lg because button became too large
' (SS,5/6/24) added "float-end" for BS5 which might not work as expected for BS3
' (SS,7/6/24) changed id btnProceedToCheckout to btnProceedToCheckoutTop because we can't have more than one button with same ID and we may make to hook into an ID by name
' (SS,5/6/26) replaced <div class="float-end"> with <div class="basket-summary text-md-end">, also removed float-end from <a id="btnProceedToCheckoutTop", then changed to just "basket-summary"
' (SS,23/6/26) remove the top Subtotal heading, total and proceed to checkout button
%>
<div class="<%=LBootstrapClass%>">
<div class="basket-summary">
<div class="form-group mb-3">
<label for="DeliveryCountry" class="form-label basket-summary-label">Delivery Country</label>
<%=GetCountryCombo("DeliveryCountry", "onChange=javascript:document.frmBasket.submit()")%>
</div>
<%
If AllowCollection And AllowCollectionBasketPage Then
Dim LDeliveryWillCollect
If Session("DeliveryWillCollect") Then
LDeliveryWillCollect = " checked"
Else
LDeliveryWillCollect = ""
End If
%>
<div class="checkbox">
<label>
<input type="checkbox" name="DeliveryWillCollect" id="DeliveryWillCollect" value="checked" onChange="javascript:document.frmBasket.submit()" <%=LDeliveryWillCollect%>> Click & Collect
</label>
</div>
<%
End If
%>
<%If TrackedDeliveryOptionEnabled Then%>
<input type="hidden" name="DeliveryMethodOriginal" value="<%=GetDeliveryMethod%>">
<div class="form-group mb-3">
<strong class="basket-summary-label">Preferred Delivery Method</strong>
<%If GetCollectOptionEnabledOnBasketPage Then
' (SS,21/5/25) added following to force will collect if user proceeds to basket without a change to basket
' !!! to check?
If GetCollectDeliverySelected Then
SetCollectDeliverySelected True
End If
%>
<div class="radio">
<label>
<input type="radio" name="DeliveryMethod" id="DeliveryOption0" value="Collect" <%=iif(GetCollectDeliverySelected, " checked", "")%> onChange="javascript:document.frmBasket.submit()"> Collect
</label>
</div>
<%End If%>
<div class="radio">
<label>
<input type="radio" name="DeliveryMethod" id="DeliveryOption1" value="Standard"<%=iif(GetStandardDeliverySelected, " checked", "")%><%=iif(GetStandardDeliverySelectionAllowed, "", " disabled")%> onChange="javascript:document.frmBasket.submit()"> Standard
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="DeliveryMethod" id="DeliveryOption2" value="Tracked"<%=iif(GetTrackedDeliverySelected, " checked", "")%><%=iif(GetTrackedDeliverySelectionAllowed, "", " disabled")%> onChange="javascript:document.frmBasket.submit()"> Tracked
</label>
</div>
<div class="radio">
<label class="radio">
<input type="radio" name="DeliveryMethod" id="DeliveryOption3" value="Expedited"<%=iif(GetExpeditedDeliverySelected, " checked", "")%><%=iif(GetExpeditedDeliverySelectionAllowed, "", " disabled")%> onChange="javascript:document.frmBasket.submit()"> Expedited
</label>
</div>
</div>
<%End If%>
<%If VouchersEnabled Then%>
<div class="form-group mb-3">
<label for="VoucherCode" class="form-label basket-summary-label">Voucher Code</label>
<input type="text" name="VoucherCode" id="VoucherCode" class="form-control" placeholder="Enter a voucher code" value="<%=Session("VoucherCode")%>" maxlength="20" aria-describedby="voucherHelpBlock">
<%If LVoucherMessage <> "" Then%>
<span class="<%=Bootstrap3Only("help-block pull-right")%>" id="voucherHelpBlock"><%=LVoucherMessage%></span>
<br>
<%End If%>
</div>
<div class="<%=Bootstrap3Only("pull-right")%><%=Bootstrap4Only("text-end mb-3")%>" style="<%=Bootstrap3Only("margin-top: -10px; margin-bottom: 5px")%>">
<%=GetButtonBasketApplyVoucherCode%>
</div>
<%End If%>
</div>
<table class="basket-totals">
<tr>
<th>Subtotal</th>
<td><%=ASubtotal%></td>
</tr>
<%If AVoucherCode <> "" Then%>
<tr>
<th>Discount</th>
<td><%=ADiscount%></td>
</tr>
<%End If%>
</tr>
<tr>
<th><%=LDeliveryLabel%></th>
<td><%=ADelivery%></td>
</tr>
<%If IsVATRegistered And Not AIsVATDeducted Then ' (SS,15/4/16) added And Not AIsVATDeducted to not show when VAT id deducted, confusing for users %>
<tr>
<th><%=GetVATLabel%></th>
<td><%=AVATTotal%></td>
</tr>
<%End If%>
<tr>
<th>Grand Total</th>
<td><%=AGrandTotal%></td>
</tr>
</table>
<div class="<%=Bootstrap4Only("text-end mt-2")%>" style="<%=Bootstrap3Only("float: right; margin-top: 5px; margin-bottom: 10px")%>">
<%=GetButtonProceedToCheckout%>
</div>
<%=Bootstrap3Only("<br/>")%>
<%If GetPayPalExpressEnabled And GetPayPalExpressShowOnBasketPage Then%>
<div class="<%=Bootstrap4Only("text-right mt-3")%>" style="<%=Bootstrap3Only("float: right; margin-top: 5px; margin-bottom: 10px")%>">
<a href="products.asp?cmd=checkout&stage=<%=CS_PAYPAL_EXPRESS_CHECKOUT%>" id="btnProceedToCheckoutPayPal">
<img src="/images/paypal-checkout-logo.png" alt="Check out with PayPal">
</a>
</div>
<%End If%>
<%If GetPayPalPayLaterMessagesEnabled Then ' (SS,3/8/22) added following for PayPal's Pay Later feature %>
<div data-pp-message data-pp-style-layout="text" data-pp-style-logo-type="primary" data-pp-style-text-color="black" data-pp-style-text-align="right" data-pp-amount="<%=RemoveCurrencyAndCommas(AGrandTotal)%>"></div>
<%End If%>
<div class="d-md-none mt-4">
<%ShowBasketInfo(ATotalWeight)%>
</div>
</div>
<%
End Sub
' (SS,20/2/15) shows the modal popup when Email basket button clicked
' using anchor instead of button for "Close" button ensures that the submit button ("Send") is clicked by default when enter key pressed
' (SS,20/9/19) modified for Bootstrap 4
' (SS,29/9/20) modified to work for both Bootstrap 3 and 4
' (SS,6/6/24) modified to work with Bootstrap 5, also added data-bs-dismiss="modal" to close button, added modal-dialog-centered to close next to class="modal-dialog" to vertically centre the modal
' tidied the form for BS5, label for id=emailBasketEmail, also mb-3
' (SS,20/726) corrected If Not IsLocalMode to If IsLocalMode, to only show these extra fields in local mode
Sub ShowBasketEmailModal
If Not SaveBasketEnabled Then Exit Sub
%>
<div class="modal fade" id="modal-content-email-basket" tabindex="-1" role="dialog" aria-labelledby="emailBasketModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content" role="document">
<%If IsBootstrap5 Then%>
<div class="modal-header">
<h5 class="modal-title" id="emailBasketModalLabel">Email basket</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<%ElseIf IsBootstrap4 Then%>
<div class="modal-header">
<h5 class="modal-title" id="emailBasketModalLabel">Email basket</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<%Else%>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Email basket</h4>
</div>
<%End If%>
<form name="frmEmailBasket" method="post" action="<%=GetSaveBasketURL%>">
<div class="modal-body">
<p>Enter your email address below and click "Send" to have the basket emailed to you.</p>
<div class="form-group mb-3"><label for="emailBasketEmail" class="form-label">Email</label><input class="form-control email" id="emailBasketEmail" placeholder="Enter email address here" data-placement="top" data-trigger="manual" data-content="Must be a valid e-mail address (user@gmail.com)" type="email" required="required" name="email" autofocus></div>
<%If IsLocalMode Then%>
<div class="form-group mb-3"><label for="emailBasketName" class="form-label">Name</label><input class="form-control" id="emailBasketName" placeholder="Enter full name here (optional)" data-placement="top" data-trigger="manual" type="text" name="name"></div>
<div class="form-group mb-3"><label for="emailBasketAddress" class="form-label">Address (optional)</label><textarea class="form-control" id="emailBasketAddress" placeholder="Enter full address here (optional)" data-placement="top" data-trigger="manual" type="text" name="address" rows="5"></textarea></div>
<%End If%>
<div class="form-group"><label for="emailBasketMessage" class="form-label">Message (optional)</label><textarea class="form-control" id="emailBasketMessage" placeholder="Enter a message here for your own reference (optional)" data-placement="top" data-trigger="manual" type="text" name="message" rows="3"></textarea></div>
</div>
<div class="modal-footer">
<div class="form-group">
<button type="button" class="btn btn-secondary" data-dismiss="modal" data-bs-dismiss="modal">Close</button>
<input class="btn btn-success" type="submit" value="Send" id="submit">
</div>
</div>
</form>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<%
End Sub
' (SS,17/7/26) to show delivery debug info if local
Sub ScriptBasketDeliveryDebug
%>
<script>
document.addEventListener("DOMContentLoaded", function () {
var debugTools = document.getElementById("delivery-debug-tools");
var placeholder = document.getElementById("delivery-debug-placeholder");
if (debugTools && placeholder) {
placeholder.appendChild(debugTools);
debugTools.classList.remove("d-none");
}
});
</script>
<%
End Sub
' --- END OF BASKET TEMPLATES --- '
%>