Skip to Content
Former Member
Nov 17, 2016 at 11:02 AM

How to implement partial redemption of vouchers only for certain products?


When evaluating a custom promotion restriction we can remove products from the products collection and return RestrictionResult.ADJUSTED_PRODUCTS. As a result, the promotion will only be applied for the remaining products, thus making it possible to exclude certain products from the promotion.

Is there a way to accomplish the same behaviour for voucher restrictions? As far as I can tell, the function:

 protected boolean isFulfilledInternal(AbstractOrder abstractOrder) {
   // ...
   return false;

will only return true/false and as such decide about the redemption for the entire cart. There is another signature:

 protected boolean isFulfilledInternal(Product product)

as well, however, it seems if the above function returns false, the voucher will still be rejected for the entire cart.