This object is created for the first time in the xt_orderform_additem.asp file when the customer adds an item to the basket. Subsequently, an instance of the OrderForm object is created whenever necessary by either the DBStorage.LookupData or the DBStorage.GetData method, and the order form data is read into it.
Use the Active Server Pages (ASP) Server object’s CreateObject method to create a OrderForm object, as follows:
REM -- create a new orderform:
set orderForm = Server.CreateObject("Commerce.OrderForm")
The OrderForm object is defined internally as a structured group of SimpleList and Dictionary objects, and includes the methods required to add items, clear items, and clear the entire OrderForm itself.
The following illustration represents a typical structure for this object. Individual sites may delete or add properties as needed.
The base of the OrderForm object is a Dictionary object that contains information that describes the entire order. This includes customer information, such as the shopper ID, name, and address, as well as order cost information, such as purchase subtotal, tax, shipping, and total.
The order form does not directly support storage of its data on disk. The DBStorage object enables persistent storage of order form data.
A number of the elements of the OrderForm’s base Dictionary object include underscore (_) characters. The appearance of an underscore character in an element name indicates that these items are not saved to the site’s order form storage. These elements are saved instead to the site’s receipt storage when the purchase is finalized.