IDiscountCodeService
Validate, apply, and update discount codes.
Last updated
Usage
This scoped service uses the current order lines and culture settings when calculating a discount.
| Member | Purpose |
|---|---|
| ValidateDiscountCodeAndReturnFeedback(string, Cart) | Returns feedback for the user interface. |
| ApplyDiscount(string, Cart) | Applies a discount code to the cart. |
| CalculateDiscount(string, decimal) | Calculates a discount from the product total. |
| ValidateDiscountCodeInCart(Cart) | Checks a code already in the cart. |
| UpdateDiscountCodeInCart(Cart) | Recalculates the cart's discount code. |
Source: OptimusCommercev2.Core/Interfaces/IDiscountCodeService.cs · OptimusCommerce.Extension 17.94.0