THIS DOCUMENT DESCRIBES IVEND SPECIFIC MARKUP TAGS AND CONTAINERS.

<IVML>..</>
<HTML>..</>

The IVML and HTML containers are interchangable. They are the master containers that enable parsing of all other iVend tags. Each page within a store should contain the HTML/IVML container. All attributes are passed through the HTML/IVML container.

ATTRIBUTES

QUIET do not output HTML container. Only return the parsed contents of the container. (Optional)
EXTRAFIELDS 

<ICART>..</>

Display the Cart. Items in the cart to be updated and deleted.

You may specify as many fields from the products table to be included in the cart display in addition to the item's price, options selected and quantity. The first field specified by the FIELDS attribute will be displayed with a link to the product's information page.

Upon a successful access to the cart, the contents of this container are returned following the Cart Widget along with a TRUE result. If an error occurrs, a FALSE result will be returned, allowing the use of <ELSE>...</>.

ATTRIBUTES

FIELDS	A comma seperated list of fieldnames to include in the cart display.	(Optional)
NAMES	A comma seperated list of names to use as column headers in the cart display. If not specified, the cart will use the values from the FIELDS attribute.	(Optional)
CONT	If specified, the cart will display a button labeled "Continue" with the value of this attribute as the destination.	(Optional)
CHECKOUT_URL	If specified, the cart will display a button labelled "Check Out" with the value of this attribute as the destination.	(Optional)

<PROCEDURE>

Defines a procedure event, tag or container in pike. For more information,
see the iVend Programmer's Manual.


<ADDITEM>

Generates and responds to requests to add items to the session cart. 

This tag has two modes: generate and respond. To add an item, you must generate a request, then respond to that request. These two actions may occur on the same page, or a request generated on one page may be responded to on another. Multiple items may be added at one time. See the examples below for more details.

You do not have to use this tag to generate a request; a properly formatted form submission to a page with a listening <additem> tag will also work for this purpose. If you place multiple <additem> tags on one page, the first <additem> tag only will add the items.

If no arguments are supplied to this tag, <additem> will respond to requests only. A tag set to generate the request may also respond, allowing items to be added to the cart without requiring a visit to a different page.

When the ITEM attribute is present, the tag will generate a full or partial add item request. By default, a form is generated with an optional quantity input box, as well as a form submit button.

ATTRIBUTES

ITEM Product code of the item to be added. (Required for request generation)
NOFORM Do not produce the html form container. Use when manually generating part of the request, or when using multiple <additem> tags to add more than one item at a time to the session cart. (Optional)
SILENT Surpress display of a form submit button and quantity input box. (Optional)
SHOWQUANTITY Display a quantity input box as part of the request generation form. This attribute has no effect if the SILENT attribute is used. (Optional)
QUANTITY Default quantity to add or display (if SHOWQUANTITY attribute is present) for a particular item. If this attribute is not present, the default value is 1. (Optional)
ACTION The action page containing an <additem> tag for reception of the additem request. Has no effect when used with NOFORM. If not provided, the default value is the current page. (Optional)

EXAMPLES

To display a form for adding item ABC123 with a quantity box, use the following code:

<additem item="ABC123" showquantity>

To add item ABC123 and DEF456 to the cart, use the following:

<form action="my_additem_page.html">
<additem item="ABC123" quantity="1" noform silent>
<additem item="DEF456" quantity="1" noform>
</form>


<IVENDLOGO>

Displays either the iVend logo button with a link to the iVend web site or a large version of the iVend logo.

ATTRIBUTES

LARGE Displays a large version of the iVend logo. No link is included. (Optional)

EXAMPLES

The following code:

<ivendlogo>

Displays:

||Insert photo here||


<SESSIONID>

Returns the current shopping session indentifier, used to identify the browser to the iVend system during a shopping session.

ATTRIBUTES

None.

EXAMPLES

The following code:

<sessionid>

Returns:

S1234567890


<GENERATEVIEWS>

Generates Product lists that are grouped on a field in the individual product records. After generating groups of items, the item list is passed to <LISTITEMS> for the actual display of items.

ATTRIBUTES

TYPE select type of records to display. Valid value is PRODUCT. (Required)
FIELD determines which field is used to group by. All records are grouped by the value of this field. (Required)
ID designates the group to select products from. Must be a valid Group ID. (Optional)
All other attributes are passed to <LISTITEMS> when the products lists are generated.

EXAMPLES

The following code:

<GENERATEVIEWS TYPE="PRODUCT" FIELD="SubCategory" ID="PRODGRP21">

