this code:
$this->TotalColumn("TotalPrice")
returns the subtotal of the Price * Quantity for each line item
it does not take into account shipping, or the other voucher code.
to have both a coupon code system and a voucher code system like this in place, you will need to have 2 forms, one to enter the coupon code and store it to a session
one to enter the voucher code and store it in a separate session
the discount rules would be triggered on the separate sessions.
if you are using a database for storing the discount percentages, you will need to have a recordset that looks up the entered coupon code, then stores the percentage in a session and use the session in the discount rule.
I can give you a broad outline here, if you need further assistance in setting this up, i suggest signing up for a premiere support appointment.