I have a specific requirement.
Buy 2 of same item (no need to color match) and Get 1 of them 50% Off.
Case 1 :-
Here the main thing is that if there are two simple products
Red and Green of an configurable product and each has qty 1 in the
cart then 50% discount of any one of the item should be given to the
customer. So let say
Red -> $50 qty 1
Green -> $50 qty 1
============
SubTotal = $100
Discount = $25
Grand Total = $75
Case 2:- The next case is that if there is just a simple product and
if it has 2 qtys in the cart then also 50% of the price should be
deducted from the cart.
Red -> $50 (qty 2)
============
SubTotal = $100
Discount = $25
Grand Total = $75
case 3 :- is the combination of case 1 and case 2 . It should work even if both the above cases are there in cart.