Summary Card
The SummaryCard
component displays basic information about the state of a discount and can display more advanced configuration options if any OptionalSectionsProps
are passed. None, any, or all optional sections can be displayed. We recommend displaying as many sections as you have data for, in order to give as much information to the merchant about their discount as possible.
Example code
Anchor link to section titled "Example code"
Name | Type | Description | Required |
---|---|---|---|
header | HeaderProps |
The header properties. | Yes |
performance | PerformanceProps |
The performance sections properties. | Yes |
activeDates | ActiveDatesProps |
Displays the start and end dates of the discount. | No |
additionalDetails | string[] |
Additional text that you want to display. | No |
appliesToPurchaseType | AppliesToPurchaseTypeProps |
The purchase type that the discount applies to (one time, subscription, or both). | No |
combinations | CombinationsProps |
How the discount combines with other discounts. | No |
customerEligibility | CustomerEligibilityProps |
Which customers the discount applies to. | No |
maximumShippingPrice | MaximumShippingPriceProps |
The maximum allowable shipping price that the discount can apply to. | No |
minimumRequirements | MinimumRequirementsProps |
The minimum purchase requirements for the discount to apply. | No |
recurringPayment | RecurringPaymentProps |
How the discount applies to orders with recurring payments. | No |
selectedCountries | SelectedCountriesProps |
The countries that the discount applies to. | No |
usageLimits | UsageLimitsProps |
The number of times that the discount can be used. | No |
HeaderProps
Anchor link to section titled "HeaderProps"Name | Type | Description | Required |
---|---|---|---|
discountMethod | DiscountMethod |
The method of the current discount (either code or discount ). |
Yes |
appDiscountType | string |
The discount type of the current discount. This value should be the appDiscountType.title returned from the API. |
Yes |
discountDescriptor | string |
The discount title for automatic discounts, or the discount code for code discounts. | Yes |
isEditing | boolean |
Whether the discount is currently being edited. | No |
discountStatus | DiscountStatus |
The status of the discount. | No |
PerformanceProps
Anchor link to section titled "PerformanceProps"Name | Type | Description | Required |
---|---|---|---|
isEditing | boolean |
Whether the discount is currently being edited. | Yes |
status | DiscountStatus |
The status of the discount (active, expired, or scheduled). | No |
usageCount | number |
The number of times that the discount has been used. | No |
hasReports | boolean |
Whether the shop has enabled the reports feature. |
No |
discountMethod | DiscountMethod |
The discount method (either code or automatic ). Used to control whether a text input or a code generator is shown. |
No |
totalSales | MoneyInput |
The total number of sales that have been made with the discount. | No |
ActiveDatesProps
Anchor link to section titled "ActiveDatesProps"AppliesToPurchaseTypeProps
Anchor link to section titled "AppliesToPurchaseTypeProps"Name | Type | Description | Required |
---|---|---|---|
purchaseType | PurchaseType |
The purchase type that the discount applies to (one time, subscription, or both). | Yes |
CombinationsProps
Anchor link to section titled "CombinationsProps"Name | Type | Description | Required |
---|---|---|---|
combinesWith | CombinableDiscountTypes |
The discount classes that can be combined with this discount. | Yes |
CustomerEligibilityProps
Anchor link to section titled "CustomerEligibilityProps"Name | Type | Description | Required |
---|---|---|---|
eligibility | Eligibility |
Who the discount applies to (all customers, specific customers, specific customer groups). | Yes |
selectedCustomerSegments | CustomerSegment[] |
The specific customer segments that the discount applies to. | No |
selectedCustomers | Customer[] |
The specific customers that the discount applies to. | No |
MaximumShippingPriceProps
Anchor link to section titled "MaximumShippingPriceProps"Name | Type | Description | Required |
---|---|---|---|
maximumShippingPrice | PositiveNumericString |
The maximum shipping price, displayed when the user selects to exclude shipping rates. | Yes |
currencyCode | CurrencyCode |
The currency code that should be used to format the input value. | Yes |
MinimumRequirementsProps
Anchor link to section titled "MinimumRequirementsProps"Name | Type | Description | Required |
---|---|---|---|
requirementType | RequirementType |
The type of minimum requirement (none, subtotal, or quantity). | Yes |
quantity | PositiveNumericString |
The minimum quantity requirement for the discount. | No |
subtotal | PositiveNumericString |
The minimum subtotal requirement for the discount. | No |
currencyCode | CurrencyCode |
The currencyCode that should be used to format the subtotal amount. | No |
RecurringPaymentProps
Anchor link to section titled "RecurringPaymentProps"Name | Type | Description | Required |
---|---|---|---|
isRecurring | boolean |
Whether a discount is applicable for recurring payments. | Yes |
recurringPaymentType | RecurringPaymentType |
The type of recurring payments (first payment, multiple payments, or all payments). | Yes |
recurringPaymentLimit | PositiveNumericString |
If the discount is available for RecurringPaymentType.MultiplePayments, then this value displays how many payments the discount is available for. | No |
SelectedCountriesProps
Anchor link to section titled "SelectedCountriesProps"Name | Type | Description | Required |
---|---|---|---|
countrySelectionType | CountrySelectionType |
The country selection type that the discount applies to (either all countries or selected countries). | Yes |
selectedCountries | CountryCode[] |
The list of country codes where the discount applies. | Yes |
UsageLimitsProps
Anchor link to section titled "UsageLimitsProps"Name | Type | Description | Required |
---|---|---|---|
totalUsageLimit | `PositiveNumericString | null` | The total number of times that a discount can be used. |
oncePerCustomer | boolean |
Whether a discount can only be used once per customer. | Yes |