1.1. How to order an item
Interchange can either use a form-based order or a link-based order to place an item in the shopping cart. The link-based order uses the special [order item-code] tag:
[order code="sku" quantity="n"* href="page"* cart="cartname"* base="table"*] * = optional parameters
Expands into a hypertext link which will include the specified code in the list of products to order and display the order page. code should be a product SKU listed in one of the "products" tables, and is the only required parameter. quantity may be specified if more than one (the default) of the item should be placed in the cart. href allows some page other than the default order page to be displayed once the item has been added to the cart. cart selects the shopping cart the item will be placed in. The optional argument base constrains the order to a particular products file -- if not specified, all tables defined as products files will be searched in sequence for the item.
Order a [order TK112]Toaster</a> today.
Note that this is the same as:
Order a [page order TK112]Toaster</A> today.
You can change frames for the order with:
Order a <A HREF="[area order TK112]" TARGET=newframe>Toaster</A> today.
Expands into </a>. May be used to give the order tag the appearance of being a container tag, but neither necessary nor recommended.
To order with a form, you set the form variable mv_order_item to the item-code/SKU and use the refresh action:
<FORM ACTION="[process-target]" METHOD=POST> <INPUT TYPE=hidden NAME="mv_todo" VALUE="refresh"> <INPUT TYPE=hidden NAME="mv_order_item" VALUE="TK112"> Order <INPUT NAME="mv_order_quantity" SIZE=3 VALUE=1> toaster <INPUT TYPE=submit VALUE="Order!"> </FORM>
You may batch select whole groups of items:
<FORM ACTION="[process-target]" METHOD=POST> <INPUT TYPE=hidden NAME="mv_todo" VALUE="refresh"> <INPUT TYPE=hidden NAME="mv_order_item" VALUE="TK112"> <INPUT NAME="mv_order_quantity" SIZE=3> Standard Toaster <INPUT TYPE=hidden NAME="mv_order_item" VALUE="TK200"> <INPUT NAME="mv_order_quantity" SIZE=3> Super Toaster <INPUT TYPE=submit VALUE="Order!"> </FORM>
Items that have a quantity of zero (or blank) will be skipped, and only items with a positive quantity will be placed in the basket.
You may also specify attributes like size or color at time of order (see How to set up an order button).