| Help Version: 2.12 Last Update: 04/02/03 |
|
Custom Searches |
|
By default, quikstore includes search parameters for high price, low price, category, product and keyword. The search page template allows customers to search by category, keyword, or a combination of both. |
| Add High/Low Price Search |
|---|
|
Option 1 - User entered data <FORM METHOD=POST ACTION=http://www.quikstore.com/cgi-bin/quikstore.cgi> Option 2 - Radio buttons for price range <FORM METHOD=POST ACTION=http://www.quikstore.com/cgi-bin/quikstore.cgi> |
| User Defined Search Parameters |
|
Example: Our Quikstore Toy Store has items for different age groups. We'll define each of our age groups for each product in the USER_1 field in the database. We've chosen the terms UpTo2, age3-5, age6-8, age8-10, and ALL. Each product could contain one or more terms. Step 1: Define our search In a text editor open the qs_main.cgi file typically found in the server_files/cgi-bin/ directory and locate the SEARCH_PARAMETERS section. To create a new query, we assign a name, "common name", database field(s), comparison, and data type. If we are creating a price query, our data type would be number, a text match would be a string. In our toy store example, we would like to create an age query, matching USER_1 (database field 11) using a text search. Here's how it would look in the qs_main: age_query=age|11|eq|string The "eq" entered in the comparison field above is used in place of an = sign. Step 2: Create our form We will create a search form using radio buttons, but we could use a dropdown list just as easily. We can also create custom links such as quikstore.cgi?search=yes&category=all&age=UpTo2 as well. Each of these methods will work to query the database using our new search parameter. <FORM METHOD=POST ACTION=http://www.quikstore.com/cgi-bin/quikstore.cgi> You could also add these 4 input fields to an existing form, such as the search form used in the search.html page. You can name a query anything you like as long as you follow the above format. And you can have as many search parameters as you like. Keep in mind though, if you combine search parameters like this: <FORM METHOD=POST ACTION=http://www.quikstore.com/cgi-bin/quikstore.cgi> ...it will only find the selected age groups in the selected category of products.
|
Copyright © 1997-2003 i-Soft, LLC