Frontend | Backend | Api

Discounts\Models\Backend\UsageCondition

Usage condition describes the conditions that need to be met for the discount to be applied; based on usage quantity or total discount price. When no user ID or user group ID is set, the condition applies to the current user. When a user ID is set, the condition applies to that specific user. When a user group ID is set, the condition applies to all users in that group.

Method Description Returns
getQuantityFrom() Gets a minimum number of usages that need to be applied for the discount to be active. int
getQuantityTo() Gets a maximum number of usages that can be applied for the discount to remain active. int
getPriceFrom() Gets a minimum total discount price amount that needs to be used for the discount to be active. string
getPriceTo() Gets a maximum total discount price amount that can be used for the discount to remain active. string
getId() int
getName() string
getData() string
isActive() bool
getCreated() Date the record was created. DateTime
getModified() Last modification date for the record. DateTime
getRule() Rule
isNewRecord() Check if the record is a new record bool
isHierarchicalModel() Check whether a model is a hierarchical model, i.e. can have children bool
isVersionedModel() Check whether a model is versioned bool