This is part of the Stockashop Manual. It describes the different ways you can use the search results page.
This manual section is in progress
There are various parameters which you can pass into the search page to affect its behaviour and display. Example usage is to have a form which posts to the search page, or to have a link such as search.php?searchfor=bikes&priceto=200&showtitle=yes, which will search for all bikes, up to £200, and show the title of the results as "Bikes".
- search: the text to search for in the product's name, description, keywords, summary, and page's name. Common words like "and", "the" and "a" in the search phrase are ignored
- search[]: you can pass in multiple "search[]" terms and they will be joined into a single search, which is very useful if you're using a form with different dropdowns
- type: pass in the "type" as "keywordsonly" and it will only search the product's keywords - which can be useful if you want to search by some word or term which you don't want the customer to know about (like a serial code). Pass in "optionsonly" to search only product option names.
- phrase: normally the search looks for any word that was typed in, but you can make it search for a specific phrase by passing in "yes"
- search in quotes: if you put quotes around the entire search term it forces it to search by phrase as above
- pricefrom: search for products greater than or equal to this price
- priceto: search for products less than or equal to this price
- date: for sites with the "event listings" feature, you can search for products/events on this date by passing in something like date=6 March 2009
- datefrom: as above, show products/events from this date, can be used alone or in combination with dateto
- dateto: as above, show products/events up to this date, can be used alone or in combination with datefrom
- flag: this will look for all products with the corresponding product flag set such as flag=on%20sale (example flags are "new product", "on sale" and "special offer"). You can pass in a plural and the "s" will be stripped but still shown in the title.
- showtitle: pass in "yes" and the seach page will show the search term as the title, or pass in anything else to set the title explicitly
- showtext: you can override the default text by passing it in as this parameter
- redirect: pass in "always" and the search results page will automatically redirect to the first product found if there were any, pass in "yes" and it will only redirect if the search returned exactly one result
- Search results pages are not created automatically in the page list, but can be added by designers. Once created, you can edit the text of the page. The default text for a successful search is "We found products matching your search for ..." For no results it is "Sorry we didn't find any matching products for ..."