Minimum Requirements Card
The MinimumRequirementsCard
enables a merchant to set the minimum subtotal or quantity for an automatic discount, or subtotal, quantity, or "no minimum" for code discounts.
Example code
Anchor link to section titled "Example code"
Name | Type | Description | Required |
---|---|---|---|
requirementType | Field<RequirementType> |
The field that controls the selected requirement type (none, minimum amount, or minimum quantity) | Yes |
subtotal | `Field<PositiveNumericString | undefined>` | The field for the subtotal minimum requirement. |
quantity | `Field<PositiveNumericString | undefined>` | The field for the quantity minimum requirement. |
discountMethod | DiscountMethod |
The discount method of the current discount (either code or automatic ). |
Yes |
appliesTo | AppliesTo |
Renders a string describing what entity the minimum requirements apply to (collections, selected products, or all products). | Yes |
currencyCode | CurrencyCode |
The currency code that should be used to format the input value | Yes |
isRecurring | boolean |
Whether the discount supports selling plans and adds selling plan specific language. | No |
Name | Value | Description |
---|---|---|
Collections | COLLECTIONS |
Applies to products in a collection. |
Order | ORDER |
Applies to the entire order. |
Product | PRODUCT |
Applies to specific products or variants. |
RequirementType
Anchor link to section titled "RequirementType"Name | Value | Description |
---|---|---|
None | NONE |
No requirements. (default) |
Subtotal | SUBTOTAL |
Applies to cart subtotal amount. |
Quantity | QUANTITY |
Applies to product quantities. |