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
Search results format through the following templates: categoryresults.html, categoryresultsrow.html
Full Search
sample form
Search results format through the following templates: searchresults.html, searchresultsrow.html
Item Page
Sample format : WMCshop.cgi?action=dbview&id=ITEMID
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!