This section is intended for both site designers of sites where the Catalog is enabled.

Background:  This explains how to enable the built in search of the products within a catalog. It uses the standard search.pm module. 
To implement the default catalog search place tag |.SC_SEARCHTAG.| where you want the search request to appear (usually in a page template).

What is searched:

  • One or more fields in the Product table is searched. 
  • Either a '%' or an '*' can be used as wild cards in the search.
  • Unless a '%' or an '*' begins the search phrase an exact match is required
  • The custom forms calling prodSearchC.pl must use the field names as defined in the site's Product table for standalone or child products (i.e., the information in the parent product will not be used). Note: its possible to have site specific fields added to the Product Table so the list below is not exclusing
  • The search function will display the resulting Parent or Standalone products as if they were in a category including building, if required, a Page List
  • Be default out of stock products, i.e., those with a Quantity of zero will be hidden. For parent products this means that all of the children must all be out of stock. 

Standard Tags and Fields

  • The tag |.SC_SEARCHTAG.| will generate a table which will accept the search term and present a drop down box allowing a single field (i.e., SKU, Name, Short Desc, and Long Desc).  If this tag is used it will remember what was passed to it. It may appear on both content and catalog pages.
  • A custom search form must have:
    action='prodSearchC.pl'
    one or more  name='fieldname' either hidden or if multiple ones are chosen using check-box inputs.
    a text input box or select list name="searchValue" (the search terms)
    optionally: name="searchIgnoreQuant" set to a non-zero value if you want products that are out of stock to be returned. 
  • The Product Line Template will be used to determine the display.  One of the categories the product appears in will be used when building the list.
  • The page template "catalog.tp1" will be used as the basis of the page.  All category references will be suppressed (we don't know what category we are in). 
    • |.ProdBody.| if present will hold the resulting list, include the report that no products were found that matched the criteria.  |.SC_CONTENT.| will be used if its not present.
    • |.SC_PAGELIST.| will be displayed if more that the allowed number of products appear in the result.
  • Field names and meaning: (most useful)
    • PrNumber: Unique product SKU: C-2-W
    • PrName: Public name of product: White 2" Candles
    • PrSDesc: Short Description: White beeswax unscented candel 2 inch
    • PrLDesc: Long  Description:  whatever you put in to fully describe the product