DiscountServiceStrategyInterface
Interface for custom discount service strategy implementations. Allows you to define how discount codes are applied in your store.
Methods
applyDiscount()
applyDiscount(
params):Promise<unknown>
Applies a discount code to the cart.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | { discountCode: string; } | Parameters for applying discount |
params.discountCode | string | The discount code to apply |
Returns
Promise<unknown>
Promise that resolves when discount is applied