Method |
Description |
|
canApply ( ) : boolean |
Checks to see if we can apply the coupon. |
|
checkMinAmount ( $minAmount, $throwErrors = true ) : boolean |
Checks the minimum subtotal needed to apply the coupon. |
|
checkValidTimes ( Carbon\Carbon $startDate, Carbon\Carbon $endDate, $throwErrors = true ) : boolean |
Checks to see if the times are valid for the coupon. |
|
getFailedMessage ( ) : null | string |
Gets the failed message for a coupon. |
|
getMessage ( ) : string |
Get the reason why a coupon has failed to apply. |
|
maxDiscount ( $maxDiscount, $discount, $throwErrors = true ) : mixed |
Returns either the max discount or the discount applied based on what is passed through. |
|
setDiscountOnItem ( CartItem $item, $discountAmount ) |
Sets a discount to an item with what code was used and the discount amount. |
|
setOptions ( $options ) |
Sets all the options for the coupon. |
|