AbstractDiscountType
abstract class AbstractDiscountType implements DiscountTypeInterface (View source)
Properties
$discount | The instance of the discount. |
Methods
Collection
bool
int
usesByUser(Authenticatable $user)
Check how many times this discount has been used by the logged in user's customers
Details
AbstractDiscountType
with(Discount $discount)
Set the data for the discount to user.
AbstractDiscountType
markAsUsed(Cart $cart)
Mark a discount as used
protected Collection
getEligibleLines(Cart $cart)
Return the eligible lines for the discount.
protected bool
checkDiscountConditions(Cart $cart)
Check if discount's conditions met.
protected AbstractDiscountType
addDiscountBreakdown(Cart $cart, DiscountBreakdown $breakdown)
Check if discount's conditions met.
protected int
usesByUser(Authenticatable $user)
Check how many times this discount has been used by the logged in user's customers