Promotion Coupon Validator
Validates promotion coupon codes and removes invalid ones from the cart.
Overview
The Promotion Coupon Validator checks that all coupon codes applied to the cart are still valid. Invalid coupon codes are automatically removed from the cart, and a validation error is returned to notify the user.
Identifier
| Property | Value |
|---|---|
| Connector ID | promotionCouponValidator |
| Validation Type | Discount |
Behavior
- Skips validation entirely for replacement orders (carts tagged with the replacement order tag)
- If the cart has no coupon codes, validation passes
- Validates each coupon code against the promotion coupon service
- Collects all invalid coupon codes
- If any invalid codes are found:
- Removes them from the cart
- Marks the cart entity as updated
- Returns a validation error
Error messages
| Condition | Translation Key |
|---|---|
| Invalid coupon codes found | CouponCodeValidatorErrorMessage |
Configuration
No additional properties required.