will generate a series of item listings that contain all products in group PRODGRP21. The items will be displayed in groups organized by the value of the field SubCategory.


<LISTITEMS>

Generates lists of items (product or group) formatted for display and browsing. If the query returns no items, a <FALSE> tag is returned, allowing use of the <ELSE>..</> container.

ATTRIBUTES
HEADLINEBGCOLOR	Specifies the background color of the title bar. (Optional)
HEADLINEFONTCOLOR Specifies the color of the title bar font. (Optional)
LISTBGCOLOR Specifies the background color of odd item bars. (Optional)
LISTBGCOLOR2 Specifies the background color of even item bars. (Optional)
LISTFONTCOLOR Specifies the color of the item list font. (Optional)
FIELDS Specifies the fields to display in the item list. (Required)
NAMES Specifies alternate names for fields in the item list. (Optional)
TYPE Specifies the type of item to generate. Valid options are PRODUCTS, GROUPS, or CUSTOM. (Required)
QUERY If a TYPE of CUSTOM is specified, use this SQL query to select items. (Optional)
PARENT If a TYPE of GROUPS is specified, select groups with this parent id. (Optional)
SHOW If not present, this tag will return all items. If present, this tag will filter on items with a status of "A". If a value is presented, this tag will filter on items with a status of "VALUE". (Optional)
LIMIT If present, the tag will limit like an addition to an SQL WHERE clause. (Optional) 
ORDER If present, the tag will order the results of the item selection by "VALUE". (Optional)
QUIET If this attribute is specified and no items are returned, the tag will return nothing. Otherwise, a message indicating the situation will be returned. (Optional)
TEMPLATE If present, the tag will add a TEMPLATE specification of VALUE to the Item's link. (Optional)
TITLE If present, this tag will return VALUE in a <listitemstitle>...</> container. (Optional) 
MODULO Specifies the number of lines in each color band. Default value is 1. (Optional)

EXAMPLES


<A>...</>

This modified version of the <A>...</> tag handles session tracking and also provides some shortcuts to common iVend paths. The contents of the container will be contained within the <A>..</ container.

ATTRIBUTES
HREF Specifies the location of a file to be linked to. (Optional)
PARSE If specified, the contents of HREF will be parsed. (Optional)
EXTERNAL Specifies that session tracking be disabled for this link. (Optional)
REFERER Specifies that the link will point back to previous page. Overrides HREF. (Optional)
ADD Causes a link to be generated that will cause the current item to be added to the cart. (Optional)
CART Generates a link to the current shopping cart. (Optional)
CHECKOUT Generates a link to the checkout location. (Optional)
TEMPLATE When link is to a product or group, specifies the template to use. (Optional)

All other attributes are passed on to the browser.


<IVSTATUS>

Displays session status information such as items added to the session cart. Returns a <STATUS>...</> container for each status message.

<IVMG>

Displays an image associated with an item. May be an image attached to a product/group, or an image stored in the appropriate images directory. <IVMG> sets the image size attributes of the image if the image is in GIF, JPEG or PNG format.

ATTRIBUTES

FIELD If specified, will return the image attached to field VALUE for the current item. (Optional) 
SRC If specified, will return the image VALUE located in the directory $STOREROOT/html/images/. (Optional)


<FORM>..</>

The <FORM>..</> container has been modified to provide session tracking capabilities. All arguments to the form container are passed through to the browser.


<CATEGORY_OUTPUT>..</>

The <CATEGORY_OUTPUT>..</> container allows custom output for groups and types based using the features available in the Roxen <*OUTPUT>...</> containers.

If one or more <FORMROTATE>..</> containers are present within the contents of this container, the contents of the <FORMROTATE>..</> containers will be used in a rotating fashion as input to the <CATEGORY_OUTPUT>..</> container, allowing more complex markup to be generated.

ARGUMENTS

TYPE Selects the type of record to operate on. Legitimate values include PRODUCTS or GROUPS. (Required unless using QUERY attribute below)
SHOWALL If TYPE attribute is set to PRODUCTS, all items will be returned, regardless of their status with a group. (Optional)
SHOW If selected, only items with a status of 'A / Active' will be eligible for selection. (Optional)
RESTRICTION Allows further eligibility restriction. Value must be a valid SQL where substring. (Optional)
ORDER Allows ordering of the selected items. The value of this attribute should follow SQL syntax for the ORDER BY clause. (Optional)
PARENT If TYPE attribute is set to GROUPS, only those items with a Parent field equal to the value of this attribute will be eligible for selection. Alternately, if a form variable "parent" is present, the value of that will be used instead. The value of this attribute should either be empty ('') or the ID/primary key value of another group. (Optional)
QUERY Bypasses all other listed arguments by passing a SQL statement directly to the underlying database system. (Optional)
RANDOM If used with <FORMROTATE>..</> containers, the order of <FORMROTATE>..</> will be randomly selected. (Optional)

