File: D:/web/hyperflight/! bs3/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
Sub DoAjaxMain
Dim LCmd
LCmd = Request("cmd")
If LCmd = "buy" And Request("mainbuy") = "yes" Then
DoProductOptionsCheck
ElseIf LCmd = "custom" Then ' if custom then call custom routine in customutils.asp
CustomAjax Request("options")
' (SS,16/7/13) added following to return list for Shopping Admin to send to Google Shopping
ElseIf LCmd = "product_description_list" Then
Response.Write ProductDescriptionListForGoogleShopping
End If
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%>