Index  Up  <<  >>  


How to order an item

MiniVend 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 cart/page* database*]
named attributes: [order code="code" href="cart/page" base="database"]

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. The optional argument cart/page selects the shopping cart the item will be placed in (begin with / to use the default cart main) and the order page that will display the order. The optional argument database constrains the order to a particular products file -- if not specified, all databases defined as products files will be searched in sequence for the item.

Example:

  Order a [order TK112]Toaster[/order] 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.

[/order]
Expands into </a>. Used with the order element, such as: Buy a [order TK112]Toaster[/order] today.

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. Order the T-shirt from the more details page of the simple demo to see how it is done.


Index  Up  <<  >>