Method | Description | Returns |
---|---|---|
hasAnyAssociatedCodeByList(array $codes) | Checks if the discount has assigned any code of the provided list. | bool |
getCodesCount() | Returns the total count of the codes assigned to the discount. | int |
getId() | int | |
getName() | string | |
getPosition() | int | |
isFinal() | Once the discount is applied, further discounts will not be considered | bool |
getMaxUses() | The maximum number of times the discount can be used. The discount is considered used when a checkout is created with it. It stays used when an order is placed. Canceled orders, requested refunds, etc. do not cancel the fact of the usage. | int |
getCreated() | Date the record was created. | DateTime |
getModified() | Last modification date for the record. | DateTime |
getFrom() | Start date for discount availability, not applied prior to this date. If not set, the discount is available immediately. | DateTime |
getTo() | End date for discount availability, not applied after this date. If not set, the discount does not expire. | DateTime |
getSite() | Site | |
getRules() | Collection (Rule) | |
getCodes() | Collection (Code) | |
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 |
Discounts\Models\Frontend\Discount
Discount