yes, that code sets a discount coupon.
if you want to replace the coupon with a flat discount, change that to:
function WAEC_Xcart_PromotionalDiscount() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0))) {
$totalDiscount += 4.95;//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
if you want to add a new discount rule, you will need to purchase eCart, we do not offer support for hand editing the ecart object.