CouponManager
class CouponManager
Manage how Coupons could interact with a Checkout
Methods
Constructor
Get Discount for the given Coupons
No description
Check if there is a Coupon removing Postage
No description
Add an available CouponManager (Services)
Get all available CouponManagers (Services)
Add an available ConstraintManager (Services)
Get all available ConstraintManagers (Services)
Clear all data kept by coupons
Decrement this coupon quantity
Details
at line 54
__construct(
ContainerInterface $container)
Constructor
at line 65
float
getDiscount()
Get Discount for the given Coupons
at line 91
mixed|void
pushCouponInSession($code)
at line 103
bool
isCouponRemovingPostage(
Order $order)
Check if there is a Coupon removing Postage
at line 175
array
getCouponsKept()
at line 261
addAvailableCoupon(
CouponInterface $coupon)
Add an available CouponManager (Services)
at line 271
array
getAvailableCoupons()
Get all available CouponManagers (Services)
at line 281
addAvailableCondition(
ConditionInterface $condition)
Add an available ConstraintManager (Services)
at line 291
array
getAvailableConditions()
Get all available ConstraintManagers (Services)
at line 299
clear()
Clear all data kept by coupons
at line 319
int
decrementQuantity(
Coupon $coupon,
int|null $customerId = null)
Decrement this coupon quantity
To call when a coupon is consumed