Please review your order and fill out the following shipping information. When finished, use the button at the bottom to send the order, or print the order and send via mail or fax to the address shown.
# table that outputs information from cookie array.
html "
\n
\n
Description | \n
Price | \n
Amt. | \n
Item Total | \n
\n"
set subtotal 0
# this foreach goes through each item in the list, checks the cookies array
# to see if present, and if so, outputs the appropiate information from the
# item array, with the quantity from the cookie. It also multiplies the
# quantity by the price to get the line total, and adds the value to the
# subtotal variable
foreach catalogitem $itemorder {
if {[catch {set quantity $cookies($catalogitem)} isthere] == 0} {
html "
\n
[lindex $item($catalogitem) 1] | \n
[lindex $item($catalogitem) 2] | \n
$[format "%.2f" [lindex $item($catalogitem) 0]] |
$quantity |
$[format "%.2f" [expr [lindex $item($catalogitem) 0] * $quantity]] |
"
set subtotal [expr $subtotal + [expr [lindex $item($catalogitem) 0] * $quantity]]
}
}
# this section emits the final part of the result table
html " \n Sub Total | \n $[format "%.2f" [set subtotal]] | \n \n
\n Texas Residents add 8% sales tax | \n \n \n
\n Total | \n \n \n
"
html " "
|