To display a shopping cart full of items (or update some header or line item information in the cart), send WebDNA a ShowCart command. WebDNA looks for any new values of header fields in the form and sets the corresponding fields in the cart. It also looks for any numbered line item information, such as "quantity3=39" and modifies the corresponding line item values in the cart. See Purchase and Add
Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):
You may set any of the same variables as with a Purchase command by putting named form variables into the form. Some are optional, and any you do not explicitly set remain unchanged from their previous values obtained from Add or ShowCart commands. Any formulas you defined will be applied and calculated before showing the contents of the cart.
In addition to the values you may set when displaying the cart, you may also display the following pre-calculated values:
Value | Description |
---|---|
GrandTotal
|
Calculated final purchase cost, based on price of all lineitems, quantites, base shipping cost, unit shipping cost, and taxRate. |
SubTotal
|
Total cost of all items, before shipping and tax. |
TaxableTotal
|
Total cost of all items that are marked as taxable. |
TaxTotal
|
Tax on taxable items. |
ShippingTotal
|
Total cost of shipping based on unitShipCost of all items and base shipping charge. |
NumLineItems
|
Number of line items in the order. |