INVENTORY SEARCH


Field Search

You may search on any "field name" such as

item_id
item_name
item_short_description
item_description

custom fields included!!

Query: http://yourdomain/path/to/WMCshop.cgi?action=dbsearch&field_name=field_value 

or a multiple search

WMCshop.cgi?action=dbsearch&field_name=field_value&another_field=field_value

i.e. : look for downloadables

WMCshop.cgi?action=dbsearch&download=yes

Search results format through the following templates: searchresults.html, searchresultsrow.html


Category Search (using a different template)

You may reach any category (item linked to a specific category) using the following syntax

Query: WMCshop.cgi?action=dbsearch&categories=categoryname&list=category

or

Query: WMCshop.cgi?action=dbsearch&categories=categoryname:subcategory&list=category

sample drop down

category:

<form method="POST" action="WMCshop.cgi">
<input type="hidden" name="action" value="dbsearch">
<input type="hidden" name="list" value="category">

<p>
category: <select size="1" name="categories">
<option value=
"books">books</option>
<option value=
"cd">cd</option>
<option
value="services">services</option>
</select>

Search results format through the following templates: categoryresults.html, categoryresultsrow.html


Full Search

sample form

Search

<form method="GET" action="WMCshop.cgi">
<p>Search <input type="text" name="keyword" size="20"> 
<input type="submit"></p>
<input type="hidden" name="action" value="fulldbsearch">
</form>

Search results format through the following templates: searchresults.html, searchresultsrow.html 


Item Page 

Sample format : WMCshop.cgi?action=dbview&id=ITEMID


Sort 

You may show results in a different order by adding the "sort" and "sortby" fields to your queries/forms.

example for links:

WMCshop.cgi?action=dbsearch&field_name=field_value&sortby=FIELDNAME&sort=OPTION

example for forms:

<input type=hidden name=sort value="OPTION">
<input type=hidden name=sortby value=
"
FIELDNAME">

"sort" options: 

Example: Sort by price numerically ascending:

WMCshop.cgi?action=dbsearch&item_name=XXXXX&sortby=price&sort=numdes

"sortby" fields: Any available field in fldslist file

"sortby" can be a great way to goup items in a search result. For example if you are selling books you could have a custom field named "author" and put a link like the following in your template 

WMCshop$cgiext?$thisquery&sortby=author&sort=des

If you wish to add pre-defined links/queries to your search - templates (searchresults/categoryresults) please remember to include $thisquery. This tag will automatically include the user query. It is important!

Note: asc means descending and vice-versa!