2.50. order
Expands into a hypertext link which will include the specified item in the list of products to order and display the order page.
2.50.1. Summary
[order code quantity]Link Text[/order] [order code=os28044 quantity=2]Link Text</A>
Parameters | Description | Default |
code | This is the unique identifier for the item, typically the SKU in the products table | none |
quantity | Quantity to order | 1 |
Attributes | Default |
interpolate (reparse) | No |
Other_Charactreristics | |
Invalidates cache | No |
Container tag | No |
Has end tag | No ([/order] is a macro for </A>) |
Tag expansion example:
[order os28044 2]Buy Framing Hammer[/order] --- <A HREF="http://localhost.localdomain/cgi-bin/tag72/ord/basket?\ mv_session_id=6CZ2whqo&mv_pc=1&mv_action=refresh&\ mv_order_item=os28044&mv_order_quantity=3">Buy Framing Hammer</A>
ASP-like Perl call:
$Tag->order($code, $quantity);
2.50.2. Description
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 code listed in one of the "products" databases.
2.50.3. 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 order tag creates a link-based order.
You can use the area tag with form variables if you need more control, for example, to change frames for the order:
<A HREF="[area href=ord/basket form="mv_order_item=os28044 mv_order_quantity=2 mv_action=refresh"]" TARGET=newframe> Order Framing Hammer</A>
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="os28044"> Order <INPUT NAME="mv_order_quantity" SIZE=3 VALUE=1> Framing Hammer <INPUT TYPE=submit VALUE="Order!"> </FORM>
Groups of items may be batched:
<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. Only items with a positive quantity will be placed in the basket.
Attributes like size or color may be specified at time of order. See the accessories tag for detail.