%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "18, 33, 55, 108, 150, 151, 152, 156, 157, 158, 159, 160, 161, 265, 266, 294, 295, 296, 648, 779, 1182, 1183, 1184, 1236, 1237" %> <% '=============================================== ' 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. '=============================================== 'Need extra recordset object Set objRecordSet3 = Server.CreateObject("ADODB.Recordset") '----------------------------------------------- 'COLLECT VALUES FROM FORM '----------------------------------------------- V_ID = request.querystring("V_ID") P_ID = request.querystring("P_ID") PT_ID = request.querystring("PT_ID") numPageStartPosition = request.querystring("numPageStartPosition") strShowBackLink = request.querystring("strShowBackLink") if not isnull(V_ID) and V_ID <> "" then strKeywords = "" strPageHistory = request.querystring("strPageHistory") strSearchCriteria = request.querystring("strSearchCriteria") strKeywords = request.querystring("strKeywords") '----------------------------------------------- 'SECURITY CHECKS '----------------------------------------------- If V_ID="" then V_ID = 0 If PT_ID="" then PT_ID = 0 If Not IsNumeric(V_ID) then response.redirect("error.asp") If Not IsNumeric(P_ID) then response.redirect("error.asp") If Not IsNumeric(PT_ID) and PT_ID <> "all" then response.redirect("error.asp") If numPageStartPosition = "" Or Not IsNumeric(numPageStartPosition) then numPageStartPosition = 1 numPageStartPosition = Cint(numPageStartPosition) 'If this gets set, don't show the product. This is ' security for language-specific products blnNoShow = false '----------------------------------------------- 'FORMAT QUERY AND RUN IT '----------------------------------------------- strQuery2 = "SELECT PT_Live, PT_Name" & CStr(numLanguageID) & ", P_StrapLine" & CStr(numLanguageID) & ", P_Live, P_Name" & CStr(numLanguageID) & ", P_SpecTable" & CStr(numLanguageID) & ", P_Desc" & CStr(numLanguageID) & ", P_HyperLink" & CStr(numLanguageID) & ", P_OrderVersionsBy, P_VersionDisplayType FROM (((tblCactuShopVersions INNER JOIN tblCactuShopTaxRates ON tblCactuShopVersions.V_Tax = tblCactuShopTaxRates.T_ID) INNER JOIN tblCactuShopProducts ON tblCactuShopVersions.V_Product = tblCactuShopProducts.P_ID) INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProducts.P_ID = tblCactuShopProductProdTypeLink.PPT_ProductID) INNER JOIN tblCactuShopProdtype ON tblCactuShopProductProdTypeLink.PPT_ProdTypeID = tblCactuShopProdtype.PT_ID WHERE P_ID=" & P_ID & " AND V_Live='y' AND P_Live='y' AND PT_Live='y'" Call ExecuteSQL(strQuery2, numCursorType, objRecordSet3) If not (objRecordSet3.BOF And objRecordSet3.EOF) then P_OrderVersionsBy = objRecordSet3("P_OrderVersionsBy") P_VersionDisplayType = objRecordSet3("P_VersionDisplayType") blnNoShow = objRecordSet3("P_Name" & CStr(numLanguageID)) & "" = "" 'Set the string to use as the title of this page - good for search engines! strPageTitleHTML = objRecordSet3("P_Name" & CStr(numLanguageID)) & " | " & GetString("Config_Webshopname") strMetaDescHTML = left(objRecordSet3("P_Desc" & CStr(numLanguageID)), 300) end if '----------------------------------------------- 'PRODUCT TRACKING - CAN BE TURNED ON OR OFF '----------------------------------------------- if Application(LICENSENUMBER & "tracking") = "y" then strQuery = "INSERT INTO tblCactuShopProductStats (PS_ProdNo, PS_Date, PS_IP) VALUES (" & _ P_ID & "," & strDateDelimiter & _ ReverseFormatYear(Now()) & strDateDelimiter & ",'" & _ Request.ServerVariables("HTTP_HOST") & "')" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) End if If not (objRecordSet3.BOF And objRecordSet3.EOF) and not blnNoShow then '----------------------------------------------- 'GET LOCATION BAR 'We've moved this up so that we can check that 'all categories below us are 'legal' for 'this language. If not, we should show 'the unavailable sign '----------------------------------------------- select case strPageHistory case "cat": strLocationBar = "" & GetString("ContentText_Categories") & "" case "basket": strLocationBar = "" & GetString("ContentText_Basket") & "" case "search" strLocationBar = "" & GetString("ContentText_Search") & "" strLocationBar = "" & GetString("ContentText_SearchResults") & "" case "related": strLocationBar = "" & GetString("ContentText_RelatedProduct") & "" case "wishlist": strLocationBar = "" & GetString("PageTitle_WishList") & "" case Else: strLocationBar = "" & GetString("ContentText_Home") & "" end select 'Add on the trail strLocationBar = strLocationBar & " > " 'Add on any categories we've been through If PT_ID <> "0" and not isnull(PT_ID) and PT_ID <> "all" then strQuery = "SELECT PT_Name" & CStr(numLanguageID) & ", PT_MotherProdType FROM tblCactuShopProdtype WHERE PT_ID = " & PT_ID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If Not (objRecordSet.BOF And objRecordSet.EOF) Then 'Get category name PT_MotherProdType = objRecordSet("PT_MotherProdType") strSectionLink = "" & objRecordSet("PT_Name" & CStr(numLanguageID)) & " > " & chr(13) objRecordSet.close 'Get mothers name numMotherID = PT_MotherProdType Do While numMotherID > 0 strQuery = "SELECT PT_ID, PT_Name" & CStr(numLanguageID) & ", PT_MotherProdType FROM tblCactuShopProdtype WHERE PT_ID = " & numMotherID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) if not (objRecordSet.bof and objRecordSet.eof) then numMotherID = objRecordSet("PT_MotherProdType") strMothers = "" & objRecordSet("PT_Name" & CStr(numLanguageID)) & " > " & strMothers else numMotherID = 0 end if objRecordSet.close loop strLocationBar = strLocationBar & strMothers & strSectionLink Else objRecordSet.Close End If End If strLocationBar = strLocationBar & objRecordSet3("P_Name" & CStr(numLanguageID)) end if '----------------------------------------------- 'BUILDPAGE DOWN HERE BECAUSE THANKS TO THE NEW 'CODE TO ADD METATAGS AND PAGETITLE, THIS NEEDS 'TO COME AFTER PRODUCT INFO PULLED OUT. '----------------------------------------------- %> <% '----------------------------------------------- 'READ PAGE TEMPLATE FROM FILE '----------------------------------------------- Call ReadFromTemplate(strTemplateLocation, aryPageTemplate, strBasketHTML, strCategoryListHTML) '----------------------------------------------- 'WRITE FIRST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(0)) If objRecordSet3.recordcount = 0 or blnNoShow then %>
| <% WriteString("ContentText_ProductUnavailable") %> |
|
<% response.write "" & objRecordSet3("P_Name" & CStr(numLanguageID)) & " " & strLocationBar & "" %> |
||||
|
||||
| <% WriteString("ContentText_RelatedProducts") %>: | ||||
| - this functionality is not included in the lite version. | ||||
| <% WriteString("ContentText_PeopleWhoBought") %>: | ||||
| - this functionality is not included in the lite version. | ||||
| <% WriteString("ContentText_TryTheseCategories") %>: | ||||
| - this functionality is not included in the lite version. | ||||
<% If strShowBackLink<>"n" then %> << <% WriteString("ContentText_GoBack") %> <% end if %> |
||||