MagicSmoke
$VERSION$
|
This class verifies that the rules of a coupon are adhered to. More...
Public Member Functions | |
__construct ($couponid) | |
create a new verifier object More... | |
isUseableOrNull () | |
checks that the coupon can be used More... | |
verify ($eventplan) | |
verify the contents of the event plan More... | |
Static Public Member Functions | |
static | applyToCart ($cartid) |
applies the coupon to the WebCart More... | |
This class verifies that the rules of a coupon are adhered to.
Also used to execute those rules on the Cart before ordering.
CouponVerifier::__construct | ( | $couponid | ) |
create a new verifier object
References WOCoupon\fromTablecoupon(), and WTcoupon\getFromDB().
|
static |
applies the coupon to the WebCart
References $db, WOCoupon\fromTablecoupon(), WOEventAbstract\fromTableevent(), WTevent\getFromDB(), WTcart\getFromDB(), WTcoupon\getFromDB(), and WTcartticket\selectFromDB().
Referenced by WebCart\createCartOverview().
CouponVerifier::isUseableOrNull | ( | ) |
checks that the coupon can be used
Referenced by verify().
CouponVerifier::verify | ( | $eventplan | ) |
verify the contents of the event plan
References WOCartTicket\Invalid, isUseableOrNull(), and tr().