I am looking for possible approaches by which we can achieve limiting the cart entries (qualifying products) on which promotion can be applied in Hybris 2011 version.
CONDITION - Qualifying products - Product A, Product B, Product C, Product D
ACTION - Fixed 100 discount on product
CART contains Product A, Product C and Product D that qualify for the promotion
OOTB - Applies product discount on all products (i.e. Product A, Product C and Product D)
How can I achieve to apply product discount only on first two products i.e. Product A, Product C
Is there any way to achieve using OOTB or do we need to customize the condition/action?
Appreciate any responses here.
We was also facing the same issue then we developed the upper limit cap every where like in productPromotion, cartPromotion etc.
Like wise you can write maximum product Allowed, but see if by default anything is there.
Otherwise u can write like:
-> You can define your own Action by extending the nearest satisfying action class.
-> From the action context, RuleActionContext get all the entries. You will see that the promotions are applying in loop of OrderEntries with qulalifying product, you just execute the action for your desired no of entries. [Here, like Apply for only 2 products] and set performActionInternal method as true.
I am attaching the some code of mine for more understandable.
Attaching some screen-shot and java class for reference.code-promotion.txt