on the discounts tab, crate a new discount rule.
set the trigger to use:
Session Variable 'CustDiscount' exists
AND
total number of unique items in the cart > 0
set the calculation to use the Based on cart subtotal condition:
Subtotal of cart 'times' '$_SESSION['CustDiscount']'