|
Home
<%
Set cwSearchObj = New cw3Search
With cwSearchObj
.SearchType = "Links"
.AllCategoriesLabel = "All Products"
.Separator = " "
.SelectedStart = ""
.SelectedEnd = ""
End With
Response.Write(cwSearchObj.Display())
Set cwSearchObj = Nothing
%>
Shopping cart
Special Offers
About Us
Terms & Conditions
Contact Us
|
<%= cwCartLinks(cwCart.Count, Null) %>
<%
'================================================================
'Application Info: Cartweaver© 2002 - 2007, All Rights Reserved.
'Developer Info: Application Dynamics Inc.
' 1560 NE 10th
' East Wenatchee, WA 98802
'Support Info: http://www.cartweaver.com/go/asphelp
'
'Cartweaver Version: 3.0.3 - Date: 13 May 2007
'================================================================
'Name: CWIncResults.asp
'Description: Displays all results from a search in a repeating
' table.
'================================================================
'*Do Not Remove This Line* Prevents extraneous %@LANGUAGE="VBSCRIPT"% declaration from being added by Dreamweaver.
'All the search queriess are contained in the cwSearchAction.asp file
%>
<%
'Open the results recordset based on the query generated from cwSearchAction
Set rsCWGetResults = cwSearchAction(Request.QueryString("keywords"), Request.QueryString("category"), Request.QueryString("secondary"))
cwDebugger cwQueryDump(rsCWGetResults,"rsCWGetResults")
'Set our result count for easy access.
ResultCount = rsCWGetResults.RecordCount
cwDebugger "ResultCount: " & ResultCount
'Columnar display variables
Dim NumberOfColumns : NumberOfColumns = CInt(Application("NumberOfColumns"))
Dim ColsOutput : ColsOutput = 0
Dim RecordsOutput : RecordsOutput = 0
Dim RowsOutput :RowsOutput = 0
Dim ColWidth : ColWidth = Fix(100/NumberOfColumns)
cwDebugger "NumberOfColumns: " & NumberOfColumns
cwDebugger "ColsOutput: " & ColsOutput
cwDebugger "RecordsOutput: " & RecordsOutput
cwDebugger "RowsOutput: " & RowsOutput
cwDebugger "ColWidth: " & ColWidth
'Set defaults for paging
Dim PagingCategory
Dim PagingSecondary
Dim PagingKeywords
PagingCategory = "&category=" & Request.QueryString("category")
PagingSecondary = "&secondary=" & Request.QueryString("secondary")
If Request.QueryString("keywords") <> "" AND Request.QueryString("keywords") <> "Enter Keywords" Then
PagingKeywords = "&keywords=" & Server.URLEncode(Request.QueryString("keywords"))
End If
Dim URLVars : URLVars = PagingCategory & PagingSecondary & PagingKeywords
'Set variables for recordset paging
PageNum_Results = 1
If Request.QueryString("PageNum_Results") <> "" Then PageNum_Results = CInt(Request.QueryString("PageNum_Results"))
MaxRows_Results = CInt(Application("ResultsPerPage"))
StartRow_Results = cwMin((PageNum_Results-1)*MaxRows_Results+1,cwMax(ResultCount,1))
EndRow_Results = cwMin(StartRow_Results+MaxRows_Results-1,ResultCount)
TotalPages_Results = cwCeiling(ResultCount/MaxRows_Results)
'START - Display Results
%>
Total Search Results: [ <%= ResultCount %> ]
<%
'Display the following based on search results
If ResultCount = 0 Then
'If there are no records
%>
Sorry, this range is currently out of stock. Please contact us for further details.
Thank You!
<%
Else
'RecordSet Paging
Response.Write(cwPagingLinks(ResultCount, Null, Null, Null, Null, Null, Null, Null, URLVars))
'We have some records to display
Dim imageTag
If NumberOfColumns > 1 Then
'Move to the starting record:
rsCWGetResults.Move StartRow_Results - 1
'Set a counter to limit returned results
i = 0
'Loop through the results
%>
<%
Do While NOT rsCWGetResults.EOF AND i < MaxRows_Results
i = i + 1
ColsOutput = ColsOutput + 1
RecordsOutput = RecordsOutput + 1
'Get the product's thumbnail image.
imageTag = cwDisplayImage(rsCWGetResults("product_ID"), 1, rsCWGetResults("product_Name"), "")
If ColsOutput = 1 Then
RowsOutput = RowsOutput + 1
%>
<%
End If %>
> <%= rsCWGetResults("product_Name") %>
<% If (imageTag) <> ("") Then 'Start CCR %>
&category=<%= Request.QueryString("category") %>"><%= imageTag %>
<% End If 'End CCR: (imageTag) <> ("") %>
<%= rsCWGetResults("product_ShortDescription") %>
<%= cwPriceList(rsCWGetResults("product_ID"), cwGetTotalProductTaxRate(rsCWGetResults("product_ID"), cwGetCustTaxRegions(Session("CustomerID"))), i) %>
&category=<%= Request.QueryString("category") %>">More Info »
|
<%
If ColsOutput = NumberOfColumns OR i = MaxRows_Results Then
'Fill the row with empty table cells if necessary
For x = ColsOutput To NumberOfColumns - 1
Response.Write(" | ")
Next
%>
<%
'Reset the column counter
ColsOutput = 0
End If
rsCWGetResults.MoveNext()
Loop
%>
<% Else %>
Item Name |
Image |
<%
'Move to the starting record:
rsCWGetResults.Move StartRow_Results - 1
'Set a counter to limit returned results
i = 0
'Loop through the results
Do While NOT rsCWGetResults.EOF AND i < MaxRows_Results
i = i + 1
'Get the product's thumbnail image.
imageTag = cwDisplayImage(rsCWGetResults("product_ID"), 1, rsCWGetResults("product_Name"), "")
%>
<%= rsCWGetResults("product_Name") %>
<%= rsCWGetResults("product_ShortDescription") %>
<%= cwPriceList(rsCWGetResults("product_ID"), cwGetTotalProductTaxRate(rsCWGetResults("product_ID"), cwGetCustTaxRegions(Session("CustomerID"))), i) %>&category=<%= Request.QueryString("category") %>">
Details
|
<% If (imageTag) <> ("") Then 'Start CCR %>
&category=<%= Request.QueryString("category") %>"><%= imageTag %>
<% End If 'End CCR: (imageTag) <> ("") %>
|
<%
rsCWGetResults.MoveNext()
Loop 'While Not rsCWGetResults.EOF
%>
<% End If 'NumberOfColumns > 1 %>
<%
End If 'ResultCount = 0
'END - Display Results
'RecordSet Paging
Response.Write(cwPagingLinks(ResultCount, Null, Null, Null, Null, Null, Null, Null, URLVars))
Response.Write(cwDisplayDiscountDescriptions())
%>
<%= cwDebugOutput %> |
|