Solutions : Page Generators : Item Detail
Item Detail
Description
Item Detail generates details pages for items defined in the Item Information Dataset (IID). Pages are dynamically generated each time Item Detail is invoked using the most current updates to both templates and data. Templates are fully customizable.
An additional feature of Item Detail is its exception handling. When no item is specified, by default a list of all items defined in the IID is generated. See "Exception Handling" below.
Invocation
Supports both GET and POST methods. Input is any valid "Item ID" name value pair; see "Exception Handling" below for more info. Links to Item Detail are automatically generated by reference with automatic insertion of the input parameters by the Page Generators and Shopping Cart solutions when they are installed.
Results
Results are formatted using fully customizable templates. Items may have two templates defined in the IID providing alternate displays. Templates may be shared across items.
Item Detail automatically generates links and controls supporting:
- Item Detail using alternate template
- Category List link
- Subcategory List link
- Manufacture List link
- Shopping Cart "Add-To-Cart" function links
- Item Search controls w/dynamic parameter setting
- Banner Rotator System markup replaced hyperlinked images
Exception Handling
When no Item ID, or an invalid Item ID, is specified an "All Items List" is generated and displayed also supported by a fully customizable template with automatic generation of controls and links; see "Results" above.
Items are listed with incremental display (20 items per page) supported by "previous" and "next" function links.
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 Detail
Installation and Usage
FILENAME: i.html
PURPOSE:
Describes installation and use of Item Detail.
DEPENDENCIES:
pg.pl - Page Generators common configuration and logic module (see pg.txt)
jhzcs.pl - JHZ-CS common configuration and logic module
IID (Item Information Dataset)
REQUIREMENTS:
i.cgi
xxx.htm (multiple templates supported; see "Templates" below)
Supplied Sample Templates:
i_1.htm
i_2.htm
i_S.htm
i_all.htm (Display All)
Optional:
Support for Item Compare, Text Search and Banner Rotator System requires those components to be previously installed and configured with Special Template markup supporting these components to be included within this product templates.
PACKING (PARTS) LIST
| PACKING LIST PRODUCT ID: ID |
|||
|---|---|---|---|
| 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/pg/i.cgi | TEXT | 14228 | 750 |
| cgi-bin/pg/i.incl | TEXT | 15006 | 700 |
| cgi-bin/pg/pg.pl | TEXT | 13315 | 750 |
| css/pg/pg.css | TEXT | 3008 | 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/pg/i_1.htm | TEXT | 4324 | 750 |
| tmpls/pg/i_2.htm | TEXT | 3522 | 750 |
| tmpls/pg/i_S.htm | TEXT | 4394 | 750 |
| tmpls/pg/i_all.htm | TEXT | 3883 | 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:
Item Detail includes three sample templates:
i_1.htm (standard display)
i_2.htm (large image display)
i_S.htm (specifications display)
i_all.htm (display all items processing)
For initial installation it is recommended to use the sample templates provided until after having tested the installation and verified the configuration modifications are working as expected. Then, create the templates desired or modify the sample templates.
Item Detail supports two templates per item to be defined in the IID. Invocation of Item Detail without the template parameter "t" results in the default template being used to generate the page. When the template parameter name and value pair is passed as "t=2" the alternate template is used as opposed to the default.
There is no restriction to the number of templates used; however, only two templates may be specified per item. Simply specify the names of the two templates to be used for each item in the IID and invoke Item Detail Page with or without the template parameter name and value pair to cause the desired template to be used.
Templates naming conventions are not strictly enforce; however, it is recommended that the filename extension of ".htm" is used to help assure proper platform conversion during FTP upload and download as ASCII text.
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
EXAMPLE:
c.cgi?c=<<category PARAM>>
<a href="#<<category ANCHOR>>"> <a name="<<category ANCHOR>>">
The All Items template is used to generate results containing all items contained in the IID; 20 items at a time. The repeating entries, one for each item, are marked within the template using the following special markup directives (in the form of HTML comments).
<!-- Entry Start --> <!-- Entry End -->
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 the installation and configuration by invoking i.cgi from within a web browser by entering the URL to i.cgi with parameters using the syntax in the example in the USAGE section below. First test passing valid parameters, then test passing invalid parameters to assure installation and configuration is correct. It is recommended that you test each possible valid value upon initial installation, and perform function and regression testing each time a new valid value is added to the website configuration.
Add hyperlinks within static pages and dynamic page templates to point to i.cgi with the appropriate parameters to yield the desired result.
USAGE:
Following successful installation and satisfaction of dependencies and requirements, "i.cgi" should be invoked via the GET method passing a valid item ID name value pair as input using the name "i", and optionally a template identifier name value pair as input using the name "t" with valid values of "1" (default if "t" not specified) or "2". And, test invoking "i.cgi" without input parameters to test Display All processing.
EXAMPLE:
Specify the domain URL to the location where i.cgi resides; i.e.,
http://www.yourdomain.com/cgi-bin/pg/i.cgi
Without parameters resulting in an All Items List being generated:
i.cgi
With parameters:
i.cgi?i=x i.cgi?i=x&t=1 i.cgi?i=x&t=2
where "x" equals a valid ITEM_NUM
where "t=1" means use the default template
where "t=2" means use the secondary template
all values are contained in the IID (Item Information Dataset)
FAQs
Are any other products required in order to use Item Detail at my website?
No.
Is there a limit to the number of templates I can use for my products?
No. The number of templates is limited only by the available storage on your web server.
JHZ-CS Solutions are distributed exclusively under terms and conditions of the JHZ-CS Software License Agreement.