Additionally, all attributes supported by the <FORMOUTPUT>..</> container are available for use by <CATEGORY_OUTPUT>..</>.


<FORMROTATE>..</>

This container is used within the <CATEGORY_OUTPUT>..</> container, and is only active within that container.


<ITEMOUTPUT>..</>

<ITEMOUTPUT>..</> generates output for an item (GROUP or PRODUCT) using same facility as other Roxen <*OUTPUT>..</> containers.

ATTRIBUTES

ITEM Specifies the item to use as source for the output. (Required when not used on a Group/Product page, or when the current Group/Product is not the desired source)
TYPE Specifies the type of item as source. Legitimate values for this attribute are PRODUCT or GROUP. (Required when the current item scope is not the same as the desired output type)
EXTRAFIELDS Allows additional or calculated fields to be included for use in the output of this container. Value should be legitimate SQL field specifications- field as 'field1', COUNT(*) as 'field2', etc. (Optional) 

Additionally, all attributes recognized by <FORMOUTPUT>..</> are available for use within this container.


<IVINDEX>..</>

<IVINDEX>..</> generates output for all configured Stores using the same facility as other Roxen <*OUTPUT>..</> containers. This tag is only available on the iVend Module Index Page ($IVENDROOT/data/index.html), and is displayed if the Appropriate Global Settings are enabled. The data fields available are the same as the variable names used in the Store configuration files located in $CONFIGDIR/.

ATTRIBUTES

This tag takes all attributes supported by the <FORMOUTPUT>..</> container.


<ITEMOPTIONS>

Lists the options available for an item using SELECT inputs. This tag should be used within a <FORM>..</> container with an <ADDITEM> tag. Option types will be presented in the order in which they were defined for an item. The order of individual options will be that which the items were originally defined for the item unless the ORDER attribute (see below) is used.

ATTRIBUTES

ITEM Sets the Product ID for which options will be displayed (Required)
ORDER Sets the Order by which individual options will be displayed within an option type.


complex_pricing 

MARKUP AVAILABLE THROUGH THE UPSELL MODULE

<UPSELL>

This tag displays an "Upsell" dialog, which entices shoppers to select items that may be useful or handy to with an item on display. The items to upsell are added in the admin interface page for a particular item. This tag should be used within a form container that also contains an <ADDITEM> tag.

ATTRIBUTES

ITEM Sets the Product ID for which Upsell Items will be displayed. If not provided, the tag will guess the proper item. May not work properly if multiple items are used on one page. (Optional)


MARKUP AVAILABLE THROUGH THE CHECKOUT MODULE


<SHIPPINGCOST>

This tag displays the shipping cost calculated for an order. If an order cannot be found, or if shipping has not been added, this tag returns "0.00".

ATTRIBUTES

ORDERID The order ID to display the shipping cost for. If not specified, the current session or orderid will be used. (Optional)


<SHIPPINGCALC>

ATTRIBUTES

TYPE The numeric Shipping Type to calculate cost for. (Required)
ORDERID The order ID to calculate the shipping cost for. If not specified, the current session or orderid will be used. (Optional)


<SHIPPINGTYPE>

This tag displays the selected shipping type for an order. If the shipping type has not yet been selected, an error will be returned.

ATTRIBUTES

ORDERID The order ID to display the shipping type for. If not specified, the current session or orderid will be used. (Optional)


<SHIPPINGADD>

Adds shipping charge to an order.

ATTRIBUTES

TYPE The integer shipping type identifier. Not required if this information is supplied as a form variable "type".
ORDERID The order ID to operate on. If not specified, the current session or orderid will be used. (Optional)
CHARGE The amount for shipping to add to the order. If not specified, the amount will be dynamically calculated using defined shipping rules. (Optional)


<SHIPPINGTYPES>

The <SHIPPINGTYPES> tag will query available shipping types and provide a list of valid options with radio buttons. This tag should be used on a page immediately before a <SHIPPINGADD> container.

ATTRIBUTES

This tag takes no attributes.


<CONFIRMEMAIL>

This tag will verify the validity of an email address by contacting the user's remote mail service and performing an identity check. This tag may return false positives depending on the configuration of the remote mail host.

