This single tag is intended for use as a replacement for the following traditional
Perlshop catalog data description tags:
ITEM_ID, ITEM_NAME, ITEM_PRICE,
ITEM_WEIGHT, ITEM_SHIPTYPE, ITEM_TAXTYPE,
ITEM_OPTION1, ITEM_OPTION2, ITEM_OPTION3,
QTY_MIN, QTY_MAX
<input type=hidden name="item_id" value="pn324"> <input type=hidden name="item_name" value="Basic Widget"> <input type=hidden name="item_price" value="12.50"> <input type=hidden name="item_weight" value="3.5"> <input type=text name="qty" value="1" size=4 maxlength=4> <input type=submit name="action" value="Order">
Using the item_data tag, this example can be reduced as follows:
<input type=hidden name="item_data" value="id:pn324|name:Basic Widget|price:12.50|weight:3.5"> <input type=text name="qty" value="1" size=4 maxlength=4> <input type=submit name="action" value="Order">
Every one of the traditional Perlshop item description tags has an equivalent item_data tag value specification. In the example above, the 'id' value replaces the item_id tag, the 'name' value replaces the item_name tag, the 'price' value replaces the item_price tag, and the 'weight' value replaces the item_weight tag.
Every one of the traditional Perlshop item description tags can be replaced by an equivalent item_data value. The names of these item_data values are the same as the traditional tag names, with each of these names also have an abbreviated form. The following table lists each traditional Perlshop tag, the item_data name equivalent, and the abbreviated form of that name.
| Traditional Perlshop Tag | ITEM_DATA Keyword | ITEM_DATA Abbreviation |
|---|---|---|
| item_id | id | i |
| item_name | name | n |
| item_option1 | option1 | o1 |
| item_option2 | option2 | o2 |
| item_option3 | option3 | o3 |
| item_price | price | p |
| item_shiptype | shiptype | s |
| item_taxtype | taxtype | t |
| item_weight | weight | w |
| qty | qty | q |
| qty_min | qtymin | qn |
| qty_max | qtymax | qx |
<input type=hidden name="item_id" value="pn324"> <input type=hidden name="item_name" value="Basic Widget"> <input type=hidden name="item_price" value="12.50"> <input type=hidden name="item_shiptype" value="free"> <input type=hidden name="item_weight" value="3.5"> <input type=text name="qty" value="1" size=4 maxlength=4> <input type=submit name="action" value="Order">
Using an item_data tag, this example can be reduced as follows:
<input type=hidden name="item_data" value="id:pn324|name:Basic Widget|price:12.50|shiptype:free|weight:3.5"> <input type=text name="qty" value="1" size=4 maxlength=4> <input type=submit name="action" value="Order">
Using the abbreviated forms of the item_data field names, this example can be reduced even further:
<input type=hidden name="item_data" value="i:pn324|n:Basic Widget|p:12.50|s:free|w:3.5"> <input type=text name="qty" value="1" size=4 maxlength=4> <input type=submit name="action" value="Order">