Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Hiding Category Search Results

In ProductCart version 3.51 and above there is a new, hardcoded variable at the top of pc/showsearchresults.asp that allows you to quickly turn off category information (list of categories that match the search criteria) on the search results page. This may be useful on large product catalogs when having category information in the search results negatively impacts the overall search speed.

To turn off category search results, locate the following code in the file pc/showsearchresults.asp:

Dim pcv_strHideCatSearch
pcv_strHideCatSearch = False '// Set to "True" to disable category search
  1. Download the file pc/showsearchresults.asp
  2. Make a back-up copy
  3. Edit the file by replacing “False” with “True” in the code shown above
  4. Save the edited file and re-upload it to the pc folder on the Web server

Changing this hardcoded variable value will affect all searches. If you only want Category Search Results to be disabled in some cases, you will need to use additional logic in the source code. For example, you could pass a new querystring value to the search results page, and then use that querystring value to turn the feature on and off.

For instance, assuming that you are passing a querystring called “showCategoryResults” with value “No” to turn off Category Search Results, the code would be written as follows on pc/showsearchresults.asp:

Dim pcv_strHideCatSearch, pcv_showCategoryResults
pcv_showCategoryResults=request("showCategoryResults")
IF lcase(pcv_showCategoryResults) = "no" THEN
 pcv_strHideCatSearch = True
ELSE
 pcv_strHideCatSearch = False
END IF

QR Code
QR Code Hiding Category Search Results (generated for current page)