ATTRIBUTES

One of the following attributes is required.

FIELD The name of the form field that will contain the email address. All letters in the field name must be lower case. (Optional)
EMAIL The value of this attribute is the email address to verify. (Optional)


<CONFIRMORDER>

This tag will confirm the customer's session information and place it as a new incoming order into the iVend system. This tag is responsible for sending confirmation email messages as follows:

	notes/confirm.txt is sent to the customer.
	notes/notify.txt should be sent to individual(s) responsible for checking new orders.

ATTRIBUTES

This tag takes no attributes.


<SALESTAX>

The <SALESTAX> tag will calculate salestax for the order based upon the taxable flag set for each item and rules set in the Sales Tax Administration interface. The tag will accept an order id as an attribute, or in the absence of this attribute, will use the current session or order identifier.

ATTRIBUTES

ORDERID Use this orderid to calculate salestax. (Optional)


<GENERATEFORM>

This tag will generate an HTML form based upon the design of a table in the store database. This tag is useful for creating input forms for checkout steps like shippig and billing address collection. This tag may also be used to generate a form that may then be modified to suit the particular design of a store. This tag will generate a form compatibile with the <ADDENTRY> tag.

ATTRIBUTES

TABLE The table to use as the basis of the generated form. (Required)
AUTOFILL If specified, this will cause the form to be filled with data already in the table for a given session or order identifier. This attribute may be used with the ORDERID and TYPE attributes. (Optional)
ORDERID The order ID to operate on. If not specified, the current session or orderid will be used. (Optional)
TYPE If a table may have more than one record for a given identifier, this attribute may be included to specify a secondary key "type" which must be present in the specified table. (Optional)
EXCLUDE If specified, this comma separated list of fieldnames will be excluded from the generated field. The excluded fields must not be mandatory, though. (Optional)
HIDE If specified, this comma separated list of fieldnames will be hidden from the form (using hidden input fields). (Optional)
PULLDOWN If specified, this comma separated list of fieldnames will be created as pulldown menus, using options specified using the "Dropdown Menu Administrator." (Optional)


<ADDENTRY>

This tag will insert the data collected by the <GENERATEFORM> tag into the specified table. This tag should appear on a page immediately following a page containing <GENERATEFORM>.

ATTRIBUTES

NOFLUSH Do not delete any old records for this identifier and table. The default behavior is to remove any records already present before  the insert takes place. (Optional)

 
<CARDCHECK>

This tag will verify a credit card number's checksum using a LOG10 algorithm. Default values for this tag will work with the supplied default store configurations.

ATTRIBUTES

CARD_NUMBER the HTML field name containing the card account number. (Optional)
EXPDATE the HTML field name containing the card's expiration date. (Optional)
CARDTYPE the HTML field name containing the card type. (Optional)


<SUBTOTAL>

The <SUBTOTAL> tag will calculate subtotal for the order based upon the sum of taxable and nontaxable items selected for purchase. The tag will accept an order id as an attribute, or in the absence of this attribute, will use the current session or order identifier.

ATTRIBUTES

ORDERID Use this orderid to calculate the subtotal. (Optional)


<GRANDTOTAL>

The <GRANDTOTAL> tag will calculate the grand total for the order based upon the sum of subtotal, other lineitems such as shipping, and salestax. The tag will accept an order id as an attribute, or in the absence of this attribute, will use the current session or order identifier.

ATTRIBUTES

ORDERID Use this orderid to calculate the subtotal. (Optional)


<SHOWORDER>

The <SHOWORDER> tag will list the items selected for purchase as an HTML table. The tag will accept an order id as an attribute, or in the absence of this attribute, will use the current session or order identifier.

ATTRIBUTES

FIELDS A comma separated list of fields to include in the table. Valid fields include those in the sessions or products table. (Required)
NAMES A comma separated list of names to display as headers at the top of the HTML table. If not included, the field names will be substituted. (Optional)
ORDERID Use this orderid to retrieve data for. (Optional)


MARKUP AVAILABLE THROUGH PROCEDURES

<RELATEDGROUPS>

This tag lists groups (with links) that an item is included in. This tag
is defined in the file library/standard_tags.

ATTRIBUTES

ITEM If specified, use this item id. If not specified, the item of the current page will be used. (Optional) 


<GROUPMAP>

This tag lists the groups (with links) that are parents of the current group. This tag is defined in the file library/standard_tags.

ATTRIBUTES

ITEM If specified, use this item/group id. If not specified, the item of the current page will be used. (Optional) 
