| Property | Description | Returns |
|---|---|---|
| productIds | Gets the product IDs for this condition. | array |
| quantityFrom | Gets a minimum quantity of the product that needs to be in the cart to apply the discount. | int |
| quantityTo | Gets a maximum quantity of the product that can be in the cart to apply the discount. Can be 0 to exclude the product from the cart. | int |
| allowed | Checks if the condition set to allow a product. If is allowed when not forbidden. | bool |
| forbidden | Checks if the condition set to forbid a product. It is forbidden when either "quantity to" or "amount to" are set to 0. | bool |
| amountFrom | Gets a minimum price amount of the product that needs to be in the cart to apply the discount. | string |
| amountTo | Gets a maximum price amount of the product that can be in the cart to apply the discount. | string |
| displayType | Returns the nice name of a condition type | string |
| type | Returns the type of condition | string |
| snakeType | Returns the type of condition in the snake case format: lowercase and connected by underline | string |
| slugType | Returns the type of condition in the slug format: lowercase and connected by hyphen | string |
| id | int | |
| name | string | |
| data | array | |
| active | bool | |
| created | Date the record was created. | DateTime |
| modified | Last modification date for the record. | DateTime |
| rule | Rule |
Discounts\Models\Api\ProductCondition
Product condition describes the conditions that need to be met for the discount to be applied; based on product quantity or price that is in the current cart. Set "quantityTo" value to 0 to "exclude" the product from the cart; i.e. when the added product is in the cart, the discount is not applied.