Solutions : Site Search : Item Search
Item Search
Description
Item Search provides search of item information contained in the Item Information Dataset (IID). Searches may be restricted by item category, subcategory and/or manufacture.
Invocation
Invocation is supported via POST passing text to search for, and optionally passing item category (department), subcategory, manufacture and search all categories (departments) as input. Item Search Controls are supported by both static HTML pages and dynamic page templates used by JHZ-CS Page Generators. When used with JHZ-CS Page Generators, Item Search input parameters category, subcategory, manufacture are automatically generated by simply including the Item Search special markup within templates.
Results
Results are sorted by numbers of matches per item and formatted using a customizable template. Template processing supports automatic generation of:
- Category List
- Subcategory List
- Manufacture List
- Item Detail
- Shopping Cart "Add-To-Cart" function links
- Banner Rotator System markup replaced hyperlinked images
Web Server Requirements:
- Operating Systems Supported: Unix, Linux, Macintosh OS X® and Windows®
- HTTP 1.x with CGI (Common Gateway Interface) PERL 5.x (check with your ISP or Server Administrator; this requirement is typically supported on most systems)
- Optional: SENDMAIL (supported on most all Unix/Linux platforms), or PERL NET:SMTP (available from CPAN) (commonly used on Windows® server platforms) with an SMTP system pre-installed and configured. This optional requirement supports automatic email notification to the webmaster when execution errors are detected.
- Optional: For configurations using an RDBMS (Relational Database Management System) data source requires a supported RDBMS, the PERL DBI module and the RDBMS specific DBD module to be previously installed and configured
Item Search
Installation and Usage
FILENAME: is.html
PURPOSE:
Describes the installation and use of Item Search.
DEPENDENCIES:
se.pl - Search configuration and common logic modules (see: se.html)
jhzcs.pl - JHZ-CS configuration and common logic modules (see: jhzcs.html)
IID (Item Information Dataset)
REQUIREMENTS:
is.cgi (web interface component)
is.htm (template)
OPTIONAL:
Support for Item Compare and Banner Rotator System requires those components to be installed and configured according to their specifications. Inclusion of Special Template markup supporting those components must also be included within the template supported by this product. See sample template provided with this product.
PACKING (PARTS) LIST
| PACKING LIST PRODUCT ID: IS |
|||
|---|---|---|---|
| COMPONENT | TYPE | SIZE | AUTH* |
| cgi-bin/dbmtabs/dbmparms.txt | TEXT | 1501 | 750 |
| cgi-bin/dbmtabs/dbmtabs.incl | TEXT | 1970 | 700 |
| cgi-bin/dbmtabs/dbmtabs.pl | TEXT | 1998 | 750 |
| cgi-bin/geog.pl | TEXT | 11750 | 750 |
| cgi-bin/jhzcs.pl | TEXT | 47225 | 750 |
| cgi-bin/license.incl | TEXT | 7565 | 700 |
| cgi-bin/se/is.cgi | TEXT | 22077 | 750 |
| cgi-bin/se/is.incl | TEXT | 14500 | 700 |
| cgi-bin/se/se.incl | TEXT | 4399 | 700 |
| cgi-bin/se/se.pl | TEXT | 3465 | 750 |
| css/se/se.css | TEXT | 3443 | 750 |
| data/IID/c.dat | TEXT | 15117 | 700 |
| data/IID/i.dat | TEXT | 2584820 | 700 |
| data/IID/m.dat | TEXT | 15181 | 700 |
| images/JHZCS.gif | BINARY | 745 | 750 |
| logs/errorlog.txt | TEXT | 91 | 750 |
| tmpls/se/is.htm | TEXT | 4530 | 750 |
|
*AUTH - Authorization/permissions octal equilvalents where: 7=RWX, 6=RW, 5=RX, 4=R (R=Read W=Write X=Executable) 1 char indicates Octal number 2 char Owner 3 char Group 4 char All Others |
|||
INSTALLATION:
It is strongly recommended that you read the entire installation process steps prior to performing any installations. Each solution has specific instruction that must be followed precisely.
The Installation Process
The installation process follows this order:
- Download solution to PC development platform and expand installation package (use any standard archive application such as WinZip®, StuffIt Expander® or TAR command)
- Modify configuration settings
- Upload to server
- Set access authorization permissions
- Test
- Customize Templates
- Test
Modify Logic Components
Modify all logic components "*.cgi" and "*.pl" logic modules as follows:
- first line of code (#!) correctly points to the PERL executable on the server (use command "which perl" or consult your server administrator)
- all "requires" statements contained in all "*.cgi" and "*.pl" logic modules must use absolute directory paths (beginning with a forward slash "/")
TEMPLATES:
Customize template for content and appearance as desired:
is.htm
The following Special mark-up within the Item Search template indicates the start and end of the repeating entries for the items matching the search criteria:
<!-- Entry Start --> <!-- Entry End -->
Any variable contained in the IID may be referenced using the variables (column header name) wrapped in less than greater than pairs. The variable name cannot contain spaces.
Two special keywords are available for use when using a variable reference within web page anchor names, anchor references and CGI URL parameters. This allows use of referenced variables that equate to an item values containing spaces. The use of these special keywords causes spaces to be translated or escaped using the required character sequences.
The special keywords are:
ANCHOR PARAM
EXAMPLES:
c.cgi?c=<<category PARAM>>
<a href="#<<category ANCHOR>>"> (link to subsequent name anchor) <a name="<<category ANCHOR>>">
Uploading to Web Server
All dependent and required components must be installed and successfully configured. All components, with the excpetion of images, must be FTP uploaded as TEXT. Images must be FTP uploaded as BINARY.
TEST:
Test installation and configuration by invoking is.cgi from a web browser using a test page containing Item Search Controls.
-
Test passing a valid search criteria
-
Test passing an invalid search criteria
-
Test all JHZ-CS page generators for correct replacement of Item Search parameters; "cat", "subcat" and "manufacture".
Add Item Search Controls to static pages and dynamic page templates as desired including the appropriate parameters and values to yield the desired results; e.g., category, subcategory, manufacture and search_all.
USAGE:
Insert Item Search Controls with markup in static pages and templates.
The JHZ-CS Page Generator Solution Templates already contain the Item Search Controls and will automatically set the hidden parameters (Form Fields) values as appropriate for the particular manufacture, category, and/or subcategory for the page being generated.
You may note the special markup variable <<search_text>> contained as a value for form field "search_text" in Item Search markup contained in Item Search Results templates. This causes the user entered Search Criteria to be retained in that field when the Item Search Results are generated and displayed.
<input type=text name="search_text" value="<<search_text>>" size=12 maxlength=40>
For static page insertion use the following syntax to "search all departments".
<!-- JHZ-CS Search Template Start --> <form action="/cgi-bin/se/is.cgi" method=post> <input type=hidden name="manufacture" value=""> <input type=hidden name="cat" value=""> <input type=hidden name="subcat" value=""> <input type=hidden name="all_cats" value=1> <input type=text name="search_text" value="" size=12 maxlength=40> <input type=submit value="Search"> </form> <!-- JHZ-CS Search Template End -->
The Special Directives "<!-- JHZ-CS Search Template Start -->" and "<!-- JHZ-CS Search Template End -->" identify Item Search variables to the JHZ-CS Page Generators for variable replacement of the hidden parameters; "cat", "subcat" and "manufacture". They must be present to cause the variables to be properly set duing the dynamic page generation process.
In Category, Subcategory and Manufacture specific static pages you may restrict the search by putting values into the hidden input fields value parameters. Specify valid values contained in the IID. To allow the user to optionally search all departments, change the "all_cats" hidden input field to a checkbox and label it with text. Example:
<input type=checkbox name="all_cats" value=1> Search All Departments
FAQs
Can I modify the Item Search template?
Yes. The template is used to format the search results. You can modify it as desired respecting the special markup directives and variables.
Can I add to the information returned in the search results?
You can add data columns to the IID, then refer to them with <<data-column-name>> by adding a new table column in the repeating portion of the template.
Do I upload the template as Text or Binary?
Upload templates and data as Text.
JHZ-CS Solutions are distributed exclusively under terms and conditions of the JHZ-CS Software License Agreement.
