You can register your own discount function which should return the discount in dollars
WTCart::registerCartDiscountFunction()
Note: for this to work, the wtOrder Node Type needs to have the "Discount" money attribute
Example give a 10% discount:
<?php
class CartDiscount {
public static function getDiscount($args) {
$cart = new WTCart();
$total = $cart->getTotal();
return $total * 0.1;
}
}
return WTCart::registerCartDiscountFunction(Array("CartDiscount", "getDiscount"));
?>