<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "359, 620, 621, 622, 623, 624, 625, 626" strThisBackPage = "products" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== Dim numErrorNo numErrorNo = 0 If Not Request.Querystring("blnSubmitted") = "True" Then numErrorNo = 2 Dim strCategories, strRelations, numParentID, strParentName aryCategories = Split(Request.Querystring("strCategories"), ",") strRelations = Request.Querystring("strRelations") numParentID = Request.Querystring("numParentID") strParentName = Request.Querystring("strParentName") %> <% WriteString("PageTitle_RelatedProducts") %> <% =strParentName %> <% If numErrorNo = 0 Then %> <% ElseIf numErrorNo = 1 Then %> <% ElseIf numErrorNo = 2 Then %> <% End If %>
<% WriteString("PageTitle_DefineRelatedProducts") %>
<% =strParentName %>

<% Else %> <% End If %>
<% numCounter = 0 For numCounter = 1 to numTotalLanguages if aryLangLiveBack(numCounter) = "y" then strNames = strNames & "P_Name" & CStr(numCounter) & ", " end if next strQuery = "SELECT " & strNames & "P_ID FROM tblCactuShopProducts INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProducts.P_ID = tblCactuShopProductProdTypeLink.PPT_ProductID WHERE tblCactuShopProductProdTypeLink.PPT_ProdTypeID = " & aryCategories(0) & " AND tblCactuShopProducts.P_ID <> " & numParentID & " ORDER BY P_Name" & CStr(numLanguageID) & " ASC" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If objRecordSet.recordcount=0 Then %> <% WriteString("ContentText_NoAvailableProducts") %>


<< <% WriteString("ContentText_BackLink") %>
">

<< <% WriteString("ContentText_BackLink") %>
<% WriteString("ContentText_ErrorChkMasterCategorySelected") %>
<< <% WriteString("ContentText_BackLink") %>
<% WriteString("ContentText_ErrorChkRelatedProdIncorrectUse") %>
<% WriteString("ContentText_CloseWindowLink") %>.
<% '----------------------------------------------- 'CLOSE DATA CONNECTIONS '----------------------------------------------- Set objRecordSet = Nothing objDataConn.Close Set objDataConn = nothing %>