File: D:/web/hyperflight/ajax.asp
<%Option Explicit%>
<%
' === COMMON TEMPLATE (SAME FOR ALL SHOPPING SITES) ===
' === AJAX Routines ===
%>
<!--#include file="dbfunctions.asp"-->
<!--#include file="apputils.asp"-->
<!--#include file="customutils.asp"-->
<!--#include file="inc-template-shopping-status.asp"-->
<%
'DebugOn
'SetDebugLogTypeToFile
'WebDebugLog
DoAjaxMain
' (SS,21/7/26) converted from "If" to "Select Case", added product_search_suggest
' (SS,23/7/26) added product_search_suggest_click
' (SS,26/7/26) added country_currency_panel and country_currency_save
Sub DoAjaxMain
Dim LCmd
LCmd = LCase(Trim(CleanRequest("cmd")))
Select Case LCmd
Case "buy"
If LCase(Request("mainbuy")) = "yes" Then
DoProductOptionsCheck
End If
Case "custom"
' If custom then call custom routine in customutils.asp
CustomAjax Request("options")
' (SS,26/7/26)
Case "country_currency_panel"
ShowCountryCurrencyPanelAjax
' (SS,26/7/26)
Case "country_currency_save"
SaveCountryCurrencyAjax
Case "product_description_list"
' (SS,16/7/13) added following to return list for Shopping Admin to send to Google Shopping
Response.Write ProductDescriptionListForGoogleShopping
' (SS,21/7/26)
Case "product_search_suggest"
ShowProductSearchSuggestAjax
' (SS,23/7/26)
Case "product_search_suggest_click"
AddIncrementalSearchToLog
End Select
End Sub
' outputs comma separated list of option IDs that are required and are missing
' if no options missing then blank is output, i.e. return to AJAX routine in browser client
' this page would be accessed using post method of jquery i.e. $.post('ajax.asp', $('form[name="frmBasket"]').serialize(), ...
Sub DoProductOptionsCheck
Response.Write ProductOptionsMissingRequiredList(Request("productid"))
End Sub
%>
<%FinaliseAjax%>