Frontend | Backend | Api

Discounts\Models\Backend\CartCondition

Cart condition describes the conditions that need to be met for the discount to be applied; base on current cart quantity or price. The value that is set is included, e.g. the "less/more or equal" condition is used.

Method Description Returns
getQuantityFrom() Gets a minimum number of items that need to be in the cart to apply the discount. int
getQuantityTo() Gets a maximum number of items that can be in the cart to apply the discount. int
getAmountFrom() Gets a minimum price amount that needs to be in the cart to apply the discount. string
getAmountTo() Gets a maximum price amount that can be in the cart to apply the discount. string
getDisplayType() Returns the nice name of a condition type string
getType() Returns the type of condition string
getSnakeType() Returns the type of condition in the snake case format: lowercase and connected by underline string
getSlugType() Returns the type of condition in the slug format: lowercase and connected by hyphen string
getId() int
getName() string
getData() array
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
getIcon() Returns the icon that represents the type string